:root {
  --bg: #050608;
  --panel: #0b0e12;
  --panel-2: #10141a;
  --panel-3: #151a21;
  --border: rgba(255,255,255,.09);
  --border-strong: rgba(255,94,0,.45);
  --text: #f6f7f9;
  --muted: #9299a5;
  --faint: #606773;
  --orange: #ff5a00;
  --orange-2: #ff7a1a;
  --green: #2bd576;
  --yellow: #ffb52e;
  --purple: #9a7cff;
  --blue: #55a7ff;
  --danger: #ff4d5e;
  --radius: 16px;
  --shadow: 0 18px 60px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, sans-serif; }
body { overflow-x: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px 16px; background: linear-gradient(180deg,#07090c 0%,#050608 65%,#090705 100%); border-right: 1px solid var(--border); z-index: 40; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 24px; }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand strong { display: block; letter-spacing: .08em; font-size: 15px; }
.brand span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.main-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; border: 1px solid transparent; background: transparent; color: #b7bdc7; padding: 12px 13px; border-radius: 12px; cursor: pointer; text-align: left; transition: .2s ease; }
.nav-item:hover { background: rgba(255,255,255,.035); color: white; }
.nav-item.active { color: var(--orange-2); border-color: rgba(255,90,0,.35); background: linear-gradient(90deg, rgba(255,90,0,.16), rgba(255,90,0,.03)); box-shadow: inset 3px 0 var(--orange); }
.nav-icon { width: 22px; text-align: center; opacity: .9; }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; }
.plan-card { padding: 16px; border: 1px solid var(--border); background: linear-gradient(145deg,rgba(255,90,0,.08),rgba(255,255,255,.02)); border-radius: 14px; }
.plan-kicker { color: var(--orange-2); font-family: "Space Mono", monospace; font-size: 11px; letter-spacing: .1em; }
.plan-name { margin: 5px 0 8px; font-weight: 700; }
.plan-card p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.profile-chip { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--border); background: #0b0d11; border-radius: 14px; padding: 10px; cursor: pointer; }
.avatar, .avatar-button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,90,0,.45); background: rgba(255,90,0,.08); color: var(--orange-2); font-weight: 700; }
.profile-chip span:nth-child(2) { text-align: left; flex: 1; }
.profile-chip strong, .profile-chip small { display: block; }
.profile-chip small { color: var(--muted); margin-top: 2px; }
.chev { color: var(--muted); }
.main-stage { min-width: 0; }
.topbar { height: 72px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: rgba(5,6,8,.88); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 30; }
.breadcrumb { color: var(--muted); font-family: "Space Mono", monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.usage-chip { display: flex; align-items: center; gap: 12px; padding: 9px 13px; background: #0a0d10; border: 1px solid var(--border); border-radius: 12px; }
.usage-chip span { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.usage-chip strong { color: var(--green); }
.icon-button, .avatar-button { border: 1px solid var(--border); background: #090c10; cursor: pointer; position: relative; }
.icon-button { width: 40px; height: 40px; border-radius: 12px; }
.notification-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); top: 6px; right: 7px; }
.page { padding: 30px 32px 54px; max-width: 1500px; margin: 0 auto; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.page-title { margin: 0; font-size: clamp(28px,3vw,42px); letter-spacing: -.04em; }
.page-subtitle { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.button { border: 0; border-radius: 11px; padding: 11px 16px; cursor: pointer; font-weight: 700; transition: .2s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: linear-gradient(180deg,var(--orange-2),var(--orange)); color: white; box-shadow: 0 9px 24px rgba(255,90,0,.22); }
.button.secondary { border: 1px solid rgba(255,90,0,.55); background: rgba(255,90,0,.08); color: var(--orange-2); }
.button.ghost { border: 1px solid var(--border); background: rgba(255,255,255,.025); color: #d9dde3; }
.button.danger { border: 1px solid rgba(255,77,94,.55); background: rgba(255,77,94,.08); color: #ff8792; }
.button.full { width: 100%; }
.stat-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; margin-bottom: 16px; }
.card { border: 1px solid var(--border); background: linear-gradient(145deg,rgba(255,255,255,.025),rgba(255,255,255,.012)); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card { padding: 18px; min-height: 130px; }
.stat-label { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.stat-value { margin-top: 10px; font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.stat-note { margin-top: 8px; color: var(--muted); font-size: 12px; }
.green { color: var(--green); } .orange { color: var(--orange-2); } .purple { color: var(--purple); } .blue { color: var(--blue); }
.grid-2 { display: grid; grid-template-columns: 1.25fr .85fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.section-card { padding: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-head h3 { margin: 0; font-size: 16px; }
.section-head a, .link { color: var(--orange-2); font-size: 12px; cursor: pointer; }
.chart { height: 280px; position: relative; background: repeating-linear-gradient(to right,transparent 0,transparent calc(14.285% - 1px),rgba(255,255,255,.05) calc(14.285% - 1px),rgba(255,255,255,.05) 14.285%), repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),rgba(255,255,255,.05) calc(25% - 1px),rgba(255,255,255,.05) 25%); border-radius: 10px; overflow: hidden; }
.chart svg { width: 100%; height: 100%; }
.activity-list { display: grid; }
.activity-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); }
.activity-row:last-child { border-bottom: 0; }
.activity-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 10px; }
.activity-row strong { display: block; font-size: 13px; }
.activity-row small { color: var(--muted); }
.launch-banner { margin: 16px 0; display: flex; justify-content: space-between; align-items: center; padding: 22px; border: 1px solid rgba(255,90,0,.48); background: radial-gradient(circle at 75% 50%,rgba(255,90,0,.22),transparent 30%), linear-gradient(90deg,rgba(255,90,0,.08),rgba(255,90,0,.015)); border-radius: var(--radius); }
.launch-banner h3 { margin: 0 0 4px; }
.launch-banner p { margin: 0; color: var(--muted); }
.agent-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.agent-card { padding: 16px; min-height: 180px; }
.agent-card-head { display:flex; justify-content:space-between; gap:10px; }
.agent-card h4 { margin: 0; }
.agent-card p { color: var(--muted); font-size: 13px; line-height: 1.55; min-height: 42px; }
.status { font-size: 11px; border-radius: 999px; padding: 4px 8px; background: rgba(43,213,118,.1); color: var(--green); }
.status.paused { background: rgba(154,124,255,.1); color: var(--purple); }
.spark { height: 35px; margin-top: 14px; }
.spark svg { width: 100%; height: 100%; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
td { font-size: 13px; }
.searchbar { display:flex; gap:10px; margin-bottom:16px; }
.input, .textarea, .select { width: 100%; border: 1px solid var(--border); color: var(--text); background: #090c10; border-radius: 12px; padding: 12px 14px; outline: none; }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(255,90,0,.7); box-shadow: 0 0 0 3px rgba(255,90,0,.08); }
.textarea { min-height: 170px; resize: vertical; }
.filter-row { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.pill { border:1px solid var(--border); background:#0a0d11; color:var(--muted); border-radius:999px; padding:8px 12px; cursor:pointer; }
.pill.active { color:var(--orange-2); border-color:rgba(255,90,0,.5); background:rgba(255,90,0,.08); }
.skill-grid, .template-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.skill-card, .template-card { padding:18px; min-height:185px; }
.skill-icon { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:rgba(255,90,0,.12); color:var(--orange-2); margin-bottom:15px; }
.skill-card p, .template-card p { color:var(--muted); font-size:13px; line-height:1.5; }
.skill-meta { margin-top:20px; display:flex; justify-content:space-between; color:var(--faint); font-size:11px; }
.workflow-layout { display:grid; grid-template-columns:.8fr 1.2fr; gap:16px; }
.workflow-list { display:grid; gap:10px; }
.workflow-item { padding:16px; cursor:pointer; }
.workflow-item.selected { border-color:var(--border-strong); }
.step-list { display:grid; gap:0; }
.step { display:grid; grid-template-columns:34px 1fr; gap:12px; position:relative; padding-bottom:22px; }
.step:not(:last-child)::after { content:""; position:absolute; left:16px; top:33px; bottom:0; width:1px; background:rgba(255,90,0,.4); }
.step-index { width:34px; height:34px; border-radius:50%; display:grid; place-items:center; background:rgba(255,90,0,.12); border:1px solid rgba(255,90,0,.5); color:var(--orange-2); font-weight:700; }
.rewards-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.chat-layout { display:grid; grid-template-columns:280px 1fr; min-height:calc(100vh - 132px); gap:16px; }
.chat-history { padding:14px; }
.chat-main { display:flex; flex-direction:column; min-height:680px; overflow:hidden; }
.chat-title { padding:18px 20px; border-bottom:1px solid var(--border); }
.conversation-list { display:grid; gap:4px; margin-top:12px; }
.conversation-item { padding:11px; border-radius:9px; color:var(--muted); cursor:pointer; }
.conversation-item.active { color:white; background:rgba(255,90,0,.11); }
.messages { padding:28px; display:flex; flex-direction:column; gap:18px; flex:1; overflow:auto; }
.message { max-width:760px; padding:16px 18px; border-radius:16px; line-height:1.6; }
.message.user { margin-left:auto; background:#161b22; border:1px solid var(--border); }
.message.ai { background:linear-gradient(145deg,rgba(255,90,0,.07),rgba(255,255,255,.015)); border:1px solid rgba(255,90,0,.28); }
.composer { margin:0 20px 20px; display:flex; gap:10px; padding:10px; border:1px solid var(--border-strong); background:#090b0e; border-radius:16px; }
.composer input { flex:1; background:transparent; color:white; border:0; outline:0; padding:8px; }
/* ── Ask Genie: empty state, composer, sandbox canvas ── */
.chat-layout.canvas-open { grid-template-columns:220px 1fr 1.05fr; }
.chat-empty { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:40px 24px; gap:22px; }
.chat-mascot { width:96px; height:96px; object-fit:contain; filter:drop-shadow(0 0 26px rgba(255,90,0,.45)); }
.chat-empty h2 { margin:0; font-size:clamp(22px,2.4vw,30px); letter-spacing:-.03em; }
.suggestion-row { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; max-width:640px; }
.composer-chip { display:flex; align-items:center; gap:6px; border:1px solid var(--border); background:#0a0d11; color:var(--muted); border-radius:10px; padding:9px 12px; cursor:pointer; font-size:12px; white-space:nowrap; }
.composer-chip:hover { color:var(--orange-2); border-color:rgba(255,90,0,.5); }
.chat-disclaimer { margin:0 0 14px; text-align:center; color:var(--faint); font-size:11px; }
.message-ai-wrap { max-width:760px; display:grid; gap:8px; }
.ai-name { color:var(--orange-2); font-size:12px; font-weight:700; }
.ai-text { line-height:1.65; }
.artifact-chip { display:flex; align-items:center; gap:12px; text-align:left; max-width:380px; padding:12px 14px; cursor:pointer; border:1px solid rgba(255,90,0,.5); background:rgba(255,90,0,.07); border-radius:14px; color:var(--text); }
.artifact-chip:hover { background:rgba(255,90,0,.12); }
.artifact-ico { width:34px; height:34px; flex-shrink:0; display:grid; place-items:center; border:1px solid rgba(255,90,0,.55); border-radius:10px; color:var(--orange-2); }
.artifact-chip strong { display:block; font-size:13px; }
.artifact-chip small { color:var(--muted); }
.canvas-panel { display:flex; flex-direction:column; min-height:680px; overflow:hidden; }
.canvas-head { display:flex; align-items:center; gap:12px; padding:12px 14px; border-bottom:1px solid var(--border); }
.seg { display:flex; border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.seg-btn { border:0; background:transparent; color:var(--muted); padding:8px 12px; cursor:pointer; font-size:12px; }
.seg-btn.active { background:rgba(255,90,0,.14); color:var(--orange-2); }
.canvas-name { flex:1; text-align:center; color:var(--muted); font-family:"Space Mono",monospace; font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.canvas-actions { display:flex; gap:8px; }
.canvas-body { flex:1; min-height:0; background:#07090c; }
.canvas-frame { width:100%; height:100%; border:0; display:block; }
.canvas-code { margin:0; height:100%; overflow:auto; padding:18px; color:#c8ceda; font-family:"Space Mono",monospace; font-size:11.5px; line-height:1.6; }
.canvas-foot { display:flex; gap:10px; padding:12px 14px; border-top:1px solid var(--border); }
@media (max-width:1400px){ .chat-layout.canvas-open { grid-template-columns:1fr 1.05fr; } .chat-layout.canvas-open .chat-history { display:none; } }
@media (max-width:900px){ .chat-layout.canvas-open { grid-template-columns:1fr; } }

/* ── Review step: pre-deploy agent summary ── */
.agent-hero { display:flex; align-items:center; gap:24px; padding:26px 28px; margin-bottom:18px; background:radial-gradient(circle at 88% 0%,rgba(255,90,0,.2),transparent 42%), linear-gradient(145deg,rgba(255,255,255,.025),rgba(255,255,255,.012)); }
.agent-hero-avatar { width:104px; height:104px; border-radius:26px; display:grid; place-items:center; background:#0a0d11; border:1px solid rgba(255,90,0,.5); box-shadow:0 0 44px rgba(255,90,0,.35); }
.agent-hero-avatar img { width:72px; height:72px; object-fit:contain; }
.agent-hero-title { display:flex; align-items:center; gap:12px; }
.agent-hero-title h2 { margin:0; font-size:clamp(24px,2.6vw,34px); letter-spacing:-.03em; }
.draft-badge { border:1px solid rgba(255,181,46,.5); color:var(--yellow); background:rgba(255,181,46,.08); border-radius:999px; padding:4px 11px; font-size:10px; letter-spacing:.12em; font-family:"Space Mono",monospace; }
.agent-hero-name { margin-top:6px; color:#d9dde3; font-size:16px; display:flex; align-items:center; gap:9px; }
.edit-ico { color:var(--muted); cursor:pointer; }
.hero-tags { margin:14px 0 0; }
.hero-tags .pill { font-size:11px; font-family:"Space Mono",monospace; letter-spacing:.06em; }
.mono-kicker { margin:0 0 14px; color:var(--orange-2); font-family:"Space Mono",monospace; font-size:12px; letter-spacing:.14em; text-transform:uppercase; border-bottom:1px solid var(--border); padding-bottom:12px; }
.review-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:22px; align-items:start; }
.launch-list { display:grid; }
.launch-item { display:grid; grid-template-columns:52px 1fr; gap:16px; padding:19px 0; border-bottom:1px solid var(--border); align-items:center; }
.launch-item:last-child { border-bottom:0; }
.launch-ico { width:52px; height:52px; display:grid; place-items:center; font-size:21px; border:1px solid var(--border); border-radius:14px; background:#0a0d11; }
.launch-item strong { display:block; font-size:15px; margin-bottom:4px; }
.launch-item p { margin:0; color:var(--muted); font-size:13px; line-height:1.6; }
.blue { color:var(--blue); }
.review-side { display:grid; gap:16px; }
.sum-list { display:grid; }
.sum-row { display:flex; align-items:center; gap:13px; padding:13px 0; border-bottom:1px solid var(--border); }
.sum-row:last-child { border-bottom:0; }
.sum-ico { width:38px; height:38px; flex-shrink:0; display:grid; place-items:center; border:1px solid var(--border); border-radius:50%; color:var(--orange-2); }
.sum-body { flex:1; }
.sum-body small { display:block; color:var(--muted); font-size:12px; }
.sum-body strong { font-size:14px; }
.sum-right { color:var(--faint); }
.econ-row { display:flex; justify-content:space-between; padding:9px 0; font-size:13px; }
.econ-row span { color:var(--muted); }
.econ-sep { border-top:1px solid var(--border); margin:8px 0; }
.deploy-cta { width:100%; text-align:center; cursor:pointer; padding:16px; border-radius:16px; border:1px solid rgba(255,90,0,.65); background:rgba(255,90,0,.08); transition:.2s ease; }
.deploy-cta:hover { background:rgba(255,90,0,.14); transform:translateY(-1px); }
.deploy-cta strong { display:block; color:var(--orange-2); font-size:15px; }
.deploy-cta small { display:block; margin-top:5px; color:var(--muted); }
@media (max-width:1100px){ .review-grid { grid-template-columns:1fr; } }

.builder { display:grid; grid-template-columns:1fr 390px; gap:16px; }
.progress { display:flex; gap:6px; margin-bottom:20px; }
.progress-step { flex:1; padding:10px; border-bottom:2px solid var(--border); color:var(--faint); font-size:12px; }
.progress-step.active { color:var(--orange-2); border-color:var(--orange); }
.summary-panel { padding:20px; position:sticky; top:100px; height:max-content; }
.permission-list { display:grid; gap:12px; }
.permission { display:flex; align-items:center; justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--border); }
.toggle { width:42px; height:24px; border-radius:999px; background:#2a2f37; padding:3px; cursor:pointer; }
.toggle::after { content:""; display:block; width:18px; height:18px; border-radius:50%; background:white; transition:.2s ease; }
.toggle.on { background:var(--green); }
.toggle.on::after { transform:translateX(18px); }
.empty-state { min-height:420px; display:grid; place-items:center; text-align:center; padding:40px; }
.empty-state img { width:84px; opacity:.95; }
.toast { position:fixed; right:24px; bottom:24px; background:#12161c; border:1px solid rgba(255,90,0,.45); color:white; padding:13px 16px; border-radius:12px; transform:translateY(25px); opacity:0; pointer-events:none; transition:.25s; z-index:100; }
.toast.show { transform:translateY(0); opacity:1; }
.mobile-only { display:none; }
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns:repeat(2,1fr); }
  .agent-grid, .skill-grid, .template-grid { grid-template-columns:repeat(2,1fr); }
  .grid-2, .workflow-layout, .builder { grid-template-columns:1fr; }
  .summary-panel { position:static; }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns:1fr; }
  .sidebar { position:fixed; left:-270px; width:250px; transition:.25s; box-shadow:40px 0 80px rgba(0,0,0,.55); }
  .sidebar.open { left:0; }
  .mobile-only { display:block; }
  .topbar { padding:0 16px; }
  .page { padding:22px 16px 40px; }
  .stat-grid, .agent-grid, .skill-grid, .template-grid, .rewards-grid, .grid-3 { grid-template-columns:1fr; }
  .chat-layout { grid-template-columns:1fr; }
  .chat-history { display:none; }
  .usage-chip { display:none; }
  .launch-banner { align-items:flex-start; flex-direction:column; gap:18px; }
}
