.hp-pq {
  --hp-pq-bg: #f4f7fb;
  --hp-pq-card: #ffffff;
  --hp-pq-line: #e4eaf3;
  --hp-pq-text: #1f2a37;
  --hp-pq-muted: #6b7280;
  --hp-pq-primary: #2563eb;
  --hp-pq-primary-hover: #1d4ed8;
  --hp-pq-row-hover: #f3f8ff;
  box-sizing: border-box;
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: linear-gradient(180deg, #f9fbff 0%, var(--hp-pq-bg) 100%);
  color: var(--hp-pq-text);
}

.hp-pq *,
.hp-pq *::before,
.hp-pq *::after {
  box-sizing: border-box;
}

.hp-pq-container {
  max-width: 1320px;
  margin: 24px auto;
  padding: 0 16px;
}

.hp-pq-panel {
  background: var(--hp-pq-card);
  border: 1px solid var(--hp-pq-line);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(2, 28, 78, 0.06);
  overflow: hidden;
}

.hp-pq-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hp-pq-line);
  background: #fbfdff;
}

.hp-pq-panel-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.hp-pq-panel-subtitle {
  color: var(--hp-pq-muted);
  font-size: 13px;
}

.hp-pq-form-wrap {
  padding: 18px 20px;
  border-bottom: 1px solid var(--hp-pq-line);
}

.hp-pq-form-grid {
  display: grid;
  grid-template-columns: minmax(170px, 1.35fr) minmax(170px, 1.35fr) minmax(120px, 0.9fr) minmax(130px, 1fr) minmax(340px, 2.35fr) minmax(60px, 0.75fr);
  gap: 12px;
  margin-bottom: 0;
  align-items: end;
  width: 100%;
}

.hp-pq-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid #e7edf6;
  border-radius: 10px;
  padding: 10px;
}

.hp-pq-field label {
  font-size: 13px;
  color: #475467;
  font-weight: 600;
}

.hp-pq-field input,
.hp-pq-field select {
  width: 100%;
  height: 38px;
  border: 1px solid #d7e1f0;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.hp-pq-input-shell {    
  background: #fcfdff;
  padding: 3px;
}

.hp-pq-field input:focus,
.hp-pq-field select:focus {
  border-color: #95b4ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hp-pq-combo {
  position: relative;    
  background: #fcfdff;
  padding: 3px;
  min-height: 46px;
}

.hp-pq-combo input {
  padding-right: 36px;
  height: 38px;
}

.hp-pq-combo input:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.hp-pq-combo-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #7b8ba8;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.hp-pq-combo.hp-pq-combo--open .hp-pq-combo-arrow {
  transform: translateY(-50%) rotate(180deg);
  color: #2563eb;
}

.hp-pq-combo-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  border: 1px solid #d3def2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  max-height: 280px;
  overflow-y: auto;
  z-index: 30;
  display: none;
  padding: 6px 0;
}

.hp-pq-combo.hp-pq-combo--open .hp-pq-combo-menu {
  display: block;
}

/* 首页查询区下拉层级修复：避免被 tabs 容器裁剪或被后续模块盖住 */
.intabs-basic {
  position: relative;
  z-index: 20;
}

.intabs-basic .tabs-contentnr {
  position: relative;
  overflow: visible !important;
  z-index: 30;
}

.intabs-basic .tabs-contentnr .div,
.intabs-basic .tabs-contentnr .div.tab-content-active,
.intabs-basic .tabs-contentnr .div .fba-content,
.intabs-basic .tabs-contentnr .div .fba-inner,
.intabs-basic .tabs-contentnr .div .fba-inner .hp-pq-field {
  overflow: visible;
}

.intabs-basic .tabs-contentnr .div .fba-inner .hp-pq-field {
  position: relative;
  z-index: 40;
}

.intabs-basic .tabs-contentnr .div .fba-inner .hp-pq-combo {
  position: relative;
  z-index: 60;
}

.intabs-basic .tabs-contentnr .div .fba-inner .hp-pq-combo.hp-pq-combo--open {
  z-index: 1000;
}

