@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;600&family=Noto+Sans+SC:wght@400;500;600&display=swap");

:root {
  --bg: radial-gradient(circle at 10% 10%, #e2ecff 0%, #f7f9ff 32%, #eef2f8 100%);
  --glass: rgba(255, 255, 255, 0.85);
  --ink: #0f172a;
  --muted: #6b7280;
  --line: #dfe3eb;
  --accent: #2563ff;
  --accent-weak: #e7edff;
  --shadow: 0 16px 60px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  justify-content: center;
}

.page {
  width: min(1220px, 100vw);
  padding: 38px 22px 50px;
  display: grid;
  gap: 18px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 4px;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 42px);
}

.sub {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 15px;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f6ff;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.status {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  background: #0f172a;
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #9ca3af;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
}

.mini {
  color: #cdd2dc;
  font-size: 12px;
}

code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 3px 6px;
  border-radius: 6px;
}

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

.panel {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--muted);
}

.strong {
  font-weight: 700;
  margin-top: 4px;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f6f8ff;
  color: #1f2937;
  font-weight: 600;
}

.live {
  box-shadow: 0 0 0 6px rgba(37, 99, 255, 0.08);
  border-color: #c9d7ff;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.message {
  padding: 12px 14px;
  border-radius: 14px;
  max-width: 80%;
  line-height: 1.6;
  border: 1px solid var(--line);
  background: #f8faff;
}

.message .meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563ff, #7c9bff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(37, 99, 255, 0.26);
}

.message.user .meta {
  color: #e5ebff;
}

.message.bot {
  align-self: flex-start;
  background: #f4f6fb;
}

.message.system {
  align-self: center;
  background: #f8f9fb;
  border-style: dashed;
  color: var(--muted);
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

#message-input {
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 15px;
  font-family: inherit;
  background: #f9fbff;
}

button {
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563ff, #5f8bff);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(37, 99, 255, 0.25);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.side .section + .section {
  margin-top: 18px;
}

.user-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 8px;
}

.user {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.user .id {
  color: var(--muted);
  font-size: 12px;
}

.note-list {
  margin: 8px 0 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
