.qbc-pm-modal {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
}

.qbc-pm-panel {
  width: min(1180px, 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.3);
  color: #0f172a;
}

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

.qbc-pm-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qbc-pm-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.qbc-pm-title p {
  margin: 2px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.qbc-pm-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 20px;
}

.qbc-pm-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qbc-pm-bot {
  min-width: 190px;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
}

.qbc-pm-bot option {
  color: #0f172a;
}

.qbc-pm-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.qbc-pm-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.qbc-pm-zonebar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 22px;
  background: #fff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  font-size: 13px;
}

.qbc-pm-zonebar label {
  font-weight: 600;
  color: #475569;
}

.qbc-pm-zonebar select {
  min-width: 170px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid #cbd5f5;
  background: #f8fafc;
  font-size: 13px;
}

.qbc-pm-zone-hint {
  margin-left: auto;
  color: #64748b;
  font-size: 12px;
}

.qbc-pm-tabs {
  display: flex;
  gap: 4px;
  padding: 0 18px;
  background: #fff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.qbc-pm-tabs button {
  padding: 12px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.qbc-pm-tabs button.is-active {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
}

.qbc-pm-body {
  flex: 1;
  overflow: auto;
  padding: 18px 22px 26px;
}

.qbc-pm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.qbc-pm-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.qbc-pm-stat span {
  font-size: 12px;
  color: #64748b;
}

.qbc-pm-stat strong {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
}

.qbc-pm-stat em {
  font-style: normal;
  font-size: 11px;
  color: #94a3b8;
}

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

.qbc-pm-card {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.qbc-pm-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.qbc-pm-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.qbc-pm-range {
  display: flex;
  gap: 4px;
}

.qbc-pm-range button {
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  cursor: pointer;
}

.qbc-pm-range button.is-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.qbc-pm-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 140px;
  padding-top: 8px;
}

.qbc-pm-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
}

.qbc-pm-bar i {
  display: block;
  width: 100%;
  max-width: 26px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #38bdf8, #1d4ed8);
  min-height: 3px;
}

.qbc-pm-bar span {
  font-size: 9px;
  color: #94a3b8;
  white-space: nowrap;
}

.qbc-pm-hours {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 110px;
}

.qbc-pm-hours div {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 3px;
}

.qbc-pm-hours i {
  display: block;
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #a78bfa, #6d28d9);
  min-height: 2px;
}

.qbc-pm-hours span {
  font-size: 8px;
  color: #94a3b8;
}

.qbc-pm-list,
.qbc-pm-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qbc-pm-list li,
.qbc-pm-events li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #f8fafc;
  font-size: 12px;
}

.qbc-pm-list b {
  color: #1d4ed8;
}

.qbc-pm-events em {
  font-style: normal;
  color: #94a3b8;
  font-size: 11px;
}

.qbc-pm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qbc-pm-tags span {
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
}

.qbc-pm-tags b {
  color: #1e40af;
}

.qbc-pm-empty {
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
  padding: 12px 0;
}

.qbc-pm-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.qbc-pm-test-group {
  min-width: 200px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid #cbd5f5;
  background: #fff;
  font-size: 13px;
}

.qbc-pm-btn {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid #cbd5f5;
  background: #fff;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.qbc-pm-btn:hover {
  border-color: #93c5fd;
  background: #f0f7ff;
}

.qbc-pm-btn.is-primary {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
}

.qbc-pm-btn.is-primary:hover {
  background: #1e40af;
}

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

.qbc-pm-preview {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 40px;
}

.qbc-pm-config {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.qbc-pm-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.qbc-pm-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: #475569;
  min-width: 160px;
}

.qbc-pm-form input[type="text"],
.qbc-pm-form input:not([type]),
.qbc-pm-form input[type="time"],
.qbc-pm-form select,
.qbc-pm-block select,
.qbc-pm-block textarea {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid #cbd5f5;
  background: #fff;
  font-size: 13px;
  color: #0f172a;
}

.qbc-pm-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  color: #475569;
}

.qbc-pm-block select,
.qbc-pm-block textarea {
  width: 100%;
}

.qbc-pm-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.qbc-pm-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
}

.qbc-pm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.qbc-pm-table th,
.qbc-pm-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.qbc-pm-table th {
  color: #64748b;
  font-weight: 600;
}

.qbc-pm-toast {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
}

.qbc-pm-panel {
  position: relative;
}

.qbc-pm-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.qbc-pm-toast[data-tone="success"] {
  background: #15803d;
}

.qbc-pm-toast[data-tone="warn"] {
  background: #b45309;
}

.qbc-pm-toast[data-tone="error"] {
  background: #b91c1c;
}

@media (max-width: 860px) {
  .qbc-pm-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .qbc-pm-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .qbc-pm-zone-hint {
    width: 100%;
    margin-left: 0;
  }
}

html[data-theme="dark"] .qbc-pm-panel {
  background: #0f172a;
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.3);
}

