/* ═══════════════════════════════════════════════════════════════
   ONE — Design System (monochrome)
   Brand: greyscale surfaces + soft copy on dark; black primary CTAs.
   Icons: inline SVG only (stroke, currentColor). See README.md.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Canvas slightly lifted so pure-black CTA reads clearly */
  --bg: #121214;
  --bg-elevated: #18181b;
  --bg-card: #18181b;
  --bg-hover: #222226;
  --bg-inset: #0e0e10;
  --border: #2e2e33;
  --border-hover: #45454d;
  --text: #f2f2f3;
  --text-secondary: #a8a8ae;
  --text-muted: #73737c;
  /* CTA: black button, soft white label */
  --accent: #000000;
  --on-accent: #f4f4f5;
  --accent-hover: #1c1c1f;
  --accent-dim: rgba(255, 255, 255, 0.06);
  --accent-glow: rgba(255, 255, 255, 0.05);
  /* Semantic chips / status — greyscale only */
  --green: #c6c6cc;
  --green-dim: rgba(255, 255, 255, 0.06);
  --red: #9b9ba3;
  --red-dim: rgba(255, 255, 255, 0.05);
  --yellow: #adadb3;
  --yellow-dim: rgba(255, 255, 255, 0.05);
  --blue: #a3a3aa;
  --blue-dim: rgba(255, 255, 255, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Fira Code", monospace;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.45);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.55);
  --shadow-glow: 0 0 32px var(--accent-glow);
  --transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Light theme ─── */
[data-theme="light"] {
  --bg: #f4f4f5;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #ececee;
  --bg-inset: #ebebed;
  --border: #d4d4d8;
  --border-hover: #b4b4bb;
  --text: #18181b;
  --text-secondary: #52525c;
  --text-muted: #71717b;
  --accent: #0a0a0a;
  --on-accent: #fafafa;
  --accent-hover: #27272a;
  --accent-dim: rgba(0, 0, 0, 0.06);
  --accent-glow: rgba(0, 0, 0, 0.06);
  --green: #3f3f46;
  --green-dim: rgba(0, 0, 0, 0.05);
  --red: #52525c;
  --red-dim: rgba(0, 0, 0, 0.05);
  --yellow: #52525c;
  --yellow-dim: rgba(0, 0, 0, 0.04);
  --blue: #52525c;
  --blue-dim: rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 24px var(--accent-glow);
}

[data-theme="light"] header { background: rgba(244,244,245,0.9); }
[data-theme="light"] .btn-primary { color: var(--on-accent); }
[data-theme="light"] .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
::selection { background: #52525b; color: #fafafa; }

.container { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ─── Header ─── */
header { padding: 14px 0; border-bottom: 1px solid var(--border); background: rgba(18,18,20,0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 100; }
header .container-wide { display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: var(--mono); font-size: 1rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
header nav { display: flex; align-items: center; gap: 16px; }
header nav a, header nav button, header nav span { font-size: 0.85rem; color: var(--text-secondary); transition: color var(--transition); }
header nav a:hover, header nav button:hover { color: var(--text); }
.nav-email { font-size: 0.78rem; color: var(--text-muted); font-family: var(--mono); }

/* ─── Theme toggle (Lucide-style icons, matches UI stroke icons) ─── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 6px;
  line-height: 0;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
}
.theme-toggle:hover { border-color: var(--border-hover); color: var(--text); background: var(--bg-hover); }
.theme-toggle__icon { width: 18px; height: 18px; flex-shrink: 0; display: block; }
.theme-toggle__icon--moon { display: none; }
html[data-theme="light"] .theme-toggle__icon--sun { display: none; }
html[data-theme="light"] .theme-toggle__icon--moon { display: block; }

/* ─── Buttons ─── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text); transition: all var(--transition); text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--border-hover); background: var(--bg-hover); }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--border-hover); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--border-hover); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 1px 2px rgba(0,0,0,0.2); }
[data-theme="light"] .btn-primary { box-shadow: none; border-color: var(--accent); }
[data-theme="light"] .btn-primary:hover { box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); padding: 8px 12px; }
.btn-ghost:hover { color: var(--text); background: var(--bg-hover); }
.btn-sm { font-size: 0.78rem; padding: 6px 14px; border-radius: var(--radius-xs); }
.btn-danger { color: var(--text-secondary) !important; border-color: var(--border-hover) !important; }
.btn-danger:hover { background: var(--accent-dim) !important; color: var(--text) !important; }
.btn[disabled] { opacity: 0.4; pointer-events: none; }

/* ─── Inputs ─── */
.input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.88rem; background: var(--bg-inset); color: var(--text); transition: all var(--transition); outline: none; }
.input:focus { border-color: var(--border-hover); box-shadow: 0 0 0 3px var(--accent-dim); }
.input::placeholder { color: var(--text-muted); }
textarea.input { resize: vertical; line-height: 1.6; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ─── Auth ─── */
.auth-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - 52px); padding: 40px 24px; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 40px; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
.auth-card .subtitle { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 32px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.field input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9rem; background: var(--bg-inset); color: var(--text); transition: all var(--transition); outline: none; }
.field input:focus { border-color: var(--border-hover); box-shadow: 0 0 0 3px var(--accent-dim); }
.field input::placeholder { color: var(--text-muted); }
.auth-card .btn { width: 100%; margin-top: 8px; padding: 12px; }
.auth-card .switch { text-align: center; margin-top: 24px; font-size: 0.82rem; color: var(--text-muted); }
.auth-card .switch a { color: var(--text-secondary); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.auth-card .switch a:hover { color: var(--text); }
.auth-card .switch a:hover { text-decoration: underline; }
.auth-error { background: var(--red-dim); color: var(--text-secondary); font-size: 0.82rem; padding: 10px 14px; border-radius: var(--radius-xs); margin-bottom: 16px; display: none; border: 1px solid var(--border-hover); }
.auth-error.visible { display: block; }
.code-inputs { display: flex; gap: 10px; justify-content: center; margin-bottom: 24px; }
.code-inputs input { width: 48px; height: 56px; text-align: center; font-family: var(--mono); font-size: 1.4rem; font-weight: 600; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-inset); color: var(--text); outline: none; transition: all var(--transition); }
.code-inputs input:focus { border-color: var(--border-hover); box-shadow: 0 0 0 3px var(--accent-dim); }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .logo { font-size: 1.2rem; }

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════ */
.dash-page { padding: 32px 0 80px; min-height: calc(100vh - 52px); }

.dash-nav { display: flex; gap: 2px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; }
.nav-tab { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); background: transparent; border: none; padding: 7px 16px; border-radius: var(--radius-xs); transition: all var(--transition); cursor: pointer; }
.nav-tab:hover { color: var(--text-secondary); }
.nav-tab.active { color: var(--text); background: var(--bg-hover); }
.nav-right { display: flex; align-items: center; gap: 16px; }

/* ─── Workspace Switcher ─── */
.workspace-switcher { position: relative; margin-right: 12px; }
.workspace-toggle { display: flex; align-items: center; gap: 6px; font-size: 0.84rem; font-weight: 600; color: var(--text); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 12px; cursor: pointer; transition: border-color var(--transition); white-space: nowrap; }
.workspace-toggle:hover { border-color: var(--border-hover); }
.workspace-dropdown { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,0.3); z-index: 100; padding: 4px; }
.workspace-dropdown.open { display: block; }
.workspace-option { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: var(--radius-xs); cursor: pointer; font-size: 0.82rem; color: var(--text-secondary); transition: all var(--transition); }
.workspace-option:hover { background: var(--bg-hover); color: var(--text); }
.workspace-option.active { color: var(--text); font-weight: 600; }
.workspace-option.active::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--text); margin-right: 8px; flex-shrink: 0; }
.workspace-divider { height: 1px; background: var(--border); margin: 4px 8px; }
.workspace-action { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; border: none; background: none; color: var(--text-muted); font-size: 0.82rem; cursor: pointer; border-radius: var(--radius-xs); transition: all var(--transition); }
.workspace-action:hover { background: var(--bg-hover); color: var(--text); }

