:root {
  --bg: #070914; --panel: rgba(17, 23, 42, .78); --panel2: rgba(12, 18, 34, .9); --text: #eef4ff; --muted: #9fb0d0; --line: rgba(148, 163, 184, .18); --brand: #7c3aed; --brand2: #06b6d4; --ok: #34d399; --warn: #fbbf24; --danger: #fb7185; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif; background: radial-gradient(circle at 15% 0%, rgba(124,58,237,.28), transparent 33%), radial-gradient(circle at 80% 10%, rgba(6,182,212,.20), transparent 31%), var(--bg); color: var(--text); min-height: 100vh; }
.hidden { display: none !important; }
.login-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(3, 6, 18, .82); backdrop-filter: blur(18px); padding: 20px; }
.login-card { width: min(440px, 100%); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(17,23,42,.96), rgba(9,14,28,.94)); border-radius: 28px; padding: 26px; box-shadow: 0 30px 100px rgba(0,0,0,.45); }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 36px clamp(18px,4vw,56px) 18px; }
.eyebrow { color: var(--brand2); text-transform: uppercase; letter-spacing: .18em; font-size: 12px; margin: 0 0 8px; }
h1 { font-size: clamp(34px,6vw,74px); line-height: .93; margin: 0; letter-spacing: -.06em; }
.sub { color: var(--muted); max-width: 760px; font-size: 17px; }
.status { border: 1px solid var(--line); background: rgba(6,182,212,.08); padding: 10px 14px; border-radius: 999px; color: #bff7ff; white-space: nowrap; }
.nav { margin: 0 clamp(18px,4vw,56px); display: flex; gap: 10px; flex-wrap: wrap; }
.nav a { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #dbeafe; padding: 9px 13px; border-radius: 999px; text-decoration: none; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 18px clamp(18px,4vw,56px) 22px; }
.wide { padding: 0 clamp(18px,4vw,56px) 22px; }
.card { border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel), rgba(9,14,28,.72)); border-radius: 24px; padding: 20px; box-shadow: 0 22px 80px rgba(0,0,0,.25); backdrop-filter: blur(16px); min-height: 320px; }
.sessions-card, .detail-card { min-height: 520px; }
.planner-card, .pipeline-card { min-height: 420px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.03em; } h3 { margin: 18px 0 10px; color: #dbeafe; } p { margin: 0; color: var(--muted); }
code { color: #a5f3fc; background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 7px; }
button { border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--brand2)); color: white; font-weight: 800; padding: 10px 14px; cursor: pointer; box-shadow: 0 12px 30px rgba(6,182,212,.14); min-height: 42px; }
button.secondary { background: rgba(255,255,255,.08); border: 1px solid var(--line); }
button:hover { filter: brightness(1.08); }
.search, .textarea { width: 100%; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text); border-radius: 14px; padding: 12px 14px; margin: 6px 0 14px; outline: none; font: inherit; }
.textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.memory-editor { min-height: 420px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dropzone { border: 1px dashed rgba(165,243,252,.45); background: rgba(6,182,212,.06); border-radius: 20px; padding: 18px; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; position: relative; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; } .dropzone button { position: relative; z-index: 2; } .dropzone strong, .dropzone span { display:block; } .dropzone span { color: var(--muted); margin-top:4px; }
.list { display:flex; flex-direction:column; gap:10px; max-height:430px; overflow:auto; padding-right:4px; } .list.compact { max-height:180px; }
.item { border:1px solid var(--line); background:rgba(255,255,255,.045); border-radius:16px; padding:13px; cursor:pointer; transition:transform .12s,border-color .12s,background .12s; }
.item:hover { transform: translateY(-1px); border-color: rgba(6,182,212,.45); background: rgba(6,182,212,.07); }
.item-title { display:flex; align-items:center; justify-content:space-between; gap:8px; font-weight:800; }
.meta { color: var(--muted); font-size: 13px; margin-top: 6px; display:flex; gap:10px; flex-wrap:wrap; }
.preview { color:#cbd5e1; margin-top:8px; line-height:1.45; font-size:14px; }
.badge { font-size:12px; border:1px solid var(--line); color:#c4b5fd; padding:3px 8px; border-radius:999px; font-weight:800; }
.details { border:1px solid var(--line); background:var(--panel2); border-radius:18px; padding:16px; min-height:390px; max-height:620px; overflow:auto; }
.details.empty { color:var(--muted); display:grid; place-items:center; } .details.mini { min-height: 92px; max-height: 340px; white-space: pre-wrap; }
.message { border-left:3px solid var(--brand2); background:rgba(255,255,255,.04); padding:12px; border-radius:10px; margin:10px 0; white-space:pre-wrap; line-height:1.5; } .message.assistant { border-left-color: var(--brand); }
.role { font-size:12px; text-transform:uppercase; letter-spacing:.12em; color:var(--muted); margin-bottom:6px; }
.file-row { display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:10px; border-bottom:1px solid var(--line); padding:10px 0; }
a { color:#67e8f9; text-decoration:none; } a:hover { text-decoration:underline; }
.note { color:var(--muted); margin:10px 0 0; min-height:20px; } .error { color:var(--danger); } .ok { color:var(--ok); } .warn { color:var(--warn); }
.pipeline-layout { display:grid; grid-template-columns: 260px 1fr 300px; gap:14px; min-height:520px; }
.palette, .inspector { border:1px solid var(--line); border-radius:18px; padding:14px; background:rgba(255,255,255,.035); }
.canvas { position:relative; min-height:520px; border:1px solid rgba(6,182,212,.28); border-radius:20px; overflow:hidden; background: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 32px 32px; }
#edges { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.node { position:absolute; width:190px; min-height:104px; border:1px solid rgba(165,243,252,.35); border-radius:18px; padding:12px; background:linear-gradient(180deg, rgba(30,41,59,.96), rgba(15,23,42,.94)); box-shadow: 0 18px 40px rgba(0,0,0,.25); cursor:grab; user-select:none; }
.node.selected { outline:2px solid var(--brand2); } .node.connecting { outline:2px solid var(--warn); }
.node .node-title { font-weight:900; margin-bottom:6px; } .node .node-meta { color:var(--muted); font-size:12px; line-height:1.35; }
.inspector label { display:block; color:var(--muted); font-size:13px; }
@media (max-width:1100px){ .grid,.pipeline-layout,.form-grid { grid-template-columns:1fr; } .hero { align-items:flex-start; flex-direction:column; } }
