/* Halcyon Talk — Halcyon house colours: ink #212324, gradient #FFAC2F → #FF8400 → #F44544. */
:root { --ink: #212324; --paper: #f6f5f3; --line: #e3e1dd; --muted: #6b6f72; --o1: #FFAC2F; --o2: #FF8400; --o3: #F44544; --you: #212324; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; color: var(--ink); background: var(--paper); display: flex; flex-direction: column; }
.hidden { display: none !important; }
.top { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: var(--ink); color: #fff; border-bottom: 3px solid; border-image: linear-gradient(90deg, var(--o1), var(--o2) 58%, var(--o3)) 1; }
.logo { height: 24px; }
.product { font-weight: 600; letter-spacing: .02em; opacity: .9; }
.spacer { flex: 1; }
.who { font-size: 13px; opacity: .8; }
button { font: inherit; cursor: pointer; }
.link { background: none; border: 0; color: inherit; text-decoration: underline; opacity: .85; }
.primary { background: linear-gradient(90deg, var(--o1), var(--o2) 58%, var(--o3)); color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; font-weight: 600; }
.primary:hover { filter: brightness(1.05); }
.auth { flex: 1; display: grid; place-items: center; padding: 24px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px; max-width: 420px; width: 100%; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.panel h1 { margin: 0 0 6px; font-size: 22px; }
.muted { color: var(--muted); }
.error { color: var(--o3); min-height: 1.5em; }
.app { flex: 1; display: grid; grid-template-columns: 260px 1fr; min-height: 0; }
.agents { border-right: 1px solid var(--line); background: #fff; overflow-y: auto; padding: 8px; }
.agent { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 10px 12px; margin-bottom: 2px; position: relative; }
.agent:hover { background: #f1efec; }
.agent.active { background: var(--ink); color: #fff; }
.agent.active .ad { color: #c9c9c9; }
.agent.unread::after { content: ""; position: absolute; right: 12px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--o2); }
.an { display: block; font-weight: 600; }
.ad { display: block; font-size: 12px; color: var(--muted); }
.chat { display: flex; flex-direction: column; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.chat-head h2 { margin: 0; font-size: 17px; }
.status { font-size: 12px; color: var(--muted); margin-left: auto; }
.messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: min(760px, 88%); }
.msg.user { align-self: flex-end; }
.msg .bubble { padding: 10px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--you); color: #fff; border-color: var(--you); }
.msg.user .bubble a { color: var(--o1); }
.msg .meta { font-size: 11px; color: var(--muted); margin: 3px 4px 0; }
.msg.user .meta { text-align: right; }
.bubble pre { background: #1b1c1d; color: #eee; padding: 10px; border-radius: 8px; overflow-x: auto; }
.bubble code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.bubble .h { display: inline-block; margin-top: 4px; }
.file { display: inline-block; margin-top: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); background: #faf9f7; }
.empty { text-align: center; margin-top: 15vh; }
.composer { display: flex; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; }
.composer textarea:focus { outline: 2px solid var(--o2); border-color: transparent; }
.only-mobile { display: none; }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .agents { border-right: 0; }
  body.in-chat .agents { display: none; }
  body:not(.in-chat) .chat { display: none; }
  .only-mobile { display: inline; }
  .who { display: none; }
}