.section-heading { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.section-desc { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.6; }

/* ═══ Create Project — Center Focus Overlay ═══ */

/* ─── Onboarding ─── */
.onboarding { margin-bottom: 24px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); }
.onboarding-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.onboarding-header h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.onboarding-steps { display: flex; flex-direction: column; gap: 2px; }
.onboard-step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); transition: background var(--transition); }
.onboard-step:hover { background: var(--bg-hover); }
.onboard-step.step-done { opacity: 0.5; }
.onboard-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.onboard-check.done { border-color: var(--green); background: var(--green); }
.onboard-check.done::after { content: ""; display: block; width: 6px; height: 10px; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-1px); }
.onboard-body { flex: 1; min-width: 0; }
.onboard-title { font-size: 0.88rem; font-weight: 600; }
.onboard-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 1px; }

/* ─── Setup Steps (Settings page) ─── */
.setup-steps { display: flex; flex-direction: column; gap: 4px; }
.setup-step { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.setup-step:last-child { border-bottom: none; }
.setup-step-num { width: 28px; height: 28px; border-radius: 8px; background: var(--bg-hover); color: var(--text); font-family: var(--mono); font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.setup-step-body { flex: 1; }
.setup-step-title { font-size: 0.88rem; font-weight: 600; margin-bottom: 4px; }
.setup-step-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; }
.setup-step-desc code { font-family: var(--mono); font-size: 0.78rem; background: var(--bg-hover); padding: 2px 6px; border-radius: 4px; }
.setup-step .mcp-code { margin-top: 10px; }

/* ─── Tech Pills ─── */
.tech-pill { display: inline-flex; align-items: center; font-size: 0.68rem; font-weight: 600; padding: 2px 8px; border-radius: 100px; background: var(--bg-hover); color: var(--text-secondary); font-family: var(--mono); letter-spacing: 0.02em; }
.detail-tech { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }

/* ─── Detail Repos ─── */
.detail-repos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.detail-repo-link { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 0.75rem; color: var(--text-secondary); padding: 4px 10px; border-radius: var(--radius-xs); border: 1px solid var(--border); background: var(--bg-inset); transition: all var(--transition); }
.detail-repo-link:hover { border-color: var(--border-hover); color: var(--text); background: var(--bg-hover); }

/* ─── Detail Actions ─── */
.detail-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: flex-start; }

