:root {
  color-scheme: light;
  --ink: #20313b;
  --muted: #6f7e84;
  --paper: #f8f7f4;
  --panel: #fff;
  --line: #e5e8e6;
  --green: #3e806f;
  --green-dark: #2c6255;
  --soft-green: #e8f2ee;
  --warm: #f2eadf;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
.app-shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 100vh; max-width: 1500px; margin: 0 auto; }
.sidebar { border-right: 1px solid var(--line); background: #fbfaf8; padding: 28px 20px; display: flex; flex-direction: column; gap: 20px; }
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 4px 16px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; background: var(--green); color: white; border-radius: 13px; font-size: 13px; letter-spacing: .05em; font-weight: 800; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 17px; letter-spacing: -.02em; }
.brand span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.primary-button, .send-button { border: 0; cursor: pointer; border-radius: 12px; font-weight: 700; transition: .2s ease; }
.primary-button { background: var(--green); color: white; padding: 13px 15px; text-align: left; }
.primary-button:hover, .send-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.sidebar-label, .eyebrow { color: var(--muted); text-transform: uppercase; font-size: 10px; letter-spacing: .13em; font-weight: 800; }
.conversation-list { overflow: auto; display: flex; flex-direction: column; gap: 5px; }
.conversation-item { background: transparent; border: 0; text-align: left; padding: 11px 12px; border-radius: 10px; color: var(--ink); cursor: pointer; font-size: 13px; }
.conversation-item:hover, .conversation-item.active { background: var(--soft-green); color: var(--green-dark); }
.conversation-count { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.privacy-note { margin-top: auto; border-top: 1px solid var(--line); padding: 17px 4px 0; color: var(--muted); line-height: 1.55; font-size: 11px; }
.privacy-note strong { color: var(--ink); }
.chat-panel { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; background: var(--panel); }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 28px 42px 22px; border-bottom: 1px solid var(--line); gap: 18px; }
h1 { margin: 5px 0 0; font-size: 22px; letter-spacing: -.03em; }
.agent-picker { color: var(--muted); font-size: 12px; display: flex; gap: 8px; align-items: center; }
select { border: 1px solid var(--line); padding: 9px 11px; border-radius: 10px; background: white; color: var(--ink); }
.welcome-card { max-width: 720px; margin: auto auto 22px; padding: 25px 28px; border: 1px solid #eadfd2; background: var(--warm); border-radius: 18px; }
.welcome-card h2 { margin: 8px 0; font-size: 21px; }
.welcome-card p { margin: 0; color: #6e6258; line-height: 1.65; font-size: 14px; }
.welcome-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #fffaf4; color: var(--green); font-size: 25px; }
.messages { flex: 1; overflow: auto; width: min(850px, 100%); margin: 0 auto; padding: 24px 28px 10px; display: flex; flex-direction: column; gap: 16px; }
.message { max-width: 78%; display: flex; flex-direction: column; gap: 5px; }
.message.user { align-self: flex-end; align-items: flex-end; }
.message.assistant { align-self: flex-start; }
.message-bubble { white-space: pre-wrap; line-height: 1.65; font-size: 14px; padding: 13px 16px; border-radius: 16px; }
.user .message-bubble { background: var(--green); color: white; border-bottom-right-radius: 4px; }
.assistant .message-bubble { background: #f2f4f2; color: var(--ink); border-bottom-left-radius: 4px; }
.message-meta { color: var(--muted); font-size: 10px; }
.composer { width: min(850px, 100%); margin: 0 auto; padding: 18px 28px 8px; display: flex; gap: 10px; align-items: flex-end; }
textarea { flex: 1; resize: vertical; min-height: 48px; max-height: 180px; border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; font: inherit; color: var(--ink); outline: none; }
textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(62,128,111,.1); }
.send-button { background: var(--green); color: white; padding: 14px 20px; min-height: 48px; }
.disclaimer { text-align: center; color: var(--muted); font-size: 10px; padding: 6px 20px 18px; }
.toast { position: fixed; right: 20px; bottom: 20px; background: #20313b; color: white; padding: 12px 15px; border-radius: 10px; font-size: 13px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; min-height: unset; }
  .conversation-list { max-height: 120px; }
  .privacy-note { display: none; }
  .chat-panel { min-height: calc(100vh - 220px); }
  .chat-header { padding: 22px 18px 16px; align-items: flex-start; flex-direction: column; }
  .messages, .composer { padding-left: 16px; padding-right: 16px; }
  .message { max-width: 90%; }
}
