@import url("https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Outfit:wght@400;500;600;700;800&display=swap");.toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  background: rgba(15, 15, 26, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  min-width: 200px;
  max-width: 90vw;
}

.toast-success {
  border-left: 3px solid var(--color-accent-success);
}

.toast-info {
  border-left: 3px solid var(--color-accent-hero);
}

.toast-error {
  border-left: 3px solid var(--color-accent-warm);
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  color: var(--color-accent-success);
}

.toast-info .toast-icon {
  color: var(--color-accent-hero);
}

.toast-error .toast-icon {
  color: var(--color-accent-warm);
}

.toast-message {
  font-size: 0.9rem;
  font-weight: 500;
  flex-grow: 1;
}

.toast-close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 50%;
  transition: all 0.2s;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
}
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  pointer-events: none;
}

.toast-container > * {
  pointer-events: auto;
}  position: relative;
  overflow: hidden; /* Contain noise */
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  backdrop-filter: blur(24px); /* Smoother blur */
  -webkit-backdrop-filter: blur(24px);

  /* Physical Glass Effect: Inner Highlight + Rim */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2), /* Brighter top edge */
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);

  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  border: none;
}

/* Noise Texture Overlay */
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg-noise);
  opacity: 0.6;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}

/* Ensure content stays above noise */
.glass-card > * {
  position: relative;
  z-index: 1;
}

.glass-card.clickable {
  cursor: pointer;
}

.glass-card.clickable:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.06) 100%
  );
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.glass-card.clickable:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Light mode variant */
@media (prefers-color-scheme: light) {
  .glass-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }
}
.landing-page {
  background: #050508;
  color: #e2e8f0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  --accent-primary: #6366f1;
  --accent-secondary: #a855f7;
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.05;
  pointer-events: none;
  z-index: 50;
}

.gradient-blob {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  opacity: 0.15;
  pointer-events: none;
}

.top-left {
  top: -200px;
  left: -200px;
  background: #4f46e5;
}

.bottom-right {
  bottom: -200px;
  right: -200px;
  background: #9333ea;
}

.landing-nav {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4rem;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.login-link {
  color: var(--text-secondary);
  font-weight: 600;
  transition: color 0.2s;
}

.login-link:hover {
  color: white;
}

.register-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.6rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.2s;
}

.register-btn:hover {
  background: white;
  color: black;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem;
  position: relative;
  z-index: 10;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 2rem;
  letter-spacing: -0.04em;
}

.gradient-text {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.italic-serif {
  font-family: var(--font-serif, Georgia, serif);
  font-style: italic;
  font-weight: 400;
}

.hero-sub {
  max-width: 800px;
  font-size: 1.25rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 3rem;
}

.hero-ctas {
  display: flex;
  gap: 1.5rem;
}

.primary-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent-primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.primary-cta:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.5);
}

.secondary-cta {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.secondary-cta:hover {
  background: rgba(255, 255, 255, 0.08);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  color: rgba(255, 255, 255, 0.2);
}

/* Feature Sections */
.highlight-section {
  padding: 8rem 0;
  position: relative;
  z-index: 10;
}

.highlight-section.alt-bg {
  background: rgba(255, 255, 255, 0.02);
}

.split-layout {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.split-layout.reverse {
  flex-direction: row-reverse;
}

.split-content {
  flex: 1;
}

.split-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  position: relative;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.highlight-section h2 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.highlight-section p {
  font-size: 1.1rem;
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
}

.check-icon {
  width: 24px;
  height: 24px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 900;
}

/* Visuals */
.graph-visual {
  position: relative;
}

.graph-node {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--accent-primary);
}

.graph-node.n1 {
  top: 30%;
  left: 20%;
}
.graph-node.n2 {
  top: 60%;
  left: 70%;
  background: var(--accent-secondary);
}
.graph-node.n3 {
  top: 20%;
  left: 80%;
}

.graph-link {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  height: 1px;
}

.graph-link.l1 {
  top: 45%;
  left: 20%;
  width: 50%;
  transform: rotate(25deg);
}

.graph-card-overlay {
  position: absolute;
  top: 40%;
  left: 30%;
  padding: 1rem !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}

.mock-entity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mock-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-radius: 50%;
}

.draft-card {
  width: 100%;
  max-width: 400px;
  height: 300px;
  padding: 1.5rem !important;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.draft-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.draft-lines .line {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.l-100 {
  width: 100%;
}
.l-80 {
  width: 80%;
}
.l-90 {
  width: 90%;
}
.l-60 {
  width: 60%;
}

/* Features Grid */
.features {
  padding: 8rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 5rem;
}

.section-title h2 {
  font-size: 3rem;
  font-weight: 800;
}

.subtitle {
  color: #94a3b8;
  font-size: 1.25rem;
  margin-top: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.landing-feature-card {
  height: 100%;
  padding: 2.5rem !important;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s;
}

.landing-feature-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-5px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.landing-feature-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
}

.landing-feature-card p {
  color: #94a3b8;
  line-height: 1.6;
}

/* Tech Specs */
.tech-specs {
  padding: 4rem 2rem;
}

.tech-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem !important;
  text-align: center;
}

.tech-content h2 {
  margin-bottom: 1rem;
}

.tech-badges {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.tech-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 600;
}

.tech-badge svg {
  color: var(--accent-secondary);
}

/* Manifesto */
.manifesto {
  padding: 8rem 2rem;
  display: flex;
  justify-content: center;
}

.manifesto-card {
  max-width: 800px;
  text-align: center;
  padding: 4rem !important;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.1),
    rgba(168, 85, 247, 0.1)
  );
}

.manifesto-card h2 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-primary);
  margin-bottom: 2rem;
}

.manifesto .quote {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 2.5rem;
  font-style: italic;
  margin-bottom: 3rem;
  line-height: 1.2;
}

.primary-cta.large {
  display: inline-flex;
  font-size: 1.25rem;
  padding: 1.25rem 3rem;
}

/* Footer */
.landing-footer {
  padding: 4rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: #000;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: #94a3b8;
  font-weight: 600;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .landing-nav {
    padding: 0 1.5rem;
  }
  .login-link {
    display: none;
  }
  .feature-card-wrapper {
    width: 100%;
  }
  .split-layout {
    flex-direction: column;
    text-align: center;
  }
  .split-layout.reverse {
    flex-direction: column;
  }
  .feature-list {
    align-items: center;
  }
  .manifesto .quote {
    font-size: 1.75rem;
  }
}

/* New Animations for Landing Page */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    transform: scale(1.2);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

.pulse-delayed {
  animation: pulse 2s infinite;
  animation-delay: 1s;
}

.text-white {
  color: white;
  font-weight: 700;
}

.feature-new-badge {
  background: var(--color-accent, #8b5cf6);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 12px;
  text-transform: uppercase;
  margin-left: 0.5rem;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 5px rgba(139, 92, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.6);
  }
  100% {
    box-shadow: 0 0 5px rgba(139, 92, 246, 0.4);
  }
}
.responsive-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.25rem 3rem;
  background: rgba(15, 15, 26, 0.7);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tolkien-logotype {
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

.logo-link:hover {
  opacity: 0.9;
}

.header-central {
  text-align: center;
}

.header-central h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
  color: white;
}

.header-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.desktop-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.responsive-header .mobile-actions {
  display: none;
}

.back-btn-round {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
  cursor: pointer;
}

.back-btn-round:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-4px);
}

/* Mobile Menu */
.mobile-menu-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-overlay {
  position: fixed;
  top: 70px; /* Header height approx */
  left: 0;
  right: 0;
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  z-index: 99;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Force actions to stack in mobile menu */
.mobile-menu-content .header-actions {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.mobile-menu-content .header-action-btn,
.mobile-menu-content a {
  width: 100%;
  justify-content: flex-start;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  .responsive-header {
    padding: 1rem;
    grid-template-columns: auto 1fr auto;
    height: 64px;
    gap: 0.5rem;
  }

  /* Increase specificity to override specific page styles */
  .responsive-header .desktop-actions {
    display: none !important;
  }

  .responsive-header .mobile-actions {
    display: flex !important;
  }

  .header-central h1 {
    font-size: 1.1rem;
    max-width: 50vw;
  }

  .tolkien-logotype {
    font-size: 1.2rem;
  }

  .back-btn-round {
    width: 32px;
    height: 32px;
  }
}
.skeleton-item {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite ease-in-out;
  border-radius: var(--radius-sm);
}

.skeleton-item.text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-item.rect {
  border-radius: var(--radius-md);
}

.skeleton-item.circle {
  border-radius: 50%;
}

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

/* Composite Skeletons */
.skeleton-commission-card {
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-fragment-card {
  padding: var(--space-xl);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.skeleton-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
/* Inbox Page Styles */
.inbox-page {
  min-height: 100vh;
  background: var(--color-bg-base, #030014); /* Default dark bg */
}

/* Header Action: Processing Bay Label */
.header-inbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Inbox Container */
.inbox-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 8rem 1.5rem 4rem 1.5rem; /* Top padding clears fixed header */
}

/* Inbox Header Section */
.inbox-header {
  margin-bottom: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1.5rem;
}

.inbox-title {
  font-family: var(--font-display, sans-serif);
  font-size: 2rem;
  font-weight: 800;
  color: white;
  margin: 0;
  background: linear-gradient(to right, #ffffff, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.inbox-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 0.3rem; /* Align with text baseline */
}

/* Empty State */
.inbox-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem;
  background: rgba(255, 255, 255, 0.01);
  border-radius: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.05);
  margin-top: 2rem;
}

.empty-icon-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.inbox-empty h3 {
  font-family: var(--font-display, sans-serif);
  font-size: 1.75rem;
  color: white;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.inbox-empty p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
  max-width: 400px;
  line-height: 1.6;
  text-align: center;
}

/* Inbox Items List */
.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Inbox Item Component */
.inbox-item-card {
  /* Using GlassCard internally but adding specific layout */
}

.inbox-item-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.inbox-text-col {
  flex: 1;
  min-width: 0; /* Text truncation fix */
}

/* Item Meta Row */
.inbox-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: "JetBrains Mono", monospace; /* Or mono font var */
  font-size: 0.75rem;
  color: #818cf8; /* Indigo-400 */
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.meta-dot {
  color: rgba(255, 255, 255, 0.3);
}

.inbox-text-preview {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inbox-summary-preview {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Inbox Actions Column */
.inbox-actions-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.icon-btn.delete:hover {
  background: rgba(239, 68, 68, 0.15); /* Red-500/15 */
  color: #f87171; /* Red-400 */
}

.icon-btn.move {
  color: #818cf8; /* Indigo */
}

.icon-btn.move:hover {
  background: rgba(129, 140, 248, 0.15);
  color: #a5b4fc;
}

/* Project Selection Dropdown */
.move-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.move-menu-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.75rem;
  width: 280px;
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 60;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.move-menu-header {
  padding: 0.75rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.move-menu-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
}

.move-project-btn {
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s;
}

.move-project-btn:hover {
  background: rgba(129, 140, 248, 0.1);
  color: white;
}

.project-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #818cf8;
}

/*
   ---------------------------
   Banner Styles (For ProjectsPage)
   ---------------------------
*/
.inbox-banner-section {
  margin-bottom: 3rem;
}

.inbox-banner-card {
  /* Inherits GlassCard */
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem !important; /* Override glass default if needed */
  border: 1px solid rgba(99, 102, 241, 0.2) !important; /* Indigo border */
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.05),
    rgba(79, 70, 229, 0.02)
  ) !important;
}

.inbox-banner-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.inbox-banner-card:hover .inbox-banner-icon {
  transform: scale(1.1);
  color: white;
  background: rgba(99, 102, 241, 0.3);
}

.inbox-banner-content h3 {
  font-family: var(--font-display, sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin: 0;
  line-height: 1.3;
}

.inbox-banner-content p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0.25rem 0 0 0;
}

.inbox-banner-action {
  margin-left: auto;
}

.open-inbox-pill {
  padding: 0.4rem 1.25rem;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: all 0.2s;
}

.inbox-banner-card:hover .open-inbox-pill {
  background: rgba(99, 102, 241, 0.3);
  color: white;
  border-color: rgba(99, 102, 241, 0.4);
}
.home-page {
  min-height: 100vh;
  background: var(--gradient-bg);
}

/*
   Header Title Customization
   Overriding ResponsiveHeader h1 for this specific page
*/
.home-page .responsive-header .header-central h1 {
  font-family: var(--font-display, "Inter", sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 1.1rem; /* Larger for more prominence */
  font-weight: 800;
  background: linear-gradient(to right, #e2e8f0, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.9;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Header Actions Row - horizontal layout */
.header-actions-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

/* Base Action Button in Header */
.header-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.header-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Primary Action Button in Header */
.header-action-btn.primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.header-action-btn.primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.header-action-btn.secondary-text {
  width: auto;
  padding: 0 1.25rem;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
}

.header-action-btn.secondary-text:hover {
  background: rgba(255, 255, 255, 0.08); /* Lighter hover for text btn */
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: none; /* remove primary glow if conflict */
}

/* User Menu Styling - Premium Distinct Treatment */
.user-menu-wrap {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin-left: 0.75rem;
}

.user-menu-btn {
  width: 46px; /* Larger than other icons */
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(249, 115, 22, 0.4); /* Warm ember border */
  background: linear-gradient(
    135deg,
    rgba(249, 115, 22, 0.15),
    rgba(234, 88, 12, 0.1)
  );
  padding: 3px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.15);
}

.user-menu-btn:hover {
  border-color: var(--color-accent-warm);
  box-shadow: 0 0 25px rgba(249, 115, 22, 0.35);
  transform: scale(1.05);
}

.user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--color-accent-warm) 0%,
    #ea580c 100%
  ); /* Warm gradient instead of purple */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.05rem; /* Slightly larger text */
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 1rem);
  right: 0;
  width: 240px;
  background: rgba(20, 20, 35, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

.dropdown-label {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-error, #f87171);
}

/* Home Page Content */
.home-content {
  /* Increased top padding to push cards further down */
  padding: 11rem 3rem 4rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .home-content {
    /* Even more space on mobile to account for safe areas and visual breathing room */
    padding: 12rem 1.5rem 3rem 1.5rem;
  }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  margin: 0;
}

.new-commission-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.5rem;
  background: var(--color-primary);
  color: white;
  border-radius: 14px;
  font-weight: 700;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.new-commission-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.commissions-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(340px, 1fr)
  ); /* Slightly wider cards */
  gap: 2rem;
}

.commission-glass {
  padding: 2rem;
  border-radius: 24px; /* Slightly tighter radius for cleaner look */
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  align-items: flex-start; /* Align to top for better multi-line handling */
  gap: 1.25rem;
  min-height: 140px;
  border: 1px solid rgba(255, 255, 255, 0.03); /* Subtle border */
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
}

.commission-glass:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.25rem; /* Optical alignment with title */
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 0.75rem;
}

.card-header-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card-content h3 {
  font-family: var(--font-display, "Outfit", sans-serif);
  font-size: 1.35rem; /* Slightly larger for impact */
  font-weight: 700;
  color: white;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em; /* Tighter for elegance */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); /* Subtle depth */
}

.card-type {
  font-size: 0.7rem; /* Slightly larger for readability */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
  opacity: 0.9;
}

/* Metadata Row Styles */
.card-meta-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto; /* Push to bottom */
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

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

.meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.meta-separator {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.6rem;
}

.quick-record-fab {
  position: fixed;
  bottom: 5rem; /* Moved up */
  right: 5rem; /* Moved left */
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.5);
  cursor: pointer;
  z-index: 100;
  border: none;
}
.loading-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.loading-spinner--small {
  width: 16px;
  height: 16px;
}

.loading-spinner--medium {
  width: 32px;
  height: 32px;
}

.loading-spinner--large {
  width: 48px;
  height: 48px;
}

.spinner-svg {
  animation: spin 0.8s linear infinite;
}

.spinner-circle {
  stroke: currentColor;
  stroke-dasharray: 90 150;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

/* Dots variant */
.loading-spinner--dots {
  gap: 4px;
}

.loading-spinner--dots .loading-dot {
  width: 6px;
  height: 6px;
  background-color: currentColor;
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite both;
}

.loading-spinner--dots .loading-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-spinner--dots .loading-dot:nth-child(2) {
  animation-delay: -0.16s;
}

.loading-spinner--small .loading-dot {
  width: 4px;
  height: 4px;
}

.loading-spinner--large .loading-dot {
  width: 10px;
  height: 10px;
}

/* Pulse variant */
.loading-pulse {
  background-color: currentColor;
  border-radius: 50%;
  opacity: 0.6;
  animation: pulse-scale 1.2s ease-in-out infinite;
}

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

@keyframes dash {
  0% {
    stroke-dasharray: 1 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90 150;
    stroke-dashoffset: -124;
  }
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

@keyframes pulse-scale {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.3;
  }
}.help-tooltip-container {
  display: inline-flex;
  position: relative;
  vertical-align: middle;
  margin-left: 0.5rem;
  z-index: 20;
}

.help-trigger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: color 0.2s ease, transform 0.2s ease;
}

