:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8eaf0;
  background: #06070b;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #06070b;
  --bg-2: #0a0c12;
  --panel: rgba(16, 18, 27, .88);
  --panel-solid: #10121b;
  --panel-2: #151824;
  --panel-3: #1a1e2b;
  --border: rgba(255,255,255,.075);
  --border-strong: rgba(255,255,255,.13);
  --text: #f2f4f8;
  --muted: #8f96a8;
  --muted-2: #697184;
  --brand: #7c5cff;
  --brand-2: #28c8ff;
  --green: #35d39a;
  --amber: #ffbb55;
  --red: #ff6578;
  --cyan: #36d6cf;
  --pink: #f17ce9;
  --shadow: 0 24px 70px rgba(0,0,0,.34);
}
* { box-sizing: border-box; }
html, body, #root { margin: 0; min-width: 320px; min-height: 100%; background: var(--bg); }
body { min-height: 100vh; overflow-x: hidden; }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(124,92,255,.12), transparent 31%),
    radial-gradient(circle at 88% 9%, rgba(40,200,255,.07), transparent 26%),
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: auto, auto, 42px 42px, 42px 42px;
}
button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid rgba(124,92,255,.72); outline-offset: 2px; }
a { color: inherit; }
::selection { background: rgba(124,92,255,.4); color: white; }
* { scrollbar-width: thin; scrollbar-color: #34394a transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #34394a; border-radius: 999px; }
*::-webkit-scrollbar-track { background: transparent; }

#boot-status { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; position: relative; z-index: 2; }
#boot-status p { margin: 0; color: var(--muted); font-size: 13px; }
.boot-wordmark { font-size: 18px; letter-spacing: .24em; font-weight: 500; }
.boot-wordmark strong { color: #9e89ff; }
.boot-orbit { width: 54px; height: 54px; position: relative; animation: spin 1.7s linear infinite; }
.boot-orbit span { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 20px rgba(124,92,255,.8); }
.boot-orbit span:nth-child(1) { left: 22px; top: 0; }
.boot-orbit span:nth-child(2) { left: 2px; top: 34px; background: var(--brand-2); }
.boot-orbit span:nth-child(3) { right: 2px; top: 34px; background: var(--green); }
@keyframes spin { to { transform: rotate(360deg); } }
#runtime-error { position: fixed; inset: 0; z-index: 999999; display: grid; place-items: center; padding: 30px; background: rgba(4,5,8,.92); backdrop-filter: blur(18px); }
.runtime-card { max-width: 760px; width: 100%; border: 1px solid rgba(255,101,120,.35); border-radius: 24px; background: #12131a; padding: 28px; box-shadow: 0 30px 100px rgba(0,0,0,.65); }
.runtime-card h2 { margin: 6px 0 10px; font-size: 26px; }
.runtime-card p { color: var(--muted); line-height: 1.6; }
.runtime-card pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #090a0e; border: 1px solid var(--border); border-radius: 14px; padding: 16px; color: #ff9eaa; max-height: 320px; overflow: auto; }
.runtime-card button { border: 0; border-radius: 12px; padding: 11px 16px; color: white; background: var(--brand); cursor: pointer; }
.runtime-kicker { font-size: 10px; letter-spacing: .2em; color: var(--red); font-weight: 800; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0,1fr); position: relative; z-index: 1; }
.sidebar { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--border); background: rgba(7,8,13,.86); backdrop-filter: blur(28px); padding: 18px 14px; display: flex; flex-direction: column; z-index: 20; }
.brand { height: 48px; display: flex; align-items: center; gap: 11px; padding: 0 8px 14px; border-bottom: 1px solid var(--border); }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, #a28cff, #6b4fff 54%, #21b8eb); position: relative; box-shadow: 0 10px 30px rgba(124,92,255,.28); overflow: hidden; }
.brand-mark::before { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 3px solid white; left: 7px; top: 7px; opacity: .95; }
.brand-mark::after { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: white; right: 5px; top: 5px; box-shadow: -19px 19px 0 rgba(255,255,255,.85); }
.brand-copy { line-height: 1; }
.brand-title { font-weight: 750; letter-spacing: -.02em; font-size: 15px; }
.brand-title span { color: #a892ff; }
.brand-subtitle { color: var(--muted-2); font-size: 9px; letter-spacing: .16em; margin-top: 5px; font-weight: 700; }
.workspace-switch { margin: 14px 2px 10px; padding: 10px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.024); display: flex; align-items: center; gap: 9px; cursor: pointer; }
.workspace-avatar { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(124,92,255,.18); color: #beaefe; font-size: 11px; font-weight: 800; }
.workspace-copy { min-width: 0; flex: 1; }
.workspace-copy strong { font-size: 11px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-copy span { color: var(--muted-2); font-size: 9px; }
.nav-scroll { overflow-y: auto; flex: 1; padding: 8px 0; }
.nav-group { margin: 14px 0 18px; }
.nav-label { padding: 0 10px 7px; color: #565d70; font-size: 9px; letter-spacing: .17em; font-weight: 800; }
.nav-item { width: 100%; border: 0; background: transparent; color: #9198aa; min-height: 38px; border-radius: 10px; padding: 0 10px; display: flex; align-items: center; gap: 10px; cursor: pointer; position: relative; transition: .18s ease; }
.nav-item:hover { background: rgba(255,255,255,.035); color: #d9dce5; }
.nav-item.active { background: linear-gradient(90deg, rgba(124,92,255,.17), rgba(124,92,255,.06)); color: white; }
.nav-item.active::before { content: ""; position: absolute; left: 0; width: 2px; height: 20px; border-radius: 0 9px 9px 0; background: #8f75ff; box-shadow: 0 0 14px #7c5cff; }
.nav-item svg { width: 16px; height: 16px; flex: 0 0 auto; }
.nav-item span { font-size: 11px; font-weight: 600; }
.nav-badge { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.06); color: #aeb4c2; font-size: 8px; font-weight: 800; }
.sidebar-bottom { border-top: 1px solid var(--border); padding-top: 12px; }
.sidebar-agent { padding: 11px; border-radius: 14px; background: linear-gradient(145deg, rgba(124,92,255,.14), rgba(40,200,255,.045)); border: 1px solid rgba(124,92,255,.19); }
.agent-line { display: flex; align-items: center; gap: 9px; }
.agent-orb { width: 29px; height: 29px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(145deg,#7c5cff,#28bde9); box-shadow: 0 9px 24px rgba(124,92,255,.25); }
.agent-orb svg { width: 15px; }
.agent-copy strong { font-size: 10px; display: block; }
.agent-copy span { color: #858ca0; font-size: 8px; }
.agent-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }

.main-shell { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; height: 64px; border-bottom: 1px solid var(--border); background: rgba(7,8,13,.78); backdrop-filter: blur(24px); display: flex; align-items: center; padding: 0 22px; gap: 12px; }
.mobile-menu { display: none; }
.breadcrumb { min-width: 180px; }
.breadcrumb span { display: block; color: var(--muted-2); font-size: 8px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; }
.breadcrumb strong { display: block; margin-top: 3px; font-size: 12px; font-weight: 650; }
.command-search { margin-left: auto; width: min(380px, 34vw); height: 36px; display: flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--border); border-radius: 11px; background: rgba(255,255,255,.025); color: var(--muted-2); }
.command-search svg { width: 14px; }
.command-search input { border: 0; outline: 0; background: transparent; color: var(--text); width: 100%; font-size: 10px; }
.command-search kbd { font-family: inherit; font-size: 8px; color: #73798a; border: 1px solid var(--border); padding: 3px 5px; border-radius: 5px; background: #0d0f15; }
.environment-pill { height: 30px; padding: 0 9px; border: 1px solid rgba(53,211,154,.17); border-radius: 9px; background: rgba(53,211,154,.07); color: #74e0b7; display: flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 750; }
.environment-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); }
.icon-button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,.022); color: #9ba2b4; display: grid; place-items: center; cursor: pointer; position: relative; }
.icon-button:hover { color: white; border-color: var(--border-strong); background: rgba(255,255,255,.045); }
.icon-button svg { width: 15px; height: 15px; }
.icon-button .notification-dot { position: absolute; right: 7px; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--red); box-shadow: 0 0 9px var(--red); }
.user-avatar { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg,#24293a,#464e69); border: 1px solid rgba(255,255,255,.12); display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.content { padding: 22px; min-width: 0; }
.page { max-width: 1600px; margin: 0 auto; animation: page-in .24s ease; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } }

.page-header { display: flex; gap: 18px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.page-eyebrow { color: #7764d8; font-size: 9px; letter-spacing: .19em; font-weight: 900; text-transform: uppercase; }
.page-title { margin: 6px 0 0; font-size: clamp(23px, 3vw, 35px); letter-spacing: -.04em; font-weight: 720; }
.page-subtitle { max-width: 760px; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn { min-height: 35px; border-radius: 10px; padding: 0 13px; border: 1px solid var(--border); background: rgba(255,255,255,.025); color: #c7cad4; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; font-size: 9px; font-weight: 750; transition: .15s ease; }
.btn:hover { background: rgba(255,255,255,.06); color: white; border-color: var(--border-strong); transform: translateY(-1px); }
.btn svg { width: 13px; height: 13px; }
.btn.primary { color: white; border-color: rgba(124,92,255,.5); background: linear-gradient(135deg,#7c5cff,#6550d8); box-shadow: 0 10px 28px rgba(124,92,255,.22); }
.btn.primary:hover { background: linear-gradient(135deg,#8d75ff,#725be6); }
.btn.success { color: #b9f3db; border-color: rgba(53,211,154,.22); background: rgba(53,211,154,.09); }
.btn.danger { color: #ff9ba7; border-color: rgba(255,101,120,.22); background: rgba(255,101,120,.08); }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none; }

.card { border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(145deg, rgba(18,20,29,.92), rgba(12,14,21,.92)); box-shadow: 0 16px 55px rgba(0,0,0,.15); }
.card-head { min-height: 51px; padding: 13px 15px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 11px; }
.card-head h3 { margin: 0; font-size: 11px; font-weight: 700; }
.card-head p { margin: 3px 0 0; color: var(--muted-2); font-size: 8px; }
.card-head .head-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: rgba(124,92,255,.09); color: #9c88ff; }
.card-head .head-icon svg { width: 14px; }
.card-head-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-body { padding: 15px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.inline { display: flex; align-items: center; gap: 8px; }
.space-between { justify-content: space-between; }
.muted { color: var(--muted); }
.tiny { font-size: 8px; }
.small { font-size: 10px; }

.hero-card { position: relative; overflow: hidden; min-height: 238px; padding: 26px; border-radius: 21px; border: 1px solid rgba(124,92,255,.18); background: linear-gradient(120deg,#11131e 0%,#121424 42%,#0b1520 100%); box-shadow: var(--shadow); }
.hero-card::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; right: -100px; top: -190px; background: rgba(124,92,255,.22); filter: blur(70px); }
.hero-card::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; right: 18%; bottom: -220px; background: rgba(40,200,255,.16); filter: blur(60px); }
.hero-content { position: relative; z-index: 2; max-width: 690px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; color: #b3a5ff; font-size: 8px; letter-spacing: .18em; font-weight: 900; }
.hero-kicker i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.hero-title { margin: 12px 0 9px; font-size: clamp(27px, 4vw, 45px); line-height: 1.04; letter-spacing: -.05em; max-width: 740px; font-weight: 700; }
.hero-title em { font-style: normal; background: linear-gradient(90deg,#ad9cff,#70d8ff); -webkit-background-clip: text; color: transparent; }
.hero-copy { margin: 0; max-width: 650px; color: #969caf; font-size: 11px; line-height: 1.7; }
.hero-actions { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-visual { position: absolute; z-index: 2; right: 28px; top: 24px; width: 330px; height: 192px; display: grid; place-items: center; }
.orbit-map { width: 210px; height: 210px; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; position: relative; animation: slow-spin 25s linear infinite; }
.orbit-map::before { content: ""; position: absolute; inset: 26px; border: 1px solid rgba(255,255,255,.065); border-radius: 50%; }
.orbit-map::after { content: ""; position: absolute; inset: 62px; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; }
@keyframes slow-spin { to { transform: rotate(360deg); } }
.orbit-core { position: absolute; inset: 77px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(135deg,#8064ff,#36bde9); box-shadow: 0 0 44px rgba(124,92,255,.4); transform: rotate(-45deg); }
.orbit-core svg { width: 24px; transform: rotate(45deg); }
.orbit-dot { position: absolute; width: 29px; height: 29px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--border-strong); background: #141722; box-shadow: 0 9px 25px rgba(0,0,0,.32); transform: rotate(var(--counter)); }
.orbit-dot svg { width: 13px; }
.orbit-dot.one { left: -12px; top: 89px; --counter: 0deg; color: #62ddad; }
.orbit-dot.two { right: 11px; top: 18px; --counter: 0deg; color: #64d7ff; }
.orbit-dot.three { right: -8px; bottom: 38px; --counter: 0deg; color: #ff82a2; }
.orbit-dot.four { left: 45px; bottom: -8px; --counter: 0deg; color: #ffcc72; }

.metric-card { padding: 15px; min-height: 116px; position: relative; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; width: 80px; height: 80px; right: -32px; top: -32px; border-radius: 50%; background: var(--metric-glow, rgba(124,92,255,.13)); filter: blur(10px); }
.metric-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.metric-label { color: var(--muted); font-size: 9px; font-weight: 600; }
.metric-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.035); color: var(--metric-color,#9f8aff); }
.metric-icon svg { width: 13px; }
.metric-value { position: relative; z-index: 2; margin-top: 12px; font-size: 25px; letter-spacing: -.04em; font-weight: 730; }
.metric-foot { position: relative; z-index: 2; margin-top: 5px; color: var(--muted-2); font-size: 8px; display: flex; align-items: center; gap: 5px; }
.metric-change { color: var(--green); font-weight: 800; }
.metric-change.down { color: var(--red); }

.health-row, .run-row, .issue-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.045); }
.health-row:last-child, .run-row:last-child, .issue-row:last-child { border-bottom: 0; }
.health-icon, .run-icon, .issue-icon { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.035); color: #aaa; }
.health-icon svg, .run-icon svg, .issue-icon svg { width: 14px; }
.health-copy, .run-copy, .issue-copy { min-width: 0; flex: 1; }
.health-copy strong, .run-copy strong, .issue-copy strong { display: block; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.health-copy span, .run-copy span, .issue-copy span { display: block; margin-top: 3px; color: var(--muted-2); font-size: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px rgba(53,211,154,.7); }
.status-dot.warn { background: var(--amber); box-shadow: 0 0 9px rgba(255,187,85,.55); }
.status-dot.bad { background: var(--red); box-shadow: 0 0 9px rgba(255,101,120,.6); }
.tag { display: inline-flex; align-items: center; gap: 5px; min-height: 20px; padding: 0 7px; border-radius: 7px; border: 1px solid var(--border); background: rgba(255,255,255,.025); color: #979eb0; font-size: 7px; font-weight: 800; white-space: nowrap; }
.tag.green { color: #76e3bb; border-color: rgba(53,211,154,.16); background: rgba(53,211,154,.065); }
.tag.amber { color: #ffd08b; border-color: rgba(255,187,85,.16); background: rgba(255,187,85,.065); }
.tag.red { color: #ff9ba8; border-color: rgba(255,101,120,.16); background: rgba(255,101,120,.065); }
.tag.purple { color: #b7a8ff; border-color: rgba(124,92,255,.2); background: rgba(124,92,255,.08); }

.funnel { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; align-items: end; min-height: 156px; padding-top: 8px; }
.funnel-step { min-width: 0; }
.funnel-bar { border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg,rgba(124,92,255,.78),rgba(124,92,255,.18)); border: 1px solid rgba(124,92,255,.22); min-height: 18px; position: relative; }
.funnel-step:nth-child(2) .funnel-bar { background: linear-gradient(180deg,rgba(77,124,255,.75),rgba(77,124,255,.15)); }
.funnel-step:nth-child(3) .funnel-bar { background: linear-gradient(180deg,rgba(40,200,255,.75),rgba(40,200,255,.15)); }
.funnel-step:nth-child(4) .funnel-bar { background: linear-gradient(180deg,rgba(54,214,207,.75),rgba(54,214,207,.15)); }
.funnel-step:nth-child(5) .funnel-bar { background: linear-gradient(180deg,rgba(53,211,154,.75),rgba(53,211,154,.15)); }
.funnel-value { font-size: 11px; font-weight: 750; margin-top: 7px; }
.funnel-label { color: var(--muted-2); font-size: 7px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.recommendation { border: 1px solid var(--border); border-radius: 13px; padding: 12px; display: flex; gap: 10px; background: rgba(255,255,255,.018); }
.recommendation-icon { width: 29px; height: 29px; border-radius: 9px; background: rgba(124,92,255,.11); color: #a18dff; display: grid; place-items: center; }
.recommendation-icon svg { width: 13px; }
.recommendation-copy { min-width: 0; flex: 1; }
.recommendation-copy strong { display: block; font-size: 9px; }
.recommendation-copy p { margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.recommendation-score { color: #b0a1f7; font-size: 8px; font-weight: 800; }

/* Flow builder */
.builder-page { max-width: none; margin: -22px; height: calc(100vh - 64px); display: grid; grid-template-rows: 57px minmax(0,1fr); background: #080a0f; }
.builder-toolbar { border-bottom: 1px solid var(--border); background: #0d0f16; display: flex; align-items: center; padding: 0 14px; gap: 9px; overflow-x: auto; }
.builder-title-block { min-width: 190px; margin-right: 8px; }
.builder-title-block input { width: 100%; border: 0; background: transparent; color: white; font-size: 12px; font-weight: 700; outline: 0; }
.builder-title-meta { margin-top: 2px; display: flex; gap: 6px; color: var(--muted-2); font-size: 7px; }
.toolbar-separator { width: 1px; height: 24px; background: var(--border); flex: 0 0 auto; }
.builder-score { margin-left: auto; min-width: 104px; height: 31px; border: 1px solid var(--border); border-radius: 9px; display: flex; align-items: center; gap: 7px; padding: 0 9px; color: var(--muted); font-size: 8px; }
.score-ring { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--score) * 1%), rgba(255,255,255,.07) 0); position: relative; }
.score-ring::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #0d0f16; }
.builder-layout { min-height: 0; display: grid; grid-template-columns: 224px minmax(0,1fr) 294px; }
.node-palette { border-right: 1px solid var(--border); background: #0b0d13; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.palette-head { padding: 12px; border-bottom: 1px solid var(--border); }
.palette-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; background: #07090d; border: 1px solid var(--border); border-radius: 9px; }
.palette-tab { height: 27px; border: 0; border-radius: 7px; background: transparent; color: var(--muted-2); font-size: 8px; font-weight: 750; cursor: pointer; }
.palette-tab.active { background: #171a24; color: white; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.palette-search { margin-top: 9px; height: 31px; border: 1px solid var(--border); border-radius: 9px; display: flex; align-items: center; gap: 7px; padding: 0 9px; background: #080a0f; color: var(--muted-2); }
.palette-search svg { width: 12px; }
.palette-search input { width: 100%; border: 0; outline: 0; background: transparent; color: white; font-size: 8px; }
.palette-scroll { padding: 10px; overflow-y: auto; flex: 1; }
.palette-group { margin-bottom: 15px; }
.palette-group-title { color: #5e6577; font-size: 7px; letter-spacing: .14em; font-weight: 900; margin: 0 3px 7px; }
.palette-node { border: 1px solid var(--border); border-radius: 10px; padding: 9px; display: flex; gap: 8px; align-items: center; background: #11131b; margin-bottom: 6px; cursor: grab; transition: .15s ease; user-select: none; }
.palette-node:hover { border-color: rgba(124,92,255,.28); background: #151822; transform: translateX(2px); }
.palette-node:active { cursor: grabbing; }
.palette-node-icon { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; background: var(--node-bg,rgba(124,92,255,.1)); color: var(--node-color,#9c88ff); }
.palette-node-icon svg { width: 13px; }
.palette-node-copy strong { display: block; font-size: 8px; }
.palette-node-copy span { display: block; color: var(--muted-2); font-size: 7px; margin-top: 3px; }
.flow-stage { min-width: 0; min-height: 0; position: relative; background: #090b11; }
.flow-stage .react-flow { background: radial-gradient(circle at 50% 40%, rgba(124,92,255,.035), transparent 40%), #090b11; }
.flow-stage .react-flow__background pattern circle { fill: #292d3a; }
.flow-stage .react-flow__controls { background: #11141c; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 14px 38px rgba(0,0,0,.28); overflow: hidden; }
.flow-stage .react-flow__controls-button { width: 28px; height: 28px; background: #11141c; color: #a5abba; border-bottom-color: var(--border); }
.flow-stage .react-flow__controls-button:hover { background: #1a1e29; }
.flow-stage .react-flow__minimap { border: 1px solid var(--border); border-radius: 10px; background: rgba(13,15,22,.9); overflow: hidden; }
.flow-stage .react-flow__edge-path { stroke-width: 2; }
.flow-stage .react-flow__edge.selected .react-flow__edge-path { stroke: #a78fff; filter: drop-shadow(0 0 5px rgba(124,92,255,.7)); }
.flow-stage .react-flow__connection-path { stroke: #8e76ff; stroke-width: 2; }
.flow-empty-tip { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 5; min-height: 31px; border: 1px solid var(--border); border-radius: 10px; background: rgba(14,16,23,.88); backdrop-filter: blur(12px); display: flex; align-items: center; gap: 7px; padding: 0 10px; color: #81889a; font-size: 8px; pointer-events: none; }
.workflow-node { min-width: 202px; max-width: 224px; border-radius: 13px; background: #151822; border: 1px solid rgba(255,255,255,.095); box-shadow: 0 15px 42px rgba(0,0,0,.34); position: relative; overflow: visible; transition: border-color .14s, box-shadow .14s, transform .14s; }
.workflow-node:hover { border-color: rgba(255,255,255,.16); }
.workflow-node.selected { border-color: rgba(124,92,255,.72); box-shadow: 0 0 0 2px rgba(124,92,255,.13), 0 18px 52px rgba(0,0,0,.42); }
.workflow-node.running { border-color: rgba(40,200,255,.72); box-shadow: 0 0 0 2px rgba(40,200,255,.11), 0 0 25px rgba(40,200,255,.12), 0 18px 50px rgba(0,0,0,.42); }
.workflow-node.success { border-color: rgba(53,211,154,.65); }
.workflow-node.failed { border-color: rgba(255,101,120,.66); }
.node-accent { position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 4px 4px 0; background: var(--node-color,#7c5cff); box-shadow: 0 0 12px var(--node-color,#7c5cff); }
.node-header { min-height: 41px; padding: 9px 10px 8px 13px; display: flex; gap: 8px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.055); }
.node-type-icon { width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; color: var(--node-color,#9d88ff); background: var(--node-bg,rgba(124,92,255,.11)); }
.node-type-icon svg { width: 12px; }
.node-name { flex: 1; min-width: 0; }
.node-name strong { display: block; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-name span { display: block; color: #626a7e; font-size: 6.5px; margin-top: 2px; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; }
.node-menu { color: #5d6475; }
.node-menu svg { width: 12px; }
.node-body { padding: 9px 12px 10px; }
.node-summary { color: #949bad; font-size: 7.5px; line-height: 1.45; min-height: 22px; }
.node-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.node-chip { min-height: 17px; padding: 0 5px; border-radius: 5px; border: 1px solid rgba(255,255,255,.055); display: inline-flex; align-items: center; color: #737b8f; font-size: 6px; background: rgba(255,255,255,.018); }
.node-status { width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.04); color: #707789; }
.node-status svg { width: 9px; }
.workflow-node.running .node-status { color: var(--brand-2); }
.workflow-node.success .node-status { color: var(--green); background: rgba(53,211,154,.08); }
.workflow-node.failed .node-status { color: var(--red); background: rgba(255,101,120,.08); }
.workflow-handle { width: 10px !important; height: 10px !important; border: 2px solid #12151e !important; background: var(--handle-color,#7d66e8) !important; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 0 10px rgba(124,92,255,.35); }
.handle-label { position: absolute; right: -2px; transform: translateX(100%); color: #656d80; font-size: 6px; white-space: nowrap; }
.handle-label.yes { top: 48px; }
.handle-label.no { top: 85px; }
.builder-inspector { border-left: 1px solid var(--border); background: #0c0e14; min-height: 0; display: flex; flex-direction: column; }
.inspector-head { min-height: 51px; padding: 11px 13px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.inspector-head strong { font-size: 10px; }
.inspector-head span { color: var(--muted-2); font-size: 7px; display: block; margin-top: 3px; }
.inspector-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(124,92,255,.1); color: #9c88ff; }
.inspector-icon svg { width: 13px; }
.inspector-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; padding: 7px 10px; border-bottom: 1px solid var(--border); }
.inspector-tab { height: 26px; border: 0; background: transparent; border-radius: 7px; color: var(--muted-2); font-size: 7px; font-weight: 800; cursor: pointer; }
.inspector-tab.active { background: #191c26; color: white; }
.inspector-scroll { flex: 1; overflow-y: auto; padding: 12px; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: flex; align-items: center; justify-content: space-between; color: #747c90; font-size: 7px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--border); border-radius: 9px; background: #090b10; color: #dfe2e9; min-height: 33px; padding: 8px 9px; outline: 0; font-size: 8px; }
.field textarea { min-height: 72px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: rgba(124,92,255,.48); box-shadow: 0 0 0 3px rgba(124,92,255,.07); }
.switch-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.switch-copy { flex: 1; }
.switch-copy strong { display: block; font-size: 8px; }
.switch-copy span { display: block; color: var(--muted-2); font-size: 7px; margin-top: 3px; line-height: 1.4; }
.switch { width: 31px; height: 18px; border-radius: 999px; border: 0; background: #282c39; padding: 2px; cursor: pointer; transition: .15s; }
.switch::after { content: ""; display: block; width: 14px; height: 14px; border-radius: 50%; background: #777f92; transition: .15s; }
.switch.on { background: rgba(124,92,255,.45); }
.switch.on::after { transform: translateX(13px); background: white; box-shadow: 0 0 8px rgba(255,255,255,.3); }
.inspector-empty { padding: 28px 16px; text-align: center; }
.inspector-empty-icon { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; margin: 0 auto 12px; background: rgba(124,92,255,.08); color: #806be6; }
.inspector-empty-icon svg { width: 20px; }
.inspector-empty strong { font-size: 10px; }
.inspector-empty p { color: var(--muted-2); font-size: 8px; line-height: 1.6; }
.validation-list { display: flex; flex-direction: column; gap: 7px; }
.validation-item { border: 1px solid var(--border); border-radius: 9px; padding: 8px; display: flex; align-items: flex-start; gap: 7px; background: rgba(255,255,255,.018); }
.validation-item svg { width: 12px; margin-top: 1px; color: var(--amber); flex: 0 0 auto; }
.validation-item.error svg { color: var(--red); }
.validation-item.ok svg { color: var(--green); }
.validation-item strong { font-size: 7px; display: block; }
.validation-item span { display: block; color: var(--muted-2); margin-top: 3px; font-size: 6.5px; line-height: 1.4; }
.trace-console { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 8; min-height: 40px; max-height: 174px; border: 1px solid var(--border); border-radius: 12px; background: rgba(10,12,18,.92); backdrop-filter: blur(18px); box-shadow: 0 20px 55px rgba(0,0,0,.4); overflow: hidden; }
.trace-head { height: 36px; padding: 0 11px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); cursor: pointer; }
.trace-head strong { font-size: 8px; }
.trace-head span { color: var(--muted-2); font-size: 7px; }
.trace-head svg { width: 12px; color: #8f79fb; }
.trace-head .chevron { margin-left: auto; }
.trace-list { max-height: 130px; overflow-y: auto; padding: 5px 10px 8px; }
.trace-row { min-height: 25px; display: grid; grid-template-columns: 74px minmax(0,1fr) 60px 54px; align-items: center; gap: 8px; border-bottom: 1px solid rgba(255,255,255,.035); font-size: 7px; }
.trace-row:last-child { border-bottom: 0; }
.trace-time { color: #626a7e; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; }
.trace-node { color: #c7cad4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trace-duration { color: #727a8d; }

/* Integration marketplace */
.filter-bar { padding: 11px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search-box { min-width: 220px; flex: 1; height: 34px; border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: rgba(255,255,255,.018); color: var(--muted-2); }
.search-box svg { width: 13px; }
.search-box input { border: 0; outline: 0; background: transparent; color: white; width: 100%; font-size: 9px; }
.segmented { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: #090b10; overflow-x: auto; }
.segmented button { border: 0; background: transparent; color: var(--muted-2); height: 27px; padding: 0 9px; border-radius: 7px; font-size: 7px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.segmented button.active { background: #1a1d27; color: white; }
.integration-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.integration-card { border: 1px solid var(--border); border-radius: 15px; background: linear-gradient(145deg,rgba(20,22,31,.9),rgba(13,15,22,.9)); padding: 14px; min-height: 185px; display: flex; flex-direction: column; position: relative; overflow: hidden; transition: .18s ease; }
.integration-card:hover { border-color: rgba(255,255,255,.14); transform: translateY(-2px); box-shadow: 0 18px 55px rgba(0,0,0,.22); }
.integration-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -40px; top: -42px; border-radius: 50%; background: var(--app-glow,rgba(124,92,255,.1)); filter: blur(8px); }
.integration-top { display: flex; align-items: flex-start; gap: 10px; position: relative; z-index: 2; }
.integration-logo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--app-bg,rgba(124,92,255,.1)); color: var(--app-color,#9f8aff); border: 1px solid rgba(255,255,255,.055); }
.integration-logo svg { width: 18px; }
.integration-name { min-width: 0; flex: 1; }
.integration-name strong { display: block; font-size: 10px; }
.integration-name span { display: block; color: var(--muted-2); font-size: 7px; margin-top: 4px; }
.integration-card p { margin: 12px 0 0; color: #8e95a7; font-size: 8px; line-height: 1.55; min-height: 37px; }
.capability-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.integration-footer { margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 8px; }
.health-line { flex: 1; height: 4px; border-radius: 999px; background: rgba(255,255,255,.05); overflow: hidden; }
.health-line span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.integration-action { border: 1px solid var(--border); border-radius: 8px; min-height: 28px; padding: 0 9px; color: #b8bdc9; background: rgba(255,255,255,.025); cursor: pointer; font-size: 7px; font-weight: 800; }
.integration-action.connected { color: #74dfb7; border-color: rgba(53,211,154,.18); background: rgba(53,211,154,.07); }

/* Connector studio */
.studio-layout { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 14px; }
.doc-drop { border: 1px dashed rgba(124,92,255,.3); border-radius: 13px; min-height: 96px; display: grid; place-items: center; text-align: center; background: rgba(124,92,255,.035); cursor: pointer; padding: 16px; }
.doc-drop:hover { background: rgba(124,92,255,.065); border-color: rgba(124,92,255,.55); }
.doc-drop svg { width: 21px; color: #8d77ff; }
.doc-drop strong { display: block; font-size: 9px; margin-top: 7px; }
.doc-drop span { display: block; color: var(--muted-2); font-size: 7px; margin-top: 4px; }
.code-editor { width: 100%; min-height: 340px; resize: vertical; border: 1px solid var(--border); border-radius: 12px; background: #080a0f; color: #c6cad4; padding: 13px; font: 8px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace; outline: 0; }
.code-editor:focus { border-color: rgba(124,92,255,.42); }
.analysis-hero { padding: 16px; display: flex; gap: 13px; align-items: center; border-bottom: 1px solid var(--border); }
.confidence-orb { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--green) calc(var(--confidence) * 1%), rgba(255,255,255,.06) 0); position: relative; }
.confidence-orb::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #11131b; }
.confidence-orb strong { position: relative; z-index: 2; font-size: 10px; }
.analysis-title strong { font-size: 12px; display: block; }
.analysis-title span { color: var(--muted-2); font-size: 8px; display: block; margin-top: 4px; }
.analysis-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.analysis-box { border: 1px solid var(--border); border-radius: 11px; padding: 10px; background: rgba(255,255,255,.018); }
.analysis-box label { color: var(--muted-2); font-size: 6px; letter-spacing: .1em; font-weight: 900; display: block; }
.analysis-box strong { font-size: 8px; display: block; margin-top: 5px; word-break: break-word; }
.endpoint-table { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.endpoint-row { display: grid; grid-template-columns: 48px minmax(0,1fr) 58px; align-items: center; min-height: 32px; padding: 0 9px; gap: 7px; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 7px; }
.endpoint-row:last-child { border-bottom: 0; }
.method { font-weight: 900; color: #7ed9b4; }
.method.POST { color: #96a9ff; }
.method.PUT, .method.PATCH { color: #ffc675; }
.method.DELETE { color: #ff8b9a; }
.endpoint-path { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; color: #aeb4c1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* LeadOps */
.source-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.source-card { min-height: 92px; padding: 12px; display: flex; align-items: center; gap: 10px; }
.source-icon { width: 35px; height: 35px; border-radius: 11px; display: grid; place-items: center; background: var(--source-bg,rgba(124,92,255,.1)); color: var(--source-color,#9e8aff); }
.source-icon svg { width: 16px; }
.source-copy strong { display: block; font-size: 15px; }
.source-copy span { display: block; color: var(--muted-2); font-size: 7px; margin-top: 4px; }
.identity-graph { min-height: 245px; position: relative; overflow: hidden; }
.identity-line { position: absolute; height: 1px; transform-origin: 0 0; background: linear-gradient(90deg,rgba(124,92,255,.15),rgba(124,92,255,.65),rgba(40,200,255,.15)); }
.identity-node { position: absolute; border-radius: 12px; min-width: 90px; padding: 9px; border: 1px solid var(--border); background: #131620; box-shadow: 0 12px 30px rgba(0,0,0,.28); }
.identity-node.master { left: 50%; top: 50%; transform: translate(-50%,-50%); min-width: 126px; text-align: center; border-color: rgba(124,92,255,.4); box-shadow: 0 0 0 4px rgba(124,92,255,.05),0 18px 40px rgba(0,0,0,.3); }
.identity-node strong { display: block; font-size: 8px; }
.identity-node span { color: var(--muted-2); font-size: 6.5px; display: block; margin-top: 3px; }
.identity-node.n1 { left: 7%; top: 18%; }
.identity-node.n2 { right: 7%; top: 15%; }
.identity-node.n3 { left: 10%; bottom: 16%; }
.identity-node.n4 { right: 8%; bottom: 18%; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { height: 34px; padding: 0 9px; border-bottom: 1px solid var(--border); text-align: left; color: #5f677a; font-size: 6.5px; letter-spacing: .09em; text-transform: uppercase; }
.data-table td { height: 45px; padding: 0 9px; border-bottom: 1px solid rgba(255,255,255,.038); font-size: 8px; color: #aeb3bf; }
.data-table tr:last-child td { border-bottom: 0; }
.lead-person { display: flex; align-items: center; gap: 8px; }
.lead-avatar { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: #202432; color: #aab2c5; font-size: 7px; font-weight: 800; }
.lead-person strong { display: block; font-size: 8px; color: #d8dbe2; }
.lead-person span { display: block; color: var(--muted-2); font-size: 6.5px; margin-top: 2px; }
.sla-bar { width: 72px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.05); overflow: hidden; }
.sla-bar span { display: block; height: 100%; background: var(--green); }

/* Runs */
.run-layout { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 14px; }
.run-list { max-height: 665px; overflow-y: auto; }
.run-item { padding: 12px; border-bottom: 1px solid var(--border); cursor: pointer; transition: .14s; }
.run-item:hover { background: rgba(255,255,255,.025); }
.run-item.active { background: linear-gradient(90deg,rgba(124,92,255,.11),rgba(124,92,255,.025)); box-shadow: inset 2px 0 #7c5cff; }
.run-item-top { display: flex; align-items: center; gap: 8px; }
.run-item-top strong { font-size: 8px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run-item-meta { margin-top: 6px; display: flex; gap: 8px; color: var(--muted-2); font-size: 6.5px; }
.trace-waterfall { padding: 6px 0; }
.waterfall-row { display: grid; grid-template-columns: 125px 58px minmax(0,1fr) 50px; align-items: center; gap: 8px; min-height: 39px; border-bottom: 1px solid rgba(255,255,255,.035); }
.waterfall-row:last-child { border-bottom: 0; }
.waterfall-name { display: flex; align-items: center; gap: 7px; font-size: 8px; }
.waterfall-name i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.waterfall-time { color: var(--muted-2); font: 6.5px ui-monospace,SFMono-Regular,Menlo,monospace; }
.waterfall-track { height: 9px; border-radius: 4px; background: rgba(255,255,255,.035); position: relative; }
.waterfall-bar { position: absolute; height: 100%; border-radius: 4px; background: linear-gradient(90deg,#7159e9,#37bfe9); left: var(--start); width: var(--width); }
.waterfall-duration { color: #7e8597; font-size: 6.5px; text-align: right; }
.log-viewer { background: #080a0e; border: 1px solid var(--border); border-radius: 11px; padding: 11px; font: 7px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace; color: #8f97a9; max-height: 190px; overflow: auto; }
.log-line .time { color: #596174; }
.log-line .level-info { color: #5fc9ef; }
.log-line .level-warn { color: #ffc16b; }
.log-line .level-error { color: #ff7c8c; }
.log-line .level-ok { color: #5bd8a7; }

/* Governance */
.policy-card { padding: 14px; }
.policy-icon { width: 33px; height: 33px; border-radius: 11px; display: grid; place-items: center; background: var(--policy-bg,rgba(124,92,255,.1)); color: var(--policy-color,#9e89ff); }
.policy-icon svg { width: 15px; }
.policy-card h4 { margin: 12px 0 5px; font-size: 10px; }
.policy-card p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.55; min-height: 38px; }
.policy-value { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; }
.policy-value strong { font-size: 12px; }
.matrix-table { width: 100%; border-collapse: collapse; }
.matrix-table th, .matrix-table td { height: 38px; padding: 0 9px; border-bottom: 1px solid rgba(255,255,255,.04); text-align: center; font-size: 7px; }
.matrix-table th:first-child, .matrix-table td:first-child { text-align: left; }
.matrix-table th { color: #626a7c; letter-spacing: .08em; text-transform: uppercase; }
.matrix-check { width: 18px; height: 18px; margin: auto; border-radius: 6px; display: grid; place-items: center; background: rgba(53,211,154,.08); color: var(--green); }
.matrix-check.blocked { background: rgba(255,101,120,.07); color: var(--red); }
.matrix-check svg { width: 10px; }
.audit-row { display: grid; grid-template-columns: 82px 110px minmax(0,1fr) 70px; align-items: center; min-height: 40px; gap: 8px; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 7px; }
.audit-row:last-child { border-bottom: 0; }
.audit-time { color: #5d6577; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; }
.audit-user { color: #b8bdc9; }
.audit-action { color: #8c93a4; }

/* Documentation */
.docs-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 14px; }
.docs-nav { position: sticky; top: 86px; max-height: calc(100vh - 110px); overflow-y: auto; }
.docs-nav button { width: 100%; min-height: 34px; border: 0; border-radius: 8px; background: transparent; color: #777f91; text-align: left; padding: 0 9px; font-size: 8px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.docs-nav button:hover { background: rgba(255,255,255,.03); color: #c5c9d2; }
.docs-nav button.active { background: rgba(124,92,255,.1); color: #b5a7ff; }
.docs-nav button svg { width: 12px; }
.doc-article { padding: clamp(19px,3vw,34px); min-height: 690px; }
.doc-article h2 { font-size: 23px; letter-spacing: -.035em; margin: 0; }
.doc-article h3 { font-size: 13px; margin: 27px 0 9px; }
.doc-article h4 { font-size: 10px; margin: 20px 0 7px; }
.doc-article p, .doc-article li { color: #9ba2b3; font-size: 9px; line-height: 1.75; }
.doc-article ul, .doc-article ol { padding-left: 18px; }
.doc-article code { font: 8px ui-monospace,SFMono-Regular,Menlo,monospace; color: #baadff; background: rgba(124,92,255,.08); border: 1px solid rgba(124,92,255,.12); padding: 2px 5px; border-radius: 5px; }
.doc-callout { border-left: 2px solid var(--brand); background: rgba(124,92,255,.055); border-radius: 0 10px 10px 0; padding: 11px 13px; color: #aeb3c0; font-size: 8px; line-height: 1.6; margin: 13px 0; }
.architecture-diagram { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; align-items: center; margin: 18px 0; }
.arch-box { min-height: 76px; border: 1px solid var(--border); border-radius: 11px; display: grid; place-items: center; text-align: center; padding: 8px; background: rgba(255,255,255,.02); position: relative; }
.arch-box:not(:last-child)::after { content: "→"; position: absolute; right: -13px; color: #4f5668; z-index: 3; }
.arch-box strong { font-size: 8px; }
.arch-box span { color: var(--muted-2); font-size: 6.5px; margin-top: 4px; display: block; }

/* Guide bot */
.guide-launcher { position: fixed; right: 19px; bottom: 18px; z-index: 70; width: 46px; height: 46px; border: 0; border-radius: 15px; background: linear-gradient(135deg,#7c5cff,#2abbe7); color: white; box-shadow: 0 16px 42px rgba(124,92,255,.35); display: grid; place-items: center; cursor: pointer; }
.guide-launcher::before { content: ""; position: absolute; inset: -5px; border: 1px solid rgba(124,92,255,.25); border-radius: 19px; animation: pulse-ring 2.4s ease infinite; }
@keyframes pulse-ring { 50% { transform: scale(1.08); opacity: .35; } }
.guide-launcher svg { width: 19px; }
.guide-panel { position: fixed; right: 19px; bottom: 74px; z-index: 70; width: min(365px,calc(100vw - 28px)); height: min(560px,calc(100vh - 100px)); border: 1px solid rgba(124,92,255,.24); border-radius: 18px; background: rgba(13,15,22,.96); backdrop-filter: blur(24px); box-shadow: 0 30px 90px rgba(0,0,0,.55); overflow: hidden; display: flex; flex-direction: column; animation: guide-in .18s ease; }
@keyframes guide-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.guide-head { height: 60px; padding: 0 13px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--border); background: linear-gradient(90deg,rgba(124,92,255,.1),rgba(40,200,255,.03)); }
.guide-head .agent-orb { width: 32px; height: 32px; }
.guide-title { flex: 1; }
.guide-title strong { display: block; font-size: 10px; }
.guide-title span { display: block; color: var(--muted-2); font-size: 7px; margin-top: 3px; }
.guide-messages { flex: 1; overflow-y: auto; padding: 13px; display: flex; flex-direction: column; gap: 9px; }
.guide-message { max-width: 88%; border-radius: 12px; padding: 9px 10px; background: #171a24; border: 1px solid var(--border); color: #aeb4c1; font-size: 8px; line-height: 1.55; }
.guide-message.user { margin-left: auto; background: rgba(124,92,255,.15); border-color: rgba(124,92,255,.24); color: #d8d1ff; }
.guide-quick { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 13px 9px; }
.guide-quick button { min-height: 25px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; background: rgba(255,255,255,.022); color: #858da0; font-size: 6.5px; cursor: pointer; }
.guide-quick button:hover { color: white; border-color: rgba(124,92,255,.26); }
.guide-input { min-height: 54px; padding: 8px; border-top: 1px solid var(--border); display: flex; gap: 7px; }
.guide-input input { flex: 1; border: 1px solid var(--border); border-radius: 10px; background: #090b10; color: white; padding: 0 10px; outline: 0; font-size: 8px; }
.guide-input button { width: 37px; border: 0; border-radius: 10px; background: var(--brand); color: white; cursor: pointer; display: grid; place-items: center; }
.guide-input button svg { width: 14px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(3,4,7,.76); backdrop-filter: blur(14px); }
.modal { width: min(620px,100%); max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid var(--border-strong); border-radius: 19px; background: #11131b; box-shadow: 0 35px 100px rgba(0,0,0,.58); }
.modal-head { min-height: 62px; padding: 13px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.modal-head h3 { margin: 0; font-size: 12px; }
.modal-head p { margin: 4px 0 0; color: var(--muted-2); font-size: 7px; }
.modal-body { padding: 16px; }
.modal-footer { min-height: 58px; padding: 10px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.toast-stack { position: fixed; right: 18px; top: 78px; z-index: 120; width: min(340px,calc(100vw - 36px)); display: flex; flex-direction: column; gap: 8px; }
.toast { border: 1px solid var(--border-strong); border-radius: 12px; background: rgba(18,20,29,.96); backdrop-filter: blur(18px); box-shadow: 0 16px 45px rgba(0,0,0,.4); padding: 11px; display: flex; gap: 9px; animation: toast-in .2s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateX(10px); } }
.toast svg { width: 14px; color: var(--green); flex: 0 0 auto; }
.toast.error svg { color: var(--red); }
.toast strong { display: block; font-size: 8px; }
.toast span { display: block; color: var(--muted-2); font-size: 7px; margin-top: 3px; line-height: 1.45; }

@media (max-width: 1250px) {
  .grid-5 { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .integration-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero-visual { opacity: .65; right: 8px; }
  .builder-layout { grid-template-columns: 204px minmax(0,1fr) 272px; }
}
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 74px minmax(0,1fr); }
  .sidebar { padding-left: 9px; padding-right: 9px; }
  .brand-copy, .workspace-copy, .workspace-switch svg, .nav-label, .nav-item span, .nav-badge, .agent-copy, .agent-dot { display: none; }
  .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .workspace-switch { justify-content: center; }
  .nav-item { justify-content: center; padding: 0; }
  .sidebar-agent { display: grid; place-items: center; padding: 8px; }
  .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .source-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .studio-layout, .docs-layout, .run-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; max-height: none; display: flex; gap: 4px; overflow-x: auto; }
  .docs-nav button { width: auto; white-space: nowrap; }
  .builder-layout { grid-template-columns: 190px minmax(0,1fr); }
  .builder-inspector { position: absolute; right: 0; top: 57px; bottom: 0; width: 286px; z-index: 10; box-shadow: -18px 0 45px rgba(0,0,0,.35); }
}
@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 244px; transform: translateX(-104%); transition: .2s; box-shadow: 22px 0 70px rgba(0,0,0,.55); }
  .sidebar.open { transform: translateX(0); }
  .brand-copy, .workspace-copy, .nav-label, .nav-item span, .nav-badge, .agent-copy, .agent-dot { display: block; }
  .workspace-switch svg { display: initial; }
  .brand { justify-content: flex-start; }
  .nav-item { justify-content: flex-start; padding: 0 10px; }
  .sidebar-agent { display: block; padding: 11px; }
  .mobile-menu { display: grid; }
  .breadcrumb { min-width: 0; }
  .command-search { display: none; }
  .environment-pill { margin-left: auto; }
  .content { padding: 14px; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-actions { justify-content: flex-start; }
  .hero-card { padding: 21px; min-height: 270px; }
  .hero-visual { opacity: .28; right: -55px; top: 65px; }
  .integration-grid, .source-strip { grid-template-columns: 1fr; }
  .builder-page { margin: -14px; height: calc(100vh - 64px); }
  .builder-toolbar { padding: 0 8px; }
  .builder-title-block { min-width: 150px; }
  .builder-score { display: none; }
  .builder-layout { grid-template-columns: 1fr; }
  .node-palette { position: absolute; left: 0; top: 57px; bottom: 0; width: 210px; z-index: 11; box-shadow: 18px 0 45px rgba(0,0,0,.45); }
  .builder-inspector { width: min(286px,90vw); }
  .trace-console { left: 7px; right: 7px; bottom: 7px; }
  .architecture-diagram { grid-template-columns: 1fr; }
  .arch-box:not(:last-child)::after { content: "↓"; right: auto; left: 50%; bottom: -14px; top: auto; }
  .analysis-grid { grid-template-columns: 1fr; }
  .data-table { min-width: 720px; }
  .table-wrap { overflow-x: auto; }
}
.spin { animation: spin .9s linear infinite; }
.workflow-node.skipped { opacity: .48; filter: saturate(.35); border-style: dashed; }
.workflow-node.skipped .node-status { color: #858b9a; }
.trace-node small { display: block; margin-top: 2px; color: var(--brand-2); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
