:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0b2144;
  background: #f4f7fb;
  letter-spacing: 0;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(420px, 100%); background: #fff; border: 1px solid #cad7ea; border-radius: 8px; padding: 32px; display: grid; gap: 22px; box-shadow: 0 22px 60px rgba(18, 53, 100, .12); }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: linear-gradient(135deg, #0077ff, #7442f5); font-weight: 800; font-size: 24px; }
.brand-mark.small { width: 34px; height: 34px; font-size: 18px; }
.eyebrow { margin: 0 0 6px; color: #1768e5; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 30px; }
h2 { margin-bottom: 0; font-size: 22px; }
.muted { color: #5f708b; line-height: 1.5; }
label { display: grid; gap: 8px; font-weight: 700; }
input, textarea { width: 100%; border: 1px solid #b8c8df; border-radius: 6px; padding: 12px 14px; color: #0b2144; background: #fff; outline: none; }
input:focus, textarea:focus { border-color: #1768e5; box-shadow: 0 0 0 3px rgba(23, 104, 229, .14); }
button { border: 0; border-radius: 6px; padding: 11px 16px; background: #1768e5; color: #fff; font-weight: 750; }
button:disabled { opacity: .5; cursor: not-allowed; }
.error { color: #ad2330; min-height: 20px; margin: 0; font-size: 13px; }
.app-shell { min-height: 100vh; }
.topbar { height: 64px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #d7e0ed; background: #fff; }
.brand-inline, .operator { display: flex; align-items: center; gap: 12px; }
.quiet { background: transparent; color: #405471; padding: 8px; }
.workspace { min-height: calc(100vh - 64px); display: grid; grid-template-columns: minmax(280px, 360px) 1fr; }
.queue-pane { border-right: 1px solid #d7e0ed; background: #fff; overflow: hidden; }
.pane-heading, .conversation-heading { min-height: 86px; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e2e8f2; }
.icon-button { width: 38px; height: 38px; padding: 0; background: #edf4ff; color: #1768e5; font-size: 21px; }
.filters { padding: 12px 16px; display: flex; gap: 6px; border-bottom: 1px solid #e2e8f2; }
.filters button { padding: 7px 10px; background: transparent; color: #536681; }
.filters button.active { background: #e8f1ff; color: #075aca; }
.queue-list { height: calc(100vh - 380px); min-height: 180px; overflow: auto; }
.queue-item { width: 100%; padding: 16px 20px; text-align: left; border-radius: 0; border-bottom: 1px solid #edf0f5; background: #fff; color: inherit; }
.queue-item:hover, .queue-item.selected { background: #f0f6ff; }
.queue-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.queue-meta { color: #6a7890; font-size: 12px; }
.status { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 9px; border-radius: 999px; background: #e8f1ff; color: #075aca; font-size: 12px; font-weight: 800; }
.conversation-pane { position: relative; min-width: 0; }
.empty-state { max-width: 580px; margin: 14vh auto; padding: 24px; text-align: center; color: #52637c; }
.empty-state h2 { color: #0b2144; font-size: 30px; margin-bottom: 12px; }
#conversation { min-height: calc(100vh - 64px); display: grid; grid-template-rows: auto auto 1fr auto; }
.intake-strip { padding: 10px 22px; background: #eef8f5; border-bottom: 1px solid #cde5dd; color: #275e50; font-size: 13px; }
.messages { padding: 24px; overflow: auto; max-height: calc(100vh - 280px); display: flex; flex-direction: column; gap: 14px; }
.message { max-width: min(720px, 84%); padding: 13px 15px; border: 1px solid #d7e0ed; border-radius: 8px; background: #fff; line-height: 1.5; white-space: pre-wrap; }
.message.human { align-self: flex-end; background: #e9f2ff; border-color: #bed5fa; }
.message.system { background: #f7f8fa; color: #53647e; }
.message-meta { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 6px; font-size: 11px; color: #6b7990; font-weight: 700; }
.composer { border-top: 1px solid #d7e0ed; background: #fff; padding: 14px 20px; }
.actions { display: flex; gap: 8px; margin-bottom: 10px; }
.secondary { background: #e8f1ff; color: #075aca; }
.danger { background: #fff0f1; color: #a42130; }
.delivery-panel { border-top: 1px solid #d7e0ed; background: #f8fbff; }
.delivery-heading { padding: 14px 16px 10px; display: flex; align-items: center; justify-content: space-between; }
.delivery-heading h3 { margin: 0; font-size: 15px; }
.delivery-list { max-height: 150px; overflow: auto; }
.delivery-empty { margin: 0; padding: 0 16px 16px; font-size: 12px; }
.delivery-item { padding: 10px 16px; border-top: 1px solid #e3eaf4; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.delivery-item div { min-width: 0; display: grid; gap: 3px; }
.delivery-item strong { font-size: 12px; overflow-wrap: anywhere; }
.delivery-item span { color: #6a7890; font-size: 11px; overflow-wrap: anywhere; }
.delivery-item button { padding: 7px 9px; font-size: 12px; }
#reply-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  .workspace { grid-template-columns: 1fr; }
  .queue-pane { border-right: 0; }
  .queue-list { height: 180px; }
  .conversation-pane { min-height: 520px; }
  #conversation { min-height: 620px; }
  .messages { max-height: 380px; }
  .topbar { padding: 0 14px; }
  .operator span { display: none; }
}
