/* SaaS chatbot UI (dark, clean, modern) */
:root{
  --bg0:#070a10;
  --bg1:#0b1020;
  --panel:#0f1630;
  --panel2:#0c1228;
  --line:rgba(255,255,255,0.08);
  --text:#eaf1ff;
  --muted:#9bb0d1;
  --muted2:#7f92b6;
  --brand:#6ea8ff;
  --brand2:#9a7bff;
  --good:#7dffb2;
  --warn:#ffd27d;
  --bad:#ff7d7d;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 15% 0%, rgba(110,168,255,0.18), transparent 60%),
    radial-gradient(900px 600px at 90% 10%, rgba(154,123,255,0.14), transparent 60%),
    radial-gradient(1200px 900px at 50% 120%, rgba(125,255,178,0.06), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

.shell{height:100%;display:grid;grid-template-columns:340px 1fr}
.sidebar{
  border-right:1px solid var(--line);
  background: rgba(9,12,22,0.55);
  backdrop-filter: blur(14px);
  padding:18px;
  display:flex;flex-direction:column;gap:16px;
}
.sb-brand{display:flex;gap:12px;align-items:center}
.sb-logo{
  width:44px;height:44px;border-radius:14px;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  display:flex;align-items:center;justify-content:center;
  font-weight:900;color:#06101e;
}
.sb-title{font-weight:900;font-size:14px;line-height:1.2}
.sb-sub{color:var(--muted);font-size:12px;margin-top:2px}
.sb-section{display:flex;flex-direction:column;gap:10px}
.sb-label{color:var(--muted2);font-size:11px;text-transform:uppercase;letter-spacing:.12em}
.sb-actions{display:flex;flex-direction:column;gap:10px}
.sb-card{
  border:1px solid var(--line);
  background: rgba(15,22,48,0.55);
  border-radius:16px;
  padding:12px;
}
.sb-muted{color:var(--muted);font-size:12px}
.sb-tiny{color:var(--muted2);font-size:11px;margin-top:10px}
.sb-foot{margin-top:auto}

.row{display:flex;gap:10px;align-items:center}
.dot{width:10px;height:10px;border-radius:999px;background:rgba(255,255,255,0.2)}
.dot.online{background:rgba(125,255,178,0.8);box-shadow: 0 0 0 6px rgba(125,255,178,0.12)}

.content{display:flex;flex-direction:column;height:100%}
.topbar{
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  background: rgba(9,12,22,0.35);
  backdrop-filter: blur(14px);
  display:flex;align-items:center;justify-content:space-between;gap:16px;
}
.tb-title{font-weight:900;font-size:15px;display:flex;align-items:center;gap:10px}
.tb-sub{color:var(--muted);font-size:12px;margin-top:4px}
.pill{
  font-size:11px;padding:4px 10px;border-radius:999px;
  border:1px solid rgba(125,255,178,0.25);
  color: rgba(125,255,178,0.95);
  background: rgba(125,255,178,0.08);
}

.btn{
  border:1px solid var(--line);
  background: rgba(15,22,48,0.35);
  color:var(--text);
  border-radius:14px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:800;
  font-size:12px;
}
.btn:hover{border-color:rgba(255,255,255,0.16)}
.btn.primary{
  border:0;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  color:#071020;
}
.btn.primary:hover{filter:brightness(1.05)}
.btn.ghost{background:transparent}

.action{
  text-align:left;width:100%;
  border:1px solid var(--line);
  background: rgba(15,22,48,0.35);
  color:var(--text);
  padding:11px 12px;border-radius:14px;
  cursor:pointer;font-size:12px;
}
.action:hover{border-color:rgba(255,255,255,0.16)}
.action .sub{display:block;color:var(--muted);font-size:11px;margin-top:3px}

.chatwrap{display:flex;flex-direction:column;height:100%}
.chips{padding:12px 18px 0 18px;display:flex;flex-wrap:wrap;gap:10px}
.chip{
  border:1px solid var(--line);
  background: rgba(15,22,48,0.25);
  color:var(--text);
  padding:7px 10px;border-radius:999px;
  font-size:12px;cursor:pointer;
}
.chip:hover{border-color:rgba(255,255,255,0.16)}

.messages{
  padding:14px 18px 0 18px;
  overflow:auto;flex:1;
  display:flex;flex-direction:column;gap:10px;
  scroll-behavior:smooth;
}
.msg{
  width:fit-content;
  max-width:min(720px,88%);
  padding:12px 12px;
  border-radius:16px;
  border:1px solid var(--line);
  background: rgba(15,22,48,0.45);
}
.msg.user{
  align-self:flex-end;
  background: rgba(110,168,255,0.13);
  border-color: rgba(110,168,255,0.32);
}
.metaRow{display:flex;gap:10px;align-items:center;margin-bottom:6px;color:var(--muted);font-size:11px}
.avatar{
  width:22px;height:22px;border-radius:999px;
  display:inline-flex;align-items:center;justify-content:center;
  font-weight:900;font-size:12px;
  background: rgba(255,255,255,0.08);
  border:1px solid var(--line);
}
.avatar.bot{background:linear-gradient(135deg, rgba(110,168,255,0.25), rgba(154,123,255,0.25)); border-color: rgba(255,255,255,0.10)}
.avatar.user{background:rgba(110,168,255,0.16); border-color: rgba(110,168,255,0.24)}
.badge{font-size:11px;padding:2px 8px;border-radius:999px;border:1px solid var(--line)}
.badge.ok{border-color:rgba(125,255,178,0.35);color:var(--good)}
.badge.warn{border-color:rgba(255,210,125,0.35);color:var(--warn)}
.badge.bad{border-color:rgba(255,125,125,0.35);color:var(--bad)}
.links{margin-top:10px;display:flex;flex-wrap:wrap;gap:10px}
a.link{
  font-size:12px;color:var(--text);text-decoration:none;
  padding:7px 11px;border-radius:999px;
  border:1px solid rgba(110,168,255,0.35);
  background: rgba(110,168,255,0.08);
}
a.link:hover{border-color:rgba(110,168,255,0.6)}

.composer{
  border-top:1px solid var(--line);
  background: rgba(9,12,22,0.35);
  backdrop-filter: blur(14px);
  padding:14px 18px;
}
.composebox{display:flex;gap:12px;align-items:flex-end}
textarea{
  resize:none;width:100%;
  min-height:44px;max-height:140px;
  border:1px solid var(--line);
  background: rgba(15,22,48,0.35);
  color:var(--text);
  border-radius:16px;
  padding:12px 12px;
  outline:none;
  font-size:13px;line-height:1.35;
}
textarea:focus{border-color:rgba(255,255,255,0.18)}
.composehint{margin-top:10px;color:var(--muted2);font-size:11px}

@media (max-width: 980px){
  .shell{grid-template-columns:1fr}
  .sidebar{display:none}
}