html[data-theme="dark"] .qbc-pm-zonebar,
html[data-theme="dark"] .qbc-pm-tabs,
html[data-theme="dark"] .qbc-pm-stat,
html[data-theme="dark"] .qbc-pm-card,
html[data-theme="dark"] .qbc-pm-test-group,
html[data-theme="dark"] .qbc-pm-btn,
html[data-theme="dark"] .qbc-pm-form input,
html[data-theme="dark"] .qbc-pm-form select,
html[data-theme="dark"] .qbc-pm-block select,
html[data-theme="dark"] .qbc-pm-block textarea {
  background: #111c33;
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.3);
}

html[data-theme="dark"] .qbc-pm-stat strong,
html[data-theme="dark"] .qbc-pm-card h3 {
  color: #f1f5f9;
}

html[data-theme="dark"] .qbc-pm-list li,
html[data-theme="dark"] .qbc-pm-events li {
  background: #16233d;
}

html[data-theme="dark"] .qbc-pm-tags span {
  background: #1e3a8a;
  color: #dbeafe;
}

html[data-theme="dark"] .qbc-pm-table th,
html[data-theme="dark"] .qbc-pm-table td {
  border-bottom-color: rgba(148, 163, 184, 0.22);
}

.qbc-pm-form input[type="number"],
.qbc-pm-form input[type="datetime-local"] {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid #cbd5f5;
  background: #fff;
  font-size: 13px;
  color: #0f172a;
}

.qbc-pm-order-keyword,
.qbc-pm-points-user {
  flex: 1;
  min-width: 180px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid #cbd5f5;
  background: #fff;
  font-size: 13px;
  color: #0f172a;
}

.qbc-pm-points-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #dbe4f5;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.qbc-pm-item-image {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin: 8px 0 2px;
  background: #eef2ff;
}

.qbc-pm-points-balance {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #dbe4f5;
}

.qbc-pm-points-balance span {
  font-size: 12px;
  color: #64748b;
}

.qbc-pm-points-balance strong {
  font-size: 26px;
  color: #0f172a;
}

.qbc-pm-points-balance em {
  font-style: normal;
  font-size: 12px;
  color: #64748b;
}

html[data-theme="dark"] .qbc-pm-form input[type="number"],
html[data-theme="dark"] .qbc-pm-form input[type="datetime-local"],
html[data-theme="dark"] .qbc-pm-order-keyword,
html[data-theme="dark"] .qbc-pm-points-user {
  background: #111c33;
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.3);
}

html[data-theme="dark"] .qbc-pm-points-card {
  background: #0f1a2e;
  border-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .qbc-pm-points-balance strong {
  color: #f1f5f9;
}
/* 积分商城补充样式 */
.qbc-pm-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.qbc-pm-hint {
  color: #64748b;
  font-size: 12px;
}

.qbc-pm-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
}

.qbc-pm-inline select {
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid #cbd5f5;
  background: #fff;
  font-size: 13px;
}

.qbc-pm-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.qbc-pm-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.qbc-pm-item.is-off {
  opacity: 0.62;
}

.qbc-pm-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.qbc-pm-item h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.qbc-pm-item header span {
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 11px;
}

.qbc-pm-item.is-off header span {
  background: #fef2f2;
  color: #b91c1c;
}

.qbc-pm-item-meta {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
}

.qbc-pm-item-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #475569;
}

.qbc-pm-item-row b {
  color: #1d4ed8;
}

.qbc-pm-item-desc {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  max-height: 48px;
  overflow: hidden;
}

.qbc-pm-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.qbc-pm-item-actions .qbc-pm-btn {
  padding: 6px 10px;
  font-size: 12px;
}

.qbc-pm-codes {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #cbd5f5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  margin-top: 8px;
}

.qbc-pm-codelist {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow: auto;
}

.qbc-pm-codelist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.qbc-pm-code-meta {
  flex-basis: 100%;
  color: #94a3b8;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.5;
}

.qbc-pm-codelist em {
  font-style: normal;
  color: #94a3b8;
  font-family: inherit;
}

.qbc-pm-tablewrap {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #fff;
}

.qbc-pm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.qbc-pm-table th,
.qbc-pm-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.qbc-pm-table th {
  color: #64748b;
  font-weight: 600;
  background: #f8fafc;
}

.qbc-pm-ops {
  display: flex;
  gap: 6px;
}

.qbc-pm-ops .qbc-pm-btn {
  padding: 5px 9px;
  font-size: 11px;
}

.qbc-pm-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 12px;
}

.qbc-pm-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
}

html[data-theme="dark"] .qbc-pm-item,
html[data-theme="dark"] .qbc-pm-tablewrap,
html[data-theme="dark"] .qbc-pm-inline select,
html[data-theme="dark"] .qbc-pm-codes {
  background: #111c33;
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.3);
}

html[data-theme="dark"] .qbc-pm-item h3 {
  color: #f1f5f9;
}

html[data-theme="dark"] .qbc-pm-codelist li,
html[data-theme="dark"] .qbc-pm-table th {
  background: #16233d;
}

html[data-theme="dark"] .qbc-pm-table td {
  border-bottom-color: rgba(148, 163, 184, 0.22);
}