.help-trigger:hover,
.help-trigger.active {
  color: var(--accent-primary);
  transform: scale(1.1);
}

.help-popover {
  position: absolute;
  width: max-content;
  max-width: 250px;
  background: rgba(20, 20, 25, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 100;
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: left;
}

/* Positioning variants */
.help-popover.side-top {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
}

.help-popover.side-bottom {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 10px;
}

.help-popover.side-right {
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 10px;
}

.help-popover.side-left {
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 10px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .help-popover {
    max-width: 200px;
  }
}
.commission-page {
  min-height: 100vh;
  background: var(--gradient-bg);
}

/* User Menu Styling */
.user-menu-wrap {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.user-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px;
  cursor: pointer;
  transition: all 0.3s;
}

.user-menu-btn:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.2);
}

.user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-secondary)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.9rem;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 1rem);
  right: 0;
  width: 240px;
  background: rgba(20, 20, 35, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

.dropdown-label {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-error, #f87171);
}

/* Form Styles */
.commission-content {
  padding: 4rem 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.commission-form {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.form-input {
  width: 100%;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  outline: none;
  transition: all 0.3s;
}

.form-input:focus {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.2);
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.type-option {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  text-align: left;
  transition: all 0.3s;
}

.type-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.type-option.selected {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--color-primary);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.2);
}

.type-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.type-label {
  display: block;
  font-weight: 800;
  color: white;
  font-size: 1rem;
}

.type-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.submit-button {
  width: 100%;
  padding: 1.5rem;
  background: var(--color-primary);
  color: white;
  border-radius: 20px;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
}

.submit-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(124, 58, 237, 0.5);
}

.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.voice-button {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-secondary)
  );
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4),
    0 0 0 4px rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  /* Prevent pulse animations from overflowing */
  overflow: visible;
  isolation: isolate;
}

@media (min-width: 768px) {
  .voice-button {
    width: 64px; /* Slightly smaller for elegance */
    height: 64px;
  }
}

.voice-button:hover:not(:disabled) {
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.4),
    0 0 0 2px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.voice-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

.voice-button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

.voice-button.listening {
  background: var(--color-accent-warm);
  box-shadow: 0 0 30px var(--color-accent-warm-glow),
    inset 0 0 15px rgba(255, 255, 255, 0.2);
  animation: glow-soft 2s infinite ease-in-out;
}

@keyframes glow-soft {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}

.voice-button.processing {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.icon-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon {
  width: 32px;
  height: 32px;
}

.icon.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.audio-waveform-container {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: transparent;
  border-radius: var(--radius-md);
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.audio-waveform-container:has(.active) {
  opacity: 1;
}

.audio-waveform-canvas {
  width: 100%;
  height: 100%;
  filter: blur(0.5px);
  transition: filter 0.3s ease;
}

.audio-waveform-canvas.active {
  animation: aurora-pulse 3s infinite ease-in-out;
}

/* Aurora Glow Animation */
@keyframes aurora-pulse {
  0%,
  100% {
    filter: blur(0.5px) drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
  }
  50% {
    filter: blur(0.5px) drop-shadow(0 0 20px rgba(139, 92, 246, 0.6))
      drop-shadow(0 0 40px rgba(96, 165, 250, 0.3));
  }
}

/* Recording Active State - More Intense Glow */
.voice-capture.recording .audio-waveform-canvas.active {
  animation: aurora-pulse-intense 1.5s infinite ease-in-out;
}

@keyframes aurora-pulse-intense {
  0%,
  100% {
    filter: blur(0.3px) drop-shadow(0 0 12px rgba(139, 92, 246, 0.6));
  }
  50% {
    filter: blur(0.3px) drop-shadow(0 0 30px rgba(139, 92, 246, 0.8))
      drop-shadow(0 0 60px rgba(96, 165, 250, 0.4));
  }
}

/* Subtle shimmer effect on the container */
.audio-waveform-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(167, 139, 250, 0.1),
    transparent
  );
  animation: shimmer 4s infinite linear;
  pointer-events: none;
}

.audio-waveform-container:has(.active)::before {
  animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 200%;
  }
}
/* Upgrade Prompt Modal */
.upgrade-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.upgrade-modal {
  background: linear-gradient(
    135deg,
    rgba(30, 30, 50, 0.95) 0%,
    rgba(20, 20, 35, 0.98) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.upgrade-modal .close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.upgrade-modal .close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.upgrade-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
}

.upgrade-modal h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: white;
}

.upgrade-message {
  color: var(--color-text-secondary);
  font-size: 1rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.upgrade-message strong {
  color: white;
}

.reset-info {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 20px;
  color: var(--color-primary-light);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.upgrade-options {
  margin-bottom: 2rem;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--color-primary), #8b5cf6);
  border-radius: 14px;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s;
  margin-bottom: 0.75rem;
}

.primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.option-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.benefits {
  text-align: left;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.benefits h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.benefits li {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* Mobile */
@media (max-width: 480px) {
  .upgrade-modal {
    padding: 2rem 1.5rem;
    margin: 0.5rem;
  }

  .upgrade-modal h2 {
    font-size: 1.25rem;
  }

  .primary-action {
    width: 100%;
    justify-content: center;
  }
}
.input-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
}

.input-modal-wrapper {
  width: 90%;
  max-width: 500px;
}

.input-card {
  padding: 0 !important;
  border: 1px solid var(--glass-border);
  overflow: hidden;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.input-card form {
  display: flex;
  flex-direction: column;
}

.input-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--glass-border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary-light);
}

.header-left h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
}

.close-btn:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
}

.input-body {
  padding: 1.5rem 1.25rem;
}

.modal-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  padding: 0.875rem 1rem;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1.1rem;
  outline: none;
  transition: all 0.2s;
}

.modal-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
  background: rgba(0, 0, 0, 0.3);
}

.modal-input::placeholder {
  color: var(--text-disabled);
}

.input-footer {
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.1);
  border-top: 1px solid var(--glass-border);
}

.input-footer button {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-footer .cancel-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
}

.input-footer .cancel-btn:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
}

.input-footer .submit-btn {
  background: var(--primary-color);
  border: none;
  color: white;
}

.input-footer .submit-btn:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.input-footer .submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
}
.voice-capture {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.transcript-container {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  min-height: 200px;
  position: relative;
  /* Add padding at bottom to avoid overlap with fixed controls */
  padding-bottom: 220px;
  -webkit-overflow-scrolling: touch;

  /* Glass Backing for Legibility */
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  margin: 1rem 0;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Desktop override */
@media (min-width: 768px) {
  .transcript-container {
    padding-bottom: 1.5rem;
  }
}

.transcript-content {
  font-family: var(--font-prose);
  font-size: 1.25rem;
  line-height: 1.7;
}

/* ... existing saved-text, current-text, placeholder styles ... */
.saved-text {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.current-text {
  color: var(--text-primary);
}

.current-text.interim {
  color: var(--text-tertiary);
}

.placeholder {
  color: var(--text-tertiary);
  font-style: italic;
}

/* Mobile-first: Fixed bottom controls */
/* Mobile: Floating Glass Island - Redesigned for clear hierarchy */
.capture-controls-container {
  position: fixed;
  bottom: var(--space-md);
  left: var(--space-md);
  right: var(--space-md);
  border-radius: var(--radius-xl);
  background: rgba(15, 15, 26, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  padding: 1rem;
  z-index: 50;
  /* Two-row layout: modes on top, controls below */
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 768px) {
  .capture-controls-container {
    position: static;
    background: none;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2rem;
  }
}

/* Voice controls: horizontal layout with VoiceButton centered */
.voice-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
}

@media (min-width: 768px) {
  .voice-controls {
    gap: 2.5rem;
    padding: 1rem 0;
  }
}

.control-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .control-button {
    width: 56px;
    height: 56px;
  }
}

.control-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: transparent;
}

/* Pulse Animation */
@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(249, 115, 22, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
  }
}

.control-button.save:not(:disabled) {
  background: var(--color-primary);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.control-button.cancel:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Status floating above controls */
.status-floating {
  position: fixed;
  bottom: calc(180px + var(--safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-primary-light);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  z-index: 60;
  pointer-events: none;
}

@media (min-width: 768px) {
  .status-floating {
    position: static;
    transform: none;
    background: none;
    backdrop-filter: none;
    margin-top: -1rem;
    text-align: center;
  }
}

/* Capture Overlay */
.capture-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: inherit;
  z-index: 100;
  text-align: center;
}

/* ... existing feedback-badge, clarification-ui, chip styles ... */
.feedback-badge {
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  animation: bounce 0.5s ease;
}

.feedback-badge.info {
  background: var(--color-primary);
  color: white;
}

.feedback-badge.success {
  background: #10b981;
  color: white;
}

.feedback-badge.error {
  background: #ef4444;
  color: white;
}

.clarification-ui {
  background: var(--color-bg-secondary);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 90%;
}

.clarification-ui p {
  font-weight: 600;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

.option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.chip {
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.chip:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: scale(1.05);
}

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

.spin {
  animation: spin 2s linear infinite;
}

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

/* Primary Save Button - prominent and obvious */
.save-button-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-tertiary);
  cursor: not-allowed;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
  min-width: 100px;
}

.save-button-primary:disabled {
  opacity: 0.5;
}

.save-button-primary.has-content {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: transparent;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.save-button-primary.has-content:active {
  transform: scale(0.95);
}

@media (min-width: 768px) {
  .save-button-primary {
    padding: 0.85rem 2rem;
  }
}

/* Multimodal Controls Container */
.multimodal-controls {
  display: none; /* Hide on mobile for simplicity */
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .multimodal-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px; /* Pill shape */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
}

.control-button.capture-action-btn {
  /* Ensure circle shape and smaller size inside the pill */
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid transparent; /* Cleaner look inside container */
  background: transparent;
}

.control-button.capture-action-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  box-shadow: 0 0 10px var(--color-primary-glow);
}

/* Analyze Button - Secondary action for AI processing */
.control-button.analyze-btn {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #a78bfa;
}

.control-button.analyze-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border-color: transparent;
  color: white;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.control-button.analyze-btn:disabled {
  opacity: 0.4;
}

/* Recording Indicator - Simple inline status */
.recording-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.recording-timer {
  font-variant-numeric: tabular-nums;
  margin-left: 0.25rem;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 3ch;
}

.recording-indicator.state-active {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.recording-indicator.state-finishing {
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: rec-pulse 1s infinite;
}

.state-active .rec-dot {
  background: #ef4444;
}

.state-finishing .rec-dot {
  background: #10b981;
  animation: finishing-flicker 0.4s infinite;
}

@keyframes finishing-flicker {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

@keyframes rec-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* Capture Modes */
.capture-modes {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .capture-modes {
    gap: 0.75rem;
    margin-bottom: 0.5rem;
  }
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: var(--color-bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s;
}

@media (min-width: 768px) {
  .mode-btn {
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.mode-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.transcript-padding {
  padding-bottom: 220px;
}

/* Status indicator uses .status-label-container below */

.fallback-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: 0.5rem;
  color: var(--color-warning);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.transcript-waveform-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  opacity: 0.04;
  pointer-events: none;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease-in-out;
}

.transcript-waveform-bg.active {
  opacity: 1;
}

.transcript-content {
  position: relative;
  z-index: 1;
  font-family: var(--font-prose);
  font-size: 1.25rem;
  line-height: 1.7;
}

/* Session Recovery Prompt */
.recovery-prompt {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.recovery-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary-light);
  font-size: 0.9rem;
  font-weight: 500;
}

.recovery-actions {
  display: flex;
  gap: 0.75rem;
}

.restore-btn {
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.restore-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.dismiss-btn {
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Status Label */
.status-label-container {
  position: absolute;
  bottom: 8px; /* Positioned at the very bottom of the card */
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

@media (min-width: 768px) {
  .status-label-container {
    bottom: 20px;
  }
}

.status-label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.status-label.active {
  color: var(--text-primary);
  background: rgba(239, 68, 68, 0.15); /* Red tint */
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ef4444;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Transcription Error Safety Net */
.transcription-error-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 1.5rem;
}

.transcription-error-overlay .error-content {
  background: var(--surface-card);
  border: 1px solid var(--color-error);
  padding: 1.5rem;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-lg);
}

.error-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.error-header h3 {
  color: var(--color-error);
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.error-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.error-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.download-btn {
  flex: 1;
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.download-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.save-preview-btn {
  flex: 1;
  background: var(--surface-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.save-preview-btn:hover {
  background: var(--surface-active);
}
/* VoiceCommandHelp Modal Styles */

.voice-help-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary, #a0a0a0);
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-help-trigger:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary, #ffffff);
  border-color: var(--accent-color, #6366f1);
}

/* Overlay */
.voice-help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal */
.voice-help-modal {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 0;
  animation: slideUp 0.3s ease;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 1;
}

.modal-header h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* Content */
.modal-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.help-section h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-color, #6366f1);
  margin: 0 0 0.5rem;
}

.section-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

/* Directives Grid */
.directives-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.directive-tag {
  padding: 0.375rem 0.75rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-family: var(--font-mono, monospace);
  color: #a5b4fc;
}

/* Entity Types */
.entities-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.entity-type {
  padding: 0.25rem 0.625rem;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 4px;
  font-size: 0.8125rem;
  color: #6ee7b7;
  text-transform: capitalize;
}

/* Examples */
.examples-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.examples-list li {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--accent-color, #6366f1);
  border-radius: 0 6px 6px 0;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--text-secondary);
}

/* Command Categories (Phase 12) */
.command-category {
  margin-bottom: 1rem;
}

.command-category:last-child {
  margin-bottom: 0;
}

.category-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.command-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.command-list li {
  padding: 0.5rem 0.75rem;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-family: var(--font-mono, monospace);
}

/* Mobile */
@media (max-width: 480px) {
  .voice-help-modal {
    max-height: 90vh;
  }

  .modal-content {
    padding: 1rem;
  }
}
.action-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.action-btn {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-accent-hero);
}

.action-btn:active {
  transform: scale(0.95);
}

/* Specific styling for when embedded in cards */
.fragment-card .action-toolbar,
.lore-card .action-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  opacity: 0;
  pointer-events: none;
}

.fragment-card:hover .action-toolbar,
.lore-card:hover .action-toolbar {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

@media (hover: none) {
  .fragment-card .action-toolbar,
  .lore-card .action-toolbar {
    opacity: 1;
    pointer-events: all;
    background: rgba(15, 15, 26, 0.6);
  }
}
.capture-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}

/* Header Override to Match ReviewPage */
.review-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.25rem 3rem;
  background: rgba(15, 15, 26, 0.7);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
}

.back-btn-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
}

.back-btn-round:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-4px);
}

.header-central {
  text-align: center;
}

.header-central h1 {
  display: block;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: white;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(139, 92, 246, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 0.2rem;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
}

.header-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
  cursor: pointer;
}

.header-action-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--color-primary);
  color: var(--color-primary-light);
  transform: translateY(-2px);
}

