/* ══════════════════════════════════════════════════════════
   怎么做产品 — 设计系统
   Linear 风格精致浅色主题 · 发丝边框 · 靛紫强调 · 柔和层次
   ══════════════════════════════════════════════════════════ */

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

:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --text-secondary: #52525b;
  --text-muted: #8e8e93;
  --primary: #5e6ad2;
  --primary-hover: #7170ff;
  --primary-light: #eef0fd;
  --success: #1f9d55;
  --success-light: #eaf8f0;
  --warning: #b45309;
  --warning-light: #fdf6ec;
  --danger: #e5484d;
  --danger-light: #fdeeee;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-xs: 0 1px 2px rgba(16,16,20,.05);
  --shadow-sm: 0 1px 2px rgba(16,16,20,.04), 0 2px 8px rgba(16,16,20,.04);
  --shadow: 0 2px 4px rgba(16,16,20,.05), 0 8px 24px rgba(16,16,20,.07);
  --shadow-lg: 0 4px 8px rgba(16,16,20,.06), 0 16px 48px rgba(16,16,20,.14);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }

/* 精致滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
::-webkit-scrollbar-track { background: transparent; }

::selection { background: var(--primary-light); color: var(--primary); }

/* ─── Navbar ───────────────────────────────────────── */
.navbar {
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 60px;
}
.nav-brand {
  font-size: 16px; font-weight: 600; letter-spacing: -.01em;
  color: var(--text); display: flex; align-items: center; gap: 8px;
}
.nav-brand .brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #5e6ad2, #7170ff);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; box-shadow: 0 2px 6px rgba(94,106,210,.35);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 7px 13px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--text-secondary);
  transition: background .15s, color .15s; white-space: nowrap;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-user {
  padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--surface-2); color: var(--text-secondary);
  border: 1px solid var(--border); white-space: nowrap;
}

/* ─── Main ─────────────────────────────────────────── */
.main-content {
  max-width: 1280px; margin: 0 auto; padding: 36px 24px 64px;
}

/* ─── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; font-size: 13.5px; font-weight: 500;
  border-radius: 9px; border: 1px solid transparent;
  cursor: pointer; transition: all .15s ease;
  font-family: var(--font); white-space: nowrap; line-height: 1.4;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: 10px; }
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 1px 2px rgba(94,106,210,.3), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-outline { background: transparent; color: var(--text-secondary); border-color: var(--border-strong); }
.btn-outline:hover:not(:disabled) { background: var(--surface-2); color: var(--text); border-color: var(--text-muted); }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 1px 2px rgba(229,72,77,.3); }
.btn-danger:hover:not(:disabled) { background: #d63c41; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-close {
  background: none; border: none; font-size: 22px; cursor: pointer;
  color: var(--text-muted); line-height: 1; padding: 4px 8px; border-radius: 6px;
  transition: background .15s, color .15s;
}
.btn-close:hover { background: var(--surface-2); color: var(--text); }

/* ─── Forms ────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 550; margin-bottom: 7px; color: var(--text); }
.form-input, .form-textarea {
  width: 100%; padding: 10px 14px; font-size: 14px;
  border: 1px solid var(--border-strong); border-radius: 9px;
  background: var(--surface); color: var(--text);
  font-family: var(--font); transition: border-color .15s, box-shadow .15s;
  box-shadow: var(--shadow-xs);
}
.form-input:hover, .form-textarea:hover { border-color: var(--text-muted); }
.form-input:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94,106,210,.14);
}
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.65; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-actions { display: flex; gap: 10px; margin-top: 22px; }
.required { color: var(--danger); }
.optional { color: var(--text-muted); font-weight: 400; }
.form-row { display: flex; gap: 16px; }
.flex-1 { flex: 1; }
.error-msg {
  color: var(--danger); font-size: 13.5px; margin-top: 10px;
  padding: 10px 14px; background: var(--danger-light);
  border: 1px solid rgba(229,72,77,.2); border-radius: 9px;
}

/* ─── Upload Zone ──────────────────────────────────── */
.upload-zone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg);
  padding: 24px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
  background: var(--surface);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary); background: var(--primary-light);
}
.upload-zone-inner {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text-secondary); font-size: 13.5px;
}
.upload-icon { font-size: 30px; }
.upload-hint { font-size: 12px; color: var(--text-muted); }

