.voiceagent-log-overlay {
  box-sizing: border-box; position: fixed; inset: 0; z-index: 1200;
  background: rgba(3, 9, 15, .78); display: grid; place-items: center; padding: 20px;
}
.voiceagent-log-dialog {
  --text: #f3f8fb; --muted: #b3c4d0; --line: #344957;
  color-scheme: dark; box-sizing: border-box; background: #0d1821; color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  width: min(1300px, 100%); min-width: 0; height: 90vh;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 20px 80px #0008; overflow: hidden;
}
.voiceagent-log-dialog > :not(.voiceagent-log-rows) { flex-shrink: 0; }
.voiceagent-log-header, .voiceagent-log-heading, .voiceagent-log-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.voiceagent-log-header { justify-content: space-between; }
.voiceagent-log-heading { flex: 1; }
.voiceagent-log-actions { flex-shrink: 0; gap: 6px; }
.voiceagent-log-dialog h2 { margin: 0; color: var(--text); font-size: 16px; line-height: 1.4; white-space: nowrap; }
.voiceagent-log-dialog [data-log-robot] { color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.voiceagent-log-dialog .muted { color: var(--muted); font-size: 12px; line-height: 1.6; }
.voiceagent-log-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0; }
.voiceagent-log-controls label { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 12px; }
.voiceagent-log-controls input:not([type="checkbox"]) { width: 150px; max-width: 100%; }
.voiceagent-log-dialog [data-log-filters] input[name="q"] { flex: 1; min-width: 100px; }
.voiceagent-log-controls select { width: auto; min-width: 88px; }
.voiceagent-log-dialog input:not([type="checkbox"]), .voiceagent-log-dialog select, .voiceagent-log-dialog option {
  background: #14232f; color: var(--text); border-color: #456071; min-height: 30px; padding: 4px 8px; font-size: 12px;
}
.voiceagent-log-dialog option:checked { background: #244856; color: #fff; }
.voiceagent-log-dialog input::placeholder { color: #a9bdcb; opacity: 1; }
.voiceagent-log-dialog input[type="checkbox"] { accent-color: #22d3ee; }
.voiceagent-log-dialog button { background: #1b303e; color: var(--text); border-color: #456071; min-height: 30px; padding: 0 9px; font-size: 12px; }
.voiceagent-log-dialog button:hover:not(:disabled) { background: #274555; border-color: #61d9ed; }
.voiceagent-log-dialog button:disabled { opacity: 1; background: #16232e; color: #9bafbe; border-color: #344957; }
.voiceagent-log-dialog [data-log-save] { background: #a5f3fc; color: #08212b; border-color: #a5f3fc; font-weight: 700; }
.voiceagent-log-dialog [data-log-save]:hover:not(:disabled) { background: #cffafe; border-color: #cffafe; }
.voiceagent-log-dialog [data-log-save]:disabled { background: #263e49; color: #bfd1dc; border-color: #456071; }
.voiceagent-log-dialog :is(button, input, select, summary, [tabindex]):focus-visible { outline: 2px solid #67e8f9; outline-offset: 3px; }
.voiceagent-log-settings { position: relative; }
.voiceagent-log-settings > summary { cursor: pointer; color: #d8f3ff; font-size: 12px; padding: 6px 8px; border: 1px solid #35596c; border-radius: 6px; background: #142d3b; white-space: nowrap; }
.voiceagent-log-settings-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 2; width: 360px; max-width: calc(100vw - 52px); max-height: 60vh; overflow: auto; display: grid; gap: 10px; padding: 12px; background: #14232f; border: 1px solid #456071; border-radius: 8px; box-shadow: 0 12px 32px #0008; }
.voiceagent-log-settings-panel [data-log-status] { color: #d8f3ff; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.voiceagent-log-settings-panel p { margin: 0; }
.voiceagent-log-rows { flex: 1; min-height: 0; overflow: auto; background: #071016; color: #e0e8f5; font: 12px/1.7 monospace; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.voiceagent-log-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; }
.voiceagent-log-footer [data-log-connection] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voiceagent-log-footer > :last-child { flex-shrink: 0; }
.voiceagent-log-rows details { padding: 6px 0; border-bottom: 1px solid #233441; }
.voiceagent-log-rows summary { cursor: pointer; white-space: pre-wrap; color: #e0e8f5; }
.voiceagent-log-rows summary:hover { background: #162732; }
.voiceagent-log-rows pre { white-space: pre-wrap; margin: 10px 16px; font: inherit; color: #bacce5; }
@media (max-width: 760px) {
  .voiceagent-log-overlay { padding: 10px; }
  .voiceagent-log-dialog { padding: 10px; height: calc(100dvh - 20px); gap: 6px; position: relative; }
  .voiceagent-log-header { flex-wrap: wrap; gap: 6px; }
  .voiceagent-log-heading { flex-basis: 100%; }
  .voiceagent-log-actions { width: 100%; }
  .voiceagent-log-dialog [data-log-close] { margin-left: auto; }
  .voiceagent-log-settings { position: static; }
  .voiceagent-log-settings-panel { top: 76px; left: 10px; right: 10px; width: auto; max-width: none; }
  .voiceagent-log-dialog [data-log-filters] input:not([type="checkbox"]) { flex: 1 1 110px; min-width: 0; }
  .voiceagent-log-footer { font-size: 10px; gap: 6px; }
}

/* Consumer-facing robot detail surface. Scoped to avoid changing builder and admin views. */
.robot-overview {
  --robot-bg: #0b151b; --robot-surface: #101e27; --robot-surface-soft: #162831; --robot-line: rgba(206, 231, 226, .13);
  --robot-text: #edf7f4; --robot-muted: rgba(211, 230, 226, .66); --robot-accent: #54d5b5; --robot-accent-soft: rgba(84, 213, 181, .14);
  --robot-warn: #f4c56d; --robot-danger: #f28d79; --robot-radius: 16px;
  color: var(--robot-text); gap: 18px; padding: 24px; border: 1px solid rgba(206, 231, 226, .1); border-radius: 22px; background: var(--robot-bg);
}
.robot-overview .muted, .robot-overview .panel-head .muted, .robot-overview .robot-status-band small, .robot-overview .robot-status-band span,
.robot-overview .robot-performance-strip span, .robot-overview .robot-health-grid span, .robot-overview .robot-activity-main small,
.robot-overview .robot-activity-row time, .robot-overview .robot-tab-panel-head, .robot-overview .robot-scene-link span,
.robot-overview .robot-current-duty-facts dt, .robot-overview .robot-current-duty-facts dd, .robot-overview .robot-current-run-table th,
.robot-overview .robot-device-facts dt, .robot-overview .robot-volume-value span, .robot-overview .robot-audio-settings p { color: var(--robot-muted); }
.robot-overview .robot-overview-head { align-items: center; }
.robot-overview .robot-title-block { gap: 12px; }
.robot-overview .robot-title-block > .icon-small { color: var(--robot-text); border: 1px solid var(--robot-line); background: var(--robot-surface); }
.robot-overview .robot-title-line h1 { color: var(--robot-text); font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; }
.robot-overview .robot-title-line .pill { border: 0; border-radius: 999px; padding: 0 10px; font-size: 11px; }
.robot-overview .robot-title-line .pill.online { color: #91f1d7; background: var(--robot-accent-soft); }
.robot-overview .robot-title-line .pill.offline { color: #ffb3a5; background: rgba(242, 141, 121, .14); }
.robot-overview .robot-hero-visual { width: 76px; height: 76px; flex: 0 0 76px; display: grid; place-items: end center; overflow: hidden; border-radius: 20px; background: #17383d; }
.robot-overview .robot-hero-visual img { width: 64px; height: 92px; object-fit: contain; object-position: center bottom; }
.robot-overview .robot-refresh-button { min-height: 38px; border: 1px solid var(--robot-line); border-radius: 999px; color: var(--robot-text); background: var(--robot-surface); }
.robot-overview .robot-status-band, .robot-overview .panel, .robot-overview .robot-period-bar, .robot-overview .robot-performance-strip > div { border-color: var(--robot-line); border-radius: var(--robot-radius); background: var(--robot-surface); box-shadow: none; }
.robot-overview .robot-status-band { overflow: hidden; }
.robot-overview .robot-status-band > div { padding: 17px 18px; border-color: var(--robot-line); }
.robot-overview .robot-status-band strong { margin: 7px 0 5px; color: var(--robot-text); font-size: 21px; }
.robot-overview .robot-status-value.positive, .robot-overview .robot-health-value.positive { color: var(--robot-accent); }
.robot-overview .robot-status-value.warning, .robot-overview .robot-health-value.warning { color: var(--robot-warn); }
.robot-overview .robot-status-value.danger, .robot-overview .robot-health-value.danger { color: var(--robot-danger); }
.robot-overview .robot-status-value.accent, .robot-overview .robot-health-value.accent { color: #3e6d9a; }
.robot-overview .robot-status-value.neutral, .robot-overview .robot-health-value.neutral { color: var(--robot-text); }
.robot-overview .panel-head { min-height: 62px; padding: 16px 18px; border-color: var(--robot-line); }
.robot-overview .panel-head h2, .robot-overview .robot-period-bar strong { color: var(--robot-text); font-size: 16px; letter-spacing: -0.01em; }
.robot-overview .panel-body { padding: 18px; }
.robot-overview .robot-state-badge, .robot-overview .robot-activity-kind, .robot-overview .robot-activity-status { min-height: 25px; border: 0; border-radius: 999px; padding: 0 9px; font-size: 11px; font-weight: 700; }
.robot-overview .robot-state-badge.positive, .robot-overview .robot-activity-kind.positive, .robot-overview .robot-activity-status.positive { color: #91f1d7; background: var(--robot-accent-soft); }
.robot-overview .robot-state-badge.accent, .robot-overview .robot-activity-kind.accent, .robot-overview .robot-activity-status.accent { color: #9cc8f0; background: rgba(96, 165, 250, .14); }
.robot-overview .robot-state-badge.warning, .robot-overview .robot-activity-kind.warning, .robot-overview .robot-activity-status.warning { color: #f7d48f; background: rgba(245, 158, 11, .14); }
.robot-overview .robot-state-badge.danger, .robot-overview .robot-activity-kind.danger, .robot-overview .robot-activity-status.danger { color: #ffb3a5; background: rgba(242, 141, 121, .14); }
.robot-overview .robot-current-duty-layout { gap: 22px; }
.robot-overview .robot-duty-scene-link strong, .robot-overview .robot-current-scene-link, .robot-overview .robot-scene-link strong { color: var(--robot-text); }
.robot-overview .robot-duty-scene-link:hover:not(:disabled) strong, .robot-overview .robot-current-scene-link:hover:not(:disabled), .robot-overview .robot-scene-link:hover:not(:disabled) strong { color: #a6f5e2; }
.robot-overview .robot-period-bar { padding: 11px 14px 11px 18px; }
.robot-overview .robot-period-bar .scene-period-tabs button { border: 0; border-radius: 999px; color: var(--robot-muted); background: transparent; }
.robot-overview .robot-period-bar .scene-period-tabs button.active { color: #fff; background: var(--robot-accent); }
.robot-overview .robot-performance-strip { gap: 10px; }
.robot-overview .robot-performance-strip > div { min-height: 96px; padding: 17px 16px; }
.robot-overview .robot-performance-strip strong { margin-top: 9px; color: var(--robot-text); font-size: 24px; }
.robot-overview .robot-performance-strip .has-anomaly strong { color: var(--robot-danger); }
.robot-overview .robot-current-run-table th, .robot-overview .robot-current-run-table td, .robot-overview .robot-detail-tablist, .robot-overview .robot-activity-row, .robot-overview .robot-scene-row, .robot-overview .robot-health-grid > div { border-color: var(--robot-line); }
.robot-overview .robot-current-run-table td { color: var(--robot-text); }
.robot-overview .robot-detail-tablist { padding: 0 18px; }
.robot-overview .robot-detail-tab { min-height: 48px; color: var(--robot-muted); }
.robot-overview .robot-detail-tab.active { border-bottom-color: var(--robot-accent); color: var(--robot-text); }
.robot-overview .robot-position-panel .pill.online { color: #91f1d7; border: 0; background: var(--robot-accent-soft); }
.robot-overview .robot-position-panel .pill.offline { color: #ffb3a5; border: 0; background: rgba(242, 141, 121, .14); }
.robot-overview .robot-mini-map { border: 0; border-radius: 12px; background: #14282e; }
.robot-overview .robot-mini-map-cross { opacity: .5; background-image: linear-gradient(rgba(177, 226, 216, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(177, 226, 216, .16) 1px, transparent 1px); }
.robot-overview .robot-mini-map-dot { border-color: #e8fffa; background: var(--robot-accent); box-shadow: 0 0 0 5px rgba(84, 213, 181, .17); }
.robot-overview .robot-audio-settings input[type="range"] { accent-color: var(--robot-accent); }
.robot-overview .robot-volume-value strong { color: var(--robot-text); }
.robot-overview .robot-volume-actions button:not(.danger), .robot-overview .robot-current-duty-actions button.danger { border: 0; border-radius: 999px; }
.robot-overview .robot-volume-actions button:not(.danger) { color: var(--robot-text); background: var(--robot-surface-soft); }
.robot-overview .robot-device-facts > summary { color: var(--robot-text); }
@media (max-width: 680px) {
  .robot-overview { gap: 14px; padding: 14px; border-radius: 16px; }
  .robot-overview .robot-hero-visual { width: 60px; height: 60px; flex-basis: 60px; border-radius: 16px; }
  .robot-overview .robot-hero-visual img { width: 52px; height: 76px; }
  .robot-overview .robot-title-line h1 { font-size: 24px; }
  .robot-overview .robot-status-band > div, .robot-overview .panel-body { padding: 14px; }
  .robot-overview .panel-head { padding: 14px; }
  .robot-overview .robot-period-bar { padding: 12px; }
  .robot-overview .robot-performance-strip > div { min-height: 84px; padding: 14px; }
}