.capture-content {
  flex: 1;
  padding: 1.5rem 1rem;
  padding-top: 80px; /* Account for fixed header */
  padding-bottom: calc(200px + var(--safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .capture-content {
    padding: var(--space-xl) var(--space-lg);
    padding-top: 100px; /* Larger header on desktop */
  }
}

.fragments-section {
  margin-top: 2rem;
  max-width: 600px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Hide recent entries on small mobile to focus on intake */
@media (max-width: 480px) {
  .fragments-section {
    display: none;
  }
}

.fragments-section h2 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  color: var(--color-text-muted);
  font-weight: 700;
}

/* ... existing scroll and spin animations ... */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 1s linear infinite;
}
.review-tool-layout {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.review-tool-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 !important; /* Reset padding to handle header/content split */
  overflow: hidden;
}

.review-tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.tool-title {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.tool-icon {
  color: var(--color-primary);
  opacity: 0.8;
}

.tool-title h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0;
  color: var(--color-text);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tool-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.review-tool-content {
  padding: var(--space-xl);
  flex: 1;
  overflow-y: auto;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
  .review-tool-layout {
    max-width: 100%;
  }

  .review-tool-header {
    padding: var(--space-md);
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .tool-actions {
    margin-left: auto;
  }

  .review-tool-content {
    padding: var(--space-md);
  }
}
.panel-wrapper {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  transition: all 0.2s;
}

.panel-wrapper:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.panel-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-secondary);
}

.panel-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.panel-icon {
  opacity: 0.7;
}

.panel-content {
  padding: 1rem;
}
/* Main container styles handled by ReviewToolLayout */
.holding-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.holding-card {
  padding: 1.75rem;
  border-radius: 28px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: var(--glass-bg) !important;
  backdrop-filter: blur(16px) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.holding-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.holding-question {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.q-icon {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.8;
}

.fragment-text {
  font-family: var(--font-prose);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border-left: 3px solid var(--color-primary);
}

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

.main-actions {
  display: flex;
  gap: 0.75rem;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
}

.action-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.action-btn.primary {
  background: var(--color-primary);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.action-btn.primary:hover {
  background: var(--color-primary);
  opacity: 0.9;
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.action-btn.delete {
  color: #ef4444;
}

.action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
}

/* Section Picker */
.section-picker {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

.section-opt {
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--color-text-secondary);
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-opt:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: scale(1.02);
}

/* Empty State */
.holding-bay-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.empty-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.check-icon {
  color: #22c55e;
  width: 32px;
  height: 32px;
}

.holding-bay-empty h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 600px) {
  .holding-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .main-actions {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
  }
}
.research-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.research-panel.fact-check {
  border-color: rgba(34, 197, 94, 0.2);
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.03) 0%,
    rgba(34, 197, 94, 0.01) 100%
  );
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2),
    inset 0 0 40px rgba(34, 197, 94, 0.05);
}

.research-panel h4 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem 0;
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.fact-check h4 {
  color: var(--color-success);
}

.summary-text {
  font-family: var(--font-prose);
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--color-text);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border-left: 3px solid var(--color-primary);
}

.fact-check .summary-text {
  border-left-color: var(--color-success);
}

.research-facts ul {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  list-style: none;
}

.research-facts li {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  line-height: 1.5;
}

.research-facts li::before {
  content: "•";
  color: var(--color-primary);
  font-weight: bold;
}

.sources-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.source-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.source-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.source-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
}

.source-snippet {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  line-height: 1.5;
}

.source-url {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  opacity: 0.7;
  margin-top: auto;
}
.visual-gallery {
  padding: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.asset-card {
  overflow: hidden;
  padding: 0 !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.asset-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.asset-image-container {
  position: relative;
  aspect-ratio: 16 / 10;
  cursor: pointer;
  overflow: hidden;
}

.asset-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.asset-card:hover .asset-thumb {
  transform: scale(1.1);
}

.asset-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
}

.asset-image-container:hover .asset-overlay {
  opacity: 1;
}

.asset-info {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.asset-prompt {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text);
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.asset-actions {
  display: flex;
  gap: 0.75rem;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--color-text);
  transform: translateY(-2px);
}

.action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-content {
  background: var(--glass-bg);
  border-radius: 32px;
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.lightbox-image-wrapper {
  width: 100%;
  background: black;
  display: flex;
  align-items: center;
  justify-content: center;
}

.full-image {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

.lightbox-details {
  padding: 2rem;
}

.lightbox-details h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.detail-item label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.1em;
}

.detail-item p {
  background: rgba(255, 255, 255, 0.03);
  padding: 1.25rem;
  border-radius: 16px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  font-family: var(--font-prose);
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.detail-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.gallery-empty,
.gallery-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--color-text-muted);
  gap: 1rem;
}

.gallery-empty h3 {
  color: var(--color-text);
  margin: 0;
  font-weight: 800;
}
.entity-registry {
  padding: 1rem;
}

.registry-controls {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  color: var(--color-text-muted);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-bar:focus-within {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-primary);
  color: var(--color-text);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.1);
  transform: translateY(-1px);
}

.search-bar input {
  background: none;
  border: none;
  color: inherit;
  width: 100%;
  font-size: 1rem;
  outline: none;
}

.filter-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.filter-chip {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-text-secondary);
  text-transform: capitalize;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
}

.filter-chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.entity-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem !important;
  cursor: pointer;
  position: relative;
  border-radius: 24px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.entity-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
}

.entity-type-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s;
}

.entity-card:hover .entity-type-icon {
  transform: scale(1.1) rotate(-5deg);
}

.entity-type-icon.character {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}
.entity-type-icon.place {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.entity-type-icon.concept {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.entity-type-icon.other {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.entity-main {
  flex: 1;
}

.entity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.entity-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.asset-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-primary);
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.entity-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chevron {
  color: rgba(255, 255, 255, 0.2);
  align-self: center;
}

.registry-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  gap: 1rem;
}
.entity-link {
  cursor: pointer;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: all 0.2s;
}

.entity-link:hover {
  text-decoration-style: solid;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.entity-link.character {
  color: #a78bfa; /* violet-400 */
  text-decoration-color: rgba(167, 139, 250, 0.5);
}

.entity-link.place {
  color: #34d399; /* emerald-400 */
  text-decoration-color: rgba(52, 211, 153, 0.5);
}

.entity-link.concept {
  color: #60a5fa; /* blue-400 */
  text-decoration-color: rgba(96, 165, 250, 0.5);
}

.entity-link.other {
  color: #e879f9; /* fuchsia-400 */
  text-decoration-color: rgba(232, 121, 249, 0.5);
}
.lifecycle-view {
  position: relative;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.lifecycle-item {
  position: relative;
  cursor: pointer;
}

.lifecycle-marker {
  position: absolute;
  left: -1.5rem;
  top: 0.25rem;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lifecycle-marker .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

.lifecycle-content {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.75rem;
  transition: all 0.2s;
}

.lifecycle-content:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}

.lifecycle-meta {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lifecycle-meta .timestamp {
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0 6px;
  border-radius: 4px;
}

.lifecycle-snippet {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  font-family: "Merriweather", serif;
}

.lifecycle-empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 2rem;
}
.character-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.character-sheet {
  width: 100%;
  max-width: 500px;
  height: 100%;
  background: #0f0f1a;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.sheet-header {
  padding: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
}

.entity-identity {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex: 1;
}

.entity-identity h2 {
  margin: 0;
  font-size: 1.5rem;
  color: white;
}

.type-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary, #6366f1);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.icon-container {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-container.character {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}
.icon-container.place {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}
.icon-container.concept {
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
}
.icon-container.other {
  background: rgba(156, 163, 175, 0.2);
  color: #d1d5db;
}

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

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  width: 40px;
  height: 40px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.icon-btn.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: #ef4444;
}

.sheet-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.sheet-section {
  margin-bottom: 2.5rem;
}

.sheet-section label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}

.description-text {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  white-space: pre-wrap;
}

.mini-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.mini-asset {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-asset img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-placeholder {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
}

.close-btn {
  position: absolute;
  top: 1rem;
  left: -50px;
  background: #0f0f1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 600px) {
  .character-sheet {
    max-width: 100%;
  }
  .close-btn {
    left: 1rem;
    top: 1rem;
  }
}
.directives-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.directives-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.directives-header h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.pending-badge {
  padding: 0.25rem 0.75rem;
  background: var(--gradient-warm-cta);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

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

.directive-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.directive-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
}

.directive-card.fulfilled {
  border-color: rgba(16, 185, 129, 0.15);
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.03) 0%,
    rgba(16, 185, 129, 0.01) 100%
  );
}

.directive-card.dismissed {
  opacity: 0.6;
  filter: grayscale(0.5);
}

.directive-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  transition: all 0.3s;
}

.directive-card:hover .directive-icon {
  background: rgba(255, 255, 255, 0.06);
  transform: scale(1.05);
}

.directive-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.directive-type {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.type-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.directive-text {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.4;
  margin: 0;
}

.directive-context {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-family: var(--font-prose);
  font-style: italic;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  margin: 0.25rem 0;
}

.directive-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.directive-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.directive-actions .action-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.directive-actions .action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  transform: translateY(-2px);
}

.directive-actions .action-btn.fulfill:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.directive-actions .action-btn.dismiss:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.directive-actions .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.directive-actions .status-icon {
  opacity: 0.7;
}

.directive-actions .status-icon.fulfilled {
  color: #10b981;
}

.directive-actions .status-icon.dismissed {
  color: #6b7280;
}

.directives-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
  color: var(--text-secondary);
}

.directives-empty h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.directives-empty p {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  max-width: 300px;
}

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

/* Fulfillment Results */
.directive-fulfillment-result {
  margin-top: 1rem;
  padding: var(--space-md);
  background: rgba(16, 185, 129, 0.05); /* Success tint */
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 185, 129, 0.1);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-xs);
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.result-text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #e5e7eb;
  margin: 0;
  white-space: pre-wrap;
}

.directive-card.fulfilled {
  opacity: 1; /* Keep it readable if fulfilled */
  border-color: rgba(16, 185, 129, 0.2);
}
/* Main container handled by ReviewToolLayout */

.sources-header-controls {
  margin-bottom: var(--space-xl);
}

/* Reusing existing classes but ensuring they don't depend on removed wrappers */

.add-source-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--gradient-warm-cta);
  color: white;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.add-source-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.sources-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
}

.filter-buttons button {
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-buttons button.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--color-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.export-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.export-controls select {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 600;
  outline: none;
}

.export-bib-btn {
  padding: 0.5rem 1.25rem;
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.export-bib-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  transform: translateY(-1px);
}

.sources-filters button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sources-filters button.active {
  background: var(--glass-bg);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.add-source-form-card {
  margin-bottom: 1rem;
  overflow: hidden;
}

.add-source-form-wrapper {
  overflow: hidden;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-group input,
.form-group select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.6rem;
  border-radius: 0.4rem;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.form-actions button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 0.4rem;
  cursor: pointer;
}

.form-actions .submit-btn {
  background: var(--accent-primary);
  border: none;
  color: white;
}

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

.source-card {
  padding: 0 !important;
  cursor: pointer;
}

.source-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.source-status-icon {
  display: flex;
  align-items: center;
}

.source-card.verified {
  border-color: rgba(34, 197, 94, 0.2);
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.03) 0%,
    rgba(34, 197, 94, 0.01) 100%
  );
}

.source-card.unverified {
  border-color: rgba(245, 158, 11, 0.15);
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.03) 0%,
    rgba(245, 158, 11, 0.01) 100%
  );
}

.source-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.source-toggle-icon {
  color: var(--text-muted);
}

.source-details {
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.details-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.detail-row a {
  color: var(--accent-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.detail-row .label {
  font-weight: 500;
  color: var(--text-muted);
}

.auto-captured-badge {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  padding: 0.25rem 0.6rem;
  border-radius: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  width: fit-content;
}

.source-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.verify-btn {
  background: var(--accent-primary);
  border: none;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 0.3rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.delete-btn {
  background: rgba(239, 68, 68, 0.1);
  border: none;
  color: #ef4444;
  padding: 0.4rem;
  border-radius: 0.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-sources {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 4rem 2rem;
  color: var(--text-muted);
  text-align: center;
}

.sources-loading {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* CSS for Deep Reader Modal */
.deep-reader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.deep-reader-modal {
  width: 100%;
  max-width: 800px;
  height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.reader-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.reader-header h3 {
  margin: 0;
  color: var(--color-text-primary);
}

.reader-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
}

.reader-content pre {
  white-space: pre-wrap;
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Button Styles */
.read-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.read-btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.2);
  border-color: #60a5fa;
}

.read-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.knowledge-graph-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.knowledge-graph-card.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  border-radius: 0;
  background: #05050a;
}

.graph-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.graph-header h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.graph-controls {
  display: flex;
  gap: 0.5rem;
}

.graph-controls button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.graph-controls button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--color-text);
  transform: translateY(-1px);
}

.graph-viewport {
  flex: 1;
  position: relative;
  background: #000;
  background-image: radial-gradient(
      circle at center,
      rgba(139, 92, 246, 0.08) 0%,
      transparent 70%
    ),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 30px 30px, 30px 30px;
}

.graph-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  animation: pulse 2s infinite;
}

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

.spinning {
  animation: spin 1s linear infinite;
}

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

/* Ensure controls are visible in fullscreen and non-fullscreen */
.knowledge-graph-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.graph-controls-overlay {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.graph-control-btn {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}

.graph-control-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-1px);
}

.graph-control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.branching-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: 32px;
}

.branch-indicator {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  position: relative;
  cursor: help;
}

.variants-list-hover {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  padding: 0.5rem;
  border-radius: 8px;
  display: none;
  gap: 4px;
  border: 1px solid var(--border-light);
  margin-bottom: 8px;
}

.branch-indicator:hover .variants-list-hover {
  display: flex;
}

.variant-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.variant-dot.active {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.branch-trigger-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0 0.25rem;
}

.branch-trigger-btn:hover {
  color: var(--primary);
}

.branch-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 0 0.25rem;
  overflow: hidden;
}

.branch-label-input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  width: 100px;
  outline: none;
}

.confirm-branch-btn {
  background: var(--primary);
  color: white;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.confirm-branch-btn:hover {
  background: var(--primary-hover);
}
/* Usage Indicator */
.usage-indicator {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
}

.usage-indicator.compact {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
  color: var(--color-primary-light);
}

.usage-indicator.low {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.usage-indicator.empty {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.usage-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary-light);
  font-weight: 700;
}

.usage-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.usage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #8b5cf6);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.usage-indicator.low .usage-fill {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.usage-indicator.empty .usage-fill {
  background: #ef4444;
}

.usage-text {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}
.review-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.header-action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.3);
}

/* User Menu Mini */
.user-menu-mini {
  position: relative;
}

.user-trigger-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-warm-cta);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.user-dropdown-alt {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  background: rgba(15, 15, 25, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  z-index: 2000;
}

.user-email-label {
  padding: 12px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
}

.dropdown-item.logout {
  color: var(--color-error);
  margin-top: 4px;
}

.dropdown-item.logout:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* New Navigation Bar */
.review-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.nav-tab {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
}

.nav-tab.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--color-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-count {
  font-size: 0.7rem;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--color-text-muted);
}

.nav-tab.active .tab-count {
  background: var(--color-primary);
  color: white;
}

.nav-tab-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.nav-tab-icon:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
}

.nav-tab-icon.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.review-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-xl) var(--space-lg);
  gap: var(--space-xl);
}

.empty-queue {
  text-align: center;
  padding: var(--space-2xl);
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.success-icon {
  color: var(--color-success);
  margin-bottom: var(--space-md);
  filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.3));
}

.empty-queue h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin: 0;
}

.prose-sub {
  color: var(--color-text-secondary);
  font-family: var(--font-prose);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.cta-button {
  display: inline-flex;
  padding: var(--space-md) var(--space-xl);
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.review-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-position {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  min-width: 60px;
  text-align: center;
}

.fragment-wrapper {
  width: 100%;
  max-width: 600px;
}

.review-card {
  padding: var(--space-xl);
}

.fragment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.fragment-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.narrative-tag {
  background: rgba(var(--color-primary-rgb), 0.2);
  color: var(--color-primary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
}

.fragment-tools {
  display: flex;
  gap: var(--space-sm);
}

.tool-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.tool-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.tool-btn:hover::before {
  opacity: 1;
}

.tool-btn:active {
  transform: scale(0.95) translateY(0);
}

.tool-btn.active {
  background: rgba(var(--color-primary-rgb), 0.15);
  color: var(--color-primary);
  border-color: rgba(var(--color-primary-rgb), 0.3);
  box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.2);
}

.playback:hover {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

.promote:hover {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.playback:active,
.promote:active {
  transform: scale(0.9);
}

.status-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
}

.status-badge.raw {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.status-badge.processing {
  background: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
}

.status-badge.processed {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.fragment-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.raw-text h4,
.processed-text h4 {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.raw-text p,
.processed-text p {
  font-family: var(--font-prose);
  font-size: 1.25rem;
  line-height: 1.7;
}

.raw-text.miniaturized {
  opacity: 0.6;
  cursor: pointer;
  transition: all 0.2s;
}

.raw-text.miniaturized:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
}

.tool-btn.promote:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border-color: #10b981;
}

.export-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: var(--text-sm);
}

.export-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.processed-text {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.processed-text h4 {
  color: var(--color-primary);
}

.review-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.review-actions .action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 1.25rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 90px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.review-actions .action-btn.reject {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1);
}

.review-actions .action-btn.reject:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.2);
}

.review-actions .action-btn.process {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
}

.review-actions .action-btn.process:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
}

