/* Minimal standalone stylesheet for the remote web UI. Not Tailwind — keeps
   the VPS's binary self-contained without shipping a build toolchain. */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #0f172a; color: #e2e8f0; }
body.centered { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }
body.chat-body { display: flex; flex-direction: column; height: 100vh; }

.card { background: #1e293b; padding: 2rem; border-radius: 0.5rem; border: 1px solid #334155; max-width: 380px; width: 100%; }
.card h1 { font-size: 1.25rem; margin-bottom: 1rem; }
.card form { display: flex; flex-direction: column; gap: 0.75rem; }
.card label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; color: #94a3b8; }
.card input { padding: 0.5rem 0.75rem; background: #0f172a; border: 1px solid #334155; border-radius: 0.25rem; color: #e2e8f0; font-size: 1rem; }
.card input:focus { outline: none; border-color: #3b82f6; }
.card button { margin-top: 0.5rem; padding: 0.6rem; background: #2563eb; color: white; border: 0; border-radius: 0.25rem; font-weight: 600; cursor: pointer; }
.card button:hover { background: #1d4ed8; }
.muted { font-size: 0.85rem; color: #94a3b8; margin-top: 1rem; text-align: center; }
.muted a { color: #60a5fa; }
.error { background: #7f1d1d; color: #fecaca; padding: 0.5rem 0.75rem; border-radius: 0.25rem; font-size: 0.9rem; margin-bottom: 1rem; }
.flash { background: #1e3a8a; color: #bfdbfe; padding: 0.5rem 0.75rem; border-radius: 0.25rem; font-size: 0.9rem; margin-bottom: 1rem; }

/* Chat UI */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; background: #1e293b; border-bottom: 1px solid #334155; }
.brand { font-weight: 700; }
.logout-form { display: inline; }
.link-button { background: transparent; border: 0; color: #94a3b8; cursor: pointer; font-size: 0.9rem; }
.link-button:hover { color: #e2e8f0; }
.messages { flex: 1; overflow-y: auto; padding: 1rem; max-width: 900px; margin: 0 auto; width: 100%; }
.msg { margin-bottom: 0.75rem; line-height: 1.5; }
.msg .sender { font-weight: 600; margin-right: 0.25rem; }
.msg.user .sender { color: #60a5fa; }
.msg.agent .sender { color: #4ade80; }
.msg.error .sender { color: #f87171; }
.response-text { display: inline-block; vertical-align: top; }
.response-text p { margin: 0.25rem 0; }
.response-text p:first-child { margin-top: 0; }
.response-text p:last-child { margin-bottom: 0; }
.response-text ul, .response-text ol { margin: 0.25rem 0; padding-left: 1.5rem; }
.response-text ul { list-style: disc; }
.response-text ol { list-style: decimal; }
.response-text code { background: #0f172a; padding: 0.1rem 0.3rem; border-radius: 0.25rem; font-size: 0.9em; }
.response-text pre { background: #0f172a; padding: 0.5rem 0.75rem; border-radius: 0.375rem; overflow-x: auto; margin: 0.5rem 0; }
.response-text pre code { background: transparent; padding: 0; }
.response-text a { color: #60a5fa; text-decoration: underline; }
.response-text strong { font-weight: 600; }
.response-text em { font-style: italic; }
.response-text blockquote { border-left: 3px solid #475569; padding-left: 0.75rem; color: #cbd5e1; }

.dots span { display: inline-block; width: 6px; height: 6px; margin: 0 1px; border-radius: 50%; background: #94a3b8; animation: bounce 1.4s infinite both; }
.dots span:nth-child(1) { animation-delay: -0.32s; }
.dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

.composer { display: flex; gap: 0.5rem; padding: 0.75rem 1rem; background: #1e293b; border-top: 1px solid #334155; max-width: 900px; margin: 0 auto; width: 100%; }
.composer textarea { flex: 1; resize: none; padding: 0.5rem 0.75rem; background: #0f172a; border: 1px solid #334155; border-radius: 0.25rem; color: #e2e8f0; font-family: inherit; font-size: 1rem; max-height: 200px; }
.composer textarea:focus { outline: none; border-color: #3b82f6; }
.composer button { padding: 0 1.25rem; background: #2563eb; color: white; border: 0; border-radius: 0.25rem; font-weight: 600; cursor: pointer; }
.composer button:disabled { background: #475569; cursor: not-allowed; }
