#wistor-nextgen-extension-root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #111827;
}

#wistor-nextgen-extension-root .ng-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2998;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 19px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
  cursor: pointer;
}

#wistor-nextgen-extension-root .ng-panel {
  position: fixed;
  top: 72px;
  right: 18px;
  z-index: 2999;
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100vh - 104px);
  display: none;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
}

#wistor-nextgen-extension-root .ng-panel.is-open {
  display: flex;
  flex-direction: column;
}

#wistor-nextgen-extension-root .ng-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

#wistor-nextgen-extension-root .ng-panel header strong {
  display: block;
  font-size: 15px;
  color: #1e3a8a;
}

#wistor-nextgen-extension-root .ng-panel header span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #64748b;
}

#wistor-nextgen-extension-root .ng-panel header button {
  width: 28px;
  height: 28px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  cursor: pointer;
}

#wistor-nextgen-extension-root .ng-body {
  overflow: auto;
  padding: 12px;
}

#wistor-nextgen-extension-root .ng-section {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

#wistor-nextgen-extension-root .ng-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #111827;
}

#wistor-nextgen-extension-root .ng-section p,
#wistor-nextgen-extension-root .ng-muted {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

#wistor-nextgen-extension-root .ng-label {
  display: block;
  margin: 8px 0 5px;
  color: #475569;
  font-size: 12px;
}

#wistor-nextgen-extension-root select {
  width: 100%;
  height: 32px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font-size: 12px;
}

#wistor-nextgen-extension-root .ng-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

#wistor-nextgen-extension-root .ng-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #1d4ed8;
  font-size: 12px;
  cursor: pointer;
}

#wistor-nextgen-extension-root .ng-actions button.ng-primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

#wistor-nextgen-extension-root .ng-two-fields,
#wistor-nextgen-extension-root .ng-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

#wistor-nextgen-extension-root .ng-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

#wistor-nextgen-extension-root .ng-check {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #334155;
  font-size: 12px;
}

#wistor-nextgen-extension-root .ng-check input {
  margin: 0;
}

#wistor-nextgen-extension-root .ng-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#wistor-nextgen-extension-root .ng-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  white-space: nowrap;
}

#wistor-nextgen-extension-root .ng-chip.is-on {
  background: #ecfdf5;
  color: #047857;
}

#wistor-nextgen-extension-root .ng-result {
  max-height: 380px;
  overflow: auto;
}

#wistor-nextgen-extension-root .ng-json {
  margin: 0;
  padding: 10px;
  overflow: auto;
  border-radius: 6px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 11px;
  line-height: 1.45;
}

#wistor-nextgen-extension-root .ng-mini-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 11px;
}

#wistor-nextgen-extension-root .ng-mini-table th,
#wistor-nextgen-extension-root .ng-mini-table td {
  padding: 6px;
  border: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

#wistor-nextgen-extension-root .ng-mini-table th {
  background: #f1f5f9;
  color: #334155;
}

#wistor-nextgen-extension-root .ng-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0;
}

#wistor-nextgen-extension-root .ng-kpis div {
  padding: 8px;
  border-radius: 6px;
  background: #f8fafc;
}

#wistor-nextgen-extension-root .ng-kpis strong,
#wistor-nextgen-extension-root .ng-kpis span {
  display: block;
}

#wistor-nextgen-extension-root .ng-kpis strong {
  color: #1e3a8a;
  font-size: 14px;
}

#wistor-nextgen-extension-root .ng-kpis span {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
}

#wistor-nextgen-extension-root .ng-subtitle {
  margin-top: 10px;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 700;
}

#wistor-nextgen-extension-root .ng-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

#wistor-nextgen-extension-root .ng-chain-node {
  padding: 5px 8px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
}

#wistor-nextgen-extension-root .ng-chain-arrow {
  color: #94a3b8;
  font-size: 12px;
}

#wistor-nextgen-extension-root .ng-detail {
  margin-top: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
}

#wistor-nextgen-extension-root .ng-detail summary {
  padding: 8px;
  cursor: pointer;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 700;
}

#wistor-nextgen-extension-root .ng-alert {
  padding: 9px 10px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 12px;
  line-height: 1.5;
}

#wistor-nextgen-extension-root .ng-alert-error {
  background: #fef2f2;
  color: #b91c1c;
}

#wistor-nextgen-extension-root .ng-loading {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
}

.ng-toast {
  position: fixed;
  right: 18px;
  bottom: 66px;
  z-index: 3000;
  padding: 9px 12px;
  border-radius: 7px;
  background: #111827;
  color: #fff;
  font: 12px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.ng-toast.is-out {
  opacity: 0;
  transform: translateY(8px);
}

@media (max-width: 720px) {
  #wistor-nextgen-extension-root .ng-panel {
    top: 56px;
    right: 8px;
    width: calc(100vw - 16px);
    max-height: calc(100vh - 84px);
  }

  #wistor-nextgen-extension-root .ng-two-fields,
  #wistor-nextgen-extension-root .ng-two-col,
  #wistor-nextgen-extension-root .ng-kpis {
    grid-template-columns: 1fr;
  }

  #wistor-nextgen-extension-root .ng-check-grid {
    grid-template-columns: 1fr;
  }
}