/* ─── Last Session ─── */
.detail-last-session { margin-bottom: 24px; padding: 16px 20px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); }
.detail-last-session h4 { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.detail-last-session p { font-size: 0.85rem; line-height: 1.6; color: var(--text-secondary); }

.create-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.65); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.create-overlay.visible { opacity: 1; pointer-events: all; }
.create-card { width: min(560px, 92vw); background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 36px 40px; box-shadow: var(--shadow-lg), 0 0 60px rgba(0,0,0,0.25); transform: translateY(8px) scale(0.98); transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
[data-theme="light"] .create-card { box-shadow: var(--shadow-lg), 0 0 48px rgba(0,0,0,0.06); }
.create-overlay.visible .create-card { transform: translateY(0) scale(1); }
.create-card h2 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 4px; }
.create-card .create-sub { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 24px; }
.create-textarea { width: 100%; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.95rem; line-height: 1.6; background: var(--bg-inset); color: var(--text); resize: none; min-height: 120px; outline: none; transition: all var(--transition); }
.create-textarea:focus { border-color: var(--border-hover); box-shadow: 0 0 0 3px var(--accent-dim); }
.create-textarea::placeholder { color: var(--text-muted); }
.create-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.create-footer .hint { font-size: 0.75rem; color: var(--text-muted); }
.create-footer .hint kbd { background: var(--bg-hover); border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; font-family: var(--mono); font-size: 0.68rem; }
.create-detected { margin-top: 16px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-inset); }
.create-detected-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.create-detected-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.create-detected-tools .tool-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 100px; background: var(--accent-dim); color: var(--text-secondary); font-size: 0.75rem; font-weight: 600; border: 1px solid var(--border); }
.create-detected-tools .tool-tag img { width: 14px; height: 14px; }

/* ─── Build Trigger ─── */
.build-trigger { display: flex; align-items: center; gap: 14px; width: 100%; padding: 20px 24px; border: 1px dashed var(--border); border-radius: var(--radius); background: transparent; color: var(--text-muted); font-size: 0.95rem; cursor: pointer; transition: all var(--transition); margin-bottom: 28px; }
.build-trigger:hover { border-color: var(--border-hover); color: var(--text-secondary); background: var(--bg-hover); border-style: solid; }
.build-trigger .trigger-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-dim); display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid var(--border); }
.build-trigger .trigger-icon svg { color: var(--text-secondary); }
.build-trigger .trigger-text { text-align: left; }
.build-trigger .trigger-title { font-weight: 600; color: var(--text); font-size: 0.88rem; display: block; }
.build-trigger .trigger-hint { font-size: 0.78rem; color: var(--text-muted); }

/* ─── Project Cards ─── */
#projects-section { margin-bottom: 48px; }
.projects-grid { display: flex; flex-direction: column; gap: 6px; }
.project-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; cursor: pointer; transition: all var(--transition); }
.project-card:hover { border-color: var(--border-hover); background: var(--bg-hover); }
.project-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.project-name { font-size: 1rem; font-weight: 600; margin-bottom: 2px; }
.project-prompt { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card-bottom { display: flex; align-items: center; justify-content: space-between; }
.project-url { font-family: var(--mono); font-size: 0.72rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.project-url .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text); animation: pulse-dot 2s ease-in-out infinite; }
.project-meta { display: flex; align-items: center; gap: 8px; }
.connector-icon-sm { width: 18px; height: 18px; object-fit: contain; border-radius: 4px; }
.connector-more { font-size: 0.72rem; color: var(--text-muted); }
.feedback-badge { font-size: 0.7rem; color: var(--text-secondary); background: var(--yellow-dim); padding: 3px 10px; border-radius: 100px; font-weight: 600; border: 1px solid var(--border); }