.review-actions .action-btn.assign {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

.review-actions .action-btn.assign:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

.review-actions .action-btn.approve {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.1);
}

.review-actions .action-btn.approve:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.2);
}

.review-actions .action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.spin {
  animation: spin 1s linear infinite;
}

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

/* Assign Modal */
.assign-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.assign-modal {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-xl);
  width: 100%;
  max-width: 500px;
  max-height: 60vh;
}

.assign-modal h3 {
  margin-bottom: var(--space-lg);
  text-align: center;
}

.section-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-height: 300px;
  overflow-y: auto;
}

.section-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-align: left;
  transition: all var(--transition-fast);
}

.section-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.no-sections {
  text-align: center;
  color: var(--color-text-secondary);
  padding: var(--space-lg);
}

/* Mobile Optimizations */
@media (max-width: 640px) {
  /* Nav bar: horizontal scroll for tabs */
  .review-nav-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    scrollbar-width: none; /* Firefox */
  }

  .review-nav-bar::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .nav-group {
    flex-shrink: 0;
  }

  .nav-tab {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .nav-tab-icon {
    width: 36px;
    height: 36px;
  }

  /* Review content spacing for fixed bottom actions */
  .review-content {
    padding-bottom: 140px;
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  /* Fixed bottom action bar */
  .review-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-md) var(--space-sm);
    padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 0.5rem;
    z-index: 50;
  }

  /* Smaller action buttons on mobile */
  .action-btn {
    flex: 1;
    min-width: 60px;
    padding: 0.75rem 0.5rem;
    font-size: 0.65rem;
    gap: 4px;
    border-radius: 14px;
  }

  .action-btn svg {
    width: 20px;
    height: 20px;
  }

  /* Assign modal - ensure scroll */
  .assign-modal {
    max-height: 70vh;
    padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
  }

  .section-list {
    max-height: 50vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Fragment card sizing */
  .fragment-wrapper {
    max-width: 100%;
  }

  .review-card {
    padding: var(--space-md);
  }

  .fragment-header {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .fragment-tools {
    align-self: flex-end;
  }
}
.privacy-onboarding {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2.5rem;
  text-align: center;
}

.onboarding-step h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.privacy-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.privacy-option {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.privacy-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.privacy-option.active {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.5);
}

.privacy-option .icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.privacy-option h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  color: #fff;
}

.privacy-option p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.password-setup .input-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.password-setup input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.password-setup input:focus {
  outline: none;
  border-color: #8b5cf6;
}

.warning-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 2rem;
  text-align: left;
}

.warning-box .icon {
  color: #f59e0b;
  flex-shrink: 0;
}

.warning-box p {
  margin: 0;
  font-size: 0.85rem;
  color: #fbbf24;
}

.error-text {
  color: #ef4444;
  font-size: 0.85rem;
  margin: 0;
}

.primary-button {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.3s, transform 0.2s;
}

.primary-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.success-icon {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.animate-in {
  animation: slideUpFade 0.5s ease-out forwards;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.mood-picker {
  margin: 1.5rem 0;
}

.mood-picker h3 {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

@media (max-width: 600px) {
  .mood-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mood-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: rgba(255, 255, 255, 0.5);
}

.mood-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-2px);
}

.mood-btn.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--mood-color);
  color: #fff;
  box-shadow: 0 0 20px color-mix(in srgb, var(--mood-color) 40%, transparent);
}

.mood-btn span {
  font-size: 0.7rem;
  font-weight: 500;
}

/* Intensity Section */
.intensity-section {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.intensity-label {
  display: block;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
  text-align: center;
}

.intensity-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
}

.intensity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--mood-color, #a78bfa);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}

.intensity-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.intensity-markers {
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  margin-top: 0.5rem;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.2);
}

.intensity-markers .filled {
  color: var(--mood-color, #a78bfa);
}

.confirm-mood-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--mood-color, #a78bfa);
  border: none;
  border-radius: 8px;
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.confirm-mood-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px color-mix(in srgb, var(--mood-color) 50%, transparent);
}

.animate-in {
  animation: fadeSlideIn 0.3s ease-out;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.mood-timeline {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #e879f9;
  font-weight: 600;
}

.period-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 1.5rem;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  position: relative;
  transition: all 0.2s;
}

.calendar-day.has-mood {
  background: var(--mood-bg);
  border-color: var(--mood-border);
}

.calendar-day.today {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.calendar-day:hover {
  transform: scale(1.1);
  z-index: 1;
}

.day-num {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.calendar-day.has-mood .day-num {
  color: #fff;
}

.mood-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.timeline-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.prompt-suggestion {
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.05) 0%,
    rgba(30, 41, 59, 0.4) 100%
  );
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.prompt-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #a78bfa;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sparkle-icon {
  color: #fbbf24;
}

.shuffle-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.shuffle-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  transform: rotate(30deg);
}

.prompt-text {
  font-size: 1.1rem;
  color: #fff;
  margin: 0 0 1rem 0;
  line-height: 1.4;
  font-weight: 500;
}

.use-prompt-btn {
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 6px;
  color: #a78bfa;
  cursor: pointer;
  transition: all 0.2s;
}

.use-prompt-btn:hover {
  background: #8b5cf6;
  color: #fff;
  border-color: #8b5cf6;
}
.journal-dashboard {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.dashboard-header {
  margin-bottom: 2.5rem;
  text-align: left;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.dashboard-header h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dashboard-header p {
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
}

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

.main-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.side-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mood-section {
  padding: 1.5rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
}

.stat-icon {
  width: 32px;
  height: 32px;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.recent-moods {
  padding: 1.5rem;
}

.recent-moods h3 {
  font-size: 1rem;
  margin: 0 0 1rem 0;
  color: rgba(255, 255, 255, 0.8);
}

.mood-history {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}

.history-date {
  color: rgba(255, 255, 255, 0.4);
}

.history-mood {
  color: #fff;
  font-weight: 500;
  text-transform: capitalize;
}

.empty-history {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
  margin: 0;
}

.new-entry-btn {
  position: relative;
  width: 100%;
  padding: 1.25rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.new-entry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: pulse 2s infinite;
  pointer-events: none;
}

@keyframes pulse {
  0% {
    width: 0;
    height: 0;
    opacity: 0.5;
  }
  100% {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}
.journal-mode-container {
  min-height: 100vh;
  background: radial-gradient(
      circle at top right,
      rgba(139, 92, 246, 0.1),
      transparent 40%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(16, 185, 129, 0.05),
      transparent 40%
    );
}
.speaker-manager {
  padding: 1.5rem;
}

.manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.manager-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
}

.add-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 6px;
  color: #a78bfa;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.add-btn:hover {
  background: #8b5cf6;
  color: #fff;
}

.speaker-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.speaker-form input,
.speaker-form textarea {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.6rem;
  color: #fff;
  font-size: 0.9rem;
}

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

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.form-actions button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  border: 1px solid transparent;
}

.save-btn {
  background: #10b981;
  color: #fff;
}

.cancel-btn {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

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

.speaker-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}

.speaker-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.speaker-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
}

.speaker-info {
  flex: 1;
}

.speaker-info h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #fff;
}

.speaker-info p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.item-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.speaker-item:hover .item-actions {
  opacity: 1;
}

.item-actions button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.item-actions button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.empty-msg {
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  margin: 1rem 0;
}
.oral-history-dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

.oh-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1.5rem;
}

.oh-header h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, #fff 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.oh-header p {
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.header-stats {
  display: flex;
  gap: 1.5rem;
}

.mini-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #fbbf24;
  padding: 0.4rem 0.8rem;
  background: rgba(251, 191, 36, 0.1);
  border-radius: 20px;
}

.oh-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
}

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

.main-content,
.side-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.interview-actions {
  padding: 2rem;
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.05) 0%,
    rgba(30, 41, 59, 0.4) 100%
  );
}

.interview-actions h3 {
  margin: 0 0 1rem 0;
  color: #fff;
}

.interview-actions p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.start-interview-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: #fbbf24;
  color: #000;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.start-interview-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(251, 191, 36, 0.2);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fbbf24;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.recent-segments,
.legacy-output {
  padding: 1.5rem;
}

.legacy-output p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.5rem;
}

.secondary-btn {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.oral-history-mode-container {
  min-height: 100vh;
  background: radial-gradient(
      circle at top right,
      rgba(251, 191, 36, 0.1),
      transparent 40%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(168, 85, 247, 0.05),
      transparent 40%
    );
}
.npc-manager {
  padding: 1.5rem;
}

.manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.add-npc-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: #ef4444;
  font-size: 0.85rem;
  cursor: pointer;
}

.npc-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.npc-form input,
.npc-form select,
.npc-form textarea {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.6rem;
  color: #fff;
  font-size: 0.9rem;
}

.npc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.npc-card {
  position: relative;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: all 0.2s;
  overflow: hidden;
}

.npc-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.npc-card.dead {
  opacity: 0.6;
}

.npc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.npc-header h4 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}

.npc-meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 0.75rem 0;
}

.npc-alliance {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.card-hover-actions {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.npc-card:hover .card-hover-actions {
  opacity: 1;
}

.card-hover-actions button {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.card-hover-actions button:hover {
  background: rgba(255, 255, 255, 0.1);
}
.session-tracker {
  padding: 1.5rem;
}

.tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.title-with-icon h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
}

.add-session-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: #ef4444;
  font-size: 0.8rem;
  cursor: pointer;
}

.session-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.session-form input,
.session-form textarea {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.6rem;
  color: #fff;
  font-size: 0.9rem;
}

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

.session-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.session-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
}

.session-number {
  width: 32px;
  height: 32px;
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.session-info {
  flex: 1;
}

.session-info h4 {
  margin: 0 0 0.2rem 0;
  font-size: 0.95rem;
  color: #fff;
}

.session-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.item-arrow {
  color: rgba(255, 255, 255, 0.2);
}
.session-recap {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.recap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #ef4444;
  font-weight: 600;
}

.generate-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #ef4444;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.generate-btn:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.2);
}

.generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.generate-btn .spin {
  animation: spin 1s linear infinite;
}

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

.recap-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.recap-stats .stat {
  text-align: center;
}

.recap-stats .value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.recap-stats .label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.recap-content {
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.recap-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.recap-actions button {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  cursor: pointer;
}

.recap-actions button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.recap-actions button.copied {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.recap-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.recap-text h2 {
  font-size: 1.1rem;
  color: #ef4444;
  margin: 0 0 0.75rem 0;
}

.recap-text h3 {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 1rem 0 0.5rem 0;
}

.recap-text li {
  margin-left: 1rem;
  list-style: disc;
}

.recap-text em {
  color: rgba(255, 255, 255, 0.5);
}

.empty-recap {
  text-align: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
}

.animate-in {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.ttrpg-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.ttrpg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}

.header-crown {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #ef4444;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ttrpg-header h1 {
  font-size: 2.8rem;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, #fff 0%, #ef4444 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ttrpg-header p {
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.record-session-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.record-session-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.ttrpg-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
}

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

.quick-actions {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.05) 0%,
    rgba(30, 41, 59, 0.4) 100%
  );
}

.quick-actions h3 {
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
  color: rgba(255, 255, 255, 0.6);
}

.action-buttons {
  display: flex;
  gap: 1rem;
}

.action-buttons button {
  flex: 1;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.action-buttons button:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}
.ttrpg-mode-container {
  min-height: 100vh;
  background: radial-gradient(
      circle at top right,
      rgba(239, 68, 68, 0.1),
      transparent 40%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(30, 41, 59, 0.4),
      transparent 40%
    );
}
.segment-editor {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.segment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.header-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #a78bfa;
  font-weight: 600;
}

.add-segment-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 6px;
  color: #a78bfa;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.add-segment-btn:hover {
  background: rgba(167, 139, 250, 0.2);
}

.segment-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.segment-form input,
.segment-form textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  color: #fff;
  font-size: 0.9rem;
}

.segment-form textarea {
  resize: vertical;
  min-height: 60px;
}

.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.time-input {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.time-input label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.cancel-btn,
.save-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.cancel-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
}

.save-btn {
  background: #a78bfa;
  border: none;
  color: #000;
}

.segments-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.segment-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.2s;
}

.segment-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(167, 139, 250, 0.2);
}

.drag-handle {
  color: rgba(255, 255, 255, 0.2);
  cursor: grab;
}

.segment-order {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(167, 139, 250, 0.1);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  color: #a78bfa;
}

.segment-time {
  font-family: monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  min-width: 50px;
}

.segment-main {
  flex: 1;
}

.segment-main h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #fff;
}

.segment-notes {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.segment-duration {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.segment-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.segment-item:hover .segment-actions {
  opacity: 1;
}

.segment-actions button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  padding: 4px;
  cursor: pointer;
}

.segment-actions button:hover {
  color: #fff;
}

.segment-actions .delete-btn:hover {
  color: #ef4444;
}

.empty-segments {
  text-align: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
}

.animate-in {
  animation: fadeSlideIn 0.2s ease-out;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.show-notes-generator {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.generator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #a78bfa;
  font-weight: 600;
}

.generate-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 8px;
  color: #a78bfa;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.generate-btn:hover:not(:disabled) {
  background: rgba(167, 139, 250, 0.2);
}

.generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.generate-btn .spin {
  animation: spin 1s linear infinite;
}

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

.generator-context {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 1.5rem 0;
}

.notes-output {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(167, 139, 250, 0.2);
  overflow: hidden;
}

.notes-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.notes-actions button {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  cursor: pointer;
}

.notes-actions button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notes-actions button.copied {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.notes-preview {
  margin: 0;
  padding: 1.25rem;
  font-family: "JetBrains Mono", "SF Mono", monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
}

.empty-notes {
  text-align: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
}

.animate-in {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.episode-manager {
  padding: 1.5rem;
}

.manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.title-group h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
}

.add-episode-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 6px;
  color: #a78bfa;
  font-size: 0.8rem;
  cursor: pointer;
}

.episode-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.episode-form input,
.episode-form select {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.6rem;
  color: #fff;
  font-size: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

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

.episode-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.episode-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
}

.status-icon.published {
  color: #10b981;
}
.status-icon.recorded {
  color: #3b82f6;
}
.status-icon.researching {
  color: #a78bfa;
}
.status-icon.draft {
  color: rgba(255, 255, 255, 0.3);
}

.episode-main {
  flex: 1;
}

.episode-main h4 {
  margin: 0 0 0.3rem 0;
  font-size: 1rem;
  color: #fff;
}

.episode-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  background: rgba(167, 139, 250, 0.1);
  color: #a78bfa;
  border-radius: 4px;
}

.date-label {
  gap: 0.3rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Detail View */
.manager-header.detail-view {
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.title-group-detail {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.title-group-detail h3 {
  font-size: 1.25rem;
  color: #fff;
  margin: 0;
}

.back-btn-text {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: #a78bfa;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.back-btn-text:hover {
  text-decoration: underline;
}

.episode-tools-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.tool-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .episode-tools-grid {
    grid-template-columns: 1fr;
  }

  .tool-column.side {
    order: 1;
  }
}
.podcast-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.podcast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(167, 139, 250, 0.2);
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.live-tag .dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.podcast-header h1 {
  font-size: 2.8rem;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.podcast-header p {
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.header-controls {
  display: flex;
  gap: 1rem;
}

.research-btn,
.start-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.research-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.start-btn {
  background: #a78bfa;
  border: none;
  color: #000;
}

.research-btn:hover,
.start-btn:hover {
  transform: translateY(-2px);
}

.podcast-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
}

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

.grid-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guest-card,
.notes-card {
  padding: 1.5rem;
}

.card-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #a78bfa;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 1rem;
}

.guest-card p,
.notes-card p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.pill-btn {
  width: 100%;
  padding: 0.6rem;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.2);
  color: #a78bfa;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.pill-btn:hover {
  background: rgba(167, 139, 250, 0.2);
  border-color: #a78bfa;
}
.podcast-mode-container {
  min-height: 100vh;
  background: radial-gradient(
      circle at top right,
      rgba(167, 139, 250, 0.1),
      transparent 40%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(30, 41, 59, 0.4),
      transparent 40%
    );
}
.argument-mapper {
  padding: 1.5rem;
}

.mapper-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-title h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
}

.add-node-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 6px;
  color: #3b82f6;
  font-size: 0.8rem;
  cursor: pointer;
}

.node-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.node-form select,
.node-form textarea {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.6rem;
  color: #fff;
  font-size: 0.9rem;
}

