@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #09090b;
  --surface: #18181b;
  --surface2: #27272a;
  --surface3: #3f3f46;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text: #f4f4f5;
  --text2: #a1a1aa;
  --text3: #71717a;
  
  --primary: #8b5cf6;
  --primary-hover: #a78bfa;
  --primary-dim: rgba(139, 92, 246, 0.15);
  
  --success: #10b981;
  --success-dim: rgba(16, 185, 129, 0.15);
  --danger: #ef4444;
  --danger-dim: rgba(239, 68, 68, 0.15);
  --warning: #f59e0b;
  --warning-dim: rgba(245, 158, 11, 0.15);
  
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius: 8px;
  --radius-sm: 6px;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -1px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5), 0 4px 6px -2px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.4);
}

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

body { 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; 
  background: var(--bg); 
  color: var(--text); 
  line-height: 1.6; 
  font-size: 14px; 
  -webkit-font-smoothing: antialiased;
}

/* Background effects */
.bg-effects {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 0; pointer-events: none; overflow: hidden;
}
.glow-blob {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: float 20s infinite alternate ease-in-out;
}
.glow-blob.purple { top: -100px; left: -100px; background: #8b5cf6; }
.glow-blob.blue { bottom: -100px; right: -100px; background: #3b82f6; animation-delay: -10s; }

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(100px, 100px) scale(1.2); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text2); }

/* ── Layout ── */
.app { display: flex; height: 100vh; overflow: hidden; position: relative; z-index: 1; }

.sidebar {
  width: 250px;
  background: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  margin-bottom: 12px;
}
.logo-icon { font-size: 1.8rem; filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.8)); animation: pulseGlow 2s infinite alternate; }
@keyframes pulseGlow { from { filter: drop-shadow(0 0 5px rgba(139,92,246,0.5)); } to { filter: drop-shadow(0 0 15px rgba(139,92,246,0.9)); } }

