.log-subnav {
  display: flex;
  gap: 8px;
  max-width: 1180px;
  margin: 0 0 14px;
  padding: 5px;
  background: #eaf4f1;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.log-subnav button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 210px;
  padding: 9px 13px;
  color: #69857f;
  border: 1px solid transparent;
  border-radius: 7px;
  text-align: left;
}
.log-subnav button > b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #4f8278;
  background: #dceeea;
  border-radius: 7px;
}
.log-subnav button span,
.log-subnav button small { display: block; }
.log-subnav button span { font-size: 11px; font-weight: 600; }
.log-subnav button small { margin-top: 2px; color: #93a9a4; font-size: 8px; font-weight: 400; }
.log-subnav button.active {
  color: var(--teal-dark);
  background: #fff;
  border-color: #d5e7e3;
  box-shadow: 0 2px 7px #254b4420;
}
.log-subnav button.active > b { color: #fff; background: var(--teal); }
.log-mode-panel { display: none; }
.log-mode-panel.active { display: block; }
.human-log-panel { margin-top: 0; }
.human-log-table th:nth-child(1) { width: 170px; }
.human-log-table th:nth-child(2) { width: 120px; }
.human-log-table th:nth-child(3) { width: 170px; }
.human-log-table th:nth-child(4) { width: 170px; }
.human-log-table th:nth-child(5) { width: auto; }
.human-log-table th:nth-child(6) { width: 75px; }
.human-direction {
  display: inline-block;
  padding: 4px 7px;
  color: #526f69;
  background: #eff5f3;
  border-radius: 10px;
  font-size: 8px;
  white-space: nowrap;
}
.human-direction.inbound { color: #347465; background: #e9f6f2; }
.human-direction.outbound { color: #5c63a5; background: #eff0fb; }
.human-log-preview { max-width: 290px; }
.live-log-summary { grid-template-columns: repeat(4, 1fr); }
.live-channel-state { font-size: 14px !important; }
.live-channel-state.connected { color: #20805f; }
.live-channel-state.error { color: #b4443c; }
.live-connection-table th:nth-child(1) { width: 180px; }
.live-connection-table th:nth-child(2) { width: 190px; }
.live-connection-table th:nth-child(3) { width: 130px; }
.live-connection-table th:nth-child(4) { width: auto; }
.live-connection-table th:nth-child(5) { width: 75px; }
.live-connection-table th:nth-child(6) { width: 82px; }
.live-status { display: inline-flex; align-items: center; gap: 5px; color: #20805f; }
.live-status::before,.live-update-dot { color: #27b792; content: "●"; }
.live-last-message { max-width: 300px; }
.live-view-button { padding: 5px 8px; color: var(--teal-dark); background: #eaf7f4; border-radius: 5px; font-size: 9px; }
.live-connection-drawer { width: min(760px, 94vw); }
.live-conversation-section { min-height: 360px; }
.live-conversation { display: flex; flex-direction: column; gap: 13px; }
.live-message { display: flex; }
.live-message.customer { justify-content: flex-end; }
.live-message-bubble { max-width: 78%; padding: 10px 13px; color: #42635d; background: #f1f8f6; border: 1px solid #dfede9; border-radius: 4px 13px 13px; white-space: pre-wrap; word-break: break-word; }
.live-message.customer .live-message-bubble { color: #fff; background: var(--teal); border-color: var(--teal); border-radius: 13px 13px 4px; }
.live-message-bubble small { display: block; margin-bottom: 5px; color: inherit; opacity: .68; font-size: 8px; }
.live-system-event { align-self: center; color: #91a7a2; font-size: 9px; }

@media (max-width: 700px) {
  .log-subnav button { min-width: 0; flex: 1; }
  .log-subnav button small { display: none; }
  .human-log-table { min-width: 980px; }
  .live-log-summary { grid-template-columns: 1fr 1fr; }
  .live-connection-table { min-width: 900px; }
}
