@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root{
  --bg:#07090d;
  --panel:#0d1118;
  --panel2:#111722;
  --panel3:#151b27;
  --line:#202734;
  --line2:#293142;
  --text:#edf1f7;
  --muted:#8b95a8;
  --muted2:#687387;
  --accent:#8b7cff;
  --accent2:#b7afff;
  --green:#63d58b;
  --red:#ef7777;
  --yellow:#e7bf68;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 70% -15%,#21194a 0,#0b0d13 32%,#07090d 65%);
  color:var(--text);
  font-family:"DM Sans",sans-serif;
}

button,input,textarea,select{font:inherit}

button{cursor:pointer}

.app{
  display:flex;
  min-height:100vh;
}

.sidebar{
  width:252px;
  flex:none;
  border-right:1px solid var(--line);
  background:rgba(7,9,13,.88);
  backdrop-filter:blur(18px);
  padding:20px 14px;
  display:flex;
  flex-direction:column;
  gap:22px;
}

.brand{
  display:flex;
  align-items:center;
  gap:11px;
  padding:3px 8px;
}

.brand-mark{
  width:36px;
  height:36px;
  border:1px solid #403a66;
  background:#17142a;
  border-radius:10px;
  display:grid;
  place-items:center;
  color:var(--accent2);
}

.brand-mark svg{width:18px}

.brand strong{
  display:block;
  font-family:"Space Grotesk";
  font-size:14px;
}

.brand small{
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-top:3px;
}

.new-project{
  height:42px;
  border:0;
  border-radius:9px;
  background:#eeebff;
  color:#171321;
  font-weight:700;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 12px;
  box-shadow:0 8px 25px #0005;
}

.new-project:hover{background:#fff}

.new-project svg{width:17px}

.new-project kbd{
  margin-left:auto;
  font-size:9px;
  background:#ddd8f5;
  padding:3px 5px;
  border-radius:4px;
}

nav{
  display:grid;
  gap:3px;
}

.nav-label{
  padding:0 10px 8px;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:#687286;
  font-weight:700;
}

nav a,.side-bottom>a{
  height:39px;
  padding:0 10px;
  display:flex;
  align-items:center;
  gap:10px;
  color:#8e98aa;
  text-decoration:none;
  border-radius:8px;
  font-size:13px;
  transition:.15s;
}

nav a:hover,
nav a.active,
.side-bottom>a:hover{
  background:#131923;
  color:#f0f2f6;
}

nav svg,.side-bottom svg{width:16px}

.side-bottom{
  margin-top:auto;
  display:grid;
  gap:8px;
}

.model-card{
  display:flex;
  align-items:center;
  gap:9px;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px;
  background:#0d1118;
}

.model-card span,.model-card strong{display:block}

.model-card span{
  font-size:9px;
  color:#6f798c;
}

.model-card strong{
  font-size:11px;
  margin-top:3px;
  max-width:150px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.model-card>svg{
  margin-left:auto;
  width:14px;
  color:#677184;
}

.status-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--green);
  box-shadow:0 0 12px #63d58b;
}

main{
  flex:1;
  min-width:0;
}

header{
  height:62px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 34px;
  background:rgba(7,9,13,.52);
  backdrop-filter:blur(12px);
  position:sticky;
  top:0;
  z-index:20;
}

.crumb{
  display:flex;
  align-items:center;
  gap:9px;
  font-size:12px;
}

