.ruleGroup {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  border-color: #8081a2;
  border-style: solid;
  border-radius: 0.25rem;
  border-width: 1px;
  background: rgba(0, 75, 183, 0.2);
}
.ruleGroup .ruleGroup-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ruleGroup .ruleGroup-body:empty {
  display: none;
}
.ruleGroup .ruleGroup-header,
.ruleGroup .rule {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.ruleGroup .rule .rule-value:has(.rule-value-list-item) {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

[data-inlinecombinators=disabled] .dndOver.rule, [data-inlinecombinators=disabled] .dndOver.ruleGroup-header {
  border-bottom-width: 2px;
  border-bottom-style: dashed;
  border-bottom-color: rebeccapurple;
  padding-bottom: 0.5rem;
}
[data-inlinecombinators=disabled] .dndOver.rule.dndCopy, [data-inlinecombinators=disabled] .dndOver.ruleGroup-header.dndCopy {
  border-bottom-color: #669933;
}

[data-inlinecombinators=enabled] .dndOver.rule:last-child, [data-inlinecombinators=enabled] .dndOver.ruleGroup-header, [data-inlinecombinators=enabled] .dndOver.rule + .betweenRules, [data-inlinecombinators=enabled] .dndOver.betweenRules {
  border-bottom-width: 2px;
  border-bottom-style: dashed;
  border-bottom-color: rebeccapurple;
  padding-bottom: 0.5rem;
}
[data-inlinecombinators=enabled] .dndOver.rule:last-child.dndCopy, [data-inlinecombinators=enabled] .dndOver.ruleGroup-header.dndCopy, [data-inlinecombinators=enabled] .dndOver.rule + .betweenRules.dndCopy, [data-inlinecombinators=enabled] .dndOver.betweenRules.dndCopy {
  border-bottom-color: #669933;
}

.ruleGroup.dndDragging,
.rule.dndDragging {
  opacity: 0.5;
}
.ruleGroup .queryBuilder-dragHandle,
.rule .queryBuilder-dragHandle {
  cursor: move;
}

.queryBuilder-branches .ruleGroup-body {
  margin-left: calc(2 * 0.5rem);
}
.queryBuilder-branches .rule,
.queryBuilder-branches .ruleGroup .ruleGroup {
  position: relative;
}
.queryBuilder-branches .rule::before, .queryBuilder-branches .rule::after,
.queryBuilder-branches .ruleGroup .ruleGroup::before,
.queryBuilder-branches .ruleGroup .ruleGroup::after {
  content: "";
  width: 0.5rem;
  left: calc(-0.5rem - 1px);
  border-color: #8081a2;
  border-style: solid;
  border-radius: 0;
  position: absolute;
}
.queryBuilder-branches .rule::before,
.queryBuilder-branches .ruleGroup .ruleGroup::before {
  top: -0.5rem;
  height: calc(50% + 0.5rem);
  border-width: 0 0 1px 1px;
}
.queryBuilder-branches .rule:last-child::before,
.queryBuilder-branches .ruleGroup .ruleGroup:last-child::before {
  border-bottom-left-radius: 0.25rem;
}
.queryBuilder-branches .rule::after,
.queryBuilder-branches .ruleGroup .ruleGroup::after {
  top: 50%;
  height: 50%;
  border-width: 0 0 0 1px;
}
.queryBuilder-branches .rule:last-child::after,
.queryBuilder-branches .ruleGroup .ruleGroup:last-child::after {
  display: none;
}
.queryBuilder-branches .ruleGroup .ruleGroup::before, .queryBuilder-branches .ruleGroup .ruleGroup::after {
  left: calc(calc(-0.5rem - 1px) - 1px);
}
.queryBuilder-branches .ruleGroup .ruleGroup::before {
  top: calc(-0.5rem - 1px);
  height: calc(50% + 0.5rem + 1px);
}
.queryBuilder-branches .ruleGroup .ruleGroup::after {
  height: calc(50% + 1px);
}
.queryBuilder-branches .betweenRules {
  position: relative;
}
.queryBuilder-branches .betweenRules::before {
  content: "";
  width: 0.5rem;
  left: calc(-0.5rem - 1px);
  border-color: #8081a2;
  border-style: solid;
  border-radius: 0;
  position: absolute;
  top: -0.5rem;
  height: calc(100% + 0.5rem);
  border-width: 0 0 0 1px;
}

/*# sourceMappingURL=query-builder.css.map */
/* Ensure QueryBuilder fits inside container */
.widget-query-config .queryBuilder {
  width: 100%;
  box-sizing: border-box;
}

/* Align rule rows properly */
.widget-query-config .ruleGroup .rule {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* Fix remove (X) button going outside */
.widget-query-config .ruleGroup .rule .rule-remove {
  position: relative !important;
  margin-left: 6px;
}

/* Keep inputs inside container */
.widget-query-config .ruleGroup .rule select,
.widget-query-config .ruleGroup .rule input {
  max-width: 200px;
}

/* Fix header alignment */
.widget-query-config .ruleGroup-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Prevent overflow inside modal */
.ruleGroup {
  overflow: visible !important;
}.react-grid-layout {
  position: relative;
  transition: height 200ms ease;
}
.react-grid-item {
  transition: all 200ms ease;
  transition-property: left, top, width, height;
}
.react-grid-item img {
  pointer-events: none;
  user-select: none;
}
.react-grid-item.cssTransforms {
  transition-property: transform, width, height;
}
.react-grid-item.resizing {
  transition: none;
  z-index: 1;
  will-change: width, height;
}

.react-grid-item.react-draggable-dragging {
  transition: none;
  z-index: 3;
  will-change: transform;
}

.react-grid-item.dropping {
  visibility: hidden;
}

.react-grid-item.react-grid-placeholder {
  background: red;
  opacity: 0.2;
  transition-duration: 100ms;
  z-index: 2;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-user-select: none;
  user-select: none;
}

.react-grid-item.react-grid-placeholder.placeholder-resizing {
  transition: none;
}

.react-grid-item > .react-resizable-handle {
  position: absolute;
  width: 20px;
  height: 20px;
}

.react-grid-item > .react-resizable-handle::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-right: 2px solid rgba(0, 0, 0, 0.4);
  border-bottom: 2px solid rgba(0, 0, 0, 0.4);
}

.react-resizable-hide > .react-resizable-handle {
  display: none;
}

.react-grid-item > .react-resizable-handle.react-resizable-handle-sw {
  bottom: 0;
  left: 0;
  cursor: sw-resize;
  transform: rotate(90deg);
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-se {
  bottom: 0;
  right: 0;
  cursor: se-resize;
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-nw {
  top: 0;
  left: 0;
  cursor: nw-resize;
  transform: rotate(180deg);
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-ne {
  top: 0;
  right: 0;
  cursor: ne-resize;
  transform: rotate(270deg);
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-w,
.react-grid-item > .react-resizable-handle.react-resizable-handle-e {
  top: 50%;
  margin-top: -10px;
  cursor: ew-resize;
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-w {
  left: 0;
  transform: rotate(135deg);
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-e {
  right: 0;
  transform: rotate(315deg);
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-n,
.react-grid-item > .react-resizable-handle.react-resizable-handle-s {
  left: 50%;
  margin-left: -10px;
  cursor: ns-resize;
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-n {
  top: 0;
  transform: rotate(225deg);
}
.react-grid-item > .react-resizable-handle.react-resizable-handle-s {
  bottom: 0;
  transform: rotate(45deg);
}
.react-resizable {
  position: relative;
}
.react-resizable-handle {
  position: absolute;
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-origin: content-box;
  box-sizing: border-box;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');
  background-position: bottom right;
  padding: 0 3px 3px 0;
}
.react-resizable-handle-sw {
  bottom: 0;
  left: 0;
  cursor: sw-resize;
  transform: rotate(90deg);
}
.react-resizable-handle-se {
  bottom: 0;
  right: 0;
  cursor: se-resize;
}
.react-resizable-handle-nw {
  top: 0;
  left: 0;
  cursor: nw-resize;
  transform: rotate(180deg);
}
.react-resizable-handle-ne {
  top: 0;
  right: 0;
  cursor: ne-resize;
  transform: rotate(270deg);
}
.react-resizable-handle-w,
.react-resizable-handle-e {
  top: 50%;
  margin-top: -10px;
  cursor: ew-resize;
}
.react-resizable-handle-w {
  left: 0;
  transform: rotate(135deg);
}
.react-resizable-handle-e {
  right: 0;
  transform: rotate(315deg);
}
.react-resizable-handle-n,
.react-resizable-handle-s {
  left: 50%;
  margin-left: -10px;
  cursor: ns-resize;
}
.react-resizable-handle-n {
  top: 0;
  transform: rotate(225deg);
}
.react-resizable-handle-s {
  bottom: 0;
  transform: rotate(45deg);
}* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #fef3e2 100%);
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
}

#root {
  min-height: 100vh;
}

/* React Grid Layout - no background behind chart */
.react-grid-layout {
  background: transparent;
  border-radius: 12px;
  padding: 12px;
  min-height: 400px;
  width: 100% !important;
}

.react-grid-layout .react-grid-placeholder {
  z-index: 1;
}

.react-grid-item {
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.react-grid-item > .react-resizable-handle {
  position: absolute !important;
  width: 24px !important;
  height: 24px !important;
  right: 0 !important;
  bottom: 0 !important;
  padding: 0 !important;
  cursor: se-resize !important;
  z-index: 10;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%236366f1' d='M16 16v-4h-4v4h4zm-6 0v-4H6v4h4zm6-6V6h-4v4h4zM6 10V6H2v4h4z'/%3E%3C/svg%3E") no-repeat bottom right !important;
}

.react-grid-item > .react-resizable-handle:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%234f46e5' d='M16 16v-4h-4v4h4zm-6 0v-4H6v4h4zm6-6V6h-4v4h4zM6 10V6H2v4h4z'/%3E%3C/svg%3E") !important;
}

.react-grid-item > .react-resizable-handle::after {
  display: none;
}

.dashboard-grid .react-grid-item {
  touch-action: none;
  padding-right: 28px;
  padding-bottom: 28px;
}

.react-grid-item.react-draggable-dragging {
  transition: none;
  z-index: 1000;
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.25);
}

.react-grid-item.react-grid-placeholder {
  background: rgba(99, 102, 241, 0.15);
  border-radius: 10px;
  z-index: 0;
  border: 2px dashed #6366f1;
}

/* Query builder - light; background expands with content */
.react-querybuilder {
  --qb-background: #f8fafc;
  --qb-border: #cbd5e1;
  --qb-button-background: #e2e8f0;
  --qb-button-hover: #cbd5e1;
  width: 100%;
  min-width: 0;
}

.react-querybuilder .ruleGroup {
  background: var(--qb-background);
  border: 1px solid var(--qb-border);
  border-radius: 8px;
  padding: 10px;
  width: 100%;
  min-width: min-content;
  box-sizing: border-box;
}

.react-querybuilder .ruleGroup-body,
.react-querybuilder .ruleGroup-header {
  width: 100%;
  min-width: 0;
}

.react-querybuilder .rule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.react-querybuilder select,
.react-querybuilder input {
  background: #fff;
  border: 1px solid var(--qb-border);
  color: #1e293b;
  border-radius: 6px;
  padding: 6px 8px;
  min-width: 0;
  flex: 1 1 auto;
  max-width: 100%;
}

.react-querybuilder button {
  background: var(--qb-button-background);
  color: #334155;
  border: 1px solid var(--qb-border);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

.react-querybuilder button:hover {
  background: var(--qb-button-hover);
}

@keyframes chartLoaderSpin {
  to {
    transform: rotate(360deg);
  }
}