.nodes-tree {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.node-wrapper {
  margin-top: 0.5rem;
}

.arg-node {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left-width: 4px;
}

.arg-node.thesis {
  border-left-color: #3b82f6;
}
.arg-node.claim {
  border-left-color: #8b5cf6;
}
.arg-node.evidence {
  border-left-color: #10b981;
}
.arg-node.counter-claim {
  border-left-color: #ef4444;
}

.node-type-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
}

.node-content {
  flex: 1;
  font-size: 0.9rem;
  color: #fff;
}

.node-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.arg-node:hover .node-actions {
  opacity: 1;
}

.node-actions button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 4px;
}

.node-actions button:hover {
  color: #fff;
}
.loading-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.loading-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.loading-btn--primary {
  background-color: #3b82f6;
  color: white;
}

.loading-btn--primary:hover:not(:disabled) {
  background-color: #2563eb;
}

.loading-btn--primary:active:not(:disabled) {
  background-color: #1d4ed8;
}

.loading-btn--secondary {
  background-color: #e2e8f0;
  color: #1e293b;
}

.loading-btn--secondary:hover:not(:disabled) {
  background-color: #cbd5e1;
}

.loading-btn--secondary:active:not(:disabled) {
  background-color: #94a3b8;
}

.loading-btn--ghost {
  background-color: transparent;
  color: #64748b;
}

.loading-btn--ghost:hover:not(:disabled) {
  background-color: #f1f5f9;
  color: #334155;
}

.loading-btn--ghost:active:not(:disabled) {
  background-color: #e2e8f0;
}

.loading-btn--loading {
  pointer-events: none;
}

.loading-btn-text {
  display: inline-block;
  transition: opacity 0.2s ease;
}.citation-manager {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.header-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #3b82f6;
  font-weight: 600;
}

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

.add-citation-btn,
.export-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.add-citation-btn {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.export-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
}

.export-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.citation-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.citation-form input,
.citation-form select,
.citation-form textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  color: #fff;
  font-size: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.75rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.cancel-btn,
.save-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.cancel-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
}

.save-btn {
  background: #3b82f6;
  border: none;
  color: #fff;
}

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

.citation-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid #3b82f6;
}

.citation-content {
  flex: 1;
}

.formatted-citation {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

.formatted-citation em {
  font-style: italic;
}

.citation-notes {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.citation-actions {
  display: flex;
  gap: 0.25rem;
}

.citation-actions button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  padding: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.citation-actions button:hover {
  color: #fff;
}

.citation-actions button.copied {
  color: #10b981;
}

.empty-citations {
  text-align: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
}

.animate-in {
  animation: fadeSlideIn 0.2s ease-out;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.academic-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.academic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.field-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.academic-header h1 {
  font-size: 2.8rem;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, #fff 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.academic-header p {
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 1rem;
}

.knowledge-btn,
.write-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.knowledge-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.write-btn {
  background: #3b82f6;
  border: none;
  color: #fff;
}

.knowledge-btn:hover,
.write-btn:hover {
  transform: translateY(-2px);
}

.academic-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
}

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

.grid-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.citation-tool,
.analysis-card {
  padding: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: 1rem;
}

.citation-tool p,
.analysis-card p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.action-pill {
  width: 100%;
  padding: 0.6rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.action-pill:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
}
.academic-mode-container {
  min-height: 100vh;
  background: radial-gradient(
      circle at top right,
      rgba(59, 130, 246, 0.1),
      transparent 40%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(30, 41, 59, 0.4),
      transparent 40%
    );
}
.dashboard-container {
  min-height: 100vh;
  background: var(--gradient-bg);
}

/* Header Override to Match ReviewPage */
.review-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.25rem 3rem;
  background: rgba(15, 15, 26, 0.7);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
}

.back-btn-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
}

.back-btn-round:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-4px);
}

.header-central {
  text-align: center;
}

.header-central h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(
    --gradient-text,
    linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(139, 92, 246, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 0.25rem;
}

.header-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
  cursor: pointer;
  margin-left: auto;
}

.header-action-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--color-primary);
  color: var(--color-primary-light);
  transform: translateY(-2px);
}

.header-action-btn.secondary-text {
  width: auto;
  padding: 0 1.25rem;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  margin-left: 0; /* Override auto margin */
}

.dashboard-sub-header {
  padding: 2.5rem 3rem 0;
  max-width: 1400px;
  margin: 0 auto;
}

.header-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
  align-items: center;
}

.options-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s;
}

.options-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.generate-action-btn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s;
}

.generate-action-btn.primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.2);
}

.generate-action-btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.3);
  opacity: 0.9;
}

.generate-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  padding: 2.5rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.75rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.stat-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-primary-light);
}

.stat-icon-wrapper.word-count {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
}
.stat-icon-wrapper.fragments {
  background: rgba(6, 182, 212, 0.1);
  color: #22d3ee;
}
.stat-icon-wrapper.pending {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
}
.stat-icon-wrapper.holding-alert {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}
.stat-icon-wrapper.holding {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
}

.dashboard-detail-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  padding: 0 3rem 5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.detail-card {
  padding: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  height: 100%;
}

.detail-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.draft-preview-content {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  padding: 2rem;
  min-height: 500px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-text-wrapper pre {
  font-family: var(--font-prose);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
  white-space: pre-wrap;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.progress-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill.writing {
  background: var(--color-primary);
}
.progress-fill.holding {
  background: var(--color-error);
}
.progress-fill.processed {
  background: var(--color-success);
}

.status-item {
  margin-bottom: 1.5rem;
}

.status-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.writing {
  background: var(--color-primary);
}
.status-dot.holding {
  background: var(--color-error);
}
.status-dot.processed {
  background: var(--color-success);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .review-header {
    padding: 1rem;
    grid-template-columns: auto 1fr auto;
  }

  .header-central h1 {
    font-size: 1.1rem;
  }

  .dashboard-sub-header {
    padding: 1.5rem 1rem 0;
  }

  .header-actions-bar {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .options-toggle-btn,
  .generate-action-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  /* Stats grid responsive */
  .stats-grid {
    gap: 1rem;
    padding: 1.5rem 1rem;
  }

  .stat-card {
    padding: 1.25rem;
    gap: 1rem;
    border-radius: 18px;
  }

  .stat-icon-wrapper {
    width: 44px;
    height: 44px;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  /* Single column detail grid */
  .dashboard-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 1rem 3rem;
  }

  .detail-card {
    padding: 1.5rem;
    border-radius: 24px;
  }

  .detail-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }

  .draft-preview-content {
    padding: 1.25rem;
    min-height: 300px;
    border-radius: 16px;
  }

  .preview-text-wrapper pre {
    font-size: 1rem;
  }
}

/* Ensure container handles overflow */
.dashboard-container {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}
.timeline-page {
  min-height: 100vh;
  background: var(--gradient-bg);
}

/* Header Override to Match ReviewPage */
.review-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.25rem 3rem;
  background: rgba(15, 15, 26, 0.7);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
}

.back-btn-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
}

.back-btn-round:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-4px);
}

.header-central {
  text-align: center;
}

.header-central h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(
    --gradient-text,
    linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(139, 92, 246, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 0.25rem;
}

.header-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
  cursor: pointer;
  margin-left: auto;
}

.header-action-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--color-primary);
  color: var(--color-primary-light);
  transform: translateY(-2px);
}

.header-action-btn .spin {
  animation: spin 2s linear infinite;
}

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

.timeline-controls {
  padding: 2.5rem 3rem 0;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.view-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 0.4rem;
}

.view-toggle button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.25rem;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  transition: all 0.3s;
}

.view-toggle button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.view-toggle button.active {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.timeline-container {
  padding: 3rem;
  max-width: 1200px;
  margin: 0 auto 5rem;
}

.timeline-group {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 4rem;
}

.timeline-group::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary), transparent);
}

.date-marker {
  position: absolute;
  left: -6px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.group-header {
  margin-bottom: 2rem;
}

.date-label {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.25rem;
}

.fragment-count {
  font-size: 0.75rem;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}

.group-fragments {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-card {
  padding: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-card:hover {
  transform: translateX(8px);
  border-color: rgba(255, 255, 255, 0.2);
}

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

.status-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.status-badge.writing {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}
.status-badge.processed {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}
.status-badge.holding {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.card-text {
  font-family: var(--font-prose);
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}
.entity-page-container {
  min-height: 100vh;
  background: var(--gradient-bg);
}

/* Header Override to Match ReviewPage */
.review-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.25rem 3rem;
  background: rgba(15, 15, 26, 0.7);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
}

.back-btn-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
}

.back-btn-round:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-4px);
}

.header-central {
  text-align: center;
}

.header-central h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(
    --gradient-text,
    linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(139, 92, 246, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 0.25rem;
}

.header-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
  cursor: pointer;
  margin-left: auto;
}

.header-action-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--color-primary);
  color: var(--color-primary-light);
  transform: translateY(-2px);
}

.entity-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 3rem;
  padding: 3rem;
  max-width: 1600px;
  margin: 0 auto;
}

/* Sidebar */
.entity-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 120px;
  max-height: calc(100vh - 150px);
}

.filter-card {
  padding: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.search-box {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}

.search-box input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--color-text);
  font-size: 0.9rem;
  transition: all 0.3s;
}

.search-box input:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-primary);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.1);
}

.type-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.4rem 0.9rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.add-entity-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.875rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s;
}

.add-entity-btn.primary {
  background: var(--gradient-warm-cta);
  color: white;
  box-shadow: 0 8px 16px rgba(249, 115, 22, 0.2);
}

.add-entity-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.3);
}

.entity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.entity-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.entity-list-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.entity-list-item.active {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.type-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.type-icon.character {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}
.type-icon.place {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
.type-icon.concept {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}
.type-icon.other {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
}

.entity-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.entity-item-info .name {
  font-weight: 500;
  font-size: var(--text-md);
}

.entity-item-info .type-label {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.entity-list-item .arrow {
  color: var(--text-secondary);
  opacity: 0.3;
}

/* Main Editor */
.entity-main {
  min-height: 600px;
}

.entity-editor-card {
  padding: 3rem;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.type-icon.large {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  font-size: 1.5rem;
}

.editor-header h2 {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--color-text);
}

.header-buttons {
  display: flex;
  gap: 1rem;
}

.editor-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-group label {
  font-size: 0.75rem;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: var(--color-text);
  font-size: 1.1rem;
  transition: all 0.3s;
  outline: none;
}

.form-group textarea {
  font-family: var(--font-prose);
  line-height: 1.7;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 25px rgba(124, 58, 237, 0.1);
}

.merge-section {
  padding: 1.5rem;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.merge-controls {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.merge-controls select {
  flex: 1;
}

.btn-merge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1.5rem;
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-merge:hover:not(:disabled) {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

.help-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin: 0;
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-save {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(124, 58, 237, 0.3);
}

.delete-btn,
.close-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
  border-color: rgba(239, 68, 68, 0.2);
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.empty-editor {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-muted);
  text-align: center;
  padding: 4rem;
  border: 2px dashed rgba(255, 255, 255, 0.05);
  border-radius: 32px;
}

.empty-icon {
  color: rgba(255, 255, 255, 0.1);
}

.empty-editor h3 {
  color: var(--color-text);
  margin: 0;
  font-weight: 800;
}

.empty-editor p {
  margin: 0;
  font-size: 1.1rem;
}

@media (max-width: 1200px) {
  .entity-layout {
    grid-template-columns: 1fr;
    padding: 1.5rem 1rem;
    gap: 1.5rem;
  }

  .entity-sidebar {
    position: static;
    max-height: none;
  }
}

/* Mobile-specific enhancements */
@media (max-width: 768px) {
  .review-header {
    padding: 1rem;
    grid-template-columns: auto 1fr auto;
  }

  .header-central h1 {
    font-size: 1.1rem;
  }

  /* Compact filter card */
  .filter-card {
    padding: 1rem;
    border-radius: 18px;
  }

  /* Horizontal scrolling filters */
  .type-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }

  .type-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Entity list cards */
  .entity-list-item {
    padding: 0.875rem;
    border-radius: 14px;
  }

  /* Compact editor card */
  .entity-editor-card {
    padding: 1.5rem;
    border-radius: 24px;
  }

  .editor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .editor-header h2 {
    font-size: 1.5rem;
  }

  .header-buttons {
    width: 100%;
    justify-content: flex-end;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 1rem;
    font-size: 1rem;
  }

  .merge-controls {
    flex-direction: column;
  }

  .btn-save {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 2rem;
  }

  .empty-editor {
    padding: 2rem;
  }
}
.sources-page {
  min-height: 100vh;
  background: var(--gradient-bg);
}

/* Header Override to Match ReviewPage */
.review-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.25rem 3rem;
  background: rgba(15, 15, 26, 0.7);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
}

.back-btn-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
}

.back-btn-round:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-4px);
}

.header-central {
  text-align: center;
}

.header-central h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(
    --gradient-text,
    linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(139, 92, 246, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 0.25rem;
}

.header-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
  cursor: pointer;
  margin-left: auto;
}

.header-action-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--color-primary);
  color: var(--color-primary-light);
  transform: translateY(-2px);
}

.header-action-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.sources-toolbar {
  display: flex;
  gap: 1.5rem;
  margin: 3rem auto;
  align-items: center;
  max-width: 1200px;
  padding: 0 2rem;
}

.search-bar {
  flex: 1;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}

.search-bar input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: var(--color-text);
  outline: none;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.search-bar input:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-primary);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.1);
}

.filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-muted);
}

.filters select {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: var(--color-text);
  outline: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.filters select:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
}

.source-card {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.source-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.source-card.verified {
  border-top: 4px solid var(--color-success);
}

.source-type {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.source-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--color-text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.source-author {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-family: var(--font-prose);
  margin-bottom: 1.5rem;
}

.source-meta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.8rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.source-url {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-accent-cool);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.source-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.source-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.verify-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  color: var(--color-success);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
}

.verify-btn:hover {
  background: var(--color-success);
  color: white;
  transform: translateY(-2px);
}

.delete-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--color-error);
  cursor: pointer;
  transition: all 0.2s;
}

.delete-btn:hover {
  background: var(--color-error);
  color: white;
  transform: translateY(-2px);
}

.loading-state,
.empty-state {
  grid-column: 1 / -1;
  padding: 6rem;
  text-align: center;
  color: var(--color-text-muted);
}

.empty-state h3 {
  color: var(--color-text);
  margin: 1.5rem 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
}
/* Integration Settings Styles */

.integration-card-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.integration-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-badge.connected {
  background: rgba(var(--color-success), 0.15);
  color: rgb(var(--color-success));
  border: 1px solid rgba(var(--color-success), 0.3);
}

.status-badge.disconnected {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.integration-details {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.detail-value {
  color: var(--color-text-primary);
  font-family: monospace;
}

.integration-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-end;
}

.error-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgb(var(--color-error));
  font-size: 0.85rem;
  padding: 0.5rem;
  background: rgba(var(--color-error), 0.1);
  border-radius: 6px;
  margin-right: auto;
}

.btn-primary {
  background: white;
  color: black;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Make status row adapt for small screens */
@media (max-width: 600px) {
  .integration-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .integration-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-message {
    width: 100%;
  }
}
.confirm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.confirm-modal-container {
  width: 100%;
  max-width: 420px;
}

.confirm-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem !important;
  border: 1px solid var(--glass-border);
}

.confirm-card.destructive {
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.1);
}

.confirm-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.confirm-header .icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--glass-bg);
  color: var(--text-secondary);
}

.confirm-card.destructive .icon-wrapper {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-error);
}

.confirm-header h3 {
  flex: 1;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.confirm-header .close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.confirm-header .close-btn:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
}

.confirm-body p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
  margin: 0;
}

.confirm-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.confirm-actions button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.confirm-actions .cancel-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.confirm-actions .cancel-btn:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
}

.confirm-actions .confirm-btn {
  border: none;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
}

.confirm-actions .confirm-btn.primary {
  background: var(--primary-color);
  color: white;
}

.confirm-actions .confirm-btn.primary:hover {
  filter: brightness(1.1);
}

.confirm-actions .confirm-btn.danger {
  background: var(--accent-error);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.confirm-actions .confirm-btn.danger:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.settings-page {
  min-height: 100vh;
  background: var(--gradient-bg);
}

/* Header styles handled by ResponsiveHeader */

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(139, 92, 246, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 0.25rem;
}

.header-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
  cursor: pointer;
  margin-left: auto;
}

.header-action-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--color-primary);
  color: var(--color-primary-light);
  transform: translateY(-2px);
}

.header-action-btn .spin {
  animation: spin 2s linear infinite;
}

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

.spinning {
  animation: spin 1s linear infinite;
}

.success-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: 12px;
  color: #22c55e;
  font-weight: 700;
  transition: all 0.2s;
}

