.qbc-gg-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
}

.qbc-gg-modal {
  width: min(1120px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  background: #f8fafc;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.qbc-gg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  color: #fff;
  background: linear-gradient(120deg, #0f172a 0%, #1e3a8a 58%, #0e7490 100%);
}

.qbc-gg-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.qbc-gg-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.14);
}

.qbc-gg-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qbc-gg-bot-select {
  min-width: 210px;
  max-width: 300px;
  height: 36px;
  padding: 0 10px;
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.28);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.32);
  font-size: 13px;
}

.qbc-gg-header-button,
.qbc-gg-close {
  height: 36px;
  padding: 0 14px;
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.28);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 13px;
}

.qbc-gg-header-button:hover,
.qbc-gg-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.qbc-gg-close {
  width: 36px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.qbc-gg-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 22px 8px;
}

.qbc-gg-warning {
  margin-bottom: 14px;
  padding: 12px 14px;
  color: #854d0e;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: #fffbeb;
  font-size: 12px;
  line-height: 1.7;
}

.qbc-gg-warning strong {
  color: #713f12;
}

.qbc-gg-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.qbc-gg-tab {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 18px;
  color: #475569;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.qbc-gg-tab:hover {
  background: #f1f5f9;
}

.qbc-gg-tab.is-active {
  color: #fff;
  background: #1d4ed8;
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.24);
}

.qbc-gg-content {
  padding-bottom: 8px;
}

