/* Forge — AI Development Workspace */
:root {
  --bg: #090b10;
  --panel: #0e1118;
  --panel-2: #121722;
  --panel-3: #171e2b;
  --line: #222a38;
  --muted: #8993a5;
  --text: #edf1f8;
  --accent: #8b7cff;
  --accent-2: #6b5ce7;
  --green: #70d6a0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}

button, input, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }

.app {
  display: grid;
  grid-template-columns: 246px minmax(360px, 1fr) 390px;
  height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 17px 13px;
  background: #0b0e14;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 7px 23px;
  color: var(--text);
  text-decoration: none;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: .2px;
}

.brand small, .profile small, .panel-head small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  margin-top: 3px;
}

.brand-mark, .welcome-logo {
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  background: linear-gradient(145deg, #a395ff, #6352d9);
  box-shadow: 0 5px 20px #7565ef35;
}

.brand-mark {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  font-size: 17px;
}

.new-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #393454;
  border-radius: 9px;
  background: #19172a;
  color: #e5e0ff;
  font-size: 13px;
  font-weight: 650;
  transition: .15s;
}

.new-chat:hover { background: #24203b; border-color: #6559a6; }

.nav-label {
  color: #687386;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 1.25px;
  font-weight: 700;
  padding: 24px 9px 9px;
  margin: 0;
}

.navigation { display: grid; gap: 3px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #aeb7c7;
  font-size: 12.5px;
  text-decoration: none;
}

.nav-item span { width: 17px; text-align: center; color: #8791a5; font-size: 15px; }
.nav-item:hover, .nav-item.active { background: #171d29; color: #f2f4fa; }

.history {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.history button {
  text-align: left;
  border: 0;
  background: transparent;
  color: #909aab;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.history button:hover { background: #151a24; color: #e5e9f2; }

.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.profile { display: flex; align-items: center; gap: 9px; padding: 9px 7px 2px; }
.profile strong { display: block; font-size: 12px; font-weight: 650; }
.profile small { letter-spacing: 0; margin-top: 2px; }

.avatar {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #292443;
  color: #c9c1ff;
  font-size: 11px;
  font-weight: 700;
}

.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: radial-gradient(ellipse at 50% 0%, #17182a 0%, transparent 45%), var(--bg);
}

.topbar {
  height: 58px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: #0b0e14c9;
}

.breadcrumb { color: #8d97a9; font-size: 12px; }
.breadcrumb span { color: #596477; padding: 0 7px; }
.breadcrumb strong { color: #e7eaf2; font-weight: 600; }

.top-actions { display: flex; align-items: center; gap: 8px; }

.small-btn {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #111620;
  padding: 7px 10px;
  color: #aeb7c6;
  font-size: 11px;
}

.small-btn:hover { border-color: #4a5265; color: white; }

.status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8e9aaa;
  font-size: 10px;
  margin-right: 7px;
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px #70d6a066;
}

.chat-scroll { flex: 1; overflow: auto; padding: 38px 7% 24px; }

.welcome {
  max-width: 730px;
  margin: 8vh auto 0;
  text-align: center;
}

.welcome-logo {
  width: 54px;
  height: 54px;
  margin: 0 auto 20px;
  border-radius: 16px;
  font-size: 26px;
  box-shadow: 0 12px 40px #7766ef35;
}

.welcome h1 { margin: 0; font-size: 29px; letter-spacing: -.8px; font-weight: 700; }

.welcome p {
  color: #929bad;
  font-size: 13px;
  line-height: 1.7;
  margin: 11px auto 27px;
  max-width: 450px;
}

.suggestions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  text-align: left;
}

.suggestion {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  background: #10151e;
  padding: 14px;
  border-radius: 10px;
  text-align: left;
  transition: .15s;
}

.suggestion:hover {
  background: #171d29;
  border-color: #4b456f;
  transform: translateY(-1px);
}

.suggestion strong { font-size: 12px; font-weight: 650; }
.suggestion span { color: #8994a6; font-size: 11px; line-height: 1.5; }

.conversation { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.message { display: flex; gap: 12px; align-items: flex-start; }
.message .avatar { width: 28px; height: 28px; }
.message-body { min-width: 0; flex: 1; }
.message-name { color: #aab4c5; font-size: 11px; font-weight: 700; margin: 2px 0 7px; }
.message-text { font-size: 13px; color: #e0e5ee; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.assistant .avatar { background: #282344; color: #c9c0ff; }
.message.user .avatar { background: #20372f; color: #9be1bd; }

.composer-wrap { padding: 12px 7% 21px; }

.composer {
  max-width: 760px;
  margin: auto;
  border: 1px solid #343b4a;
  background: #111620;
  border-radius: 13px;
  box-shadow: 0 10px 40px #0005;
}

.composer:focus-within { border-color: #7669d4; box-shadow: 0 0 0 3px #7669d41c; }

.composer textarea {
  width: 100%;
  min-height: 58px;
  max-height: 170px;
  resize: vertical;
  border: 0;
  outline: 0;
  color: #edf1f8;
  background: transparent;
  padding: 15px 16px 8px;
  font-size: 13px;
  line-height: 1.5;
}

.composer textarea::placeholder { color: #737e90; }

.composer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 5px 9px 9px 13px; }
.composer-tools { display: flex; gap: 6px; }

.tool-btn {
  border: 0;
  background: transparent;
  color: #8d98aa;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
}

.tool-btn:hover { background: #202735; color: #e3e7f0; }

.send {
  border: 0;
  border-radius: 8px;
  padding: 8px 13px;
  background: var(--accent-2);
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.send:hover { background: #7b6cf0; }

.disclaimer { text-align: center; color: #667184; font-size: 9px; margin: 9px auto 0; }

.right-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #0c1017;
  border-left: 1px solid var(--line);
}

.panel-head {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
}

.panel-head strong { font-size: 12px; }
.panel-head small { letter-spacing: 0; margin-top: 3px; }

.panel-tabs { display: flex; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid var(--line); }

.tab {
  border: 0;
  background: transparent;
  color: #818da0;
  font-size: 10px;
  padding: 8px 10px;
  border-bottom: 2px solid transparent;
}

.tab.active { color: #e6e2ff; border-color: var(--accent); }

.filebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  color: #9ca7b8;
  font-size: 10px;
}

.code-area {
  flex: 1;
  overflow: auto;
  background: #0a0e15;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.85;
  color: #b8c2d3;
}

.empty-code { color: #6f7b8e; padding: 4px 1px; font-family: inherit; line-height: 1.7; font-size: 11px; }

.panel-footer { padding: 13px; border-top: 1px solid var(--line); }

.preview-btn {
  width: 100%;
  padding: 10px;
  border: 1px solid #403a65;
  background: #19172a;
  color: #d9d3ff;
  border-radius: 8px;
  font-size: 11px;
}

.preview-btn:hover { background: #24203b; }

@media (max-width: 1050px) {
  .app { grid-template-columns: 220px minmax(320px, 1fr); }
  .right-panel { display: none; }
}

@media (max-width: 680px) {
  body { overflow: auto; }
  .app { min-height: 100vh; height: 100dvh; grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .workspace { min-height: 0; }
  .topbar { padding: 0 13px; }
  .chat-scroll { padding: 25px 17px; }
  .welcome { margin-top: 8vh; }
  .welcome h1 { font-size: 25px; }
  .suggestions { grid-template-columns: 1fr; }
  .composer-wrap { padding: 10px 12px 16px; }
  .breadcrumb { font-size: 11px; }
}