.success-btn:hover {
  background: rgba(34, 197, 94, 0.2);
  transform: translateY(-2px);
}

.settings-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  padding: 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.settings-sidebar {
  position: sticky;
  top: 120px;
  height: fit-content;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-nav button {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  transition: all 0.3s;
  text-align: left;
}

.settings-nav button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.settings-nav button.active {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.section-header {
  margin-bottom: 2rem;
}

.section-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: white;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.form-card {
  padding: 2.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  font-size: 0.75rem;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: var(--color-text);
  font-size: 1.1rem;
  transition: all 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 25px rgba(124, 58, 237, 0.1);
}

.theme-selector {
  display: flex;
  gap: 1rem;
}

.theme-selector button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: var(--color-text-secondary);
  font-weight: 700;
  transition: all 0.3s;
}

.theme-selector button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.theme-selector button.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* ============================================
   New Settings Components Styles
   ============================================ */

/* Card Title */
.card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-title h4 {
  font-size: 1rem;
  font-weight: 800;
  color: white;
  margin: 0;
}

.card-title svg {
  color: var(--color-primary-light);
}

.card-description {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.card-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
  font-style: italic;
}

/* Form Group with Icon in Label */
.form-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group label svg {
  color: var(--color-primary-light);
  flex-shrink: 0;
}

/* Toggle Description */
.toggle-description {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

/* Field Hint */
.field-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* Toggle Group */
.toggle-group {
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem !important;
}

.toggle-group label {
  flex: 1;
  min-width: 150px;
}

.toggle-group .toggle-description {
  width: 100%;
  order: 3;
  flex-basis: 100%;
  margin-top: -0.5rem;
}

/* Toggle Switch */
.toggle-switch {
  width: 56px;
  height: 32px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.toggle-switch.on {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-switch.on .switch-knob {
  transform: translateX(24px);
}

/* Slider Group */
.slider-group {
  gap: 0.5rem !important;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slider-row input[type="range"] {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  appearance: none;
  outline: none;
  padding: 0;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

.slider-row input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

.slider-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-primary-light);
  min-width: 4rem;
  text-align: right;
}

/* Radio Group */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.radio-option:has(input:checked) {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--color-primary);
}

.radio-option input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--color-primary);
}

.radio-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.radio-label strong {
  font-size: 0.95rem;
  color: white;
}

.radio-label span {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Color Picker Grid */
.color-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.color-swatch {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.color-swatch:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-swatch.active {
  border-color: white;
  box-shadow: 0 0 0 2px var(--color-primary);
}

/* Font Preview */
.font-preview {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  color: var(--color-text);
  line-height: 1.6;
  margin-top: 1rem;
}

/* API Key Input */
.api-key-group label {
  margin-bottom: 0.25rem;
}

.provider-description {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  margin-left: 0.5rem;
}

.api-key-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.api-key-input input {
  flex: 1;
}

.toggle-visibility {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-secondary);
  transition: all 0.2s;
}

.toggle-visibility:hover {
  background: rgba(255, 255, 255, 0.1);
}

.key-configured {
  color: var(--color-success, #22c55e);
  display: flex;
}

/* Backup Actions */
.backup-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.outline-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: var(--color-text);
  font-weight: 600;
  transition: all 0.2s;
}

.outline-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
}

.primary-btn {
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  border-radius: 12px;
  color: white;
  font-weight: 700;
  transition: all 0.2s;
}

.primary-btn:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
}

.danger-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--color-error);
  border-radius: 12px;
  color: var(--color-error);
  font-weight: 700;
  transition: all 0.2s;
}

.danger-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Import Section */
.import-section {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.import-section textarea {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.85rem;
  min-height: 150px;
}

/* Save Project Button */
.save-project-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--color-primary);
  border-radius: 12px;
  color: white;
  font-weight: 700;
  transition: all 0.2s;
  margin-top: 1rem;
}

.save-project-btn:hover:not(:disabled) {
  background: var(--color-primary-light);
  transform: translateY(-2px);
}

.save-project-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.save-project-btn .spin {
  animation: spin 2s linear infinite;
}

/* Account Info */
.account-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.user-email {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-email svg {
  color: var(--color-primary-light);
}

.user-email label {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.user-email p {
  color: white;
  font-weight: 600;
  margin: 0;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  color: #f87171;
  font-weight: 600;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Tab Labels */
.tab-label {
  white-space: nowrap;
}

.danger-card {
  padding: 2.5rem;
  background: rgba(239, 68, 68, 0.03);
  border-radius: 32px;
  border: 1px solid rgba(239, 68, 68, 0.1);
}

.danger-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.danger-action:last-child {
  margin-bottom: 0;
}

.danger-action h4 {
  margin-bottom: 0.25rem;
  color: white;
}

.danger-action p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

.solid-danger {
  padding: 0.75rem 1.5rem;
  background: var(--color-error);
  color: white;
  border-radius: 12px;
  font-weight: 700;
  transition: all 0.3s;
}

.solid-danger:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

.outline-danger {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--color-error);
  border: 1px solid var(--color-error);
  border-radius: 12px;
  font-weight: 700;
  transition: all 0.3s;
}

.outline-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  /* Header */
  .review-header {
    padding: 1rem;
    grid-template-columns: auto 1fr auto;
  }

  .header-central h1 {
    font-size: 1.1rem;
  }

  /* Single column layout */
  .settings-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
    padding-bottom: 100px; /* Space for sticky save */
  }

  /* Horizontal scrolling nav tabs */
  .settings-sidebar {
    position: static;
    order: -1;
  }

  .settings-nav {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }

  .settings-nav::-webkit-scrollbar {
    display: none;
  }

  .settings-nav button {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  /* Form cards */
  .form-card,
  .danger-card {
    padding: 1.5rem;
    border-radius: 20px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 1rem;
    font-size: 1rem;
  }

  .section-header h3 {
    font-size: 1.25rem;
  }

  /* Theme selector responsive */
  .theme-selector {
    flex-wrap: wrap;
  }

  .theme-selector button {
    flex: 1 1 45%;
    min-width: 0;
    padding: 0.75rem;
    font-size: 0.85rem;
  }

  /* Danger actions stack */
  .danger-action {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* Sticky save button */
  .header-action-btn.primary {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    width: auto;
    padding: 0.75rem 1.5rem;
    border-radius: 24px;
    gap: 0.5rem;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
  }
}
/**
 * Project Settings Page Styles
 * Matches global settings aesthetic with project-specific sections
 */

.project-settings-page {
  min-height: 100vh;
  background: var(--bg-primary);
}

.project-settings-page .loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 1rem;
  color: var(--text-muted);
}

.project-settings-page .loading-state .spin {
  animation: spin 1s linear infinite;
}

/* Header */
.project-settings-page .save-btn-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent-primary);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.project-settings-page .save-btn-header:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.project-settings-page .save-btn-header:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Content Layout */
.project-settings-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Settings Cards */
.settings-card {
  padding: 1.5rem;
}

.settings-card .card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.settings-card .card-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.settings-card .card-header.danger {
  color: var(--danger);
}

.settings-card .card-description {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

/* Form Groups */
.settings-card .form-group {
  margin-bottom: 1.25rem;
}

.settings-card .form-group:last-child {
  margin-bottom: 0;
}

.settings-card .form-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.settings-card .form-group input[type="text"],
.settings-card .form-group textarea,
.settings-card .form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.settings-card .form-group input:focus,
.settings-card .form-group textarea:focus,
.settings-card .form-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.settings-card .form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.settings-card .field-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Form Row (side by side) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Toggle Groups */
.settings-card .toggle-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.settings-card .toggle-group label {
  flex: 1;
  min-width: 150px;
  margin-bottom: 0;
}

.settings-card .toggle-group .toggle-description {
  flex-basis: 100%;
  order: 3;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.settings-card .toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-card .toggle-switch.on {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.settings-card .toggle-switch .switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.settings-card .toggle-switch.on .switch-knob {
  transform: translateX(22px);
}

/* Radio Option Cards */
.radio-group-horizontal {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.radio-option-card {
  display: block;
  cursor: pointer;
}

.radio-option-card input {
  display: none;
}

.radio-option-card .option-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.875rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.radio-option-card input:checked + .option-content {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-primary);
}

.radio-option-card .option-content strong {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.radio-option-card .option-content span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Danger Zone */
.danger-zone {
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.danger-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.danger-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
}

.danger-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.danger-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: transparent;
  border: 1px solid var(--danger);
  border-radius: 8px;
  color: var(--danger);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.danger-btn:hover {
  background: var(--danger);
  color: white;
}

/* Delete Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.delete-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.delete-modal .warning-icon {
  color: var(--danger);
  margin-bottom: 1rem;
}

.delete-modal h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}

.delete-modal p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.modal-actions .cancel-btn {
  padding: 0.75rem 1.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-actions .cancel-btn:hover {
  background: var(--bg-quaternary);
}

.modal-actions .confirm-delete-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--danger);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-actions .confirm-delete-btn:hover:not(:disabled) {
  background: #dc2626;
}

.modal-actions .confirm-delete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 640px) {
  .project-settings-content {
    padding: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .radio-group-horizontal {
    grid-template-columns: 1fr;
  }

  .danger-action {
    flex-direction: column;
    align-items: flex-start;
  }

  .danger-btn {
    width: 100%;
    justify-content: center;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions button {
    width: 100%;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  background: var(--gradient-bg);
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60vh;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(124, 58, 237, 0.3) 0%,
    rgba(6, 182, 212, 0.1) 30%,
    transparent 70%
  );
  pointer-events: none;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  z-index: 1;
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.auth-logo {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.logo-icon {
  color: #a78bfa;
  filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.5));
}

.auth-subtitle {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.auth-card {
  padding: var(--space-2xl);
}

.auth-card h2 {
  font-size: var(--text-2xl);
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.card-desc {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  font-size: var(--text-sm);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.auth-field label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--color-text-muted);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  color: white;
  font-size: var(--text-base);
  transition: all 0.2s;
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px var(--color-primary-glow);
}

.auth-submit {
  margin-top: var(--space-md);
  background: var(--gradient-warm-cta);
  color: white;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all 0.2s;
  box-shadow: 0 4px 15px var(--color-accent-warm-glow);
}

.auth-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--color-accent-warm-glow);
}

.auth-submit:active:not(:disabled) {
  transform: translateY(0);
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-submit.secondary {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  text-decoration: none;
}

.auth-footer {
  margin-top: var(--space-xl);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.auth-footer a {
  color: var(--color-primary-light);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.success-card {
  text-align: center;
}

.success-icon {
  color: var(--color-success);
  margin-bottom: var(--space-lg);
  margin-left: auto;
  margin-right: auto;
}
.premium-gate {
  margin-top: 2rem;
  background: linear-gradient(
    145deg,
    rgba(20, 20, 35, 0.8),
    rgba(20, 20, 25, 0.95)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.premium-gate::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #a786ff, #f472b6, #fbbf24);
}

.gate-content {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.gate-icon {
  width: 64px;
  height: 64px;
  background: rgba(167, 134, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a786ff;
  margin: 0 auto 1.5rem;
  border: 1px solid rgba(167, 134, 255, 0.2);
}

.premium-gate h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff, #a786ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gate-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.gate-description strong {
  color: var(--text-primary);
}

.gate-features {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.gate-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.gate-features svg {
  color: #fbbf24;
}

.upgrade-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent-primary);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 100px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(100, 108, 255, 0.3);
}

.upgrade-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(100, 108, 255, 0.4);
}

.gate-note {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}
.guide-page {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 2rem;
}

/* ============================================================================
   HEADER
   ============================================================================ */

.guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  gap: 2rem;
  flex-wrap: wrap;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text-primary);
}

.header-main h1 {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff, #a786ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-main .subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.25rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.progress-indicator {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.progress-indicator span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.progress-bar {
  width: 120px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), #a786ff);
  border-radius: 100px;
  transition: width 0.5s ease;
}

.coach-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem 1.25rem;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.coach-toggle span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.toggle-switch {
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  position: relative;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-switch.active {
  background: var(--accent-primary);
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.4);
}

.toggle-switch .knob {
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-switch.active .knob {
  transform: translateX(20px);
}

/* ============================================================================
   LAYOUT
   ============================================================================ */

.guide-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ============================================================================
   SIDEBAR - PARTS & CHAPTERS
   ============================================================================ */

.guide-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 2rem;
}

.part-group {
  margin-bottom: 0.5rem;
}

.part-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: none;
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.part-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.part-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  background: rgba(124, 58, 237, 0.15);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.part-title {
  flex: 1;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

.part-header svg {
  color: var(--text-muted);
  transition: transform 0.2s;
}

.part-header svg.expanded {
  transform: rotate(180deg);
}

.part-chapters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 0 0.5rem 0.5rem;
  overflow: hidden;
}

.chapter-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.chapter-link:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.chapter-link.active {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.3);
}

.chapter-link.locked {
  opacity: 0.7;
  filter: grayscale(0.6);
  border-style: dashed;
}

.chapter-link.locked .chapter-icon {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
}

.chapter-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.chapter-link.active .chapter-icon {
  background: var(--accent-primary);
  color: white;
}

.chapter-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.chapter-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chapter-progress .done {
  color: #10b981;
}

/* ============================================================================
   CHAPTER HERO
   ============================================================================ */

.chapter-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.chapter-hero .part-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  background: rgba(124, 58, 237, 0.15);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.chapter-hero .hero-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.2),
    rgba(167, 134, 255, 0.2)
  );
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--accent-primary);
}

.chapter-hero .hero-icon svg {
  width: 28px;
  height: 28px;
}

.chapter-hero h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ============================================================================
   TUTORIAL CARD & MODULES
   ============================================================================ */

.tutorial-card {
  padding: 2.5rem !important;
}

.tutorial-card h3 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.prose-large {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.module-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 2rem 0;
}

.module-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
  color: inherit;
}

.module-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(124, 58, 237, 0.3);
}

.module-item.active {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--accent-primary);
}

.module-num {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--accent-primary);
  width: 20px;
}

