.qbc-gp-modal {
  position: fixed;
  inset: 0;
  z-index: 48;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
}

.qbc-gp-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1120px;
  max-height: calc(100vh - 20px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: #f8fafc;
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.34);
}

.qbc-gp-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  background: linear-gradient(120deg, #3b0764 0%, #7e22ce 52%, #a855f7 100%);
  color: #fff;
}

.qbc-gp-header h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.qbc-gp-header p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.qbc-gp-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.qbc-gp-toolbar {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

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

.qbc-gp-toolbar select,
.qbc-gp-toolbar input,
.qbc-gp-field input,
.qbc-gp-field select,
.qbc-gp-field textarea {
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  outline: none;
}

.qbc-gp-toolbar select,
.qbc-gp-toolbar input {
  padding: 6px 9px;
}

.qbc-gp-toolbar select:focus,
.qbc-gp-toolbar input:focus,
.qbc-gp-field input:focus,
.qbc-gp-field select:focus,
.qbc-gp-field textarea:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.14);
}

.qbc-gp-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 8px 20px 0;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  overflow-x: auto;
}

.qbc-gp-tab {
  flex: 0 0 auto;
  padding: 9px 14px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
}

.qbc-gp-tab.is-active {
  border-bottom-color: #9333ea;
  color: #7e22ce;
  font-weight: 600;
}

.qbc-gp-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 24px;
  overscroll-behavior: contain;
}

.qbc-gp-status {
  margin: 0 20px 10px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

.qbc-gp-status.is-error {
  background: #fef2f2;
  color: #b91c1c;
}

.qbc-gp-status.is-ok {
  background: #ecfdf5;
  color: #047857;
}

.qbc-gp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.qbc-gp-card,
.qbc-gp-section {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.qbc-gp-card {
  padding: 14px;
}

.qbc-gp-card-label {
  color: #64748b;
  font-size: 12px;
}

.qbc-gp-card-value {
  margin-top: 6px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 700;
}

.qbc-gp-pet {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(240px, 1.3fr);
  gap: 14px;
  margin-bottom: 14px;
}

.qbc-gp-pet-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 14px;
  border: 1px solid #e9d5ff;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 20%, #faf5ff 0%, #fff 70%);
}

.qbc-gp-pet-emoji {
  font-size: 64px;
  line-height: 1;
}

.qbc-gp-pet-name {
  margin-top: 10px;
  color: #581c87;
  font-size: 20px;
  font-weight: 700;
}

.qbc-gp-pet-meta {
  margin-top: 4px;
  color: #7e22ce;
  font-size: 12px;
}

.qbc-gp-bars {
  display: grid;
  gap: 10px;
}

.qbc-gp-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  color: #475569;
  font-size: 12px;
}

.qbc-gp-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f5f9;
}

.qbc-gp-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a855f7, #ec4899);
}

.qbc-gp-section {
  margin-top: 14px;
  padding: 16px;
}

.qbc-gp-section h4 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 14px;
}

.qbc-gp-hint {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.qbc-gp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qbc-gp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  cursor: pointer;
}

.qbc-gp-button:hover {
  background: #f8fafc;
}

.qbc-gp-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.qbc-gp-button-primary {
  border-color: #9333ea;
  background: #9333ea;
  color: #fff;
}

.qbc-gp-button-primary:hover {
  background: #7e22ce;
}

.qbc-gp-button-danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.qbc-gp-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

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

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

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

.qbc-gp-table tr:last-child td {
  border-bottom: 0;
}

.qbc-gp-empty {
  padding: 26px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}

.qbc-gp-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.qbc-gp-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #475569;
  font-size: 12px;
}

.qbc-gp-field input,
.qbc-gp-field select,
.qbc-gp-field textarea {
  width: 100%;
  padding: 7px 9px;
  box-sizing: border-box;
}

.qbc-gp-field textarea {
  min-height: 82px;
  resize: vertical;
  font-family: Consolas, "SFMono-Regular", ui-monospace, Menlo, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", monospace;
  line-height: 1.55;
}

.qbc-gp-field-wide {
  grid-column: 1 / -1;
}

.qbc-gp-toggle {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.qbc-gp-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

@media (max-width: 760px) {
  .qbc-gp-modal {
    padding: 0;
  }

  .qbc-gp-panel {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

  .qbc-gp-header {
    padding: 14px 16px;
  }

  .qbc-gp-toolbar,
  .qbc-gp-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .qbc-gp-pet {
    grid-template-columns: 1fr;
  }

  .qbc-gp-pet-emoji {
    font-size: 52px;
  }
}
