* { box-sizing: border-box; margin: 0; }
:root {
  --blue: #0b5cab;
  --bg: #f3f5f9;
  --card: #ffffff;
  --warn: #8a1c1c;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
#banner {
  background: var(--warn);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
}
#tabs { display: flex; }
.tab {
  flex: 1;
  padding: 10px;
  border: 0;
  background: #dde3ee;
  font-size: 15px;
  cursor: pointer;
}
.tab.active { background: var(--blue); color: #fff; }
main { flex: 1; display: flex; min-height: 0; }
#chat-pane, #form-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px;
  overflow-y: auto;
}
#chat-log { flex: 1; overflow-y: auto; padding-bottom: 8px; }
.bubble {
  max-width: 85%;
  margin: 6px 0;
  padding: 10px 12px;
  border-radius: 12px;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.35;
}
.bubble.member { background: var(--blue); color: #fff; margin-left: auto; }
.bubble.agent { background: var(--card); border: 1px solid #d6dce8; }
.bubble.system { background: #fff6e0; border: 1px solid #e4cf8e; font-size: 13px; }
#chat-input-row { display: flex; gap: 8px; }
#chat-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #c3ccdc;
  border-radius: 8px;
  font-size: 16px;
}
#chat-send {
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
}
.card {
  background: var(--card);
  border: 1px solid #d6dce8;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}
.card h2 { font-size: 17px; margin-bottom: 10px; color: var(--blue); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; margin-bottom: 4px; }
.field .help { font-size: 12px; color: #456; margin-top: 3px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #c3ccdc;
  border-radius: 6px;
  font-size: 15px;
  background: #fafbfe;
}
.field.flash input, .field.flash select, .field.flash textarea {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 92, 171, 0.25);
  transition: box-shadow 0.3s;
}
#checklist-items li { font-size: 14px; margin: 6px 0 6px 4px; list-style: none; }
#review-items dt { font-weight: 600; font-size: 13px; margin-top: 8px; }
#review-items dd { font-size: 15px; margin-left: 0; }
.hidden { display: none; }

/* phone-first: one pane at a time, tabs switch */
@media (max-width: 899px) {
  body.show-form #chat-pane { display: none; }
  body:not(.show-form) #form-pane { display: none; }
}
/* wide: side by side, no tabs */
@media (min-width: 900px) {
  #tabs { display: none; }
  #chat-pane { max-width: 45%; border-right: 1px solid #d6dce8; }
}