.module-text {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

.video-indicator {
  color: #f59e0b;
}

.arrow {
  color: var(--text-muted);
  opacity: 0.5;
}

/* ============================================================================
   CHAPTER CONTENT
   ============================================================================ */

.chapter-content {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.prose-content {
  line-height: 1.8;
  font-size: 1rem;
}

.prose-content h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  color: var(--text-primary);
}

.prose-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.prose-content ul,
.prose-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.prose-content li {
  margin-bottom: 0.5rem;
}

.prose-content em {
  color: var(--text-muted);
  font-style: italic;
}

.prose-content code {
  background: rgba(124, 58, 237, 0.15);
  color: #c4b5fd;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: "SF Mono", Monaco, monospace;
}

/* ============================================================================
   SPECIAL CONTENT BOXES
   ============================================================================ */

.tip-box {
  margin: 1.5rem 0;
  background: rgba(124, 58, 237, 0.1);
  border-left: 4px solid var(--accent-primary);
  padding: 1.25rem;
  border-radius: 0 10px 10px 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.tip-box svg {
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.tip-box p {
  margin: 0 !important;
  color: #c4b5fd;
}

.comparison-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.comparison-box .dont,
.comparison-box .do {
  padding: 1.25rem;
  border-radius: 10px;
}

.comparison-box .dont {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.comparison-box .do {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.comparison-box strong {
  display: block;
  margin-bottom: 0.5rem;
}

.comparison-box p {
  margin: 0 !important;
  font-style: italic;
  color: var(--text-muted);
}

.principle-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.principle-box h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.example-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.example-box p {
  margin: 0 !important;
  font-style: italic;
}

/* ============================================================================
   MODE CARDS
   ============================================================================ */

.mode-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.mode-card {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-align: center;
}

.mode-card svg {
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.mode-card h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.mode-card p {
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  margin: 0 !important;
}

.mode-card.burst {
  border-color: rgba(245, 158, 11, 0.3);
}
.mode-card.burst svg {
  color: #f59e0b;
}

.mode-card.stream {
  border-color: rgba(59, 130, 246, 0.3);
}
.mode-card.stream svg {
  color: #3b82f6;
}

.mode-card.dictation {
  border-color: rgba(16, 185, 129, 0.3);
}
.mode-card.dictation svg {
  color: #10b981;
}

/* ============================================================================
   SANDWICH DIAGRAM
   ============================================================================ */

.sandwich-diagram {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sandwich-diagram .bread,
.sandwich-diagram .meat {
  padding: 1.25rem;
  border-radius: 10px;
}

.sandwich-diagram .bread {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.sandwich-diagram .meat {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.sandwich-diagram strong {
  display: block;
  margin-bottom: 0.25rem;
}

.sandwich-diagram p {
  margin: 0.25rem 0 !important;
  color: var(--text-muted);
  font-size: 0.9rem !important;
}

.sandwich-diagram em {
  color: var(--text-secondary);
}

/* ============================================================================
   ENTITY GRID
   ============================================================================ */

.entity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}

.entity-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.entity-type svg {
  color: var(--accent-primary);
}

/* ============================================================================
   FORMAT GRID
   ============================================================================ */

.format-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}

.format-card {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  text-align: center;
}

.format-card strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.format-card p {
  margin: 0 !important;
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
}

/* ============================================================================
   COMMAND TABLE
   ============================================================================ */

.command-table-container {
  margin: 1.5rem 0;
  overflow-x: auto;
}

.command-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.command-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.command-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.command-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ============================================================================
   NUMBERED STEPS
   ============================================================================ */

.numbered-steps {
  counter-reset: steps;
  list-style: none;
  padding-left: 0;
  margin: 1.5rem 0;
}

.numbered-steps li {
  counter-increment: steps;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1rem;
}

.numbered-steps li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent-primary), #a786ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
}

/* ============================================================================
   VIDEO EMBED
   ============================================================================ */

.video-embed {
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
}

.video-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  font-weight: 600;
  font-size: 0.9rem;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-meta {
  padding: 1.25rem;
}

.video-meta strong {
  display: block;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.video-meta .creator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.video-meta p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ============================================================================
   COMPLETE BUTTON
   ============================================================================ */

.complete-btn {
  margin-top: 3rem;
  width: 100%;
  padding: 1.25rem;
  background: var(--accent-primary);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.complete-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(124, 58, 237, 0.4);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1024px) {
  .guide-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .guide-sidebar nav {
    position: static;
  }

  .mode-cards {
    grid-template-columns: 1fr;
  }

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

  .comparison-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .guide-page {
    padding: 1rem;
  }

  .guide-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .tutorial-card {
    padding: 1.5rem !important;
  }

  .entity-grid,
  .format-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================================
   EXERCISE BOXES
   ============================================================================ */

.exercise-box {
  margin: 2rem 0;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.08),
    rgba(59, 130, 246, 0.08)
  );
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 16px;
  overflow: hidden;
}

.exercise-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-weight: 700;
  font-size: 0.9rem;
}

.exercise-header svg {
  flex-shrink: 0;
}

.exercise-content {
  padding: 1.25rem;
}

.exercise-content h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.exercise-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.exercise-content ol,
.exercise-content ul {
  padding-left: 1.25rem;
  margin: 0.75rem 0;
}

.exercise-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.exercise-prompt {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  font-style: italic;
  color: var(--text-muted);
}

.exercise-prompt strong {
  color: #34d399;
  font-style: normal;
}

/* Key Takeaway Box */
.takeaway-box {
  margin: 2rem 0;
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.08),
    rgba(245, 158, 11, 0.08)
  );
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 12px;
  padding: 1.25rem;
}

.takeaway-box h5 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 0.5rem;
}

.takeaway-box p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Quick Reference Card */
.quick-ref {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.quick-ref-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.quick-ref-item svg {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.quick-ref-item .ref-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.quick-ref-item .ref-value {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
}

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

/* ============================================================================
   SCHOLAR PASS BANNER
   ============================================================================ */

.scholar-trial-banner {
  margin: 0 0 1.5rem 0;
  animation: slideIn 0.5s ease-out;
}

.scholar-trial-banner .trial-content {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(124, 58, 237, 0.15));
  border: 1px solid rgba(124, 58, 237, 0.2);
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
}

.trial-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.trial-icon {
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.1);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.trial-text strong {
  display: block;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.trial-text p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.trial-text p strong {
  display: inline;
  color: var(--accent-primary);
}

.trial-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.trial-cta:hover {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

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

@media (max-width: 768px) {
  .scholar-trial-banner .trial-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .trial-info {
    flex-direction: column;
    gap: 0.75rem;
  }
}
.editor-page {
  min-height: 100vh;
  background: var(--gradient-bg);
  display: flex;
  flex-direction: column;
}

/* Header Override to Match ReviewPage */
.review-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.25rem 3rem;
  background: rgba(15, 15, 26, 0.7);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
}

.back-btn-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
}

.back-btn-round:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-4px);
}

.header-central {
  text-align: center;
}

.header-central h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(
    --gradient-text,
    linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(139, 92, 246, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--color-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 0.25rem;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.header-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s;
  cursor: pointer;
}

.header-action-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--color-primary);
  color: var(--color-primary-light);
  transform: translateY(-2px);
}

.header-action-btn.primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.editor-main {
  display: grid;
  grid-template-columns: 350px 1fr 60px;
  flex: 1;
  overflow: hidden;
}

.editor-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.editor-content {
  background: rgba(0, 0, 0, 0.05);
  padding: 2rem;
  overflow-y: auto;
}

.draft-canvas {
  max-width: 900px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* NEW: Fixed Toolbar Header for Editor */
.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(24, 24, 27, 0.8);
  backdrop-filter: blur(12px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
  margin-bottom: 1rem;
}

.refine-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  color: var(--color-primary-light);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.refine-btn:hover {
  background: var(--color-primary);
  color: white;
}

.editor-toolbar button {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all 0.2s;
}

.editor-toolbar button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.manuscript-editor {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  font-family: var(
    --font-prose,
    "Charter",
    "Georgia",
    serif
  ); /* Fallback to classic serif */
  font-size: 1.25rem;
  line-height: 1.8;
  padding: 2rem;
  outline: none;
  resize: none;
  max-width: 65ch; /* Optimal reading width */
  margin: 0 auto; /* Center it */
  width: 100%;
}

.pane-tabs {
  display: flex;
  padding: 1rem;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pane-tabs button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted);
  transition: all 0.2s;
}

.pane-tabs button.active {
  background: rgba(139, 92, 246, 0.1);
  color: var(--color-primary-light);
}

.editor-tools {
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
}

.tool-icons button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  transition: all 0.2s;
}

.tool-icons button.active {
  background: rgba(139, 92, 246, 0.1);
  color: var(--color-primary-light);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  /* Header adjustments */
  .review-header {
    padding: 1rem;
    grid-template-columns: auto 1fr auto;
  }

  .header-central h1 {
    font-size: 1.1rem;
  }

  .back-btn-round,
  .header-action-btn {
    width: 38px;
    height: 38px;
  }

  /* Single column layout on mobile */
  .editor-main {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
  }

  /* Hide sidebar on mobile by default */
  .editor-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    z-index: 200;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 15, 26, 0.98);
    backdrop-filter: blur(20px);
  }

  /* When sidebar is shown via JS toggle */
  .editor-sidebar.mobile-open {
    display: block;
  }

  /* Overlay when sidebar is open */
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    display: none;
  }

  .sidebar-overlay.visible {
    display: block;
  }

  /* Full width editor content */
  .editor-content {
    padding: 1rem;
    width: 100%;
  }

  /* Hide right tool panel on mobile */
  .editor-tools {
    display: none;
  }

  /* Editor toolbar responsive */
  .draft-canvas {
    gap: 1rem;
  }

  .editor-toolbar {
    padding: 0.4rem 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .manuscript-editor {
    padding: 1rem;
    font-size: 1.1rem;
  }

  /* Pane tabs on mobile */
  .pane-tabs {
    padding: 0.75rem;
    gap: 0.25rem;
  }

  .pane-tabs button {
    padding: 0.5rem;
    font-size: 0.7rem;
  }
}
.draft-generation-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.draft-modal-content {
  width: 100%;
  max-width: 500px;
  background: rgba(15, 15, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(124, 58, 237, 0.1);
  padding: 0; /* Content padding handled inside */
  overflow: hidden;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(
    90deg,
    rgba(124, 58, 237, 0.1) 0%,
    transparent 100%
  );
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--color-text-tertiary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.config-section h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary);
  margin-bottom: 0.75rem;
}

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

.tone-option {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.tone-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.tone-option.selected {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--color-primary);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.tone-icon {
  margin-bottom: 0.25rem;
  color: var(--color-text-secondary);
}

.tone-option.selected .tone-icon {
  color: var(--color-primary-light);
}

.tone-label {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-primary);
}

.tone-desc {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  line-height: 1.4;
}

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

.option-checkbox {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.option-checkbox:hover {
  background: rgba(255, 255, 255, 0.06);
}

.option-checkbox input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 1.1em;
  height: 1.1em;
}

.option-label {
  display: flex;
  flex-direction: column;
}

.option-title {
  font-weight: 500;
  color: var(--color-text-secondary);
}

.option-help {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
}

