:root{
  --maroon-900:#2b070e;
  --maroon-800:#4a0b18;
  --maroon-700:#6a0f22;
  --maroon-600:#800020;
  --white:#ffffff;
  --bg:#fbfbfd;
  --text:#1e1f24;
  --muted:#6b7280;
  --border:#e7e7ee;
  --shadow: 0 16px 50px rgba(0,0,0,.10);
  --radius: 18px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);
  background: radial-gradient(1200px 600px at 10% 10%, rgba(128,0,32,.16), transparent 50%),
              radial-gradient(900px 500px at 90% 20%, rgba(128,0,32,.10), transparent 55%),
              linear-gradient(180deg, #fff, #f7f7fb);
}

.app{
  max-width: 1100px;
  margin: 26px auto;
  padding: 18px;
}

.header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:rgba(255,255,255,.85);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:18px 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.brand{display:flex;gap:14px;align-items:center}
.logo{
  width:52px;height:52px;border-radius:14px;
  display:grid;place-items:center;
  font-weight:800;color:#fff;
  background: linear-gradient(135deg, var(--maroon-600), #b3002f);
  box-shadow: 0 10px 26px rgba(128,0,32,.25);
}
.title{font-weight:800; letter-spacing:-.4px; font-size:18px}
.subtitle{color:var(--muted); font-size:13px; margin-top:2px}

.pill{
  display:flex;align-items:center;gap:10px;
  padding:10px 14px;border-radius:999px;
  background: linear-gradient(135deg, var(--maroon-700), var(--maroon-600));
  color:#fff;font-weight:600;font-size:13px;
}
.dot{width:10px;height:10px;border-radius:99px;background:#22c55e;box-shadow:0 0 16px rgba(34,197,94,.85)}

.chat{
  margin-top:16px;
  background:rgba(255,255,255,.90);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.messages{
  height: calc(100vh - 290px);
  min-height: 420px;
  padding:22px;
  overflow:auto;
}

.msg{display:flex; gap:12px; max-width: 860px; margin: 14px 0}
.msg.user{margin-left:auto; flex-direction:row-reverse}
.avatar{
  width:42px;height:42px;border-radius:14px;
  display:grid;place-items:center;
  font-weight:800;
  background: #f0f0f6;
  color: var(--maroon-700);
}
.msg.bot .avatar{
  background: linear-gradient(135deg, var(--maroon-700), var(--maroon-600));
  color:#fff;
}
.bubble{
  padding:14px 16px;
  border-radius: 16px;
  border:1px solid var(--border);
  background:#fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.msg.user .bubble{
  background: linear-gradient(135deg, var(--maroon-700), var(--maroon-600));
  color:#fff;
  border-color: rgba(255,255,255,.15);
}
.meta{display:flex;justify-content:space-between;gap:16px;margin-bottom:8px}
.name{font-weight:800;font-size:13px}
.time{font-size:12px;color:rgba(107,114,128,.9)}
.msg.user .time{color:rgba(255,255,255,.75)}
.text{line-height:1.7; font-size:14px; white-space:pre-wrap}
.text code{
  background: rgba(128,0,32,.08);
  padding:2px 6px;border-radius:6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono";
}
.msg.user .text code{background: rgba(255,255,255,.18)}

.quick{
  display:flex; flex-wrap:wrap; gap:10px;
  padding: 14px 0 6px;
}
.qbtn{
  border:1.6px solid var(--maroon-600);
  color: var(--maroon-700);
  background:#fff;
  border-radius:999px;
  padding:10px 14px;
  font-weight:700;
  cursor:pointer;
  transition: .2s ease;
}
.qbtn:hover{
  background: linear-gradient(135deg, var(--maroon-700), var(--maroon-600));
  color:#fff;
  transform: translateY(-1px);
}

.composer{
  display:flex;gap:10px;
  background:rgba(255,255,255,.92);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:10px;
  box-shadow: var(--shadow);
}
.input{
  flex:1;
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  font-size:14px;
  outline:none;
}
.input:focus{
  border-color: rgba(128,0,32,.55);
  box-shadow: 0 0 0 4px rgba(128,0,32,.12);
}
.iconbtn{
  border:1px solid var(--border);
  border-radius:14px;
  padding: 0 14px;
  background:#f4f4f9;
  font-weight:800;
  cursor:pointer;
}
.iconbtn:hover{background:#efeff8}
.send{
  border:none;
  border-radius:14px;
  padding:0 16px;
  background: linear-gradient(135deg, var(--maroon-700), var(--maroon-600));
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
.send:hover{filter:brightness(1.05)}

.note{
  text-align:center;
  color:var(--muted);
  font-size:12px;
  margin-top:10px;
}