/* ─── Status Pills ─── */
.project-status { font-family: var(--mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 10px; border-radius: 100px; border: 1px solid transparent; }
.status-draft { background: var(--bg-hover); color: var(--text-secondary); border-color: var(--border); }
.status-building { background: var(--yellow-dim); color: var(--text-secondary); border: 1px solid var(--border); }
.status-live { background: var(--green-dim); color: var(--text); border: 1px solid var(--border-hover); }
.status-paused { background: var(--red-dim); color: var(--text-muted); border: 1px solid var(--border); }
.project-time { font-size: 0.75rem; color: var(--text-muted); }

/* ─── Project Detail ─── */
.btn-back { margin-bottom: 20px; font-size: 0.82rem; }
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.detail-name { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0; }
.detail-url { font-family: var(--mono); font-size: 0.78rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.detail-url a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 3px; }
.detail-url a:hover { color: var(--text); }
.detail-url .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text); animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.btn-session { white-space: nowrap; padding: 10px 24px; }

.detail-prompt { margin-bottom: 24px; padding: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.detail-prompt h4, .detail-section h4 { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.detail-prompt p { font-size: 0.9rem; line-height: 1.65; color: var(--text-secondary); }
.detail-section { margin-bottom: 24px; }
.all-ready { font-size: 0.72rem; color: var(--text-secondary); font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 8px; }

.detail-connectors { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-connector { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-inset); font-size: 0.85rem; transition: all var(--transition); }
.detail-connector.connected { border-color: var(--border-hover); background: var(--accent-dim); }
.connector-logo { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.connected-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-secondary); flex-shrink: 0; }
.btn-connect { font-size: 0.72rem; padding: 4px 10px; border-radius: var(--radius-xs); border: 1px solid var(--border-hover); background: transparent; color: var(--text); font-weight: 600; transition: all var(--transition); cursor: pointer; }
.btn-connect:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ═══ Activity Log ═══ */
.activity-log { display: flex; flex-direction: column; }
.log-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.log-item:last-child { border-bottom: none; }
.log-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.log-icon svg { width: 16px; height: 16px; display: block; flex-shrink: 0; }
.log-icon.i-run { background: var(--accent-dim); color: var(--text); border: 1px solid var(--border); }
.log-icon.i-fb { background: var(--yellow-dim); color: var(--text-secondary); border: 1px solid var(--border); }
.log-icon.i-deploy { background: var(--green-dim); color: var(--text-secondary); border: 1px solid var(--border); }
.log-icon.i-edge { background: var(--blue-dim); color: var(--text-secondary); border: 1px solid var(--border); }
.log-icon.i-err { background: var(--red-dim); color: var(--text-muted); border: 1px solid var(--border); }
.log-body { flex: 1; min-width: 0; }
.log-title { font-size: 0.85rem; font-weight: 500; margin-bottom: 2px; }
.log-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }
.log-time { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; padding-top: 2px; }
.log-empty { padding: 32px 0; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* ─── Feedback ─── */
.feedback-list { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.feedback-item { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); }
.feedback-item.feedback-resolved { opacity: 0.5; }
.feedback-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.feedback-type { font-family: var(--mono); font-size: 0.68rem; font-weight: 600; text-transform: uppercase; padding: 3px 10px; border-radius: 100px; letter-spacing: 0.04em; }
.type-feedback { background: var(--bg-hover); color: var(--text-secondary); border: 1px solid var(--border); }
.type-bug { background: var(--red-dim); color: var(--text-muted); border: 1px solid var(--border); }
.type-feature { background: var(--accent-dim); color: var(--text-secondary); border: 1px solid var(--border); }
.feedback-status { font-size: 0.72rem; color: var(--text-muted); font-family: var(--mono); }
.feedback-time { font-size: 0.72rem; color: var(--text-muted); margin-left: auto; }
.feedback-content { font-size: 0.85rem; line-height: 1.6; color: var(--text-secondary); }
.feedback-form { padding-top: 16px; border-top: 1px solid var(--border); }
.feedback-form textarea { margin-bottom: 10px; font-size: 0.88rem; min-height: 64px; }
.feedback-form-actions { display: flex; gap: 8px; align-items: center; }
.feedback-type-select { width: auto; flex: 0 0 auto; min-width: 120px; padding: 6px 12px; font-size: 0.82rem; }

/* ─── Tools Library ─── */
.tools-library { padding-top: 8px; }
.tools-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.filter-chip { font-size: 0.78rem; font-weight: 500; padding: 6px 14px; border-radius: 100px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; transition: all var(--transition); }
.filter-chip:hover { border-color: var(--border-hover); color: var(--text-secondary); }
.filter-chip.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
.tools-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.tool-library-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); cursor: pointer; transition: all var(--transition); }
.tool-library-card:hover { border-color: var(--border-hover); background: var(--bg-hover); }
.tool-library-card.tool-connected { border-color: var(--border-hover); background: var(--green-dim); }
.tool-library-logo { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.tool-library-info { flex: 1; min-width: 0; }
.tool-library-name { font-size: 0.88rem; font-weight: 600; }
.tool-library-cat { font-size: 0.72rem; color: var(--text-muted); text-transform: capitalize; }
.tool-connect-hint { font-size: 0.75rem; color: var(--text-secondary); font-weight: 600; }
.tool-status-connected { font-size: 0.68rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; flex-shrink: 0; }
.btn-disconnect { width: 28px; height: 28px; border-radius: var(--radius-xs); border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition); flex-shrink: 0; padding: 0; }
.btn-disconnect:hover { background: var(--red-dim); border-color: var(--border); color: var(--text); }
.disconnect-date { font-size: 0.78rem; color: var(--text-muted); margin-top: -4px; }
.disconnect-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.btn-danger { background: #d32f2f; color: #fff; border: none; padding: 8px 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: all var(--transition); }
.btn-danger:hover { background: #b71c1c; }
.btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Settings ─── */
.settings-block { margin-bottom: 36px; }
.settings-block h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.settings-desc { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.6; }
.mcp-code { background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 20px; font-family: var(--mono); font-size: 0.78rem; line-height: 1.7; overflow-x: auto; color: var(--text-secondary); }
.mcp-code pre { margin: 0; white-space: pre; }
.key-gen-form { display: flex; gap: 8px; }
.key-gen-form .input { flex: 1; }
.new-key-box { padding: 14px 18px; border: 1px solid var(--border-hover); border-radius: var(--radius-sm); margin: 14px 0; background: var(--accent-dim); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.new-key-warning { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); width: 100%; margin-bottom: 4px; }
.new-key-value { font-family: var(--mono); font-size: 0.8rem; word-break: break-all; background: var(--bg-inset); padding: 8px 12px; border-radius: var(--radius-xs); border: 1px solid var(--border); flex: 1; user-select: all; color: var(--text); }
.api-key-list { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.api-key-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); font-size: 0.85rem; }
.key-prefix { font-family: var(--mono); font-size: 0.78rem; color: var(--text-muted); margin-left: 8px; }

/* ─── Modal ─── */
.modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 32px; width: min(440px, 92vw); max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.modal-title-row { display: flex; align-items: center; gap: 10px; }
.modal-logo { width: 28px; height: 28px; object-fit: contain; }
.modal-header h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); padding: 0 4px; line-height: 1; transition: color var(--transition); }
.modal-close:hover { color: var(--text); }
.modal-desc { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }
.modal-docs-link { font-size: 0.78rem; color: var(--text-secondary); display: block; margin-bottom: 8px; text-decoration: underline; text-underline-offset: 3px; }
.modal-docs-link:hover { color: var(--text); }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.75rem; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.form-group input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.88rem; background: var(--bg-inset); color: var(--text); outline: none; transition: all var(--transition); }
.form-group input:focus { border-color: var(--border-hover); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-group input::placeholder { color: var(--text-muted); }

.empty-state { text-align: center; padding: 56px 24px; color: var(--text-muted); font-size: 0.88rem; }
.empty-state-sm { padding: 20px 0; color: var(--text-muted); font-size: 0.82rem; text-align: center; }

/* ═══════════════════════════════════════════════════════════════
   LANDING
   ═══════════════════════════════════════════════════════════════ */
.landing { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.landing-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--border); }
.hero { text-align: center; padding: 80px 0 64px; position: relative; }
.hero::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 480px; height: 480px; background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%); opacity: 1; pointer-events: none; }
[data-theme="light"] .hero::before { background: radial-gradient(circle, rgba(0,0,0,0.04) 0%, transparent 70%); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 16px; position: relative; }
.hero h1 .gradient { background: linear-gradient(135deg, #a1a1aa, #f4f4f5, #a1a1aa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
[data-theme="light"] .hero h1 .gradient { background: linear-gradient(135deg, #52525c, #18181b, #52525c); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: 1.05rem; color: var(--text-secondary); max-width: 460px; margin: 0 auto 40px; line-height: 1.7; position: relative; }
.steps { padding: 0 0 72px; }
.steps h2 { text-align: center; font-size: 1.5rem; font-weight: 700; margin-bottom: 36px; letter-spacing: -0.02em; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { text-align: center; padding: 28px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); transition: border-color var(--transition); }
.step:hover { border-color: var(--border-hover); }
.step-num { width: 36px; height: 36px; background: var(--accent-dim); color: var(--text-secondary); border: 1px solid var(--border); border-radius: 10px; font-size: 0.82rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; font-family: var(--mono); }
.step h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.55; }
.tools-section { padding: 0 0 72px; text-align: center; }
.tools-section h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.tools-section > p { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 28px; }
.tools-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 560px; margin: 0 auto; }
.tool-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 100px; background: var(--bg-card); font-size: 0.82rem; font-weight: 500; color: var(--text-secondary); transition: all var(--transition); }
.tool-chip:hover { border-color: var(--border-hover); color: var(--text); }
.tool-chip img { width: 18px; height: 18px; object-fit: contain; }
.setup-section { text-align: center; padding: 0 0 72px; }
.setup-section h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.setup-section > p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 24px; }
.setup-code { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; max-width: 440px; margin: 0 auto 16px; text-align: left; font-family: var(--mono); font-size: 0.78rem; line-height: 1.7; overflow-x: auto; color: var(--text-secondary); }
.setup-code pre { margin: 0; white-space: pre; }
.setup-hint { font-size: 0.8rem; color: var(--text-muted); }
.landing-cta { text-align: center; padding: 0 0 80px; }
.landing-cta h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.landing-cta p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 24px; }

