.dbg-host-btn {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dbg-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8998;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.dbg-backdrop--open {
  opacity: 1;
  pointer-events: auto;
}

.dbg-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 8999;
  width: min(480px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--md-surface, #0f172a);
  border-left: 1px solid var(--md-border, #334155);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.3);
}

.dbg-drawer--open {
  transform: translateX(0);
}

.dbg-drawer--terminal {
  width: min(920px, 96vw);
  background: #000;
  border-left-color: #333;
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.dbg-drawer__body-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dbg-terminal__head {
  flex-shrink: 0;
  border-bottom: 1px solid #333;
  background: #0a0a0a;
  padding: 10px 12px;
}

.dbg-terminal__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dbg-terminal__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #f3f4f6;
}

.dbg-terminal__count {
  margin-left: 10px;
  font-size: 12px;
  font-weight: 400;
  color: #9ca3af;
}

.dbg-terminal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.dbg-terminal__meta {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 12px;
  font-size: 11px;
  color: #9ca3af;
  border-bottom: 1px solid #222;
  background: #050505;
}

.dbg-terminal__meta strong {
  color: #d1d5db;
  font-weight: 600;
}

.dbg-log {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 12px 16px;
  background: #000;
  font-size: 11px;
  line-height: 1.45;
}

.dbg-log__row {
  margin-bottom: 2px;
  word-break: break-word;
  white-space: pre-wrap;
}

.dbg-log__row--info {
  color: #d1d5db;
}

.dbg-log__row--ok {
  color: #86efac;
}

.dbg-log__row--warn {
  color: #fcd34d;
}

.dbg-log__row--error {
  color: #fca5a5;
}

.dbg-log__ts {
  color: #6b7280;
}

.dbg-log__tag {
  color: #93c5fd;
  font-weight: 600;
}

.dbg-log__text {
  color: inherit;
}

.dbg-btn {
  padding: 6px 10px;
  border: 1px solid #444;
  border-radius: 4px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
}

.dbg-btn--sm {
  padding: 4px 8px;
}

.dbg-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.dbg-btn--ghost {
  background: #111;
  color: #e5e7eb;
}

.dbg-btn--close {
  color: #fca5a5;
}

.dbg-btn--toggle {
  background: #374151;
  border-color: #6b7280;
}

.dbg-btn--toggle-on {
  background: #15803d;
  border-color: #22c55e;
}

.dbg-copy-toast {
  flex-shrink: 0;
  padding: 6px 16px;
  font-size: 11px;
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border-bottom: 1px solid #222;
}

.dbg-link {
  font-size: 11px;
  color: #93c5fd;
}

/* Toggle no header do workspace (fora do drawer) */
.dbg-monitor-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dbg-monitor-toggle__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dbg-monitor-toggle__btn--on {
  background: #ecfdf5;
  border-color: #22c55e;
  color: #15803d;
}

.dbg-monitor-toggle__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.dbg-monitor-toggle__btn--on .dbg-monitor-toggle__dot {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.7);
}

.dbg-monitor-toggle__log {
  height: 28px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.dbg-monitor-toggle__log:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.dbg-terminal__tabs {
  display: flex;
  gap: 4px;
  margin-top: 10px;
}

.dbg-terminal__tab {
  padding: 4px 12px;
  border: 1px solid #333;
  border-radius: 4px;
  background: #111;
  color: #9ca3af;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
}

.dbg-terminal__tab--active {
  background: #1e3a8a;
  border-color: #3b82f6;
  color: #e5e7eb;
}

.dbg-terminal__tab-badge {
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: #374151;
  font-size: 10px;
}

.dbg-log__row--replay {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0;
  margin-bottom: 2px;
  font: inherit;
  cursor: pointer;
}

.dbg-log__row--replay:hover {
  background: rgba(59, 130, 246, 0.12);
  outline: 1px dashed #3b82f6;
}

.dbg-log__replay-hint {
  color: #60a5fa;
  font-size: 10px;
}

.dbg-replay {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 16px;
  overflow: auto;
  background: #050505;
}

.dbg-replay__status {
  margin: 0 0 8px;
  font-size: 11px;
  color: #9ca3af;
}

.dbg-replay__mount {
  min-height: 200px;
  border: 1px dashed #333;
  border-radius: 4px;
  background: #0a0a0a;
}

.dbg-replay__mount--ready {
  border-style: solid;
  border-color: #374151;
}

.dbg-replay__actions {
  margin-top: 10px;
}

.dbg-rr-mask,
.dbg-rr-block {
  /* Marcadores visuais opcionais no DOM vivo; rrweb aplica máscara na gravação */
}
