:root{
  --bg: #0b0f14;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.04);
  --border: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.65);
  --muted2: rgba(255,255,255,.50);
  --accent: #e7ff6a; /* tweak to match brand accent if you have one */
  --accent2: rgba(231,255,106,.15);
  --shadow: 0 10px 40px rgba(0,0,0,.35);
  --radius: 18px;
  --radius2: 14px;
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  background: radial-gradient(1200px 800px at 15% 10%, rgba(231,255,106,.10), transparent 55%),
              radial-gradient(900px 700px at 85% 20%, rgba(255,255,255,.06), transparent 60%),
              var(--bg);
  color:var(--text);
}

.shell{max-width:1180px; margin:0 auto; padding:22px}

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow:var(--shadow);
}

.brand{display:flex; gap:12px; align-items:center}
.brand-mark{
  width:38px; height:38px;
  border-radius:12px;
  background:linear-gradient(180deg, var(--accent), rgba(231,255,106,.55));
  color:#0b0f14;
  display:flex; align-items:center; justify-content:center;
  font-weight:800;
}
.brand-title{font-weight:800; letter-spacing:.2px}
.brand-subtitle{color:var(--muted); font-size:13px; margin-top:2px}

.topbar-actions{display:flex; gap:10px; align-items:center}
.user{
  display:flex; gap:8px; align-items:center;
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--card2);
}
.dot{width:8px; height:8px; border-radius:999px; background:var(--accent)}

.layout{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:16px;
  margin-top:16px;
}

.panel{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--card2);
  padding:16px;
}

.panel h2{margin:0 0 10px 0; font-size:16px}
.muted{color:var(--muted); line-height:1.45}

.field{margin-top:14px}
label{display:block; font-size:12px; color:var(--muted); margin-bottom:6px}
input{
  width:100%;
  background:rgba(0,0,0,.25);
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  color:var(--text);
  outline:none;
}
input:focus{border-color:rgba(231,255,106,.55); box-shadow:0 0 0 4px rgba(231,255,106,.08)}

.hint{margin-top:8px; font-size:12px; color:var(--muted2)}
.divider{height:1px; background:var(--border); margin:16px 0}
.small{font-size:13px; line-height:1.35}

.status{
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:rgba(0,0,0,.22);
  font-size:13px;
}

.chat{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--card2);
  display:flex;
  flex-direction:column;
  min-height: 70vh;
  overflow:hidden;
}

.chat-log{
  padding:16px;
  overflow:auto;
  flex:1;
}

.system{
  border:1px dashed rgba(231,255,106,.35);
  background:rgba(231,255,106,.07);
  border-radius:14px;
  padding:12px 12px;
}
.system-title{font-weight:700; margin-bottom:6px}
.system-body{color:var(--muted); line-height:1.5}

.msg{
  display:flex;
  margin-top:12px;
}
.msg.user{justify-content:flex-end}
.bubble{
  max-width: 780px;
  border:1px solid var(--border);
  border-radius:18px;
  padding:12px 14px;
  background:rgba(0,0,0,.22);
  line-height:1.55;
}
.msg.user .bubble{
  background:rgba(231,255,106,.10);
  border-color:rgba(231,255,106,.30);
}
.meta{
  font-size:11px;
  color:var(--muted2);
  margin-top:6px;
}

.composer{
  display:flex;
  gap:10px;
  padding:12px;
  border-top:1px solid var(--border);
  background:rgba(0,0,0,.20);
}
.composer input{flex:1}

.btn{
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:600;
}
.btn:disabled{opacity:.55; cursor:not-allowed}
.btn-primary{
  border-color:rgba(231,255,106,.45);
  background:rgba(231,255,106,.16);
}
.btn-secondary{
  background:rgba(255,255,255,.04);
}

.markdown h1,.markdown h2,.markdown h3{margin:14px 0 8px}
.markdown p{margin:10px 0}
.markdown ul{margin:10px 0 10px 18px}
.markdown code{background:rgba(255,255,255,.08); padding:2px 6px; border-radius:8px}
.markdown pre{background:rgba(0,0,0,.35); padding:12px; border-radius:14px; overflow:auto}
.markdown table{width:100%; border-collapse:collapse; margin:12px 0}
.markdown th,.markdown td{border:1px solid var(--border); padding:8px; text-align:left}
.markdown blockquote{border-left:3px solid rgba(231,255,106,.45); margin:10px 0; padding:6px 10px; color:var(--muted)}