.order-query-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.48);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: order-query-backdrop-in 0.2s ease both;
}

.order-query-card {
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: min(88dvh, 820px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: #fbfaf6;
  color: #18202d;
  box-shadow: 0 36px 100px -38px rgba(10, 18, 34, 0.7);
  animation: order-query-card-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.order-query-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid #e7e4dc;
  background:
    radial-gradient(circle at 90% 0%, rgba(220, 229, 255, 0.8), transparent 15rem),
    #fbfaf6;
}

.order-query-kicker {
  margin: 0 0 5px;
  color: #8b93a3;
  font-family: "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.order-query-title {
  margin: 0;
  color: #151d2a;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.order-query-sub {
  margin: 6px 0 0;
  color: #687184;
  font-size: 12.5px;
  line-height: 1.6;
}

.order-query-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid #e1ded6;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  color: #465064;
  font-size: 22px;
  line-height: 1;
  transition: background 0.16s ease, transform 0.16s ease;
}

.order-query-close:hover {
  background: #fff;
  transform: rotate(4deg);
}

.order-query-body {
  min-height: 230px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 26px 28px;
  -webkit-overflow-scrolling: touch;
}

.order-query-loading {
  display: grid;
  min-height: 230px;
  place-items: center;
  color: #687184;
  font-size: 13px;
}

.order-query-loading::before {
  content: "";
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border: 2px solid #dce2ed;
  border-top-color: #2d68db;
  border-radius: 50%;
  animation: order-query-spin 0.72s linear infinite;
}

.order-query-auth {
  width: min(410px, 100%);
  margin: 0 auto;
}

.order-query-auth-intro {
  margin: 0 0 18px;
  padding: 13px 15px;
  border: 1px solid #dfe7f7;
  border-radius: 12px;
  background: #f5f8ff;
  color: #536079;
  font-size: 12px;
  line-height: 1.7;
}

.order-query-form {
  display: grid;
  gap: 14px;
}

.order-query-field {
  display: grid;
  gap: 7px;
}

.order-query-field > span {
  color: #414b5e;
  font-size: 11.5px;
  font-weight: 700;
}

.order-query-field input,
.order-query-search input {
  width: 100%;
  height: 45px;
  border: 1px solid #d9dee8;
  border-radius: 11px;
  background: #fff;
  color: #18202d;
  outline: none;
  padding: 0 13px;
  font: inherit;
  font-size: 13.5px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.order-query-field input:focus,
.order-query-search input:focus {
  border-color: #8eafea;
  box-shadow: 0 0 0 3px rgba(44, 105, 219, 0.1);
}

.order-query-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5a6475;
  font-size: 12px;
}

.order-query-check input {
  width: 15px;
  height: 15px;
  accent-color: #286ff1;
}

.order-query-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #fff0f2;
  color: #c7475a;
  font-size: 12px;
}

.order-query-submit,
.order-query-refresh {
  min-height: 44px;
  border-radius: 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.order-query-submit {
  background: #286ff1;
  color: #fff;
  box-shadow: 0 13px 24px -18px rgba(40, 111, 241, 0.9);
}

.order-query-submit:disabled {
  cursor: progress;
  opacity: 0.62;
}

.order-query-auth-foot {
  margin: 15px 0 0;
  color: #8992a2;
  font-size: 11.5px;
  text-align: center;
}

.order-query-auth-foot a {
  color: #286ff1;
  font-weight: 700;
}

.order-query-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.order-query-search {
  position: relative;
}

.order-query-search::before {
  content: "⌕";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 14px;
  color: #7d8798;
  font-size: 20px;
  transform: translateY(-52%);
  pointer-events: none;
}

.order-query-search input {
  height: 43px;
  padding-left: 38px;
}

.order-query-refresh {
  min-height: 43px;
  padding: 0 18px;
  border: 1px solid #d5dfef;
  background: #fff;
  color: #2f64bd;
}

.order-query-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 13px;
  color: #717b8d;
  font-size: 11.5px;
}

.order-query-summary b {
  color: #d05263;
  font-size: 13px;
}

.order-query-user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px 4px 5px;
  border: 1px solid #e2e6ed;
  border-radius: 999px;
  background: #fff;
  color: #475166;
}

.order-query-user i {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #e8effc;
  color: #286ff1;
  font-style: normal;
  font-weight: 800;
}

.order-query-records {
  display: grid;
  gap: 12px;
}

.order-query-record {
  padding: 17px 18px;
  border: 1px solid #e5e8ed;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 14px 30px -31px rgba(22, 38, 66, 0.55);
}

.order-query-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f1f3;
}

.order-query-record-label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-query-record-label span {
  color: #a0a7b5;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.order-query-record-label b {
  overflow: hidden;
  color: #30394a;
  font-family: "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-query-status {
  flex: none;
  padding: 4px 9px;
  border-radius: 7px;
  background: #f1f3f7;
  color: #6b7485;
  font-size: 10.5px;
  font-weight: 700;
}

.order-query-status.paid,
.order-query-status.shipped,
.order-query-status.done {
  background: #e8f8ee;
  color: #0f9145;
}

.order-query-status.pending {
  background: #fff5de;
  color: #a96b16;
}

.order-query-status.cancelled {
  background: #fff0f2;
  color: #c7475a;
}

.order-query-record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin: 12px 0 0;
  color: #647084;
  font-size: 11.5px;
}

.order-query-record-meta b {
  color: #11a04c;
  font-size: 13px;
}

.order-query-products {
  margin: 11px 0 0;
  color: #2d3749;
  font-size: 12.5px;
  line-height: 1.7;
  word-break: break-word;
}

.order-query-record-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: #8991a0;
  font-size: 10.5px;
}

.order-query-record-foot button {
  flex: none;
  padding: 4px 8px;
  border-radius: 7px;
  background: #f4f7fc;
  color: #2e68cb;
  font: inherit;
  font-weight: 700;
}

.order-query-empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 34px 18px;
  border: 1px dashed #dfe3ea;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  color: #7c8596;
  text-align: center;
}

.order-query-empty-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 12px;
  border-radius: 20px;
  background: #edf3ff;
  color: #6995e5;
  font-size: 22px;
  font-weight: 800;
}

.order-query-empty b {
  color: #485268;
  font-size: 14px;
}

.order-query-empty span {
  margin-top: 3px;
  font-size: 11.5px;
}

@keyframes order-query-card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
}

@keyframes order-query-backdrop-in {
  from {
    opacity: 0;
  }
}

@keyframes order-query-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 680px) {
  .order-query-modal {
    align-items: end;
    padding: 0;
  }

  .order-query-card {
    width: 100%;
    max-height: 94dvh;
    border-radius: 22px 22px 0 0;
  }

  .order-query-head {
    padding: calc(19px + env(safe-area-inset-top)) 18px 17px;
  }

  .order-query-title {
    font-size: 22px;
  }

  .order-query-body {
    padding: 19px 16px calc(24px + env(safe-area-inset-bottom));
  }

  .order-query-toolbar {
    grid-template-columns: 1fr;
  }

  .order-query-refresh {
    min-height: 39px;
  }

  .order-query-summary {
    align-items: flex-start;
  }

  .order-query-record {
    padding: 15px 14px;
  }

  .order-query-record-foot {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .order-query-modal,
  .order-query-card,
  .order-query-loading::before {
    animation: none;
  }
}