.intabs-basic .tabs-contentnr .div .fba-inner .hp-pq-combo-menu {
  z-index: 1100;
}

.hp-pq-combo-option {
  padding: 5px 10px;
  line-height: 1.3;
  font-size: 12px;
  cursor: pointer;
  color: #1f2a37;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.hp-pq-combo-option:hover,
.hp-pq-combo-option.hp-pq-combo-option--active {
  background: #eff5ff;
  color: #1d4ed8;
}

.hp-pq-combo-meta {
  color: #64748b;
  font-size: 11px;
  white-space: nowrap;
}

.hp-pq-combo-empty {
  padding: 10px;
  font-size: 13px;
  color: #6b7280;
}

.hp-pq-unit {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hp-pq-input-group {
  display: flex;
  align-items: center;
  border: 1px solid #d7e1f0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.hp-pq-input-group input {
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0;
  padding-right: 8px;
  min-width: 0;
}

.hp-pq-input-group:focus-within {
  border-color: #95b4ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.hp-pq-input-unit {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: #8b97ab;
  line-height: 1;
  padding: 0 10px;
  border-left: 1px solid #e6ecf7;
  letter-spacing: 0.3px;
}

.hp-pq-actions {
  display: flex;
  gap: 10px;
}

.hp-pq-field--actions {
  justify-content: flex-end;
  min-width: 176px;
  border: 0;
  padding: 0;
  gap: 0;
  align-self: stretch;
}

.hp-pq-action-label {
  display: none;
}

.hp-pq-btn {
  border: 0;
  border-radius: 10px;
  height: 100%;
  padding: 0 26px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.hp-pq-actions {
  height: 100%;
}

.hp-pq-btn-primary {
  color: #fff;
  background: var(--hp-pq-primary);
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.24);
}

.hp-pq-btn-primary:hover {
  background: var(--hp-pq-primary-hover);
  transform: translateY(-1px);
}

.hp-pq-btn-ghost {
  color: #2f4f9d;
  background: #edf3ff;
}

.hp-pq-btn-ghost:hover { background: #dde8ff; }

.hp-pq-result-wrap {
  padding: 14px 20px 20px;
  position: relative;
  min-height: 220px;
}

.hp-pq-loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.86);
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: #1e40af;
  font-weight: 600;
}

.hp-pq-loading.hp-pq-loading--visible { display: flex; }

.hp-pq-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid #bfd3ff;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: hp-pq-spin 0.8s linear infinite;
}

@keyframes hp-pq-spin {
  to { transform: rotate(360deg); }
}

.hp-pq-empty {
  color: var(--hp-pq-muted);
  font-size: 14px;
  text-align: center;
  padding: 42px 20px;
  border: 1px dashed #d7deea;
  border-radius: 10px;
  background: #fafcff;
}

.hp-pq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.hp-pq-table th,
.hp-pq-table td {
  border: 1px solid #e5ebf5;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.hp-pq-table thead th {
  background: #f6f9ff;
  color: #334155;
  font-weight: 700;
}

.hp-pq-table tbody tr.hp-pq-table-row:hover {
  background: var(--hp-pq-row-hover);
}

.hp-pq-cell-action {
  text-align: center !important;
  vertical-align: middle !important;
}

.hp-pq-iconbtn {
  border: 0;
  background: transparent;
  color: #1d4ed8;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.hp-pq-iconbtn:hover {
  color: #1e40af;
}

.hp-pq-iconbtn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.hp-pq-iconbtn.hp-pq-iconbtn--open svg {
  transform: rotate(180deg);
}

.hp-pq-th-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hp-pq-detail {
  display: none;
  background: #fcfdff;
}

.hp-pq-detail.hp-pq-detail--open {
  display: table-row;
}

.hp-pq-detail-box {
  font-size: 12px;
  color: #334155;
  line-height: 1.7;
  padding: 2px 0;
}

@media (max-width: 1024px) {
  .hp-pq-form-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .hp-pq-field--actions {
    grid-column: 1 / -1;
    min-width: 0;
    justify-content: flex-start;
  }
  .hp-pq-unit { grid-template-columns: 1fr; }
}