/* ─── Problem Section ─── */
.problem-section { padding: 0 0 72px; }
.problem-section h2 { text-align: center; font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.02em; }
.problem-section > p { text-align: center; font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 36px; max-width: 480px; margin-left: auto; margin-right: auto; }
.step-icon { width: 36px; height: 36px; background: var(--accent-dim); border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; color: var(--text-secondary); }

/* ─── Proof Section ─── */
.proof-section { padding: 0 0 72px; }
.proof-section h2 { text-align: center; font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.02em; }
.proof-section > p { text-align: center; font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 36px; max-width: 480px; margin-left: auto; margin-right: auto; }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.proof-card { text-align: center; padding: 28px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); transition: border-color var(--transition); }
.proof-card:hover { border-color: var(--border-hover); }
.proof-value { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 2px; font-family: var(--mono); }
.proof-label { font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; }
.proof-detail { font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; }

/* ─── Differentiators ─── */
.differentiators { padding: 0 0 72px; }
.differentiators h2 { text-align: center; font-size: 1.5rem; font-weight: 700; margin-bottom: 32px; letter-spacing: -0.02em; }
.diff-list { display: flex; flex-direction: column; gap: 12px; max-width: 600px; margin: 0 auto; }
.diff-item { padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); font-size: 0.88rem; line-height: 1.6; transition: border-color var(--transition); }
.diff-item:hover { border-color: var(--border-hover); }
.diff-item strong { display: block; margin-bottom: 2px; font-size: 0.9rem; }
.diff-item span { color: var(--text-secondary); font-size: 0.84rem; }
.pricing-section { text-align: center; padding: 0 0 72px; }
.pricing-section h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.pricing-section > p { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 32px; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
.pricing-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; transition: border-color var(--transition); }
.pricing-card:hover { border-color: var(--border-hover); }
.pricing-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.pricing-price { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 20px; }
.pricing-price span { font-size: 0.88rem; font-weight: 400; color: var(--text-muted); }
.pricing-features { list-style: none; margin-bottom: 24px; }
.pricing-features li { font-size: 0.85rem; color: var(--text-secondary); padding: 6px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.pricing-features li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.pricing-features li:last-child { border-bottom: none; }
.pricing-featured { position: relative; border-color: var(--border-hover); }
.pricing-featured::before { content: "Popular"; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--on-accent); font-size: 0.7rem; font-weight: 600; padding: 3px 14px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.04em; }

