:root {
  --bg: #0b0c14;
  --bar: #12131f;
  --surface: #1a1c2c;
  --text: #e8e8ee;
  --muted: #9aa0b4;
  --accent: #6ee7b7;
  --accent-2: #00aaff;
  --border: rgba(255, 255, 255, 0.08);
  --font: "Figtree", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}
.ld-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}
.ld-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.ld-brand strong {
  color: var(--accent);
  letter-spacing: 0.04em;
  font-size: 13px;
  text-transform: uppercase;
}
.ld-brand span { font-size: 11px; color: var(--muted); }
.ld-paciente {
  margin: 0;
  flex: 1;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ld-mic, .ld-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.ld-mic:hover, .ld-btn:hover { border-color: var(--accent-2); }
.ld-mic.is-on {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #fecaca;
}
.ld-status { margin: 0; font-size: 12px; color: var(--muted); }
.ld-masks { display: flex; flex-wrap: wrap; gap: 6px; }
.ld-mask {
  border: 1px solid var(--border);
  background: var(--bar);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.ld-mask:hover, .ld-mask.is-active { border-color: var(--accent); color: var(--accent); }
#ld-texto {
  flex: 1;
  min-height: 160px;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bar);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  line-height: 1.5;
}
#ld-texto:focus { outline: 2px solid rgba(110, 231, 183, 0.28); }
.ld-actions { display: flex; justify-content: flex-end; gap: 8px; }
.ld-btn.primary { background: var(--accent); color: #082018; border-color: transparent; }
.ld-btn.primary:hover { filter: brightness(1.05); }
.ld-btn:disabled, .ld-mic:disabled { opacity: 0.45; cursor: not-allowed; }