.upload-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.upload-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 9px;
  font-size: 13px; box-shadow: var(--shadow-xs);
}
.upload-item-icon { font-size: 16px; }
.upload-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item-size { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.upload-item-preview {
  width: 34px; height: 34px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--border); cursor: pointer;
}
.upload-item-remove {
  background: none; border: none; color: var(--text-muted);
  font-size: 17px; cursor: pointer; padding: 0 4px; line-height: 1;
  border-radius: 4px;
}
.upload-item-remove:hover { color: var(--danger); }

/* ─── Prototype Viewer ────────────────────────────── */
.prototype-viewer {
  margin: 16px 20px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
}
.prototype-iframe { width: 100%; height: 600px; border: none; background: #fff; }
.prototype-hint {
  padding: 12px 20px; font-size: 13px; color: var(--text-muted);
  background: var(--surface-2); border-top: 1px solid var(--border);
}
.prototype-hint p { margin-bottom: 4px; }

/* ─── Diff Markers ─────────────────────────────────── */
.diff-added {
  background: #dcfce7; color: #15803d; padding: 1px 7px;
  border-radius: 5px; font-size: 11px; font-weight: 600;
  margin-right: 4px; white-space: nowrap;
}
.diff-changed {
  background: #fef3c7; color: #a16207; padding: 1px 7px;
  border-radius: 5px; font-size: 11px; font-weight: 600;
  margin-right: 4px; white-space: nowrap;
}
.diff-changed + small { color: #a16207; font-style: italic; }

/* ─── Modal ────────────────────────────────────────── */
.modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(24,24,27,.5);
  backdrop-filter: blur(2px);
}
.modal-content {
  position: relative; background: var(--surface);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  width: 90%; max-width: 700px; max-height: 90vh; overflow-y: auto;
  animation: modalIn .18s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
}
.modal-header h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.modal-body { padding: 4px 24px 24px; }

/* ─── Badges ───────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1.5;
}
.badge-draft { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge-in_progress { background: var(--primary-light); color: var(--primary); border: 1px solid rgba(94,106,210,.25); }
.badge-completed { background: var(--success-light); color: var(--success); border: 1px solid rgba(31,157,85,.25); }

/* ─── API Warning Banner ──────────────────────────── */
.api-warning-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; margin-bottom: 28px;
  background: var(--warning-light); border: 1px solid rgba(180,83,9,.2);
  border-radius: var(--radius-lg);
}
.api-warning-icon { font-size: 28px; flex-shrink: 0; }
.api-warning-body { flex: 1; }
.api-warning-body strong { font-size: 14.5px; color: var(--warning); }
.api-warning-body p { font-size: 13px; color: #92610f; margin-top: 2px; }
.api-warning-banner .btn { flex-shrink: 0; }

/* ─── Dashboard ────────────────────────────────────── */
.dashboard { }
.dash-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 36px; flex-wrap: wrap; gap: 16px;
}
.dash-header h1 { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-bottom: 6px; }
.subtitle { color: var(--text-muted); font-size: 14.5px; }

.project-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 18px;
}
.project-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 22px;
  cursor: pointer; transition: all .16s ease;
  box-shadow: var(--shadow-xs);
}
.project-card:hover {
  box-shadow: var(--shadow); border-color: var(--border-strong);
  transform: translateY(-2px);
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.card-header h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--text-muted); margin-bottom: 10px; }
.card-preview {
  font-size: 13px; color: var(--text-secondary);
  background: var(--surface-2); padding: 11px 13px; border-radius: 8px;
  margin-bottom: 14px; line-height: 1.6; max-height: 62px; overflow: hidden;
}
.card-progress { display: flex; align-items: center; gap: 12px; }
.progress-bar { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-hover));
  border-radius: 3px; transition: width .3s;
}
.progress-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.empty-state {
  text-align: center; padding: 96px 20px;
}
.empty-icon {
  width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; box-shadow: var(--shadow-sm);
}
.empty-state h2 { font-size: 19px; font-weight: 600; margin-bottom: 8px; letter-spacing: -.01em; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; font-size: 14px; }