.qbc-gg-footer {
  flex: 0 0 auto;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.qbc-gg-status {
  font-size: 12px;
  color: #64748b;
}

.qbc-gg-status.is-ok {
  color: #047857;
}

.qbc-gg-status.is-danger {
  color: #b91c1c;
}

.qbc-gg-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.qbc-gg-join-section {
  margin-bottom: 14px;
}

.qbc-gg-stat {
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.qbc-gg-stat-value {
  color: #0f172a;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.qbc-gg-stat-label {
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
}

.qbc-gg-stat.is-pending {
  border-color: #bfdbfe;
  background: linear-gradient(160deg, #eff6ff, #fff);
}

.qbc-gg-stat.is-ok {
  border-color: #bbf7d0;
  background: linear-gradient(160deg, #f0fdf4, #fff);
}

.qbc-gg-stat.is-danger {
  border-color: #fecaca;
  background: linear-gradient(160deg, #fef2f2, #fff);
}

.qbc-gg-stat.is-warn {
  border-color: #fde68a;
  background: linear-gradient(160deg, #fffbeb, #fff);
}

.qbc-gg-stat.is-muted {
  background: linear-gradient(160deg, #f8fafc, #fff);
}

.qbc-gg-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.qbc-gg-filter {
  height: 34px;
  padding: 0 10px;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}

.qbc-gg-count {
  margin-left: auto;
  color: #64748b;
  font-size: 12px;
}

.qbc-gg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qbc-gg-record {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-left-width: 4px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.035);
}

.qbc-gg-record.is-pending {
  border-left-color: #3b82f6;
}

.qbc-gg-record.is-ok {
  border-left-color: #10b981;
}

.qbc-gg-record.is-danger {
  border-left-color: #ef4444;
}

.qbc-gg-record.is-warn {
  border-left-color: #f59e0b;
}

.qbc-gg-record-main {
  flex: 1;
  min-width: 0;
}

.qbc-gg-record-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.qbc-gg-seq {
  padding: 2px 7px;
  color: #1d4ed8;
  border-radius: 6px;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

.qbc-gg-member {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.qbc-gg-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.qbc-gg-badge.is-pending {
  color: #1d4ed8;
  background: #dbeafe;
}

.qbc-gg-badge.is-ok {
  color: #047857;
  background: #d1fae5;
}

.qbc-gg-badge.is-danger {
  color: #b91c1c;
  background: #fee2e2;
}

.qbc-gg-badge.is-warn {
  color: #b45309;
  background: #fef3c7;
}

.qbc-gg-record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: #475569;
  font-size: 12px;
  line-height: 1.6;
}

.qbc-gg-record-meta.is-muted {
  margin-top: 4px;
  color: #94a3b8;
}

.qbc-gg-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: 250px;
}

.qbc-gg-action {
  height: 32px;
  padding: 0 11px;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}

.qbc-gg-action:hover {
  background: #f8fafc;
}

.qbc-gg-action.is-ok {
  color: #047857;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.qbc-gg-action.is-danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.qbc-gg-action.is-warn {
  color: #b45309;
  border-color: #fde68a;
  background: #fffbeb;
}

.qbc-gg-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.qbc-gg-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #fff;
}

.qbc-gg-empty-icon {
  margin-bottom: 8px;
  font-size: 34px;
}

.qbc-gg-settings {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.qbc-gg-section {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
}

.qbc-gg-section-head {
  margin-bottom: 13px;
}

.qbc-gg-section-title {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.qbc-gg-section-hint {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.6;
}

.qbc-gg-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.qbc-gg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.qbc-gg-field-label {
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.qbc-gg-field-hint {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.5;
}

.qbc-gg-input,
.qbc-gg-textarea {
  width: 100%;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  font-size: 13px;
  outline: none;
}

.qbc-gg-input {
  height: 36px;
  padding: 0 10px;
}

.qbc-gg-textarea {
  padding: 9px 10px;
  line-height: 1.6;
  resize: vertical;
}

.qbc-gg-input:focus,
.qbc-gg-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.qbc-gg-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
}

.qbc-gg-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #1d4ed8;
}

.qbc-gg-toggle-text {
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.qbc-gg-toggle-hint {
  margin-left: auto;
  color: #94a3b8;
  font-size: 11px;
}

.qbc-gg-operator-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.qbc-gg-operator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 12px;
}

.qbc-gg-operator input {
  accent-color: #1d4ed8;
}

.qbc-gg-subtitle {
  margin: 16px 0 8px;
  padding-top: 12px;
  color: #0f172a;
  border-top: 1px dashed #e2e8f0;
  font-size: 13px;
  font-weight: 700;
}

.qbc-gg-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.qbc-gg-primary,
.qbc-gg-secondary {
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.qbc-gg-primary {
  color: #fff;
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
}

.qbc-gg-primary:hover {
  background: #1e40af;
}

.qbc-gg-secondary {
  color: #334155;
  border: 1px solid #cbd5e1;
  background: #fff;
}

.qbc-gg-secondary:hover {
  background: #f8fafc;
}

.qbc-gg-primary:disabled,
.qbc-gg-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.qbc-gg-members {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  color: #94a3b8;
  font-size: 12px;
}

.qbc-gg-members-empty {
  padding: 8px 0;
}

.qbc-gg-member-chip {
  max-width: 100%;
  padding: 6px 9px;
  overflow: hidden;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  cursor: pointer;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qbc-gg-member-chip:hover {
  background: #dbeafe;
}

.qbc-gg-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.qbc-gg-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qbc-gg-details {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.qbc-gg-details-summary {
  padding: 10px 12px;
  color: #334155;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.qbc-gg-details[open] .qbc-gg-details-summary {
  border-bottom: 1px solid #e2e8f0;
}

.qbc-gg-details .qbc-gg-textarea {
  margin: 10px;
  width: calc(100% - 20px);
  background: #fff;
}

.qbc-gg-var-hint {
  padding: 0 12px 10px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.5;
}

.qbc-gg-test-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.qbc-gg-test-result {
  flex: 1;
  min-width: 220px;
  padding: 9px 12px;
  color: #475569;
  border: 1px dashed #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
  font-size: 12px;
}

.qbc-gg-save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.qbc-gg-save-note {
  color: #94a3b8;
  font-size: 12px;
}

@media (max-width: 820px) {
  .qbc-gg-overlay {
    padding: 0;
  }

  .qbc-gg-modal {
    width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

  .qbc-gg-header {
    flex-wrap: wrap;
    padding: 14px 16px;
  }

  .qbc-gg-header-actions {
    width: 100%;
  }

  .qbc-gg-bot-select {
    flex: 1;
    min-width: 0;
    max-width: none;
  }

  .qbc-gg-body {
    padding: 14px 14px 6px;
  }

  .qbc-gg-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qbc-gg-settings-grid,
  .qbc-gg-command-grid {
    grid-template-columns: 1fr;
  }

  .qbc-gg-record {
    flex-direction: column;
    align-items: stretch;
  }

  .qbc-gg-record-actions {
    max-width: none;
    justify-content: flex-start;
  }

  .qbc-gg-toolbar {
    flex-wrap: wrap;
  }

  .qbc-gg-count {
    width: 100%;
    margin-left: 0;
  }
}
