:root {
  --bg: #0f1117; --panel: #1a1d27; --panel-2: #232733;
  --accent: #6c5ce7; --text: #e8eaf0; --muted: #8b90a0;
  --ok: #1dd1a1; --busy: #feca57; --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', 'Noto Sans Thai', system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, #1c2030, var(--bg));
  color: var(--text); min-height: 100vh;
}
.topbar { display: flex; align-items: baseline; gap: 12px; padding: 18px 26px; border-bottom: 1px solid #262a36; }
.topbar h1 { margin: 0; font-size: 22px; }
.subtitle { color: var(--muted); font-size: 14px; }
.layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; padding: 24px; max-width: 1280px; margin: 0 auto; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
.office { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; align-content: start; }
.agent-card {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid #2b3040; border-radius: var(--radius);
  padding: 16px; text-align: center; transition: transform .15s ease, box-shadow .15s ease;
}
.agent-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.agent-card img { width: 64px; height: 64px; border-radius: 50%; background: #11131a; }
.agent-card .name { font-weight: 600; margin-top: 8px; }
.agent-card .role { color: var(--muted); font-size: 12px; margin-top: 4px; min-height: 32px; }
.status { display: inline-block; margin-top: 10px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #2b3040; color: var(--muted); }
.status.busy { background: rgba(254,202,87,.15); color: var(--busy); }
.status.done { background: rgba(29,209,161,.15); color: var(--ok); }
.chat { background: var(--panel); border: 1px solid #2b3040; border-radius: var(--radius); display: flex; flex-direction: column; height: 70vh; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 10px 14px; border-radius: 12px; max-width: 85%; font-size: 14px; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--accent); }
.msg.bot { align-self: flex-start; background: var(--panel-2); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #2b3040; }
.chat-form input { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid #2b3040; background: #11131a; color: var(--text); }
.chat-form button { padding: 10px 18px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 600; }
.chat-form button:hover { background: #5a4bd6; }
