:root {
  color-scheme: dark;
  --bg: #090b0c;
  --panel: #121619;
  --panel-2: #1b2226;
  --line: #2a3439;
  --text: #edf2f7;
  --muted: #a0aab6;
  --accent: #54d6b6;
  --accent-2: #7cc7ff;
  --warn: #f2b84b;
  --danger: #ee6b6e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(84, 214, 182, .12), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(124, 199, 255, .10), transparent 28%),
    var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar { border-right: 1px solid var(--line); padding: 22px 16px; background: rgba(9, 11, 12, .84); backdrop-filter: blur(18px); position: sticky; top: 0; height: 100vh; }
.brand { font-weight: 750; font-size: 18px; margin-bottom: 24px; }
.nav a, .nav button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--muted); background: transparent; border: 0; font: inherit; cursor: pointer; }
.nav a:hover, .nav button:hover { background: var(--panel); color: var(--text); }
.main { padding: 28px; max-width: 1280px; width: 100%; }
.topline { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 24px; }
h1 { font-size: 28px; margin: 0; letter-spacing: 0; }
h2 { font-size: 18px; margin: 0 0 14px; }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel, .card { background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02)); border: 1px solid var(--line); border-radius: 8px; padding: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.card strong { display: block; font-size: 24px; margin-top: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-weight: 650; cursor: pointer; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #06100e; border-color: transparent; }
.btn.danger { background: #3a1719; color: #ffd7d8; border-color: #703539; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.safe { color: var(--accent); }
.warn { color: var(--warn); }
.danger-text { color: var(--danger); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 650; font-size: 13px; }
input, textarea, select { width: 100%; border: 1px solid var(--line); background: #0d0f11; color: var(--text); border-radius: 8px; padding: 10px 12px; font: inherit; }
textarea { min-height: 150px; resize: vertical; }
label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: 13px; }
pre { white-space: pre-wrap; overflow: auto; background: #0b0d0f; border: 1px solid var(--line); border-radius: 8px; padding: 12px; color: #d8dee9; }
.chat { display: grid; gap: 10px; }
.msg { padding: 12px; border-radius: 8px; border: 1px solid var(--line); background: #111417; }
.msg.user { border-color: #37564f; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .panel { width: min(420px, 100%); }
.eyebrow { margin: 0 0 6px; color: var(--accent); text-transform: uppercase; font-size: 12px; letter-spacing: .08em; font-weight: 750; }
.hero-console {
  min-height: 180px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(84,214,182,.18), rgba(124,199,255,.08)),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
  margin-bottom: 16px;
}
.hero-console h1 { font-size: 42px; line-height: 1; }
.status-stack { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.console-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.console-feed { display: grid; gap: 16px; }
.glass { background: rgba(18,22,25,.78); backdrop-filter: blur(18px); }
.composer textarea { min-height: 132px; border-color: rgba(84,214,182,.35); background: rgba(5,7,8,.75); }
.mode-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.mode-row label { margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: rgba(255,255,255,.03); }
.quick-prompts { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.chip { border: 1px solid var(--line); background: #0d1113; color: var(--muted); border-radius: 999px; padding: 7px 10px; cursor: pointer; }
.chip:hover { color: var(--text); border-color: var(--accent); }
.artifact { border: 1px solid var(--line); background: rgba(15,19,22,.88); border-radius: 8px; padding: 18px; }
.artifact-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.lead { font-size: 17px; line-height: 1.65; color: #dbe8ee; }
.artifact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.insight-card { background: #0b0f11; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.insight-card h3, .chart-panel h3 { margin: 0 0 10px; font-size: 15px; }
.risk-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--warn); }
.risk-dot.high { background: var(--danger); }
.risk-dot.medium { background: var(--warn); }
.chart-panel { background: #0b0f11; border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-top: 12px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 70px; gap: 10px; align-items: center; margin: 10px 0; }
.bar-row div { height: 9px; background: #1b2428; border-radius: 999px; overflow: hidden; }
.bar-row i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
.empty-visual { min-height: 260px; display: grid; place-items: center; text-align: center; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); }
.side-rail { display: grid; gap: 16px; position: sticky; top: 20px; }
.metric span { color: var(--muted); }
.money { font-size: 30px; color: var(--accent); }
.chat-hero { min-height: 150px; }
.chat-workbench { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.conversation {
  min-height: 70vh;
  display: grid;
  align-content: start;
  gap: 14px;
  padding-bottom: 220px;
}
.welcome-card {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(84,214,182,.35);
  border-radius: 8px;
  padding: 24px;
  background: rgba(18,22,25,.55);
}
.welcome-card h2 { font-size: 30px; margin: 0; }
.bubble { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; }
.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #0b0f11;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.bubble.user .avatar { color: #06100e; background: var(--accent); border-color: var(--accent); }
.bubble-body {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(18,22,25,.82);
}
.bubble.user .bubble-body { background: rgba(84,214,182,.10); border-color: rgba(84,214,182,.34); }
.bubble.plan .bubble-body { border-color: rgba(124,199,255,.35); }
.bubble.artifact .bubble-body { background: rgba(11,15,17,.9); }
.bubble-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.bubble-meta strong { color: var(--text); font-size: 13px; }
.execution-strip { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #0b0f11; color: var(--muted); }
.execution-strip i { width: 24px; height: 1px; background: var(--line); }
.artifact-inline { margin-top: 12px; }
.chat-composer {
  position: sticky;
  bottom: 18px;
  z-index: 5;
  border: 1px solid rgba(84,214,182,.32);
  background: rgba(9,11,12,.86);
  backdrop-filter: blur(18px);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 20px 70px rgba(0,0,0,.45);
}
.composer-line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: end; }
.composer-line textarea { min-height: 68px; max-height: 180px; resize: vertical; }
.mode-row.compact label { padding: 6px 9px; font-size: 13px; }
.context-panel { display: grid; gap: 16px; position: sticky; top: 20px; }
details { margin-top: 12px; }
summary { cursor: pointer; color: var(--accent); font-weight: 700; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .grid, .two, .console-layout, .artifact-grid, .chat-workbench, .composer-line { grid-template-columns: 1fr; }
  .hero-console { align-items: flex-start; flex-direction: column; }
  .hero-console h1 { font-size: 32px; }
  .main { padding: 18px; }
  .context-panel { position: static; }
}