/* ─── Project Workspace ───────────────────────────── */
.workspace-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.ws-header-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ws-header-left h1 { font-size: 21px; font-weight: 650; letter-spacing: -.015em; }
.ws-header-right { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { font-size: 13.5px; color: var(--text-muted); padding: 4px 8px; border-radius: 6px; transition: all .15s; }
.back-link:hover { color: var(--text); background: var(--surface-2); }

.section { margin-bottom: 26px; }
.section h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; letter-spacing: -.005em; }
.raw-idea-section { }
.raw-idea-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  font-size: 13.5px; line-height: 1.7; white-space: pre-wrap;
  max-height: 200px; overflow-y: auto; color: var(--text-secondary);
}

/* ─── File List (project page) ───────────────────── */
.file-list { display: flex; flex-wrap: wrap; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 9px;
  font-size: 12.5px; box-shadow: var(--shadow-xs);
}
.file-item-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-size { color: var(--text-muted); font-size: 12px; }

/* ─── Stage Indicator ─────────────────────────────── */
.stage-indicator {
  display: flex; align-items: center; justify-content: center;
  padding: 26px 16px; margin-bottom: 32px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
}
.stage-step {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  text-align: center;
}
.step-circle {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; background: var(--surface-2); border: 2px solid var(--border);
  transition: all .3s;
}
.stage-step.completed .step-circle { background: var(--success-light); border-color: var(--success); }
.stage-step.active .step-circle {
  background: var(--primary-light); border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(94,106,210,.12);
}
.step-label { font-size: 12px; font-weight: 550; color: var(--text-secondary); }
.step-status { font-size: 11px; color: var(--text-muted); }
.step-line {
  width: 60px; height: 2px; background: var(--border); margin: 0 4px;
  align-self: flex-start; margin-top: 23px; transition: background .3s;
}
.step-line.completed { background: var(--success); }

/* ─── Stage Panel ─────────────────────────────────── */
.stage-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 16px; overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.stage-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: var(--surface);
  flex-wrap: wrap; gap: 8px;
}
.stage-panel-header h2 { font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.stage-num {
  background: var(--primary-light); color: var(--primary);
  padding: 3px 10px; border-radius: 7px; font-size: 12px; font-weight: 600;
}
.stage-panel-actions { display: flex; align-items: center; gap: 8px; }
.stage-done-badge { font-size: 13px; color: var(--success); font-weight: 550; }
.stage-locked { font-size: 13px; color: var(--text-muted); }

.stage-loading { padding: 44px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.spinner {
  width: 38px; height: 38px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 13.5px; color: var(--text-secondary); text-align: center; }
.loading-timer { color: var(--text-muted); font-size: 12.5px; }

.stage-error {
  padding: 14px 18px; margin: 14px 20px;
  background: var(--danger-light); color: var(--danger);
  border: 1px solid rgba(229,72,77,.2);
  border-radius: var(--radius); font-size: 13.5px;
}

.stage-output { padding: 20px; }
.output-content {
  max-height: 600px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; margin-bottom: 14px; background: var(--surface);
}
.output-actions { display: flex; gap: 8px; margin-bottom: 16px; }

.pm-notes-section { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--border); }
.pm-notes-section h4 { font-size: 13.5px; margin-bottom: 8px; font-weight: 600; }

/* ─── Markdown Body ───────────────────────────────── */
.markdown-body {
  font-size: 14px; line-height: 1.8; color: var(--text);
}
.markdown-body h1 { font-size: 23px; margin: 26px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-weight: 650; letter-spacing: -.015em; }
.markdown-body h2 { font-size: 19px; margin: 22px 0 10px; font-weight: 620; letter-spacing: -.01em; }
.markdown-body h3 { font-size: 16px; margin: 18px 0 8px; font-weight: 600; }
.markdown-body h4 { font-size: 14.5px; margin: 14px 0 6px; font-weight: 600; }
.markdown-body p { margin-bottom: 12px; }
.markdown-body ul, .markdown-body ol { margin-bottom: 12px; padding-left: 24px; }
.markdown-body li { margin-bottom: 4px; }
.markdown-body table {
  width: 100%; border-collapse: collapse; margin-bottom: 16px;
  font-size: 13px; border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.markdown-body th, .markdown-body td {
  border: 1px solid var(--border); padding: 9px 12px; text-align: left;
}
.markdown-body th { background: var(--surface-2); font-weight: 600; }
.markdown-body tr:nth-child(even) td { background: #fafafa; }
.markdown-body blockquote {
  border-left: 3px solid var(--primary);
  padding: 10px 16px; margin: 12px 0; background: var(--primary-light);
  color: var(--text-secondary); border-radius: 0 8px 8px 0;
}
.markdown-body code {
  background: var(--surface-2); padding: 2px 6px; border-radius: 5px;
  font-family: var(--font-mono); font-size: 12.5px; color: #b3415c;
}
.markdown-body pre {
  background: #19191d; color: #d4d4dc; padding: 18px;
  border-radius: var(--radius); overflow-x: auto; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.markdown-body pre code { background: none; padding: 0; color: inherit; }
.markdown-body hr { border: none; border-top: 1px solid var(--border); margin: 26px 0; }
.markdown-body strong { font-weight: 620; }

/* ─── PRD Viewer ──────────────────────────────────── */
.prd-viewer { }
.prd-viewer-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 26px; flex-wrap: wrap; gap: 12px;
}
.prd-viewer-header h1 { font-size: 21px; font-weight: 650; letter-spacing: -.015em; }
.prd-viewer-actions { display: flex; gap: 8px; }
.prd-preview {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 34px; max-width: 900px;
  box-shadow: var(--shadow-sm);
}
.prd-editor { }
.prd-editor-textarea {
  width: 100%; min-height: 600px; padding: 20px;
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.7;
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); resize: vertical;
  box-shadow: var(--shadow-xs);
}
.prd-editor-textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94,106,210,.14);
}

