.query-page { display: grid; gap: 20px; }
.query-card { padding: 20px; }
.query-row { display: flex; gap: 10px; align-items: center; flex-wrap: nowrap; }
.query-row > input[type="text"],
.query-row > input:not(.verify-row input) { flex: 1 1 auto; min-width: 0; }
.verify-row { display: flex; gap: 6px; flex: 0 0 auto; }
.verify-row input { flex: 0 0 150px; width: 150px; min-width: 0; text-align: center; letter-spacing: 2px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.verify-btn { flex-shrink: 0; padding: 0 12px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; color: #2563eb; font-size: 13px; cursor: pointer; white-space: nowrap; height: 40px; }
.verify-btn:hover:not(:disabled) { background: #2563eb; color: #fff; }
.verify-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.query-row > .portal-primary { flex-shrink: 0; height: 40px; white-space: nowrap; padding: 0 20px; }
.query-row > .portal-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.recent-list { overflow: hidden; }
.recent-item { width: 100%; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border: 0; background: #fff; color: #0f172a; text-align: left; }
.recent-item:hover { background: #eff6ff; }
.recent-item span:first-child { min-width: 0; }
.recent-item b, .recent-item small { display: block; }
.recent-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.recent-item small, .result-head small { margin-top: 4px; color: #94a3b8; font-family: monospace; font-size: 12px; }
.recent-status { display: flex; align-items: center; gap: 8px; margin-left: 16px; color: #64748b; font-size: 12px; white-space: nowrap; }
.recent-status i, .result-head i, .timeline-item i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.recent-status em { color: #93c5fd; font-size: 18px; font-style: normal; }
.result-card { padding: 20px; }
.query-empty { padding: 32px 20px; text-align: center; }
.query-empty > div { margin-bottom: 8px; font-size: 24px; }
.query-empty b, .query-empty small { display: block; }
.query-empty small { margin: 6px 0 14px; color: #94a3b8; font-size: 12px; }
.query-empty button { border: 0; background: transparent; color: #2563eb; font-size: 13px; }
.back-link { padding: 0; border: 0; background: transparent; color: #2563eb; font-size: 12px; }
.result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 10px 0 18px; }
.result-head b, .result-head small { display: block; }
.result-head > span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 6px; color: #94a3b8; font-size: 12px; }
.portal-progress { height: 8px; margin-bottom: 20px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.portal-progress i { display: block; height: 100%; border-radius: inherit; }
.timeline { position: relative; margin-top: 20px; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: #e2e8f0; }
.timeline-item { position: relative; display: grid; gap: 2px; padding-bottom: 16px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #93c5fd; border: 2px solid #fff; box-shadow: 0 0 0 2px #bfdbfe; }
.timeline-item.done::before { background: #22c55e; box-shadow: 0 0 0 2px #86efac; }
.timeline-item.pending::before { background: #f59e0b; box-shadow: 0 0 0 2px #fcd34d; }
.timeline-item b { font-size: 13px; font-weight: 600; color: #0f172a; }
.timeline-item span { font-size: 12px; color: #64748b; line-height: 1.5; }
.timeline-item small { font-size: 11px; color: #94a3b8; font-family: monospace; }
.edit-query-btn { margin: 0 0 18px; padding: 8px 16px; border: 1px solid #bfdbfe; border-radius: 6px; background: #eff6ff; color: #2563eb; font-size: 13px; }
.edit-query-btn:hover { background: #2563eb; color: #fff; }
.edit-query-card { padding: 20px; }
.edit-form { display: grid; gap: 16px; margin-top: 16px; }
.edit-form label { display: grid; gap: 8px; color: #606266; font-size: 13px; }
.edit-form > div { display: flex; gap: 10px; align-items: center; }
.edit-cancel-btn { padding: 10px 20px; border: 1px solid #dcdfe6; border-radius: 6px; background: #fff; color: #606266; }

.detail-modal-content { border: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15); }
.detail-modal-header { padding: 18px 22px; border-bottom: 1px solid #f1f5f9; position: relative; }
.detail-modal-header .btn-close { position: absolute; top: 16px; right: 18px; opacity: .6; }
.detail-modal-header .btn-close:hover { opacity: 1; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-right: 40px; }
.detail-head b { display: block; font-size: 15px; font-weight: 600; color: #0f172a; line-height: 1.4; }
.detail-head small { display: block; margin-top: 4px; color: #94a3b8; font-family: monospace; font-size: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.status-pill i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.detail-modal-body { padding: 22px; }
.detail-section-title { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 12px; padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; }
.detail-section-title span { font-size: 14px; font-weight: 600; color: #0f172a; }
.detail-section-title small { color: #94a3b8; font-size: 12px; font-weight: normal; }
.detail-empty { padding: 30px; text-align: center; color: #94a3b8; font-size: 13px; }
.detail-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 0; color: #64748b; font-size: 13px; }

@media (max-width: 767px) {
  .query-row { gap: 8px; flex-wrap: wrap; }
  .query-row > input[type="text"],
  .query-row > input:not(.verify-row input) { flex: 1 1 100%; }
  .verify-row { flex: 1 1 auto; }
  .query-row > .portal-primary { flex: 0 0 auto; width: 100%; height: 44px; }
  .recent-status em { display: none; }
  .detail-modal-header { padding: 14px 16px; }
  .detail-modal-body { padding: 16px; }
  .detail-head b { font-size: 14px; }
}