:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #e7edf5;
  background: #eef1f5;
  font-synthesis: none;
  text-rendering: geometricPrecision;
  --accent: #2f5fbd;
  --accent-soft: #eef4ff;
  --ink: #101723;
  --panel: #111821;
  --panel-2: #161f2a;
  --line: rgba(255, 255, 255, 0.08);
  --muted: #8997aa;
}

* { box-sizing: border-box; }
html, body, #root { min-height: 100%; margin: 0; }
button { font: inherit; border: 0; cursor: default; }

body { background: #eef1f5; }

.studio-shell {
  min-height: 100vh;
  padding: 16px;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 12px;
}

.project-rail {
  border: 1px solid #d9dee7;
  border-radius: 22px;
  background: #f8fafc;
  padding: 14px;
  color: #182231;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .07);
}

.brand-lockup { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  color: #f8fafc; font-weight: 650;
  background: #17202b;
}
.brand-lockup b { display: block; font-size: 14px; letter-spacing: -.2px; }
.brand-lockup span { display: block; color: #7a8595; font-size: 12px; margin-top: 2px; }

.new-project {
  width: 100%; height: 38px; border-radius: 12px;
  color: #f8fafc; background: #17202b;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.rail-section { margin-top: 22px; }
.rail-section p { font-size: 11px; color: #8a94a3; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 9px; }
.project-item {
  width: 100%; min-height: 56px; text-align: left;
  display: grid; grid-template-columns: 18px 1fr; gap: 8px;
  padding: 10px; margin: 4px 0; border-radius: 13px;
  background: transparent; color: #2b3544;
}
.project-item span { font-size: 13px; font-weight: 550; }
.project-item em { grid-column: 2; font-style: normal; font-size: 11px; color: #7e8998; margin-top: -4px; }
.project-item.active { background: #fff; box-shadow: inset 0 0 0 1px #e3e8f0; }

.workspace-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #d9dee7;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .10);
}

.topbar {
  height: 70px;
  padding: 0 16px 0 22px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #e5e9f0;
  color: #111827;
}
.crumb { font-size: 12px; color: #7c8796; }
.topbar h1 { font-size: 17px; line-height: 1; letter-spacing: -.35px; margin: 5px 0 0; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions button, .route-chip {
  height: 34px; border-radius: 999px; display: inline-flex; gap: 7px; align-items: center;
  padding: 0 12px; font-size: 13px; color: #2d3748;
  background: #f7f9fc; box-shadow: inset 0 0 0 1px #e2e7ef;
}
.topbar-actions .tab.active { background: var(--accent-soft); color: #224f9e; box-shadow: inset 0 0 0 1px #d7e3f7; }
.route-chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #667385; }
.topbar-actions .publish { background: #17202b; color: #fff; box-shadow: none; }

.split-layout {
  height: calc(100vh - 102px);
  min-height: 680px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(380px, 39%) minmax(0, 61%);
  gap: 12px;
}

.chat-panel {
  min-width: 0;
  display: flex; flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: #101720;
  border: 1px solid #1c2633;
  box-shadow: none;
}
.chat-header { height: 68px; padding: 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.eyebrow { color: #8d9aaa; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.chat-header h2 { margin: 4px 0 0; font-size: 17px; letter-spacing: -.35px; color: #f5f7fa; }
.icon-btn { width: 34px; height: 34px; border-radius: 11px; background: #151e29; color: #aeb8c6; }

.status-strip {
  margin: 14px 16px 4px;
  padding: 10px 12px;
  border-radius: 13px;
  background: #151e29;
  border: 1px solid #202b39;
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; color: #a8b3c3;
}
.status-strip strong { color: #f5f7fa; font-weight: 560; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #8ea4c4; box-shadow: none; }

.messages { flex: 1; overflow: auto; padding: 12px 16px 10px; }
.bubble { max-width: 92%; margin: 12px 0; border-radius: 16px; padding: 12px; }
.bubble.user { margin-left: auto; background: #eef4ff; color: #111827; border-bottom-right-radius: 6px; }
.bubble.agent { background: #151e29; border: 1px solid #202b39; color: #dce3ec; border-bottom-left-radius: 6px; }
.bubble-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; font-size: 11px; color: #8b98aa; }
.user .bubble-head { color: #69778b; }
.bubble-head span { font-weight: 650; }
.bubble-body { font-size: 14px; line-height: 1.48; }
.tool-stack { margin: 12px 0; display: grid; gap: 8px; }
.tool-card { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 13px; background: #151e29; border: 1px solid #202b39; }
.tool-icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #9fb0c5; background: #1a2532; }
.tool-icon.done { color: #d1d8e3; background: #1a2532; }
.tool-card strong { display: block; font-size: 13px; color: #edf2f7; }
.tool-card span { display: block; margin-top: 2px; font-size: 12px; color: #8f9cad; }
.suggestions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.suggestions button { border-radius: 999px; background: #1a2532; color: #c5ceda; padding: 7px 10px; font-size: 12px; box-shadow: inset 0 0 0 1px #263242; }

.composer { padding: 12px; border-top: 1px solid var(--line); background: #0f161f; }
.composer-input { height: 50px; border-radius: 15px; display: flex; align-items: center; gap: 12px; padding: 0 10px; color: #8997aa; background: #151e29; box-shadow: inset 0 0 0 1px #243042; }
.composer-input button, .composer-tools button { background: transparent; color: #a4afbf; display: flex; align-items: center; gap: 6px; }
.composer-input span { flex: 1; font-size: 14px; }
.composer-tools { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 7px; }
.composer-tools button { height: 30px; border-radius: 999px; padding: 0 9px; background: #151e29; font-size: 12px; }
.composer-tools .send { margin-left: auto; width: 36px; padding: 0; justify-content: center; background: var(--accent); color: white; }

.preview-panel { min-width: 0; border-radius: 20px; background: #f8fafc; border: 1px solid #e0e5ed; display: flex; flex-direction: column; overflow: hidden; }
.preview-toolbar { height: 46px; flex: 0 0 auto; display: flex; align-items: center; gap: 13px; padding: 0 14px; border-bottom: 1px solid #e5e9f0; color: #586577; }
.window-dots { display: flex; gap: 6px; }
.window-dots i { display: block; width: 9px; height: 9px; border-radius: 50%; background: #d5dbe5; }
.window-dots i:first-child, .window-dots i:nth-child(2), .window-dots i:nth-child(3) { background: #d5dbe5; }
.preview-route { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 7px 10px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #e3e8f0; color: #36465b; }
.preview-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.preview-actions span, .preview-actions button { display: flex; align-items: center; gap: 5px; color: #667386; }
.preview-actions button { height: 31px; padding: 0 10px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #e1e7f0; }
.preview-frame { flex: 1; padding: 14px; overflow: hidden; background: #f3f6fa; }

.mock-site { height: 100%; min-height: 580px; overflow: hidden; border-radius: 16px; background: #fff; color: #111827; box-shadow: inset 0 0 0 1px #e4e8ee, 0 16px 45px rgba(15,23,42,.08); }
.mock-nav { height: 66px; padding: 0 32px; display: flex; align-items: center; border-bottom: 1px solid #eceff4; }
.mock-logo { font-weight: 700; letter-spacing: -.7px; color: #111827; }
.mock-nav nav { margin-left: 42px; display: flex; gap: 24px; font-size: 14px; color: #707b8c; }
.mock-nav button { margin-left: auto; height: 36px; padding: 0 15px; border-radius: 999px; background: #17202b; color: white; }
.mock-hero { padding: 82px 64px 60px; background: #fff; }
.badge { width: max-content; display: flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; background: #f3f6fa; color: #536174; font-size: 13px; font-weight: 550; }
.mock-hero h1 { max-width: 640px; margin: 22px 0 12px; font-size: clamp(48px, 5vw, 78px); line-height: .94; letter-spacing: -3.8px; color: #101723; }
.mock-hero p { max-width: 520px; font-size: 18px; line-height: 1.58; color: #5f6b7d; }
.mock-actions { display: flex; gap: 10px; margin-top: 28px; }
.mock-actions button { height: 42px; border-radius: 999px; padding: 0 18px; }
.mock-actions .primary { background: #17202b; color: white; box-shadow: none; }
.mock-actions .secondary { background: #fff; color: #172033; box-shadow: inset 0 0 0 1px #dfe5ee; }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px; background: #fff; }
.mock-grid div { min-height: 150px; border-radius: 16px; padding: 20px; background: #f8fafc; box-shadow: inset 0 0 0 1px #e5e9f0; }
.mock-grid span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #667386; font-size: 12px; }
.mock-grid h3 { margin: 16px 0 8px; letter-spacing: -.6px; }
.mock-grid p { color: #657184; font-size: 14px; line-height: 1.5; margin: 0; }

@media (max-width: 1100px) {
  .studio-shell { grid-template-columns: 1fr; }
  .project-rail { display: none; }
  .split-layout { grid-template-columns: 1fr; height: auto; }
  .preview-panel { min-height: 640px; }
}

@media (max-width: 760px) {
  .studio-shell { padding: 8px; }
  .topbar { height: auto; padding: 14px; align-items: flex-start; gap: 12px; flex-direction: column; }
  .topbar-actions { flex-wrap: wrap; }
  .split-layout { padding: 8px; min-height: 0; }
  .mock-nav nav, .route-chip { display: none; }
  .mock-hero { padding: 52px 28px 38px; }
  .mock-grid { grid-template-columns: 1fr; }
}