/* ─── Settings ────────────────────────────────────── */
.settings-page { max-width: 720px; }
.settings-page h1 { font-size: 23px; margin-bottom: 6px; font-weight: 650; letter-spacing: -.015em; }
.settings-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px;
  box-shadow: var(--shadow-xs); margin-bottom: 18px;
}
.settings-card h3 { font-size: 15px; margin-bottom: 14px; font-weight: 600; }
.settings-msg { padding: 10px 16px; border-radius: 9px; margin-top: 16px; font-size: 13.5px; }
.msg-success { background: var(--success-light); color: var(--success); }
.msg-error { background: var(--danger-light); color: var(--danger); }
.msg-warning { background: var(--warning-light); color: var(--warning); }
.msg-info { background: var(--primary-light); color: var(--primary); }
.preset-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.preset-buttons .btn { text-align: center; }
.preset-buttons small { display: block; font-weight: 400; color: var(--text-muted); font-size: 11px; }

/* ─── Model List ──────────────────────────────────── */
.model-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 9px; margin-bottom: 8px; background: var(--surface);
}
.model-info strong { font-size: 13.5px; display: block; font-weight: 600; }
.model-detail { font-size: 12px; color: var(--text-muted); }
.model-actions { display: flex; gap: 4px; }

.stage-model-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.stage-label { font-size: 13.5px; font-weight: 550; white-space: nowrap; min-width: 200px; }

/* ─── Prompt Row ──────────────────────────────────── */
.prompt-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.prompt-label { font-size: 13.5px; font-weight: 550; flex: 1; }

/* ─── Template Page ───────────────────────────────── */
.template-page { }
.template-header { margin-bottom: 26px; }
.template-header h1 { font-size: 23px; margin-bottom: 6px; font-weight: 650; letter-spacing: -.015em; }
.template-preview {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 34px; max-width: 900px;
  box-shadow: var(--shadow-sm);
}

/* ─── Toast ────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 26px; right: 26px; z-index: 300;
  background: #18181b; color: #fff; padding: 12px 20px;
  border-radius: 10px; font-size: 13.5px;
  box-shadow: var(--shadow-lg); animation: fadeIn .2s;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .nav-inner { padding: 0 16px; }
  .main-content { padding: 22px 16px 48px; }
  .project-grid { grid-template-columns: 1fr; }
  .dash-header { flex-direction: column; }
  .workspace-header { flex-direction: column; }
  .ws-header-right { width: 100%; }
  .form-row { flex-direction: column; }
  .prd-viewer-header { flex-direction: column; }
  .stage-indicator { overflow-x: auto; justify-content: flex-start; padding: 16px 8px; }
  .step-line { width: 40px; }
  .nav-links { gap: 2px; }
  .nav-link { padding: 7px 9px; font-size: 13px; }
}
