.job-query-page {
  max-width: 1680px;
  margin: 0 auto;
  padding: 20px;
}

.job-query-header {
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 16px;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--portal-brand-start, #667eea) 0%,
    var(--portal-brand-end, #764ba2) 100%
  );
  box-shadow: var(--portal-shadow-panel, 0 8px 24px rgba(79, 70, 229, 0.18));
}

.job-query-header h1 {
  margin: 0;
  font-size: 24px;
}

.job-query-header p {
  margin: 8px 0 0;
  font-size: 13px;
  opacity: 0.9;
}

.job-query-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.job-query-muted {
  font-size: 12px;
  color: #64748b;
}

.job-query-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
}

.job-query-filter input {
  height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
}

.job-query-btn {
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.job-query-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.job-query-btn-primary {
  background: #4f46e5;
  color: #fff;
}

.job-query-btn-success {
  background: #16a34a;
  color: #fff;
}

.job-query-btn-ghost {
  background: #f1f5f9;
  color: #334155;
}

.job-query-resource-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.job-query-resource {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.job-query-resource.selected {
  border-color: #6366f1;
  background: #eef2ff;
}

.job-query-resource input {
  margin: 0;
}

.job-query-resource-meta {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.job-query-resource-meta strong {
  font-size: 13px;
  color: #1f2937;
}

.job-query-resource-meta span {
  font-size: 12px;
  color: #64748b;
}

.job-query-table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

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

.job-query-table th,
.job-query-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.job-query-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  text-align: left;
  z-index: 1;
}

.job-query-empty {
  padding: 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

.job-query-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
}

.job-query-success {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
}

@media (max-width: 1200px) {
  .job-query-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .job-query-page {
    padding: 12px;
  }

  .job-query-resource-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
