:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, sans-serif; background: #f3f6fb; color: #1f2937; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, #ffffff, #eef3f9 62%, #e7edf5); }
.shell { max-width: 1050px; margin: auto; padding: 24px; }
.card { background: rgba(255,255,255,.96); border: 1px solid #d6e0eb; border-radius: 16px; box-shadow: 0 18px 50px rgba(50,70,95,.12); }
.login-card { max-width: 440px; margin: 13vh auto; padding: 34px; text-align: center; }
.brand { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 15px; background: #31c48d; color: #063b2a; font-size: 30px; font-weight: 800; }
.brand.small { display: inline-grid; width: 28px; height: 28px; margin: 0 8px 0 0; border-radius: 8px; font-size: 17px; vertical-align: middle; }
h1 { margin: 0 0 8px; font-size: 26px; } p { color: #62748a; }
label { display: grid; gap: 7px; color: #526174; font-size: 13px; }
input, textarea, select { width: 100%; border: 1px solid #c8d4e2; border-radius: 10px; background: #ffffff; color: #172033; padding: 12px; font: inherit; }
input::placeholder, textarea::placeholder { color: #8a99aa; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(49,196,141,.2); border-color: #31b985; }
button { border: 0; border-radius: 10px; padding: 12px 18px; background: #31c48d; color: #063b2a; font-weight: 750; cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
.login-card button { width: 100%; margin-top: 16px; }
.error { min-height: 20px; margin-top: 10px; color: #b42318; font-size: 13px; }
.hidden { display: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.quiet { padding: 8px 12px; background: transparent; color: #526174; border: 1px solid #c8d4e2; }
.workspace-grid { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 16px; align-items: start; }
.chat-pane { min-width: 0; }
.conversations { padding: 14px; position: sticky; top: 14px; }
.conversation-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; color: #26384d; }
.conversation-count { color: #7a8a9d; font-size: 12px; }
.new-conversation { padding: 8px 10px; font-size: 12px; }
.conversation-list { display: grid; gap: 7px; max-height: 65vh; overflow: auto; }
.conversation-row { display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: 4px; }
.conversation-item { display: grid; gap: 3px; width: 100%; padding: 10px; text-align: left; background: #f5f8fb; color: #26384d; border: 1px solid #dce5ee; font-weight: 500; }
.conversation-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item span { color: #7a8a9d; font-size: 11px; font-weight: 400; }
.conversation-item.active { background: #dff4eb; border-color: #7ad6b2; color: #164e3b; }
.conversation-delete { padding: 0; background: #fff3f1; color: #b42318; border: 1px solid #f1c8c3; font-size: 20px; font-weight: 400; line-height: 1; }
.conversation-delete:hover { background: #fee4e1; }
.conversation-empty { margin: 6px 2px; font-size: 12px; }
.conversation-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 3px 2px 12px; }
.conversation-title h2 { margin: 0; color: #26384d; font-size: 20px; }
.conversation-title span { color: #7a8a9d; font-size: 12px; }
.controls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 16px; margin-bottom: 16px; }
.transcript { min-height: 52vh; max-height: 66vh; overflow: auto; padding: 18px; }
.message, .activity, .plan { white-space: pre-wrap; line-height: 1.55; margin: 0 0 16px; padding: 13px 15px; border-radius: 12px; }
.message.user { background: #dff4eb; margin-left: 12%; color: #164e3b; }
.message.agent { background: #edf3f9; margin-right: 8%; color: #26384d; }
.activity, .plan { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; color: #526174; background: #f3f6fa; }
.composer { margin-top: 16px; }
.composer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
#status { color: #526174; font-size: 13px; }
.notice { text-align: center; font-size: 12px; }
@media (max-width: 900px) { .workspace-grid { grid-template-columns: 200px minmax(0, 1fr); } .controls { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .shell { padding: 14px; } .workspace-grid { grid-template-columns: 1fr; } .conversations { position: static; } .conversation-list { max-height: 220px; } .controls { grid-template-columns: 1fr; } .transcript { min-height: 58vh; } .message.user, .message.agent { margin-left: 0; margin-right: 0; } }
@media (min-width: 1100px) {
  .shell { max-width: none; min-height: 100vh; padding: 24px 32px; }
  #app { min-height: calc(100vh - 48px); }
  .workspace-grid { grid-template-columns: 300px minmax(0, 1fr); min-height: calc(100vh - 94px); }
  .conversations { height: calc(100vh - 94px); }
  .conversation-list { max-height: calc(100vh - 170px); }
  .chat-pane { display: flex; min-height: calc(100vh - 94px); flex-direction: column; }
  .chat-pane .transcript { flex: 1; min-height: 0; max-height: none; }
}