.crumb span{color:#626d80}

.crumb svg{
  width:13px;
  color:#4e586b;
}

.header-actions{
  display:flex;
  gap:8px;
}

.icon-btn,.avatar{
  border:1px solid var(--line);
  background:#0f131b;
  color:#aab3c2;
  width:34px;
  height:34px;
  border-radius:9px;
  display:grid;
  place-items:center;
}

.icon-btn:hover{
  border-color:var(--line2);
  background:#151a24;
  color:#fff;
}

.icon-btn svg{width:15px}

.avatar{
  font-size:10px;
  font-weight:700;
  color:#ddd8ff;
}

.hero,
.builder-card,
.stats,
.dashboard-grid,
.page-heading,
.page-content{
  max-width:1100px;
  margin-left:auto;
  margin-right:auto;
}

.hero{
  padding:68px 34px 30px;
}

.hero-eyebrow{
  display:flex;
  align-items:center;
  gap:7px;
  color:#a39aff;
  font-size:10px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.hero-eyebrow svg{width:14px}

.hero h1{
  font:700 clamp(38px,5vw,62px)/1.02 "Space Grotesk";
  letter-spacing:-.05em;
  margin:13px 0;
}

.hero h1 span{color:var(--accent2)}

.hero p{
  max-width:700px;
  color:#929cad;
  font-size:15px;
  line-height:1.7;
  margin:0;
}

.builder-card{
  margin-bottom:18px;
  padding:0 34px;
}

.builder-card form{
  border:1px solid #2a3140;
  background:linear-gradient(145deg,#111620,#0b0f15);
  border-radius:14px;
  box-shadow:0 22px 60px #0007;
  overflow:hidden;
}

.card-top{
  min-height:58px;
  padding:13px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
}

.card-top h2{
  margin:5px 0 0;
  font:600 16px "Space Grotesk";
}

.eyebrow{
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.13em;
  color:#727d91;
  font-weight:700;
}

.secure{
  display:flex;
  align-items:center;
  gap:6px;
  color:#71b48b;
  font-size:10px;
}

.secure svg{width:14px}

.builder-card textarea{
  display:block;
  width:100%;
  min-height:160px;
  background:transparent;
  border:0;
  outline:0;
  color:#e8ebf2;
  padding:17px;
  resize:vertical;
  font:14px/1.65 "DM Sans";
}

.builder-card textarea::placeholder{color:#5d6779}

.prompt-tools{
  display:flex;
  align-items:center;
  gap:6px;
  padding:10px;
  border-top:1px solid var(--line);
}

.chip{
  display:flex;
  align-items:center;
  gap:6px;
  background:#131923;
  border:1px solid #242c39;
  color:#9da7b7;
  border-radius:7px;
  padding:7px 9px;
  font-size:10px;
}

.chip:hover{
  color:#e7e9ee;
  border-color:#343d4e;
}

.chip svg{width:13px}

.prompt-spacer{flex:1}

.select{
  height:34px;
  max-width:210px;
  background:#111620;
  color:#aeb7c5;
  border:1px solid #272f3d;
  border-radius:8px;
  padding:0 9px;
  font-size:10px;
  outline:none;
}

.build-btn{
  border:0;
  background:#ebe8ff;
  color:#171321;
  border-radius:8px;
  padding:10px 14px;
  font-weight:700;
  font-size:11px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  text-decoration:none;
}

.build-btn:hover{
  background:#fff;
  transform:translateY(-1px);
}

.build-btn svg{width:14px}

.advanced-build{
  border-top:1px solid #191f2a;
  padding:9px 12px;
  display:flex;
  gap:18px;
  color:#778194;
  font-size:10px;
}

.advanced-build label{
  display:flex;
  align-items:center;
  gap:6px;
}

.advanced-build input{accent-color:var(--accent)}

.stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  padding:0 34px 18px;
}

.stat-card{
  border:1px solid var(--line);
  background:rgba(13,17,24,.8);
  border-radius:11px;
  padding:14px;
  display:flex;
  align-items:flex-start;
  gap:11px;
}

.stat-icon{
  width:31px;
  height:31px;
  border-radius:8px;
  background:#151a26;
  border:1px solid #272e3b;
  display:grid;
  place-items:center;
  color:#a49cff;
}

.stat-icon svg{width:15px}

.stat-card span,.stat-card strong,.stat-card small{display:block}

.stat-card span{
  color:#687387;
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.stat-card strong{
  font:600 15px "Space Grotesk";
  margin-top:3px;
}

.stat-card small{
  color:#697487;
  font-size:9px;
  margin-top:3px;
}

.dashboard-grid{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:14px;
  padding:0 34px 30px;
}

.panel{
  border:1px solid var(--line);
  background:rgba(13,17,24,.8);
  border-radius:13px;
  overflow:hidden;
}

.panel+.panel{margin-top:14px}

.panel-head{
  padding:17px 18px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
}

.panel-head h2{
  margin:5px 0 0;
  font:600 16px "Space Grotesk";
}

.live{
  display:flex;
  align-items:center;
  gap:5px;
  color:#79c793;
  font-size:10px;
}

.live svg{width:12px}

.pipeline{padding:7px}

.pipeline-stage{
  display:flex;
  align-items:center;
  gap:11px;
  padding:10px;
  border-radius:9px;
}

.pipeline-stage:hover{background:#121722}

.pipeline-icon{
  width:32px;
  height:32px;
  border:1px solid #292f3c;
  background:#121620;
  border-radius:8px;
  display:grid;
  place-items:center;
  color:#a7a0ff;
}

.pipeline-icon svg{width:15px}

.pipeline-stage strong,
.pipeline-stage small{
  display:block;
}

.pipeline-stage strong{font-size:11px}

.pipeline-stage small{
  font-size:9px;
  color:#737e91;
  margin-top:2px;
}

.pipeline-stage>span{
  margin-left:auto;
  color:#687286;
  font-size:9px;
  text-transform:capitalize;
}

.cap-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  padding:7px;
}

.cap-grid>div{
  padding:14px 12px;
  border-bottom:1px solid #1a202b;
}

.cap-grid>div:nth-child(odd){
  border-right:1px solid #1a202b;
}

.cap-grid>div:nth-last-child(-n+2){
  border-bottom:0;
}

.cap-grid svg{
  width:15px;
  color:#9f97ff;
  margin-bottom:8px;
}

.cap-grid strong,.cap-grid small{display:block}

.cap-grid strong{font-size:11px}

.cap-grid small{
  font-size:9px;
  line-height:1.5;
  color:#707b8f;
  margin-top:3px;
}

.page-heading{
  padding:42px 34px 20px;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
}

.page-heading h1{
  margin:7px 0 3px;
  font:600 30px "Space Grotesk";
  letter-spacing:-.03em;
}

.page-heading p{
  margin:0;
  color:var(--muted);
  font-size:12px;
}

.page-content{
  padding:0 34px 60px;
}

.project-layout{
  display:grid;
  grid-template-columns:.8fr 1.2fr;
  gap:14px;
}

.project-meta{
  padding:8px;
}

.project-meta>div{
  padding:14px;
  border-bottom:1px solid #1a202b;
}

.project-meta>div:last-child{border-bottom:0}

.project-meta span,
.project-meta strong{
  display:block;
}

.project-meta span{
  font-size:9px;
  color:#697488;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.project-meta strong{
  margin-top:5px;
  font-size:11px;
  word-break:break-all;
}

.file-list{
  padding:7px;
  max-height:480px;
  overflow:auto;
}

.file-row{
  display:flex;
  align-items:center;
  gap:9px;
  padding:9px 11px;
  color:#aeb6c4;
  border-radius:7px;
  font-size:10px;
}

.file-row:hover{
  background:#131923;
  color:#fff;
}

.file-row svg{
  width:14px;
  color:#8f87ef;
  flex:none;
}

.project-list{padding:8px}

.project-row{
  width:100%;
  border:0;
  background:transparent;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
  padding:12px;
  border-radius:9px;
}

.project-row:hover{background:#131923}

.project-symbol{
  width:34px;
  height:34px;
  border:1px solid #292f3c;
  background:#121620;
  border-radius:8px;
  display:grid;
  place-items:center;
  color:#a49cff;
}

.project-symbol svg{width:16px}

.project-info{flex:1}

.project-info strong,
.project-info small{
  display:block;
}

.project-info strong{
  font-size:11px;
  word-break:break-all;
}

.project-info small{
  color:#6e798c;
  font-size:9px;
  margin-top:3px;
}

.project-row>svg{
  width:14px;
  color:#626d80;
}

.badge{
  display:inline-flex;
  align-items:center;
  padding:4px 7px;
  border-radius:5px;
  border:1px solid #293141;
  color:#7e899b;
  background:#111620;
  font-size:9px;
  text-transform:capitalize;
}

.badge.success{
  color:#75c995;
  border-color:#21432e;
  background:#102017;
}

.badge.running{
  color:#b7aaff;
  border-color:#383261;
  background:#17142b;
}

.badge.error{
  color:#ed8585;
  border-color:#4a2828;
  background:#211314;
}

.empty-state{
  min-height:260px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:30px;
  color:#667185;
}

.empty-state>svg{
  width:30px;
  height:30px;
  color:#8f87ef;
  margin-bottom:12px;
}

.empty-state h3{
  margin:0;
  color:#e1e5ec;
  font:600 16px "Space Grotesk";
}

.empty-state p{
  max-width:420px;
  margin:7px 0 17px;
  color:#727d91;
  font-size:11px;
  line-height:1.6;
}

.build-console{
  border:1px solid var(--line);
  background:#0d1118;
  border-radius:13px;
  overflow:hidden;
  margin:0 34px 35px;
}

.console-head{
  padding:16px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
}

.console-head h2{
  margin:5px 0 0;
  font:600 16px "Space Grotesk";
}

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

.request-summary{
  padding:15px 18px;
  display:flex;
  gap:10px;
  border-bottom:1px solid #191f2a;
  background:#0f141c;
}

.request-summary>span{
  color:#9389ef;
}

.request-summary svg{width:15px}

.request-summary strong{
  font-size:10px;
}

.request-summary p{
  margin:4px 0 0;
  color:#7d8799;
  font-size:10px;
  line-height:1.6;
}

.event-stream{
  max-height:400px;
  overflow:auto;
  padding:8px;
}

.event-stream.large{
  min-height:260px;
  max-height:560px;
}

.event{
  display:flex;
  gap:11px;
  padding:12px 10px;
  border-radius:8px;
}

.event:hover{background:#121722}

.event-dot{
  width:8px;
  height:8px;
  margin-top:4px;
  flex:none;
  border-radius:50%;
  background:#8f87ef;
  box-shadow:0 0 10px #8f87ef88;
}

.event-body{flex:1}

.event-body>div{
  display:flex;
  align-items:center;
  gap:8px;
}

.event strong{
  font-size:10px;
}

.event-body span{
  color:#555f71;
  font-size:8px;
}

.event small{
  display:block;
  color:#727d91;
  font-size:9px;
  line-height:1.5;
  margin-top:3px;
  word-break:break-word;
}

.event.waiting .event-dot{
  background:#596376;
  box-shadow:none;
}

.build-help{
  display:flex;
  gap:12px;
  padding:16px;
  border-bottom:1px solid var(--line);
}

.build-help>div:first-child{
  color:#9389ef;
}

.build-help svg{width:18px}

.build-help strong{
  font-size:11px;
}

.build-help p{
  margin:4px 0 0;
  color:#727d91;
  font-size:10px;
  line-height:1.6;
}

.repo-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  padding:12px;
}

.repo-card{
  border:1px solid #202735;
  background:#10151d;
  border-radius:9px;
  padding:15px;
}

.repo-card svg{
  width:16px;
  color:#9389ef;
  margin-bottom:10px;
}

.repo-card strong,
.repo-card span{
  display:block;
}

.repo-card strong{font-size:11px}

.repo-card span{
  color:#697487;
  font-size:9px;
  margin-top:3px;
}

.notice{
  margin:8px 12px 14px;
  padding:11px;
  border:1px solid #2a2e3a;
  border-radius:8px;
  display:flex;
  gap:8px;
  color:#798496;
  font-size:9px;
  line-height:1.5;
}

.notice svg{
  width:14px;
  flex:none;
  color:#9188ed;
}

.artifact-list{
  padding:8px;
}

.artifact-row{
  display:flex;
  align-items:center;
  gap:11px;
  padding:11px;
  border-radius:8px;
}

.artifact-row:hover{background:#131923}

.artifact-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  background:#151a26;
  border:1px solid #292f3c;
  border-radius:8px;
  color:#a29aff;
}

.artifact-icon svg{width:15px}

.artifact-info{flex:1}

.artifact-info strong,
.artifact-info small{
  display:block;
}

.artifact-info strong{font-size:10px}

.artifact-info small{
  color:#697487;
  font-size:8px;
  margin-top:3px;
}

.download-btn{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:7px 9px;
  border:1px solid #292f3c;
  border-radius:7px;
  color:#a8b1c0;
  text-decoration:none;
  font-size:9px;
}

.download-btn:hover{
  color:#fff;
  background:#151a24;
}

.download-btn svg{width:13px}

.settings-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-bottom:14px;
}

.settings-list>div{
  padding:13px 16px;
  border-bottom:1px solid #1a202b;
}

.settings-list>div:last-child{border-bottom:0}

.settings-list span,
.settings-list strong{
  display:block;
}

.settings-list span{
  color:#697487;
  font-size:9px;
}

.settings-list strong{
  margin-top:4px;
  font-size:10px;
  word-break:break-all;
}

.provider-list{padding:8px}

.provider-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border-radius:8px;
}

.provider-row:hover{background:#131923}

.provider-row>svg{
  width:15px;
  color:#9b93ef;
}

.provider-row div{flex:1}

.provider-row strong,
.provider-row small{
  display:block;
}

.provider-row strong{font-size:10px}

.provider-row small{
  color:#697487;
  font-size:8px;
  margin-top:3px;
}

.provider-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--green);
}

.tag-list{
  padding:15px;
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.provider-tag{
  padding:6px 9px;
  border-radius:6px;
  background:#141a24;
  border:1px solid #293140;
  color:#a0a9b8;
  font-size:9px;
}

.muted{color:#6d788b;font-size:10px}

.empty-inline{
  padding:25px;
  text-align:center;
  color:#657084;
  font-size:10px;
}

#toast-container{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:100;
  display:grid;
  gap:8px;
  width:min(360px,calc(100vw - 40px));
}

.toast{
  display:flex;
  align-items:center;
  gap:9px;
  padding:12px 13px;
  border:1px solid #303746;
  border-radius:9px;
  background:#121721;
  box-shadow:0 15px 45px #0009;
  color:#bfc6d2;
  font-size:10px;
  animation:toastIn .2s ease;
}

.toast svg{width:15px;color:#a39aff}

.toast.success svg{color:var(--green)}
.toast.error svg{color:var(--red)}

.toast.out{
  opacity:0;
  transform:translateY(8px);
  transition:.25s;
}

@keyframes toastIn{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:none}
}

@media(max-width:1000px){
  .stats{grid-template-columns:1fr 1fr}
  .dashboard-grid{grid-template-columns:1fr}
  .project-layout,.settings-grid{grid-template-columns:1fr}
}

@media(max-width:760px){
  .sidebar{display:none}

  header{padding:0 16px}

  .hero{
    padding:42px 18px 25px;
  }

  .builder-card,
  .stats,
  .dashboard-grid,
  .page-heading,
  .page-content{
    padding-left:18px;
    padding-right:18px;
  }

  .stats{grid-template-columns:1fr}

  .prompt-tools{
    flex-wrap:wrap;
  }

  .prompt-spacer{display:none}

  .select{
    flex:1;
    min-width:170px;
  }

  .advanced-build{
    flex-wrap:wrap;
  }

  .build-console{
    margin-left:18px;
    margin-right:18px;
  }

  .repo-grid{
    grid-template-columns:1fr;
  }

  .page-heading{
    align-items:flex-start;
    gap:15px;
    flex-direction:column;
  }
}
