:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #090d16; color: #e5e7eb; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, #18233b 0, #090d16 42%); }
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 1px solid #334155; border-radius: 10px; padding: 10px 14px; color: #e5e7eb; background: #182033; }
button:hover { border-color: #64748b; }
input, textarea { width: 100%; border: 1px solid #334155; border-radius: 10px; padding: 11px 12px; color: #f8fafc; background: #0b1220; outline: none; }
input:focus, textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px #2563eb22; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.shell { max-width: 1180px; margin: 0 auto; padding: 24px; }
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
h1 { margin: 0; font-size: 28px; }
.eyebrow { margin: 0 0 4px; color: #60a5fa; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.card { border: 1px solid #273449; border-radius: 16px; background: #0f172acc; box-shadow: 0 18px 60px #0005; backdrop-filter: blur(14px); }
.login-card { max-width: 440px; margin: 12vh auto; padding: 24px; display: grid; gap: 14px; }
.hint { margin: 0; color: #94a3b8; font-size: 13px; }
.status { border-radius: 99px; padding: 7px 11px; font-size: 12px; border: 1px solid; }
.status.online { color: #86efac; border-color: #15803d; background: #14532d55; }
.status.offline { color: #fca5a5; border-color: #991b1b; background: #7f1d1d55; }
.app { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; min-height: calc(100vh - 112px); }
.hidden { display: none !important; }
.sidebar { padding: 14px; overflow: hidden; }
.field-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.secondary { width: 100%; margin: 10px 0; }
.sessions { display: grid; gap: 7px; max-height: calc(100vh - 250px); overflow-y: auto; }
.session { display: block; width: 100%; text-align: left; padding: 11px; }
.session strong, .session small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session small { margin-top: 5px; color: #94a3b8; }
.session.active { border-color: #3b82f6; background: #1e3a5f; }
.conversation { display: grid; grid-template-rows: auto 1fr auto auto; min-height: 0; overflow: hidden; }
.conversation-title { padding: 16px; border-bottom: 1px solid #273449; font-weight: 700; }
.messages { padding: 18px; overflow-y: auto; min-height: 360px; max-height: calc(100vh - 310px); }
.message { max-width: 88%; margin: 0 0 13px; border-radius: 14px; padding: 11px 13px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.message.user { margin-left: auto; background: #1d4ed8; }
.message.assistant { background: #1e293b; }
.message.progress { color: #cbd5e1; background: #172033; border-left: 3px solid #64748b; font-size: 13px; }
.message.error { background: #7f1d1d88; color: #fecaca; }
.approval { margin: 0 16px 12px; padding: 14px; border: 1px solid #b45309; border-radius: 12px; background: #451a0366; }
.approval pre { max-height: 180px; overflow: auto; }
.composer { border-top: 1px solid #273449; padding: 14px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }
.primary { border-color: #2563eb; background: #2563eb; }
.danger { border-color: #dc2626; background: #b91c1c; }
@media (max-width: 760px) {
  .shell { padding: 12px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { max-height: 260px; }
  .sessions { max-height: 150px; }
  .conversation { min-height: calc(100vh - 390px); }
  .messages { max-height: none; min-height: 280px; }
}