footer { border-top: 1px solid var(--border); padding: 24px 0; text-align: center; }
footer p { font-size: 0.75rem; color: var(--text-muted); }

/* ─── Infrastructure Needs ─── */
.infra-grid { display: flex; flex-direction: column; gap: 8px; }
.infra-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); }
.infra-item.satisfied { opacity: 0.7; }
.infra-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.infra-icon.ready { background: rgba(34,197,94,0.12); color: #22c55e; }
.infra-icon.missing { background: rgba(245,158,11,0.12); color: #f59e0b; }
.infra-body { flex: 1; min-width: 0; }
.infra-cat { font-size: 13px; font-weight: 600; }
.infra-detail { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.infra-action { flex-shrink: 0; }
.infra-action a { font-size: 12px; font-weight: 500; color: var(--text-secondary); text-decoration: none; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; transition: all var(--transition); display: inline-block; }
.infra-action a:hover { border-color: var(--border-hover); color: var(--text); }

.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--text-secondary); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Organizations (Team in Settings) ─── */
.role-badge { font-size: 0.68rem; font-weight: 600; padding: 2px 8px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.04em; background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.role-owner { color: #f59e0b; border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.08); }
.role-admin { color: #8b5cf6; border-color: rgba(139,92,246,0.3); background: rgba(139,92,246,0.08); }
.role-member { color: #3b82f6; border-color: rgba(59,130,246,0.3); background: rgba(59,130,246,0.08); }
.role-client { color: #22c55e; border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.08); }

.org-invite-section { margin-bottom: 16px; }
.org-invite-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.org-invite-form .input { flex: 1; min-width: 180px; }
.invite-role-select { max-width: 120px; }
.org-members-list { display: flex; flex-direction: column; gap: 4px; }
.org-member-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); }
.org-member-info { display: flex; align-items: center; gap: 8px; }
.org-member-email { font-size: 0.85rem; }

/* ─── App Feedback ─── */
.app-feedback-form { display: flex; flex-direction: column; gap: 8px; }
.app-feedback-form .form-row { display: flex; gap: 8px; align-items: center; }
.app-feedback-list { display: flex; flex-direction: column; gap: 8px; }
.app-fb-item { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); }
.app-fb-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.app-fb-subject { font-weight: 600; font-size: 0.88rem; flex: 1; }
.app-fb-status { font-size: 0.68rem; font-weight: 600; padding: 2px 8px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.04em; background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.app-fb-open .app-fb-status { color: #3b82f6; border-color: rgba(59,130,246,0.3); background: rgba(59,130,246,0.08); }
.app-fb-in_progress .app-fb-status { color: #f59e0b; border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.08); }
.app-fb-resolved .app-fb-status { color: #22c55e; border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.08); }
.app-fb-time { font-size: 0.72rem; color: var(--text-muted); }
.app-fb-content { font-size: 0.83rem; color: var(--text-secondary); margin: 0; }
.app-fb-admin-notes { font-size: 0.8rem; color: var(--text-secondary); margin: 8px 0 0; padding: 8px 10px; background: var(--bg-elevated); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.app-fb-email { font-size: 0.72rem; color: var(--text-muted); }

@media (max-width: 640px) {
  .steps-grid { grid-template-columns: 1fr; gap: 12px; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 2rem; }
  .key-gen-form { flex-direction: column; }
  .tools-library-grid { grid-template-columns: 1fr; }
  .detail-top { flex-direction: column; }
  .detail-connectors { flex-direction: column; }
  .detail-connector { width: 100%; }
  .dash-nav { gap: 1px; }
  .nav-tab { padding: 6px 10px; font-size: 0.78rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .create-card { padding: 28px 20px; }
  .build-trigger { padding: 16px 18px; }
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-success {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
}
.toast-error {
  background: var(--bg-elevated);
  border: 1px solid var(--red);
  color: var(--red);
}

/* ═══ Connect modal hint text ═══ */
.modal-mcp-hint {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

/* ═══ Smart paste parse status ═══ */
.parse-status {
  font-size: 0.78rem;
  padding: 6px 0;
  line-height: 1.5;
}
.parse-ok {
  color: var(--green, #22c55e);
}
.parse-hint {
  color: var(--text-secondary);
}

/* ═══ Vault status + enrichment UX ═══ */
.vault-status-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 16px; }
.vault-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green, #22c55e); flex-shrink: 0; }
.vault-status-text { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.vault-status-meta { font-size: 0.75rem; color: var(--text-muted); margin-left: auto; }
.vault-pending { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-secondary); padding: 6px 0; margin-bottom: 8px; }
.vault-pending-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber, #f59e0b); flex-shrink: 0; }
.vault-enrichment { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; padding: 6px 10px; border-radius: var(--radius-sm); margin-bottom: 4px; }
.vault-enrichment-validated { color: var(--green, #22c55e); background: rgba(34,197,94,0.06); }
.vault-enrichment-failed { color: var(--red, #ef4444); background: rgba(239,68,68,0.06); }
.vault-enrichment-auto-applied { color: var(--blue, #3b82f6); background: rgba(59,130,246,0.06); }
.enrich-icon { font-size: 0.85rem; flex-shrink: 0; }
.enrich-intent { flex: 1; }
.enrich-time { color: var(--text-muted); white-space: nowrap; }
.vault-enrich-section { margin-top: 8px; }
.vault-enrich-paste { resize: vertical; font-family: var(--font-mono); font-size: 0.82rem; margin-bottom: 8px; }
.vault-enrich-intent { font-size: 0.85rem; margin-bottom: 4px; }
.btn-enrich { background: none; border: 1px solid var(--border); color: var(--text-secondary); font-size: 0.75rem; padding: 4px 10px; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.btn-enrich:hover { border-color: var(--border-hover); color: var(--text); }

/* ═══ Tasks ═══ */
.detail-tasks-section { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--bg-inset); }
.task-count { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; margin-left: 6px; }
.task-quick-add { display: flex; gap: 8px; margin-bottom: 12px; }
.task-quick-add .input { flex: 1; font-size: 0.85rem; }
.task-list { display: flex; flex-direction: column; gap: 2px; }
.task-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); transition: background var(--transition); }
.task-item:hover { background: var(--bg-hover, rgba(255,255,255,0.04)); }
.task-item.task-done { opacity: 0.5; }
.task-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all var(--transition); color: var(--text); }
.task-check:hover { border-color: var(--green, #22c55e); }
.task-check.checked { border-color: var(--green, #22c55e); background: var(--green, #22c55e); color: #fff; }
.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 0.85rem; display: block; }
.task-done .task-title { text-decoration: line-through; color: var(--text-muted); }
.task-desc { font-size: 0.75rem; color: var(--text-muted); display: block; margin-top: 2px; }
.task-attachments { font-size: 0.7rem; color: var(--text-secondary); }
.task-priority { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 6px; border-radius: 4px; font-weight: 600; flex-shrink: 0; }
.priority-high { color: var(--red, #ef4444); background: rgba(239,68,68,0.1); }
.priority-medium { color: var(--amber, #f59e0b); background: rgba(245,158,11,0.1); }
.priority-low { color: var(--text-muted); background: rgba(128,128,128,0.1); }
.task-delete { background: none; border: none; color: var(--text-muted); font-size: 1.1rem; cursor: pointer; opacity: 0; transition: opacity var(--transition); padding: 0 4px; }
.task-item:hover .task-delete { opacity: 1; }
.task-delete:hover { color: var(--red, #ef4444); }

/* ═══ Files ═══ */
.detail-files-section { }
.file-count { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; margin-left: 6px; }
.file-add-form { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.file-add-form .input { font-size: 0.85rem; flex: 1; min-width: 140px; }
.file-add-url-toggle { margin-bottom: 8px; }
.files-storage-hint { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 10px; padding: 6px 10px; background: rgba(245,158,11,0.06); border-radius: var(--radius-sm); border: 1px solid rgba(245,158,11,0.15); }
.file-list { display: flex; flex-direction: column; gap: 4px; }
.file-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); transition: background var(--transition); }
.file-item:hover { background: var(--bg-hover, rgba(255,255,255,0.04)); }
.file-item-image { flex-direction: column; align-items: flex-start; }
.file-item-image .file-body { display: flex; align-items: center; gap: 10px; width: 100%; }
.file-item-image .task-delete { align-self: flex-start; }
.file-type-icon { font-size: 1.1rem; flex-shrink: 0; }
.file-body { flex: 1; min-width: 0; }
.file-name { font-size: 0.85rem; color: var(--text); text-decoration: none; }
.file-name:hover { color: var(--accent, #3b82f6); text-decoration: underline; }
.file-desc { font-size: 0.75rem; color: var(--text-muted); display: block; margin-top: 2px; }

/* Upload zone */
.file-upload-zone {
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 10px;
  position: relative;
}
.file-upload-zone:hover, .file-upload-zone.drag-over {
  border-color: var(--accent, #3b82f6);
  background: rgba(59,130,246,0.04);
}
.upload-zone-content { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.upload-icon { font-size: 1.5rem; }
.upload-zone-content span { font-size: 0.85rem; color: var(--text-secondary); }
.upload-browse-link { color: var(--accent, #3b82f6); cursor: pointer; text-decoration: underline; }
.upload-hint { font-size: 0.72rem !important; color: var(--text-muted) !important; }
.upload-hidden-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-progress {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px; padding: 6px 0;
}
.upload-progress-bar {
  height: 4px; border-radius: 2px; background: var(--accent, #3b82f6);
  width: 0%; transition: width 0.15s; flex: 1;
}
.upload-progress-text { font-size: 0.75rem; color: var(--text-secondary); white-space: nowrap; }

/* Image thumbnails */
.file-thumbnail { width: 100%; max-height: 180px; overflow: hidden; border-radius: var(--radius-sm); margin-bottom: 4px; }
.file-thumbnail img { width: 100%; max-height: 180px; object-fit: cover; display: block; border-radius: var(--radius-sm); }
.file-thumbnail a { display: block; }