.modal-footer {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.modal-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.modal-btn.cancel {
  background: transparent;
  color: var(--color-text-secondary);
}

.modal-btn.cancel:hover {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.modal-btn.generate {
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.modal-btn.generate:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.modal-btn.generate:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
/* Workbench Layout - The Cognitive Cockpit */
:root {
  --workbench-carrier-width: 60px;
  --workbench-carrier-expanded: 240px;
  --workbench-companion-width: 320px;
  --workbench-header-height: 48px;
  --workbench-bg: #09090b;
  --workbench-panel-bg: rgba(24, 24, 27, 0.6);
  --workbench-border: 1px solid rgba(255, 255, 255, 0.06);
}

.workbench-container {
  display: grid;
  grid-template-columns: var(--workbench-carrier-width) 1fr var(
      --workbench-companion-width
    );
  grid-template-rows: 100vh;
  background-color: var(--workbench-bg);
  color: var(--color-text);
  overflow: hidden;
  font-family: var(--font-ui);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Collapsed companion state */
.workbench-container.companion-collapsed {
  grid-template-columns: var(--workbench-carrier-width) 1fr 0;
}

.workbench-container.companion-collapsed .workbench-companion {
  width: 0;
  min-width: 0;
  overflow: hidden;
  border-left: none;
}

/* Column A: Carrier */
.workbench-carrier {
  grid-column: 1;
  background: rgba(0, 0, 0, 0.3);
  border-right: var(--workbench-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  gap: 1rem;
  z-index: 20;
  backdrop-filter: blur(20px);
}

/* Column B: Stage */
.workbench-stage {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: radial-gradient(
    circle at 50% 30%,
    rgba(30, 30, 40, 0.4),
    transparent 70%
  );
}

.stage-header {
  height: var(--workbench-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: var(--workbench-border);
}

.stage-content {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

/* Column C: Companion */
.workbench-companion {
  grid-column: 3;
  background: var(--workbench-panel-bg);
  border-left: var(--workbench-border);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
  z-index: 10;
  height: 100vh;
}

.companion-header {
  height: var(--workbench-header-height);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  border-bottom: var(--workbench-border);
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.companion-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

/* Icons and Interactions */
.carrier-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all 0.2s;
  cursor: pointer;
}

.carrier-icon:hover,
.carrier-icon.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
}

.carrier-icon.active {
  box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.2);
  border: 1px solid rgba(var(--color-primary-rgb), 0.3);
}

/* Mobile Toggles */
.mobile-companion-toggle {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 50;
  border: none;
  cursor: pointer;
}

.mobile-companion-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 90;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .workbench-container {
    grid-template-columns: var(--workbench-carrier-width) 1fr;
    /* Companion is overlay */
  }

  .workbench-companion {
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 320px;
    height: 100%;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    background: #09090b;
  }

  .workbench-companion.mobile-visible {
    transform: translateX(0);
  }

  .mobile-companion-toggle {
    display: flex;
  }

  .mobile-companion-overlay.visible {
    display: block;
  }
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}
.binder {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.binder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.binder-search-bar {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 8px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  padding: 6px 8px 6px 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s;
}

.search-input-wrapper input:focus {
  border-color: var(--color-primary);
}

.filter-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.filter-icon {
  color: var(--color-text-muted);
}

.filter-wrapper select {
  background: transparent;
  border: none;
  color: var(--color-text);
  font-size: var(--text-xs);
  cursor: pointer;
  outline: none;
  padding: 2px 4px;
  border-radius: 4px;
}

.filter-wrapper select:hover {
  background: rgba(255, 255, 255, 0.05);
}

.filter-wrapper select option {
  background-color: #18181b;
  color: #e4e4e7;
}
.binder-header h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}

.binder-add-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.binder-add-btn:hover {
  background: var(--color-primary);
  color: white;
}

.new-section-menu {
  display: flex;
  flex-direction: column;
  padding: var(--space-sm);
  gap: var(--space-xs);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.new-section-menu button {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: all var(--transition-fast);
}

.new-section-menu button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.binder-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm) 0;
}

.binder-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  color: var(--color-text-secondary);
  text-align: center;
  gap: var(--space-md);
}

.binder-empty button {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
}

.binder-node {
  user-select: none;
}

.binder-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.expand-btn {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.item-icon {
  flex-shrink: 0;
}

.item-title {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.item-menu {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.binder-item:hover .item-menu {
  opacity: 1;
}

.item-menu:hover {
  color: var(--color-primary);
}

.binder-fragment {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  padding-left: var(--space-xl);
  cursor: pointer;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

.binder-fragment:hover {
  color: var(--color-text);
}

.fragment-preview {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.binder-unassigned {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.unassigned-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .binder {
    border-radius: var(--radius-md);
  }

  .binder-header {
    padding: var(--space-sm);
  }

  .binder-header h3 {
    font-size: var(--text-xs);
  }

  .binder-search-bar {
    padding: var(--space-xs) var(--space-sm);
  }

  /* Limit visible nesting depth on mobile */
  .binder-item {
    padding: var(--space-xs);
    /* Cap the left padding to prevent over-indentation */
    max-width: 100%;
  }

  /* Override deep nesting indentation */
  .binder-node .binder-node .binder-node .binder-item {
    padding-left: var(--space-lg);
  }

  .binder-fragment {
    padding-left: var(--space-lg);
  }

  /* Smaller buttons */
  .binder-add-btn {
    width: 26px;
    height: 26px;
  }

  .new-section-menu button {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
  }

  /* Make binder horizontally scrollable for overflow */
  .binder-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
.skeleton {
  display: inline-block;
  background-color: var(--color-surface-2, #e0e0e0);
  animation: skeleton-pulse 1.5s ease-in-out 0.5s infinite;
  border-radius: 4px;
}

.skeleton--text {
  height: 1em;
  width: 100%;
  margin-bottom: 0.5em;
}

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

.skeleton--rectangular {
  height: 100%;
  width: 100%;
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .skeleton {
    background-color: var(--color-surface-2, #333);
  }
}

[data-theme="dark"] .skeleton {
  background-color: var(--color-surface-2, #333);
}
/**
 * ProjectSettings Component Styles
 * Control Center bento-grid layout for project configuration
 */

.project-settings-control {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  animation: fadeIn 0.5s ease forwards;
}

/* Header */
.control-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.control-title {
  font-size: 2rem;
  font-weight: 900;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.control-title svg {
  color: var(--color-success, #10b981);
}

.control-id {
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.save-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-success, #10b981);
  border-radius: 9999px;
  color: black;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.save-btn:hover {
  background: #34d399;
  transform: translateY(-2px);
}

/* Grid Layout */
.control-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .control-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.control-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Section Card */
.control-section {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
}

.section-icon-bg {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.75rem;
  opacity: 0.08;
  transition: opacity 0.2s;
}

.control-section:hover .section-icon-bg {
  opacity: 0.15;
}

.section-icon-bg svg {
  width: 100px;
  height: 100px;
}

/* Section Header */
.section-header-flex {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.section-icon-wrapper {
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.section-icon-wrapper svg {
  color: var(--color-success, #10b981);
  width: 16px;
  height: 16px;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: white;
  margin: 0;
}

.section-description {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Form Elements */
.control-form-group {
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.control-form-group:last-child {
  margin-bottom: 0;
}

.control-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.control-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.control-input:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
}

.control-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  color: white;
  transition: all 0.2s ease;
}

.control-select:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
}

.control-select option {
  background: #1a1a2e;
}

.control-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  resize: none;
  transition: all 0.2s ease;
}

.control-textarea:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
}

/* Grid Rows */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Label with Badge */
.label-with-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.label-badge {
  font-size: 0.6rem;
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-weight: 500;
}

/* Toggle Component */
.control-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.2s ease;
}

.control-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.control-toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
}

.control-toggle:hover .control-toggle-label {
  color: white;
}

.toggle-track {
  width: 40px;
  height: 24px;
  border-radius: 9999px;
  padding: 0.25rem;
  transition: background 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
}

.toggle-track.on {
  background: var(--color-success, #10b981);
}

.toggle-thumb {
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Selection Card */
.selection-card {
  position: relative;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.selection-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.selection-card.selected {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.selection-check {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  color: var(--color-success, #10b981);
}

.selection-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.selection-content svg {
  color: rgba(255, 255, 255, 0.4);
}

.selection-card.selected .selection-content svg {
  color: var(--color-success, #10b981);
}

.selection-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.selection-card.selected .selection-title {
  color: white;
}

.selection-desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
  line-height: 1.4;
}

/* Language Selector Row */
.language-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.language-row svg {
  color: rgba(255, 255, 255, 0.4);
}

.language-row .control-select {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.9rem;
}

.language-row .control-select:focus {
  border: none;
  outline: none;
}

/* Voice Mode Stack */
.voice-mode-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Mode Specific Sections */
.mode-section-journal {
  border-color: rgba(236, 72, 153, 0.3);
  background: rgba(236, 72, 153, 0.03);
}

.mode-section-journal .section-icon-wrapper svg {
  color: #f472b6;
}

.mode-section-ttrpg {
  border-color: rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.03);
}

.mode-section-ttrpg .section-icon-wrapper svg {
  color: #c084fc;
}

.mode-section-academic {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.03);
}

.mode-section-academic .section-icon-wrapper svg {
  color: #60a5fa;
}

.toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Automation Note */
.automation-note {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  padding: 0 0.25rem;
  margin-top: 0.75rem;
}

/* Danger Zone */
.danger-section {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.03);
  transition: background 0.2s ease;
}

.danger-section:hover {
  background: rgba(239, 68, 68, 0.05);
}

.danger-section .section-icon-wrapper svg {
  color: #f87171;
}

.danger-description {
  font-size: 0.75rem;
  color: rgba(239, 68, 68, 0.6);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.danger-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.9rem;
  color: white;
  font-family: var(--font-mono);
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.danger-input:focus {
  outline: none;
  border-color: rgba(239, 68, 68, 0.5);
}

.danger-input::placeholder {
  color: rgba(239, 68, 68, 0.5);
}

.delete-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 0.5rem;
  color: #fca5a5;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.delete-btn:hover:not(:disabled) {
  background: var(--color-error, #ef4444);
  color: white;
}

.delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
  .project-settings-control {
    padding: 1rem;
    padding-bottom: 6rem;
  }

  .control-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .control-title {
    font-size: 1.5rem;
  }

  .save-btn {
    width: 100%;
    justify-content: center;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.sidebar-tabs-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.sidebar-tab-bar {
  display: flex;
  padding: 0.5rem;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted);
  transition: all 0.2s;
}

.sidebar-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
}

.sidebar-tab.active {
  background: rgba(139, 92, 246, 0.1);
  color: var(--color-primary-light);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.2);
}

.sidebar-tab-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.tab-pane {
  height: 100%;
  overflow-y: auto;
  padding: 0.5rem;
  /* Scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Settings pane specific styles for companion panel */
.tab-pane.settings-pane {
  padding: 0;
}

.tab-pane.settings-pane .project-settings-control {
  padding: 1rem;
  max-width: 100%;
}

.tab-pane.settings-pane .control-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.tab-pane.settings-pane .control-title {
  font-size: 1.25rem;
}

.tab-pane.settings-pane .save-btn {
  width: 100%;
  justify-content: center;
}

.tab-pane.settings-pane .control-grid {
  grid-template-columns: 1fr;
}

.tab-pane.settings-pane .form-row-2 {
  grid-template-columns: 1fr;
}

.tab-pane.settings-pane .toggle-grid {
  grid-template-columns: 1fr;
}

.tab-pane.settings-pane .control-section {
  padding: 1rem;
}

.tab-pane.settings-pane .section-icon-bg {
  display: none;
}
.review-inbox-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.inbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem;
  color: var(--color-text-primary);
}

.inbox-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.inbox-title h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
}

.view-all-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.view-all-btn:hover {
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.05);
}

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

.inbox-card {
  padding: 1rem;
  background: rgba(20, 20, 25, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.3s ease;
}

.inbox-card:hover {
  background: rgba(30, 30, 40, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.inbox-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.raw {
  background-color: var(--color-warning);
  box-shadow: 0 0 8px var(--color-warning-dim);
}

.status-dot.processed {
  background-color: var(--color-success);
  box-shadow: 0 0 8px var(--color-success-dim);
}

.badge.narrative {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.inbox-body {
  margin-bottom: 1rem;
}

.text-preview {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-preview.raw {
  font-style: italic;
  opacity: 0.8;
}

/* Edit textarea styles - was missing! */
.inbox-edit-textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
}

.inbox-edit-textarea:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.mini-action.edit {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.mini-action.edit:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
}

.mini-action.save {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.mini-action.save:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.4);
}

.mini-action.cancel {
  background: rgba(156, 163, 175, 0.1);
  border-color: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
}

.mini-action.cancel:hover {
  background: rgba(156, 163, 175, 0.2);
  border-color: rgba(156, 163, 175, 0.4);
}

.inbox-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.action-group-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.effects-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 0.5rem;
}

.effect-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.5rem !important;
  width: auto !important;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.effect-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--color-primary-light);
}

.effect-label {
  display: none; /* Hide labels on small screens or by default to save space */
}

@media (min-width: 1400px) {
  .effect-label {
    display: inline-block;
  }
}

.mini-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mini-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  transform: scale(1.05);
}

.mini-action.reject:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

.mini-action.process {
  width: auto;
  padding: 0 0.75rem;
  gap: 0.5rem;
  font-size: 0.8rem;
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

.mini-action.process:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
}

.mini-action.process:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mini-action.approve {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.mini-action.approve:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.4);
}

.review-inbox-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  width: 100%;
}

.empty-state-card {
  text-align: center;
  padding: 3rem !important;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.02) !important;
}

.empty-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.empty-state-card h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  color: var(--color-text-primary);
}

.empty-state-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
/* WorkspacePage.css */

.workspace-stage-content {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.workbench-editor-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 0 2rem 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.companion-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  overflow-y: auto;
  padding-bottom: 2rem;
}

.prosaic-context {
  padding: 0.5rem 0;
}

.prosaic-context h4 {
  margin: 0 0 0.25rem 0;
  color: var(--color-foreground);
  font-family: var(--font-display, "Cinzel");
}

.commission-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Stage Toolbar (Tab Switcher Container) */
.stage-toolbar {
  padding: 0.75rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: center;
  background: rgba(15, 15, 26, 0.3);
}

.tab-switcher {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 8px;
}

.tab-switcher button {
  background: none;
  border: none;
  padding: 0.5rem 1.5rem;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.tab-switcher button.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-foreground);
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-switcher button:hover:not(.active) {
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-foreground);
}

.save-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.stage-action-btn.primary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.stage-action-btn.primary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.stage-placeholder-review {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--color-text-muted);
  text-align: center;
}
/* Fragment Detail Modal Styles */

.fragment-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.fragment-modal {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.fragment-modal-card {
  padding: 0 !important;
  background: rgba(20, 20, 25, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Header */
.fragment-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-primary);
}

.header-title h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
}

/* Body */
.fragment-modal-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Editor Section */
.editor-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.editor-section label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fragment-textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.fragment-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Metadata Section */
.metadata-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.field-group select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--color-text-primary);
  font-size: 0.9rem;
  cursor: pointer;
}

.field-group select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.field-group select option {
  background: #18181b;
  color: #e4e4e7;
}

/* Tag Input */
.tag-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tag-chip {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border-radius: 4px;
  font-size: 0.8rem;
}

.tag-chip button {
  background: none;
  border: none;
  color: #c4b5fd;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.7;
}

.tag-chip button:hover {
  opacity: 1;
}

.tag-input-wrapper input {
  flex: 1;
  min-width: 80px;
  padding: 0.25rem;
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  font-size: 0.85rem;
  outline: none;
}

.tag-input-wrapper input::placeholder {
  color: var(--color-text-muted);
}

/* Toggle Group */
.toggle-group {
  display: flex;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem;
  border-radius: 6px;
}

.toggle-group button {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-group button:hover {
  color: var(--color-text-primary);
}

.toggle-group button.active {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

/* Actions */
.fragment-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.action-group-right {
  display: flex;
  gap: 0.75rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
  justify-content: center;
}

.action-btn.delete {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  margin-right: auto; /* Push to far left if container is flex */
}

.action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.action-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--color-text-muted);
}

.action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
}

.action-btn.process {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

.action-btn.process:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
}

.action-btn.primary {
  background: var(--color-primary);
  color: white;
}

.action-btn.primary:hover {
  filter: brightness(1.1);
}

.action-btn.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spin {
  animation: spin 1s linear infinite;
}

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

/* Mobile Optimizations */
@media (max-width: 640px) {
  .fragment-modal {
    max-width: 100%;
    max-height: 100vh;
    height: 100%;
  }

  .fragment-modal-card {
    border-radius: 0 !important;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .fragment-modal-body {
    flex: 1;
    overflow-y: auto;
  }

  .fragment-modal-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .action-btn.delete {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }

  .action-group-right {
    flex: 1;
    justify-content: flex-end;
  }
}
.offline-indicator {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.offline-indicator.offline {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-warning);
  color: var(--color-warning);
}

.offline-indicator.queued {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

/* Mobile positioning */
@media (max-width: 640px) {
  .offline-indicator {
    bottom: 80px; /* Above nav bar if present, or just higher */
    right: 50%;
    transform: translateX(50%);
  }
}
/**
 * PWA Update Toast Styles
 * Premium glassmorphic notification matching Tolkien's design language
 */

/* Container - Fixed positioning bottom-right */
.update-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  max-width: 380px;
  width: calc(100vw - 3rem);
}

/* Main toast card */
.update-toast {
  position: relative;
  overflow: hidden;
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 1px 0 rgba(255, 255, 255, 0.1) inset;
}

/* Glossy top highlight */
.update-toast-gloss {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 40%
  );
  pointer-events: none;
  border-radius: inherit;
}

/* Accent glow at top */
.update-toast-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 100%;
  background: radial-gradient(
    ellipse 40% 30% at 50% 0%,
    rgba(124, 58, 237, 0.3) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Content layout */
.update-toast-content {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

/* Icon container */
.update-toast-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.25) 0%,
    rgba(79, 70, 229, 0.15) 100%
  );
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-md);
  color: var(--color-primary-light);
}

.icon-sparkle {
  width: 22px;
  height: 22px;
  animation: sparkle-pulse 2s ease-in-out infinite;
}

@keyframes sparkle-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.95);
  }
}

/* Text content */
.update-toast-text {
  flex: 1;
  min-width: 0;
}

.update-toast-title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 0.375rem 0;
  letter-spacing: -0.01em;
}

.update-toast-description {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

/* Action buttons */
.update-toast-actions {
  display: flex;
  gap: 0.625rem;
}

.update-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: white;
  background: linear-gradient(135deg, var(--color-primary) 0%, #5b21b6 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.update-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

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

.update-btn-secondary {
  padding: 0.5rem 0.875rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.update-btn-secondary:hover {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Close button */
.update-toast-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-left: auto;
}

.update-toast-close:hover {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .update-toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    width: auto;
    max-width: none;
  }

  .update-toast {
    padding: 1rem;
  }

  .update-toast-content {
    flex-wrap: wrap;
  }

  .update-toast-text {
    flex-basis: calc(100% - 76px);
  }

  .update-toast-actions {
    width: 100%;
    margin-top: 0.5rem;
  }

  .update-btn-primary,
  .update-btn-secondary {
    flex: 1;
    justify-content: center;
  }
}
.debug-trigger {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem; /* Far bottom-right corner */
  width: 48px;
  height: 48px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.2s;
}

.debug-trigger:hover {
  transform: scale(1.1);
  background: #18181b;
}

.debug-panel {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem; /* Far bottom-right corner */
  width: 380px;
  height: 500px;
  background: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  font-family: "JetBrains Mono", monospace;
}

.debug-header {
  height: 40px;
  background: rgba(239, 68, 68, 0.1);
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.debug-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.debug-actions button {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  opacity: 0.7;
  margin-left: 8px;
}

.debug-actions button:hover {
  opacity: 1;
}

.debug-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.debug-section h5 {
  color: #71717a;
  font-size: 0.7rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.state-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px;
  border-radius: 6px;
}

.state-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.state-item .label {
  color: #a1a1aa;
}

.state-item .value {
  color: #fff;
}

.state-item .value.warn {
  color: #f59e0b;
}
.state-item .value.good {
  color: #22c55e;
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
}

.log-entry {
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  border-left: 2px solid transparent;
}

.log-entry.info {
  border-color: #3b82f6;
}
.log-entry.warn {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}
.log-entry.error {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}
.log-entry.debug {
  border-color: #71717a;
}

.log-entry .timestamp {
  color: #71717a;
  font-size: 0.65rem;
  margin-bottom: 2px;
}

.log-entry .message {
  color: #e4e4e7;
  word-break: break-all;
}

.log-data {
  margin-top: 4px;
  color: #a1a1aa;
  font-size: 0.65rem;
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 4px;
}


:root {
  /* Colors - Midnight Athenaeum Palette */
  --color-primary: #7c3aed; /* Deep Violet */
  --color-primary-hover: #6d28d9; /* Darker Violet */
  --color-primary-light: #a78bfa; /* Light Violet */
  --color-primary-glow: rgba(124, 58, 237, 0.35);

  /* Accent: Warm Ember */
  --color-accent-warm: #f97316; /* Orange for primary CTAs */
  --color-accent-warm-glow: rgba(249, 115, 22, 0.3);

  /* Accent: Cool Cyan */
  --color-accent-cool: #06b6d4; /* For secondary highlights */

  /* Surfaces (Dark Mode) */
  --color-bg-deep: #0a0a12; /* Deep background */
  --color-bg-base: #0f0f1a; /* Standard background */
  --color-bg-elevated: #1a1a2e; /* Elevated surfaces */
  --color-surface-glass: rgba(255, 255, 255, 0.06);
  --color-surface-glass-hover: rgba(255, 255, 255, 0.1);

  /* Default Mapping (Fixes Invisible Text) */
  --color-bg: var(--color-bg-deep);
  --color-surface: var(--color-bg-elevated);
  --color-text: var(--color-text-primary);

  /* Text Hierarchy */
  --color-text-primary: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #64748b;
  --color-text-accent: var(--color-primary-light);

  /* Semantic Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: var(--color-primary);

  /* Gradients */
  --gradient-hero: linear-gradient(
    135deg,
    #8b5cf6 0%,
    /* Vivid Violet */ #6366f1 50%,
    /* Indigo */ #0ea5e9 100% /* Sky Blue */
  );
  --gradient-warm-cta: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  --gradient-subtle-glow: radial-gradient(
    ellipse at 50% 0%,
    var(--color-primary-glow),
    transparent 70%
  );
  --gradient-bg: linear-gradient(
    180deg,
    var(--color-bg-deep) 0%,
    var(--color-bg-base) 100%
  );

  /* Textures */
  --bg-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --font-display: "Outfit", var(--font-sans);
  --font-prose: "Crimson Pro", Georgia, serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px var(--color-primary-glow);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 250ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 450ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Safe area for mobile */
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============================================
   GLOBAL BRAND CLASSES
   ============================================ */

/* Tolkien Logotype - Primary Platform Brand */

.tolkien-logotype {
  font-family: var(--font-display);
  font-size: 1.75rem; /* Larger for impact */
  font-weight: 950; /* Maximum thickness */
  letter-spacing: 0.08em; /* Widened for all-caps */
  text-transform: uppercase; /* ALL CAPS treatment */
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.4));
  white-space: nowrap;
}

/* Unified Header Grid */

.review-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0.75rem 2rem;
  gap: 1.5rem;
  background: rgba(15, 15, 26, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-central {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.header-central h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Light mode */

@media (prefers-color-scheme: light) {
  :root {
    --color-bg: #f8fafc;
    --color-bg-secondary: #f1f5f9;
    --color-surface: rgba(255, 255, 255, 0.8);
    --color-text: #1e293b;
    --color-text-secondary: #475569;
    --color-text-muted: #94a3b8;
    --gradient-bg: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  }
}

/* Reduced motion */

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

/* Base styles */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--gradient-bg);
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Accessibility */

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Typography */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: var(--space-md);
}

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

a:hover {
  color: var(--color-primary);
}

/* Buttons */

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Inputs */

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Scrollbar */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Utility classes */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Animations */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.fade-in {
  animation: fadeIn var(--transition-slow) ease forwards;
}

.slide-up {
  animation: slideUp var(--transition-slow) ease forwards;
}
