:root {
  --odb-bg: rgba(15, 20, 30, 0.86);
  --odb-panel: rgba(18, 26, 38, 0.92);
  --odb-border: rgba(255, 255, 255, 0.12);
  --odb-border-strong: rgba(255, 255, 255, 0.2);
  --odb-text: #e8edf6;
  --odb-muted: #98a7c2;
  --odb-accent: #20d5c6;
  --odb-accent-2: #6ee7ff;
  --odb-danger: #f16b4e;
  --odb-shadow: 0 18px 38px rgba(6, 10, 18, 0.45);
  font-family: "Space Grotesk", "Sora", "Avenir Next", "Segoe UI", sans-serif;
}

#odb-annotate-root {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  pointer-events: none;
}

.odb-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  width: min(396px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  background: var(--odb-panel);
  border: 1px solid var(--odb-border);
  border-radius: 14px;
  color: var(--odb-text);
  box-shadow: var(--odb-shadow);
  backdrop-filter: blur(16px) saturate(120%);
  pointer-events: auto;
}

.odb-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: grab;
  user-select: none;
}

.odb-panel-header .odb-title {
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 13px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.odb-panel-header .odb-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
  flex: 1 1 auto;
  min-width: 0;
}

.odb-btn {
  font-size: 11px;
  border-radius: 10px;
  padding: 6px 10px;
  border: 1px solid var(--odb-border);
  background: transparent;
  color: var(--odb-text);
  cursor: pointer;
}

.odb-btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  line-height: 1;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.odb-btn-primary {
  background: linear-gradient(135deg, var(--odb-accent) 0%, var(--odb-accent-2) 100%);
  color: #041114;
  border: none;
}

.odb-btn-ghost {
  color: var(--odb-muted);
}

.odb-panel-body {
  padding: 12px 14px 14px;
  display: grid;
  gap: 10px;
}

.odb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--odb-muted);
  font-size: 11px;
}

.odb-count {
  color: var(--odb-text);
  font-weight: 600;
}

.odb-label {
  font-size: 11px;
  color: var(--odb-muted);
}

.odb-textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid var(--odb-border);
  background: var(--odb-bg);
  color: var(--odb-text);
  padding: 10px 12px;
  resize: vertical;
  font-size: 11px;
}

.odb-switch {
  position: relative;
  width: 36px;
  height: 18px;
  display: inline-flex;
  align-items: center;
}

.odb-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.odb-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.odb-switch span::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  top: 1px;
  left: 2px;
  border-radius: 999px;
  background: #0d1524;
  transition: transform 0.2s ease;
}

.odb-switch input:checked + span {
  background: linear-gradient(135deg, rgba(32, 213, 198, 0.9), rgba(110, 231, 255, 0.9));
  border-color: rgba(32, 213, 198, 0.8);
  box-shadow: 0 0 0 2px rgba(32, 213, 198, 0.2);
}

.odb-switch input:checked + span::after {
  transform: translateX(16px);
}

.odb-highlight {
  position: fixed;
  border: 2px solid var(--odb-accent);
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(32, 213, 198, 0.2);
  pointer-events: none;
  opacity: 0;
}

.odb-tooltip {
  position: fixed;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--odb-bg);
  color: var(--odb-text);
  font-size: 11px;
  border: 1px solid var(--odb-border-strong);
  pointer-events: none;
  opacity: 0;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.odb-note {
  position: fixed;
  width: 220px;
  background: var(--odb-panel);
  border: 1px solid var(--odb-border);
  border-radius: 12px;
  color: var(--odb-text);
  box-shadow: var(--odb-shadow);
  pointer-events: auto;
}

.odb-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  cursor: grab;
}

.odb-note-close {
  background: transparent;
  border: none;
  color: var(--odb-muted);
  cursor: pointer;
}

.odb-note-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--odb-text);
  box-sizing: border-box;
  padding: 10px 12px;
  resize: vertical;
  font-size: 11px;
}

.odb-connectors {
  position: fixed;
  inset: 0;
  color: var(--odb-accent);
  pointer-events: none;
}
