body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #050816;
  color: #e5e7eb;
}

.page {
  padding: 16px 20px;
}

.title {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 500;
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel {
  background-color: #020617;
  border-radius: 6px;
  border: 1px solid #1f2937;
  padding: 8px 10px 10px 10px;
  box-sizing: border-box;
}

.panel-left {
  flex: 1;
  min-width: 0;
}

.panel-right {
  flex: 1;
  min-width: 0;
}

.panel-header {
  font-size: 12px;
  margin-bottom: 6px;
  color: #9ca3af;
}

.panel-footer {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.expression-input {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  box-sizing: border-box;
  background-color: #020617;
  border-radius: 4px;
  border: 1px solid #374151;
  color: #e5e7eb;
  padding: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

.button {
  background-color: #2563eb;
  color: white;
  border-radius: 4px;
  border: none;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.button:hover {
  background-color: #1d4ed8;
}

.error-message {
  font-size: 11px;
  color: #f97316;
}

.tree-root {
  min-height: 220px;
  border-radius: 4px;
}

.tree-group {
  border-radius: 4px;
  border: 1px solid #4b5563;
  padding: 4px 8px 4px 8px;
  margin-bottom: 4px;
  background-color: #020617;
}

.tree-group-header {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 2px;
  color: #e5e7eb;
}

.tree-group-header.and {
  background-color: #064e3b;
}

.tree-group-header.or {
  background-color: #92400e;
}

.tree-group-header.xor {
  background-color: #4c1d95;
}

.tree-children {
  margin-top: 2px;
  padding-left: 10px;
  border-left: 1px solid #39ff14;
}

.tree-leaf {
  display: flex;
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 3px;
  border: 1px solid #4b5563;
  background-color: #020617;
}

.tree-leaf-prefix {
  min-width: 18px;
  padding-right: 4px;
  margin-right: 4px;
  border-right: 1px solid #374151;
  text-align: right;
  color: #ff39ff;
  flex-shrink: 0;
}

.tree-leaf-body {
  white-space: pre-wrap;
  flex: 1;
}

.tree-leaf + .tree-leaf {
  margin-top: 4px;
}

.tree-group + .tree-leaf,
.tree-group + .tree-group {
  margin-top: 4px;
}

.tree-children {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
