* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #3b9df8;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #333;
}

.page-top {
  text-align: center;
  padding: 20px 0;
}

.page-top img {
  width: calc(100% - 280px);
  max-width: 280px;
  height: auto;
}

.query-header {
  height: 0;
  padding: 0;
}

.header-holder {
  display: none;
}

.query-main {
  width: 100%;
  max-width: 600px;
  padding: 20px;
  margin: 0 auto;
}

.query-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  position: relative;
  top: -15px;
}

.query-card-return {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  height: 40px;
  border-radius: 6px;
  background: #3b9df8;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.query-card h2 {
  margin: 0 0 14px;
  color: #3b9df8;
  font-size: 18px;
}

.query-input-row {
  display: flex;
  gap: 8px;
}

.query-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.query-input-wrap input {
  width: 100%;
  border: 1px solid #3b9df8;
  border-radius: 6px;
  padding: 10px 86px 10px 12px;
  font-size: 14px;
  outline: none;
  min-width: 0;
}

.query-input-wrap input:focus {
  border-color: #3b9df8;
  box-shadow: 0 0 0 2px rgba(59,157,248,0.16);
}

.query-inside-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  bottom: 4px;
  border: 0;
  border-radius: 4px;
  background: #3b9df8;
  color: #fff;
  min-width: 70px;
  font-size: 14px;
  padding: 0 12px;
}

.query-input-row > button {
  border: 0;
  border-radius: 6px;
  background: #3b9df8;
  color: #fff;
  min-width: 74px;
  font-size: 14px;
  padding: 0 10px;
}

.query-input-row .ghost-btn {
  background: #eaf4ff;
  color: #1a68c8;
  border: 1px solid #bddbff;
}

.hint {
  margin: 10px 0 0;
  color: #888;
  font-size: 13px;
}

.latest-title {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #dce9fb;
  color: #3b9df8;
  font-size: 16px;
  font-weight: 600;
}

.latest-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.latest-item {
  border: 1px solid #dce9fb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  background: #f7fbff;
}

.latest-item-title {
  font-size: 15px;
  color: #163d72;
  margin-bottom: 6px;
}

.latest-item-time {
  font-size: 12px;
  color: #7f8da3;
}

.empty-row {
  color: #999;
  font-size: 13px;
  padding: 8px 0;
}

@media (max-width: 700px) {
  .page-top img {
    width: calc(100% - 200px);
  }

  .query-main {
    padding: 10px;
  }

  .query-input-row {
    flex-wrap: wrap;
  }

  .query-input-wrap {
    flex: 1 1 100%;
  }

  .query-input-row > button,
  .query-input-row > .query-card-return {
    flex: 1;
    height: 38px;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: white;
  width: 90%;
  max-width: 400px;
  border-radius: 12px;
  padding: 24px;
  transform: translateY(20px);
  transition: all 0.3s;
  position: relative;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.modal-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  color: #333;
}

.search-btn {
  background-color: #3b9df8;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 0;
  cursor: pointer;
  flex: 1;
  font-size: 14px;
}

.result-area {
  font-size: 14px;
}

.result-area:not(:empty) {
  border-top: 1px dashed #e0e0e0;
  padding-top: 15px;
  margin-top: 20px;
}

.result-item {
  margin-bottom: 10px;
}

.result-label {
  color: #666;
  margin-right: 5px;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  background-color: #e6f7ff;
  color: #1890ff;
  border: 1px solid #91d5ff;
}

.result-value-strong {
  font-weight: 700;
}

.search-result-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.search-result-actions {
  display: flex;
  justify-content: center;
  width: 90%;
  max-width: 400px;
}

.search-result-close-btn {
  width: 100px;
  flex: 0 0 auto;
}

#searchResultModal .modal-content {
  max-height: 60vh;
  display: flex;
  flex-direction: column;
}

#searchResultModal .modal-title {
  flex-shrink: 0;
}

#searchResultModal .result-area {
  overflow-y: auto;
  padding-right: 5px;
  flex: 1;
  min-height: 0;
}

#searchResultModal .result-area:not(:empty) {
  margin-top: 0;
}

#qrLoadingModal {
  z-index: 2100;
}

.admin-modal-content {
  width: 320px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  overflow: hidden;
  background-color: white;
  max-width: none !important;
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e8e8e8;
  background-color: #fff;
}

.admin-modal-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.admin-modal-close {
  font-size: 20px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.admin-modal-body {
  padding: 30px 20px;
  text-align: center;
  font-size: 16px;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.admin-loading-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3b9df8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.modal-header-custom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e8e8;
}

.modal-title-custom {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.modal-close-custom {
  font-size: 20px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.modal-footer-custom {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 15px;
  border-top: 1px solid #e8e8e8;
  margin-top: 20px;
}

.btn-common {
  padding: 8px 25px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.btn-submit-custom {
  background-color: #3b9df8;
  color: white;
}

.btn-submit-custom:hover {
  background-color: #1890ff;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
