/* ==========================================================================
   FableFlow 5.1 — Master Stylesheet (Swiss High-Contrast Dark Theme)
   ========================================================================== */

:root {
  --bg-base: #07090e;
  --bg-card: rgba(14, 18, 28, 0.85);
  --bg-card-hover: rgba(20, 26, 40, 0.95);
  --bg-input: #0b0e17;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.35);
  --border-success: rgba(16, 185, 129, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #38bdf8;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-violet: #8b5cf6;
  --accent-rose: #f43f5e;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(139, 92, 246, 0.08) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Top Announcement Bar */
.top-announcement-bar {
  width: 100%;
  background: #090c14;
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 24px;
  position: relative;
  z-index: 10;
}

.top-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.82rem;
}

.top-bar-text {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.badge-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.03em;
}

.badge-cyan {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.copy-pill-btn {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.copy-pill-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-cyan);
  color: #fff;
}

.copy-tag {
  background: rgba(255, 255, 255, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  text-transform: uppercase;
}

/* Main Container */
.studio-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 12px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  margin: 16px 0 36px;
  background: rgba(9, 12, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}

.brand-meta {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-highlight {
  color: var(--accent-cyan);
}

.brand-subtext {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-github:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
  text-align: center;
  max-width: 900px;
  margin: 20px auto 48px;
}

.hero-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 600;
  margin-bottom: 20px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.text-gradient {
  background: linear-gradient(135deg, #fff 20%, var(--accent-cyan) 60%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}

.hero-subtitle strong {
  color: #fff;
}

/* Studio Workspace */
.studio-workspace {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 28px;
  margin-bottom: 60px;
}

@media (max-width: 1024px) {
  .studio-workspace {
    grid-template-columns: 1fr;
  }
}

.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
}

.card-header-bar h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.status-indicator {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.status-indicator.live {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.input-hint {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.preset-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.preset-btn.active {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.45);
  font-weight: 600;
}

.input-wrapper {
  margin-bottom: 18px;
}

.input-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.studio-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  resize: vertical;
  line-height: 1.5;
  transition: var(--transition);
}

.studio-textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

/* Agent Lanes */
.agent-lanes-config {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.lane-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.lane-label {
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.lane-val {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-fable {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.badge-worker {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.badge-qc {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.btn-primary-glow {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  border: none;
  color: #04101d;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.35);
  transition: var(--transition);
}

.btn-primary-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, #7dd3fc, var(--accent-cyan));
}

/* Visualizer Pipeline */
.pipeline-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.pipeline-status.running {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.pipeline-status.complete {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.pipeline-track {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pipeline-stage-card {
  background: rgba(11, 14, 23, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  transition: var(--transition);
}

.pipeline-stage-card.active {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

.pipeline-stage-card.passed {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.12);
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.stage-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stage-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.stage-header h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
}

.stage-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.stage-body {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.placeholder-text {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Stage dynamic elements */
.contract-box {
  background: #06080e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #e2e8f0;
  margin-top: 8px;
}

.contract-title {
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 6px;
}

.invariants-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.invariants-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
}

.invariants-list li .bullet {
  color: var(--accent-amber);
}

.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.check-item.passed {
  border-left: 3px solid var(--accent-emerald);
}

.check-item .check-state {
  color: var(--accent-emerald);
  font-weight: 700;
}

/* Worklog Card */
.worklog-box {
  background: #05070c;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #a7f3d0;
  white-space: pre-wrap;
  margin-top: 8px;
}

/* Install Section */
.install-section {
  margin-bottom: 60px;
}

.install-card {
  text-align: center;
}

.install-header {
  max-width: 700px;
  margin: 0 auto 28px;
}

.install-header h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 12px 0 10px;
}

.install-header p {
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.terminal-tabs {
  max-width: 800px;
  margin: 0 auto;
  background: #070a11;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.tab-btns {
  display: flex;
  background: #0a0e1a;
  border-bottom: 1px solid var(--border-subtle);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
  background: rgba(56, 189, 248, 0.05);
  font-weight: 700;
}

.tab-content {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}

.tab-content pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: #e2e8f0;
  overflow-x: auto;
  flex: 1;
}

.tab-content.hidden {
  display: none;
}

.copy-btn-inside {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.copy-btn-inside:hover {
  background: var(--accent-cyan);
  color: #04101d;
}

/* Footer */
.studio-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 28px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

.footer-copy a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-copy a:hover {
  color: var(--accent-cyan);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

/* ==========================================================================
   Advanced Mode Switcher & Adversarial Audit Styles
   ========================================================================== */

.mode-toggle-wrap {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mode-toggle-group {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.mode-btn.active.pass-mode {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.mode-btn.active.fail-mode {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.4);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.2);
}

/* Adversarial Gate Rejection UI */
.pipeline-stage-card.failed {
  border-color: rgba(244, 63, 94, 0.6);
  background: rgba(244, 63, 94, 0.04);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.15);
}

.pipeline-stage-card.failed .stage-badge {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.4);
}

.pipeline-status.failed {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.check-item.failed {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fecdd3;
}

.check-item.failed .check-state {
  color: var(--accent-rose);
  font-weight: 700;
}

.worklog-box.rejected {
  border-left-color: var(--accent-rose);
  color: #fda4af;
  background: rgba(244, 63, 94, 0.05);
}

/* ==========================================================================
   Comparison Matrix (Pros & Cons of Solutions)
   ========================================================================== */

.matrix-section {
  margin-top: 50px;
}

.matrix-header {
  text-align: center;
  margin-bottom: 28px;
}

.matrix-header h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-top: 8px;
  color: #fff;
}

.matrix-table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.matrix-table th, 
.matrix-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.matrix-table th {
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.matrix-table th.highlight,
.matrix-table td.highlight {
  background: rgba(56, 189, 248, 0.05);
  border-left: 1px solid rgba(56, 189, 248, 0.2);
  border-right: 1px solid rgba(56, 189, 248, 0.2);
}

.matrix-table th.highlight {
  color: var(--accent-cyan);
}

.matrix-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.matrix-table .tag-yes {
  color: var(--accent-emerald);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.matrix-table .tag-no {
  color: var(--accent-rose);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.matrix-table .tag-warn {
  color: var(--accent-amber);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   Export Hub Cards
   ========================================================================== */

.export-section {
  margin-top: 50px;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.export-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition);
}

.export-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.export-card h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.export-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.export-card-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.export-card-btn:hover {
  background: var(--accent-cyan);
  color: #04101d;
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   Real LLM Provider & BYOK Settings Modal
   ========================================================================== */

.btn-api-settings {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent-cyan);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-api-settings:hover {
  background: var(--accent-cyan);
  color: #04101d;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.api-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  cursor: pointer;
}

.api-status-badge.live {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.api-status-badge.offline {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

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

.modal-card {
  background: #0d121f;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.15);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.modal-select, .modal-input {
  background: #07090e;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.modal-select:focus, .modal-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 10px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}