.logo-text { 
  font-size: 1.5rem; 
  font-weight: 800; 
  background: linear-gradient(to right, #c084fc, #818cf8); 
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent; 
  letter-spacing: -0.5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 4px 16px;
  color: var(--text2);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.nav-item:hover { 
  background: rgba(255, 255, 255, 0.03); 
  color: var(--text); 
  border-color: var(--border);
}

.nav-item.active { 
  background: var(--primary-dim);
  color: var(--primary-hover); 
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.05);
}

.nav-icon { font-size: 1.2rem; width: 24px; text-align: center; }

.main { 
  flex: 1; 
  padding: 32px 48px; 
  overflow-y: auto; 
  max-width: 1400px; 
  margin: 0 auto;
  width: 100%;
  scroll-behavior: smooth;
}

/* ── Pages ── */
.page { display: none; animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.page.active { display: block; }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.page-header { margin-bottom: 32px; }
.page-header h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -1px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.page-desc { color: var(--text2); font-size: 1rem; max-width: 600px; }

/* ── Cards ── */
.card {
  background: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.card-header h3 { font-size: 1.1rem; font-weight: 600; display: flex; align-items: center; gap: 8px; color: #fff; }

/* ── Stats ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.stat-card { 
  text-align: center; 
  padding: 24px 16px; 
  background: rgba(255,255,255,0.02); 
  border-radius: var(--radius-lg); 
  border: 1px solid var(--border); 
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.stat-card:hover { transform: translateY(-4px); background: rgba(255,255,255,0.04); box-shadow: var(--shadow-lg); }
.stat-card:hover::before { opacity: 1; }

.stat-value { 
  font-size: 2.5rem; 
  font-weight: 800; 
  background: linear-gradient(135deg, #fff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}
.stat-label { font-size: 0.9rem; color: var(--text2); font-weight: 500; margin-top: 8px; text-transform: uppercase; letter-spacing: 0.5px;}

/* ── Pipeline ── */
.pipeline-container { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; overflow-x: auto; padding: 12px 4px; flex-wrap: nowrap; }
.pipeline-container::-webkit-scrollbar { height: 4px; }
.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 90px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.pipeline-step .step-icon { font-size: 1.5rem; margin-bottom: 8px; filter: grayscale(1); transition: all 0.3s; }
.pipeline-step .step-name { font-size: 0.85rem; font-weight: 600; color: var(--text2); transition: all 0.3s;}
.pipeline-step .step-desc { font-size: 0.7rem; color: var(--text3); margin-top: 2px; }

.pipeline-step.active { 
  background: var(--primary-dim); 
  border-color: var(--primary); 
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}
.pipeline-step.active .step-icon { filter: grayscale(0); animation: bounce 1s infinite alternate; }
.pipeline-step.active .step-name { color: #fff; }

.pipeline-step.done { 
  background: rgba(16, 185, 129, 0.1); 
  border-color: rgba(16, 185, 129, 0.4); 
}
.pipeline-step.done .step-icon { filter: grayscale(0); }
.pipeline-step.done .step-name { color: var(--success); }

.pipeline-step.error { background: var(--danger-dim); border-color: var(--danger); }
.pipeline-arrow { color: var(--border-hover); font-size: 1.2rem; flex-shrink: 0; font-weight: 300; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-4px); } }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 150px; }

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
input:hover, select:hover, textarea:hover { border-color: var(--border-hover); }
input:focus, select:focus, textarea:focus { 
  outline: none; 
  border-color: var(--primary); 
  background: rgba(0,0,0,0.4);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}
textarea { resize: vertical; min-height: 100px; line-height: 1.5; }
.select-styled { width: auto; min-width: 150px; cursor: pointer; }
.input-search { width: 250px; padding: 8px 14px; border-radius: 20px; background: rgba(0,0,0,0.3); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.97); }

.btn-primary { 
  background: linear-gradient(135deg, #8b5cf6, #6366f1); 
  color: #fff; 
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { 
  background: linear-gradient(135deg, #9366f9, #6d70f2); 
  box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.btn-success { 
  background: linear-gradient(135deg, #10b981, #059669); 
  color: #fff; 
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}
.btn-success:hover { box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3); transform: translateY(-1px); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-outline { 
  background: rgba(255,255,255,0.03); 
  border: 1px solid var(--border); 
  color: var(--text); 
}
.btn-outline:hover { 
  background: rgba(255,255,255,0.08); 
  border-color: var(--text3); 
}

.btn-sm { padding: 6px 12px; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn-gen { font-size: 1.05rem; padding: 12px 28px; border-radius: var(--radius-lg); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; background: rgba(0,0,0,0.2); }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { 
  background: rgba(255,255,255,0.03); 
  color: var(--text2); 
  font-weight: 600; 
  text-transform: uppercase; 
  letter-spacing: 0.5px; 
  font-size: 0.8rem;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.03); }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.3px; }
.badge-ok { background: var(--success-dim); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-err { background: var(--danger-dim); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-info { background: var(--primary-dim); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.2); }
.badge-warn { background: var(--warning-dim); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }

/* ── Score badge ── */
.score-badge { display: inline-block; padding: 6px 14px; border-radius: 20px; font-weight: 700; font-size: 0.9rem; box-shadow: var(--shadow-sm); }
.score-badge.pass { background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(5,150,105,0.2)); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.score-badge.fail { background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(220,38,38,0.2)); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }

/* ── Modal ── */
.modal-overlay { 
  position: fixed; inset: 0; 
  background: rgba(0,0,0,0.6); 
  display: flex; align-items: center; justify-content: center; 
  z-index: 1000; backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease forwards;
}
.modal { 
  background: var(--surface); 
  border: 1px solid var(--border); 
  border-radius: var(--radius-xl); 
  width: 90%; max-width: 680px; max-height: 85vh; 
  overflow-y: auto; 
  padding: 32px; 
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal h3 { margin-bottom: 24px; font-size: 1.4rem; font-weight: 700; color: #fff; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ── Tabs ── */
.tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.tab-btn { 
  padding: 8px 16px; 
  background: transparent; 
  border: none; 
  border-radius: var(--radius);
  color: var(--text2); 
  cursor: pointer; 
  font-size: 0.9rem; 
  font-weight: 500;
  transition: all 0.2s;
}
.tab-btn:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.tab-btn.active { background: var(--surface2); color: #fff; box-shadow: var(--shadow-sm); }
.tab-panel { display: none; animation: fadeIn 0.3s; }
.tab-panel.active { display: block; }

/* ── Code editor ── */
.code-editor { 
  font-family: "Cascadia Code", "Fira Code", monospace; 
  font-size: 0.9rem; line-height: 1.7; min-height: 250px; 
  background: #000; padding: 16px; border-radius: var(--radius);
  border: 1px solid var(--border);
  color: #e2e8f0;
}

/* ── Toast ── */
.toast { 
  position: fixed; bottom: 30px; right: 30px; 
  padding: 12px 20px; border-radius: var(--radius); 
  font-size: 0.95rem; font-weight: 500; z-index: 2000; 
  animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards, fadeOut 0.4s ease 3.1s forwards; 
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  display: flex; align-items: center; gap: 10px;
}
.toast-ok { background: #10b981; color: #fff; }
.toast-err { background: #ef4444; color: #fff; }
.toast-ok::before { content: '✓'; font-weight: bold; }
.toast-err::before { content: '✕'; font-weight: bold; }
@keyframes toastIn { from { transform: translateY(100px) scale(0.9); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(20px); } }

/* ── Log ── */
.log-container { 
  font-family: "Cascadia Code", monospace; 
  font-size: 0.85rem; color: var(--text2); 
  max-height: 250px; overflow-y: auto; 
  background: #000; border-radius: var(--radius); 
  padding: 16px; border: 1px solid var(--border);
  line-height: 1.6;
}
.log-container div { border-bottom: 1px dashed rgba(255,255,255,0.05); padding: 4px 0; }
.log-container div:last-child { border-bottom: none; }

/* ── Chapter text ── */
.chapter-text { 
  background: rgba(0,0,0,0.2); 
  border: 1px solid var(--border); 
  border-radius: var(--radius-lg); 
  padding: 32px 40px; 
  line-height: 2; 
  font-size: 1.05rem; 
  color: #fff;
  white-space: pre-wrap; 
  max-height: 600px; overflow-y: auto; 
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
  font-family: "Noto Serif SC", "Songti SC", serif;
}

/* ── Issues ── */
.issue-item { 
  padding: 12px 16px; border-left: 4px solid var(--border); 
  margin-bottom: 10px; font-size: 0.9rem; 
  background: rgba(255,255,255,0.02); 
  border-radius: 0 var(--radius) var(--radius) 0; 
}
.issue-item.high { border-left-color: var(--danger); background: linear-gradient(90deg, var(--danger-dim), transparent); }
.issue-item.medium { border-left-color: var(--warning); background: linear-gradient(90deg, var(--warning-dim), transparent); }
.issue-item.low { border-left-color: var(--primary); }

/* ── Chars ── */
.char-card { 
  display: inline-block; background: rgba(255,255,255,0.03); 
  border: 1px solid var(--border); border-radius: var(--radius-lg); 
  padding: 16px; margin: 6px; min-width: 200px; vertical-align: top; 
  transition: all 0.2s;
}
.char-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.char-card h4 { font-size: 1.05rem; margin-bottom: 6px; color: #fff; }
.char-card p { font-size: 0.85rem; color: var(--text2); }
.char-card .delete-btn { float: right; background: none; border: none; color: var(--text3); cursor: pointer; font-size: 1.2rem; transition: color 0.2s; }
.char-card .delete-btn:hover { color: var(--danger); }

/* ── Tags ── */
.tag-container { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text3); font-size: 1rem; border: 1px dashed var(--border); border-radius: var(--radius-lg); }

/* ── Divider ── */
.divider-text { text-align: center; color: var(--text3); margin: 20px 0; font-size: 0.85rem; display: flex; align-items: center; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; border-bottom: 1px solid var(--border); margin: 0 16px; }

/* ── Progress bar ── */
.progress-bar-wrap { background: rgba(0,0,0,0.3); border-radius: 20px; height: 16px; overflow: hidden; margin-bottom: 20px; border: 1px solid var(--border); box-shadow: inset 0 1px 3px rgba(0,0,0,0.2); }
.progress-bar { 
  background: linear-gradient(90deg, #8b5cf6, #3b82f6, #10b981); 
  background-size: 200% 100%;
  height: 100%; width: 0%; 
  transition: width 0.4s ease; 
  display: flex; align-items: center; justify-content: center; 
  font-size: 0.75rem; color: #fff; font-weight: 700;
  animation: gradientMove 2s linear infinite;
}
@keyframes gradientMove { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ── Spinner ── */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.2); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Workbench 3-column layout ── */
.workbench-layout { display: flex; height: calc(100vh - 48px); gap: 0; background: rgba(24, 24, 27, 0.6); backdrop-filter: blur(12px); border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.wb-sidebar {
  width: 280px;
  background: rgba(0,0,0,0.3);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.wb-sidebar-header { padding: 16px; border-bottom: 1px solid var(--border); background: rgba(0,0,0,0.2); }
.wb-sidebar-header h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0; color: #fff; }
.wb-sidebar-body { flex: 1; overflow-y: auto; padding: 12px; }
.wb-section { margin-bottom: 12px; }
.wb-section summary {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius);
  transition: background 0.2s;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.wb-section summary::-webkit-details-marker { display: none; }
.wb-section summary::after { content: '▾'; font-size: 0.8em; color: var(--text3); transition: transform 0.2s; }
.wb-section[open] summary::after { transform: rotate(180deg); }
.wb-section summary:hover { background: rgba(255,255,255,0.06); }
.wb-section > div { padding: 12px 8px; font-size: 0.85rem; animation: fadeIn 0.3s; }
.wb-char-item { padding: 8px; margin-bottom: 6px; background: rgba(0,0,0,0.2); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.wb-char-item strong { font-size: 0.9rem; color: #fff; }
.wb-char-item p { font-size: 0.8rem; color: var(--text2); margin: 4px 0 0; }
.wb-fs-item { padding: 6px 10px; margin-bottom: 6px; border-left: 3px solid var(--primary); font-size: 0.85rem; background: rgba(255,255,255,0.02); }
.wb-fs-item.resolved { border-left-color: var(--success); opacity: 0.5; }

.wb-editor { flex: 1; display: flex; flex-direction: column; min-width: 0; background: transparent; }
.wb-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--border);
}
.wb-textarea {
  flex: 1;
  width: 100%;
  padding: 32px 40px;
  background: transparent;
  border: none;
  color: #fff;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 1.1rem;
  line-height: 2.2;
  resize: none;
  outline: none;
}
.wb-textarea::placeholder { color: var(--text3); font-family: "Inter", sans-serif; font-size: 1rem; }

.wb-review {
  width: 350px;
  background: rgba(0,0,0,0.3);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.wb-review-header { padding: 16px; border-bottom: 1px solid var(--border); background: rgba(0,0,0,0.2); }
.wb-review-header h3 { font-size: 1rem; font-weight: 700; margin: 0; color: #fff; }
.wb-review-body { flex: 1; overflow-y: auto; padding: 20px; }

@media (max-width: 1024px) {
  .workbench-layout { flex-direction: column; height: auto; }
  .wb-sidebar { width: 100%; max-height: 250px; border-right: none; border-bottom: 1px solid var(--border); }
  .wb-editor { min-height: 500px; }
  .wb-review { width: 100%; border-left: none; border-top: 1px solid var(--border); }
}

@media (max-width: 768px) {
  .sidebar { width: 70px; }
  .logo-text, .nav-item span:not(.nav-icon) { display: none; }
  .nav-item { justify-content: center; padding: 14px; margin: 8px; }
  .sidebar-logo { justify-content: center; padding: 20px 0; }
  .main { padding: 20px; }
  .stats-grid { grid-template-columns: 1fr; }
  .pipeline-container { gap: 4px; }
  .pipeline-step { min-width: 60px; padding: 8px; }
  .pipeline-step .step-desc { display: none; }
}
