/* 全局（原 App.vue）*/
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: clamp(12px, 2.5vw, 16px);
  -webkit-text-size-adjust: 100%;
}
/* 询价 / 询价列表 / 下单：模板 `html_class=h5-step-fs`，避免 :has() 在部分 WebView 失效 */
html.h5-step-fs {
  font-size: clamp(14px, 2.8vw, 18px);
}
html, body, #app, .app { min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  overflow-x: hidden;
}
a { color: #4A90E2; text-decoration: none; }

/* 宽屏：全站 #app 手机视口柱（方案 B，与首页原 480px 断点一致） */
:root {
  --h5-shell-width: 480px;
}
@media (min-width: 480px) {
  body {
    background: #e8eaed;
  }
  #app.app.h5-viewport-shell {
    max-width: var(--h5-shell-width);
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 8px 32px rgba(0, 0, 0, 0.12);
  }
}

/* ========== Home ========== */
.home-page {
  min-height: 100vh;
  background: #f5f6f8;
  padding-bottom: 2rem;
  max-width: 100vw;
  overflow-x: hidden;
}
@media (min-width: 480px) {
  .home-page {
    max-width: none;
    margin: 0;
  }
}
.home-page .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.home-page .account-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}
.home-page .icon-arrow { font-size: 0.75rem; color: #666; }
.home-page .header-right { display: flex; align-items: center; }
.home-page .btn-service {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  color: #4A90E2;
  background: transparent;
  border: 1px solid #4A90E2;
  border-radius: 1rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.home-page .btn-service:active { opacity: 0.8; }
.home-page .main { padding: 1rem; }
.home-page .action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.home-page .btn-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 7rem;
  padding: 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.home-page .btn-action:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.home-page .btn-inquiry {
  background: linear-gradient(145deg, #07C160 0%, #06AD56 100%);
}
.home-page .btn-list {
  background: linear-gradient(145deg, #4A90E2 0%, #357ABD 100%);
}
.home-page .btn-icon {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.home-page .btn-desc {
  font-size: 0.75rem;
  opacity: 0.95;
}
.home-page .menu-block {
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.home-page .menu-item {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  min-height: 52px;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: #333;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.home-page .menu-item:last-child { border-bottom: none; }
.home-page .menu-item:active { background: #f5f6f8; }
.home-page .menu-icon { font-size: 1.25rem; margin-right: 0.75rem; }
.home-page .menu-text { flex: 1; font-size: 0.9375rem; }
.home-page .menu-arrow { font-size: 1.25rem; color: #999; font-weight: 300; }

/* ========== Login ========== */
.page.login { max-width: 360px; margin: 0 auto; padding: 2rem; }
.page.login h1 { margin-bottom: 1.5rem; font-size: 1.5rem; }
.page.login input { width: 100%; padding: 0.75rem; margin-bottom: 1rem; border: 1px solid #ddd; border-radius: 4px; }
.page.login button { width: 100%; padding: 0.75rem; background: #4A90E2; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.page.login button:disabled { opacity: 0.6; cursor: not-allowed; }
.page.login .approved-tip { color: #07C160; font-size: 0.95rem; margin-bottom: 1rem; }
.page.login .success { color: #07C160; font-size: 0.9rem; margin-bottom: 0.5rem; }
.page.login .error { color: #c00; font-size: 0.9rem; margin-bottom: 0.5rem; }

/* ========== Register ========== */
.page.register { max-width: 360px; margin: 0 auto; padding: 2rem; }
.page.register h1 { margin-bottom: 1.5rem; font-size: 1.5rem; }
.page.register input { width: 100%; padding: 0.75rem; margin-bottom: 1rem; border: 1px solid #ddd; border-radius: 4px; }
.page.register button { width: 100%; padding: 0.75rem; background: #4A90E2; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.page.register button:disabled { opacity: 0.6; cursor: not-allowed; }
.page.register .error { color: #c00; font-size: 0.9rem; margin-bottom: 0.5rem; }
.page.register .link { margin-top: 1rem; text-align: center; }

/* ========== Waiting ========== */
.page.waiting { max-width: 360px; margin: 0 auto; padding: 2rem; }
.page.waiting h1 { margin-bottom: 1rem; font-size: 1.5rem; }
.page.waiting .message { margin-bottom: 1rem; color: #666; }
.page.waiting .info { margin-bottom: 0.5rem; font-size: 0.9rem; }
.page.waiting .tip { margin: 1rem 0; font-size: 0.85rem; color: #888; }
.page.waiting button { width: 100%; padding: 0.75rem; background: #4A90E2; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.page.waiting button:disabled { opacity: 0.6; cursor: not-allowed; }

/* ========== Inquiry ========== */
.inquiry-page {
  min-height: 100vh;
  background-color: #e6f3ff;
  padding-bottom: 7.5rem;
  --hist-text-strong: #0e4478;
  --hist-text: #1a64b8;
  --hist-text-secondary: #4a82c4;
  --hist-text-muted: #6a9fd6;
  --hist-accent: #1565c0;
  --hist-accent-soft: #2f78c8;
}
.inquiry-page .nav-bar {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  min-height: 44px;
}
.inquiry-page .nav-back {
  color: var(--hist-accent-soft);
  font-size: 1rem;
  text-decoration: none;
  margin-right: 0.5rem;
}
.inquiry-page .nav-back:active { opacity: 0.8; }
.inquiry-page .nav-title { font-size: 1rem; font-weight: 600; color: var(--hist-text-strong); }
.inquiry-page .account-info-bar {
  padding: 0.5rem 1rem;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.inquiry-page .info-item { font-size: 0.875rem; }
.inquiry-page .info-label { color: var(--hist-text-secondary); margin-right: 0.25rem; }
.inquiry-page .info-value { color: var(--hist-text-strong); font-weight: 600; }
.inquiry-page .form-container { padding: 0.5rem 0.75rem; }
.inquiry-page .form-item {
  margin-bottom: 1rem;
  background: #fff;
  border-radius: 0.375rem;
  padding: 1rem;
}
.inquiry-page .form-label { font-size: 0.875rem; font-weight: 600; color: var(--hist-text-secondary); margin-bottom: 0.5rem; }
.inquiry-page .form-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.inquiry-page .form-hint { font-size: 0.75rem; color: var(--hist-text-muted); }
.inquiry-page .form-input-wrapper { position: relative; display: flex; align-items: center; }
/* 标的联想面板（询价页 / 询价列表，见 PRD §2.3） */
.stock-code-autocomplete-wrap { position: relative; width: 100%; }
.underlying-suggest-panel {
  position: absolute; left: 0; right: 0; top: 100%; margin-top: 2px; z-index: 50;
  max-height: 12rem; overflow-y: auto; background: #fff; border: 1px solid #e5e5e5;
  border-radius: 0.25rem; box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.underlying-suggest-item {
  padding: 0.5rem 0.625rem; font-size: 0.8125rem; color: #333;
  border-bottom: 1px solid #f0f0f0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.underlying-suggest-item:last-child { border-bottom: none; }
.underlying-suggest-item:active { background: #f5f5f5; }
.underlying-suggest-empty { padding: 0.5rem 0.625rem; font-size: 0.75rem; color: #999; }
.inquiry-page .underlying-suggest-item {
  color: var(--hist-text-strong);
  font-weight: 500;
}
.inquiry-page .underlying-suggest-empty { color: var(--hist-text-muted); }
.inquiry-page .form-input {
  flex: 1;
  height: 2.25rem;
  padding: 0 1rem;
  background: #e6f3ff;
  border: 1px solid #e5e5e5;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  color: var(--hist-text-strong);
  font-weight: 500;
}
.inquiry-page .form-input::placeholder { color: var(--hist-text-muted); }
.inquiry-page .form-input:focus { border-color: var(--hist-accent); outline: none; }
.inquiry-page .scale-input { padding-right: 5rem; }
.inquiry-page .input-unit { position: absolute; right: 1rem; font-size: 0.875rem; color: var(--hist-text-secondary); font-weight: 500; }
.inquiry-page .form-input-select {
  flex: 1;
  height: 2.25rem;
  padding: 0 1rem;
  background: #e6f3ff;
  border: 1px solid #e5e5e5;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.inquiry-page .select-text { font-size: 0.8125rem; color: var(--hist-text-strong); font-weight: 500; flex: 1; }
.inquiry-page .select-text.placeholder { color: var(--hist-text-muted); font-weight: 400; }
.inquiry-page .icon-arrow { font-size: 0.75rem; color: var(--hist-text-muted); transition: transform 0.3s; }
.inquiry-page .icon-arrow.up { transform: rotate(180deg); }
.inquiry-page .strategy-grid,
.inquiry-page .term-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.375rem;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.inquiry-page .strategy-grid.hide { max-height: 4.5rem; }
.inquiry-page .strategy-grid.show { max-height: 20rem; }
.inquiry-page .term-grid.hide { max-height: 4.5rem; }
.inquiry-page .term-grid.show { max-height: 28rem; }
.inquiry-page .strategy-item,
.inquiry-page .term-item {
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e6f3ff;
  border: 1px solid #e5e5e5;
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--hist-text);
}
.inquiry-page .strategy-item.selected,
.inquiry-page .term-item.selected {
  background: rgba(21, 101, 192, 0.12);
  border-color: var(--hist-accent);
  color: var(--hist-accent);
  font-weight: 600;
}
.inquiry-page .scale-quick-buttons { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.5rem; }
.inquiry-page .quick-btn {
  padding: 0.3rem 0.6rem;
  background: #e6f3ff;
  border: 1px solid #e5e5e5;
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--hist-text);
}
.inquiry-page .quick-btn.selected {
  background: rgba(21, 101, 192, 0.12);
  border-color: var(--hist-accent);
  color: var(--hist-accent);
  font-weight: 600;
}
.inquiry-page .submit-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #e5e5e5;
  z-index: 100;
}
.inquiry-page .submit-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.inquiry-page .reset-btn {
  flex-shrink: 0;
  min-width: 4.5rem;
  height: 2.75rem;
  padding: 0 1rem;
  background: #fff;
  border: 1px solid var(--hist-accent-soft);
  border-radius: 2.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--hist-accent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.inquiry-page .reset-btn:active {
  opacity: 0.88;
}
.inquiry-page .submit-btn {
  flex: 1;
  min-width: 0;
  width: auto;
  height: 2.75rem;
  background: linear-gradient(135deg, #ff6b9d 0%, #ff8fa3 100%);
  border-radius: 2.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}
.inquiry-page .submit-btn.disabled { background: #d9d9d9; color: #999; box-shadow: none; }
.inquiry-page .customer-service-fixed {
  position: fixed;
  top: 4rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hist-accent);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.35);
  z-index: 999;
}
.inquiry-page .service-icon { font-size: 1.125rem; }

/* ========== InquiryList (history-page) ========== */
.history-page {
  min-height: 100vh;
  background: #e6f3ff;
  display: flex;
  flex-direction: column;
  --hist-text-strong: #0e4478;
  --hist-text: #1a64b8;
  --hist-text-secondary: #4a82c4;
  --hist-text-muted: #6a9fd6;
  --hist-accent: #1565c0;
  --hist-accent-soft: #2f78c8;
}
.history-page .nav-bar {
  display: flex; align-items: center; padding: 0.5rem 0.75rem; background: #fff; border-bottom: 1px solid #e5e5e5; min-height: 44px;
}
.history-page .nav-back { color: var(--hist-accent-soft); font-size: 1rem; text-decoration: none; margin-right: 0.5rem; }
.history-page .nav-back:active { opacity: 0.8; }
.history-page .nav-title { font-size: 1rem; font-weight: 600; color: var(--hist-text-strong); }
.history-page .account-info-bar {
  padding: 0.5rem 1rem;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.history-page .account-info-bar .info-item { font-size: 0.875rem; }
.history-page .account-info-bar .info-label { color: var(--hist-text-secondary); margin-right: 0.25rem; }
.history-page .account-info-bar .info-value { color: var(--hist-text-strong); font-weight: 600; }
.history-page .filter-container { padding: 0.5rem 0.75rem; background: #e6f3ff; }
.history-page .filter-card {
  background: #fff;
  border-radius: 0.375rem;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #c5d9f0;
}
.history-page .filter-label-row { display: flex; gap: 0.375rem; margin-bottom: 0.375rem; }
.history-page .stock-label-wrapper { flex: 1.2; }
.history-page .filter-btn-wrapper { flex: 1; }
.history-page .filter-label { font-size: 0.75rem; font-weight: 600; color: var(--hist-text-secondary); }
.history-page .filter-row { display: flex; gap: 0.375rem; align-items: center; }
.history-page .stock-input-inline { flex: 1.2; }
.history-page .form-input-compact {
  width: 100%; height: 2rem; padding: 0 0.5rem; background: #f5f9fc; border: 1px solid #b0bec5;
  border-radius: 0.25rem; font-size: 0.75rem; color: var(--hist-text-strong);
}
.history-page .form-input-compact::placeholder { color: var(--hist-text-muted); }
.history-page .form-input-compact:focus { border-color: #1565c0; outline: none; }
.history-page .inquiry-btn {
  flex: 0.8; height: 2rem; background: #1565c0; border-radius: 0.25rem;
  display: flex; align-items: center; justify-content: center;
}
.history-page .inquiry-btn:active { filter: brightness(0.92); }
.history-page .inquiry-btn-text { font-size: 0.75rem; color: #fff; font-weight: 600; }
.history-page .rule-buttons-row { display: flex; gap: 0.375rem; margin-top: 0.5rem; }
.history-page .rule-btn {
  flex: 1; height: 1.875rem; background: #e8f0fa; border: 1px solid #b0bec5; border-radius: 0.25rem;
  display: flex; align-items: center; justify-content: center;
}
.history-page .rule-btn.selected { background: rgba(21, 101, 192, 0.12); border-color: #1565c0; }
.history-page .rule-btn-text { font-size: 0.6875rem; font-weight: 500; color: var(--hist-text); }
.history-page .rule-btn.selected .rule-btn-text { color: var(--hist-accent); font-weight: 600; }
.history-page .rule-btn.rule-btn-reset {
  flex: 0 0 3.25rem;
  background: #1565c0;
  border: none;
  border-radius: 0.25rem;
}
.history-page .rule-btn.rule-btn-reset .rule-btn-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}
.history-page .rule-btn.rule-btn-reset:active { filter: brightness(0.92); }
.history-page .rule-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.history-page .rule-modal-content { width: 80%; max-width: 22rem; background: #fff; border-radius: 0.75rem; overflow: hidden; }
.history-page .rule-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem; border-bottom: 1px solid #f7f7f7; }
.history-page .rule-modal-title { font-size: 1rem; font-weight: 600; color: var(--hist-text-strong); }
.history-page .rule-modal-close { width: 1.5rem; height: 1.5rem; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--hist-text-muted); cursor: pointer; }
.history-page .rule-modal-body { padding: 0.75rem; max-height: 60vh; overflow-y: auto; }
.history-page .rule-option-item { display: flex; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid #f7f7f7; }
.history-page .rule-checkbox {
  width: 1.25rem; height: 1.25rem; border: 2px solid #e5e5e5; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; margin-right: 0.5rem;
}
.history-page .rule-checkbox.checked { background: #1565c0; border-color: #1565c0; }
.history-page .rule-checkbox.checked span { color: #fff; font-size: 0.75rem; font-weight: bold; }
.history-page .rule-option-label { flex: 1; font-size: 0.875rem; color: var(--hist-text); }
.history-page .rule-unwind-radio-row,
.history-page .rule-div-radio-row { cursor: pointer; }
.history-page .rule-unwind-radio,
.history-page .rule-div-radio {
  width: 1.125rem; height: 1.125rem; margin-right: 0.5rem; flex-shrink: 0;
  accent-color: #1565c0; cursor: pointer;
}
.history-page .rule-modal-footer { display: flex; border-top: 1px solid #f7f7f7; }
.history-page .rule-modal-btn { flex: 1; height: 2.75rem; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; cursor: pointer; }
.history-page .rule-modal-btn.cancel-btn { background: #e5e5e5; color: var(--hist-text-secondary); }
.history-page .rule-modal-btn.confirm-btn { background: #1565c0; color: #fff; }
.history-page .list-container { flex: 1; padding: 0.5rem; box-sizing: border-box; }
.history-page .inquiry-card { background: #fff; border-radius: 0.5rem; padding: 0.75rem; margin-bottom: 0.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.history-page .card-header { display: flex; justify-content: space-between; align-items: center; gap: 0.35rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid #e5e5e5; }
.history-page .card-header.copy-zone { user-select: none; -webkit-user-select: none; cursor: default; }
.history-page .card-longpress-copy-zone {
  flex: 1;
  align-self: stretch;
  min-width: 1.5rem;
  min-height: 2.25rem;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.history-page .stock-info { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; min-width: 0; }
.history-page .stock-code { font-size: 1rem; font-weight: 600; color: var(--hist-text-strong); }
.history-page .stock-name { font-size: 0.75rem; color: var(--hist-text-secondary); }
.history-page .status-badge { padding: 0.25rem 0.6rem; border-radius: 1.25rem; background: #eef2f7; }
.history-page .status-badge.clickable { background: var(--hist-accent); cursor: pointer; }
.history-page .status-badge.updated-status { background: #e53935; }
.history-page .status-badge.updated-status .status-text { color: #fff; font-weight: 600; }
.history-page .status-badge.clickable.better-status { background: #ffeb3b; }
.history-page .status-badge.clickable.better-status .status-text { color: #333; font-weight: 600; }
.history-page .status-text { font-size: 0.6875rem; color: var(--hist-text-secondary); font-weight: 500; }
.history-page .status-badge.clickable .status-text { color: #fff; font-weight: 600; }
.history-page .detail-table-expand { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e5e5e5; }
.history-page .detail-table-expand.hide { display: none; }
.history-page .detail-table-header {
  background: #fff;
  border-radius: 4px;
  padding: 0.45rem 0 0.5rem;
  margin-bottom: 0.375rem;
  border-bottom: 2px solid var(--hist-text-strong);
}
.history-page .detail-header-row { display: flex; align-items: center; }
.history-page .detail-header-cell {
  flex: 1;
  font-size: calc(0.75rem + 4px);
  font-weight: 600;
  color: var(--hist-text-strong);
  text-align: center;
  padding: 0 0.25rem;
}
.history-page .detail-header-cell:first-child {
  text-align: left;
  padding-left: 0.5rem;
}
.history-page .detail-header-cell.detail-header-cell-nowrap { white-space: nowrap; flex: 1.1; min-width: 0; }
.history-page .detail-table-row-wrapper { border-bottom: 1px solid #f7f7f7; }
.history-page .detail-table-row-wrapper.expanded-quote { background: #fffbeb; border-radius: 0.25rem; margin: 2px 0; padding: 0.25rem 0; }
.history-page .detail-level1-wrapper.has-more { cursor: default; }
.history-page .detail-group-toggle {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-sizing: border-box;
  min-width: 2rem;
  min-height: 2rem;
  margin: -0.25rem 0;
  align-self: center;
}
.history-page .detail-group-toggle:active { opacity: 0.75; }
.history-page .detail-group-longpress {
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.history-page .detail-table-row-wrapper.detail-level2-row {
  border-left: 2px solid #edd9a8;
  background-color: #fffdf5;
  border-radius: 0.25rem;
  margin: 2px 0;
}
.history-page .detail-level2-row .detail-level2-col-hidden {
  visibility: hidden;
  pointer-events: none;
  min-height: 0;
}
.history-page .detail-header-arrow { flex: 0 0 2.25rem; min-width: 2.25rem; }
.history-page .detail-data-cell.detail-level1-arrow {
  flex: 0 0 2.25rem;
  min-width: 2.25rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--hist-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.history-page .detail-group-expanded .detail-level1-arrow { transform: rotate(180deg); }
.history-page .detail-table-row {
  display: flex;
  align-items: center;
  padding: 0.6rem 0 0.375rem;
}
.history-page .detail-data-cell {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--hist-text-strong);
  text-align: center;
  padding: 0 0.25rem;
}
.history-page .detail-table-row > .detail-data-cell:nth-child(2),
.history-page .detail-table-row > .detail-data-cell:nth-child(4) {
  font-size: 1rem;
  font-weight: 600;
  color: var(--hist-text-strong);
}
.history-page .detail-data-cell.structure-cell { flex: 1.5; text-align: left; padding-left: 0.5rem; font-weight: 600; }
.history-page .detail-data-cell.quote-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  font-weight: 600;
  color: var(--hist-text-strong);
}
.history-page .detail-data-cell.quote-cell .quote-pill {
  display: inline-block;
  min-width: 2.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: #d6e8fc;
  color: var(--hist-text-strong);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
  text-align: center;
  box-sizing: border-box;
}
.history-page .detail-data-cell.quote-cell.quote-updated .quote-pill {
  background: #ffcdd2;
  color: #b71c1c;
}
.history-page .status-cell-wrapper { display: flex; align-items: center; justify-content: center; }
.history-page .status-cell { font-size: 1rem; font-weight: 600; color: var(--hist-text-strong); }
.history-page .status-cell.expired { color: var(--hist-text-muted); }
.history-page .status-cell.clickable { color: var(--hist-accent); cursor: pointer; font-weight: 600; }
.history-page .trade-rule-wrapper { display: flex; align-items: center; justify-content: space-between; padding: 0 0.25rem 0.5rem 0.5rem; }
.history-page .trade-rule { flex: 1; font-size: calc(0.75rem + 2px); font-weight: 400; color: #000; line-height: 1.35; }
.history-page .expand-icon-wrapper { margin-left: 0.25rem; cursor: pointer; }
.history-page .expand-icon { font-size: 0.75rem; color: var(--hist-accent-soft); font-weight: bold; }
.history-page .empty-state,
.history-page .loading-state { display: flex; justify-content: center; align-items: center; padding: 3rem 0; }
.history-page .empty-text,
.history-page .loading-text { font-size: 0.875rem; color: var(--hist-text-secondary); }
.history-page .customer-service-fixed {
  position: fixed; top: 4rem; right: 0.75rem; width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center; background: #4a90e2;
  border-radius: 50%; box-shadow: 0 4px 12px rgba(74,144,226,0.3); z-index: 999;
}
.history-page .service-icon { font-size: 1.125rem; }

/* 须在 .inquiry-page/.history-page 的 fixed 底栏、客服球基础样式之后，否则 left/right 会被覆盖 */
@media (min-width: 480px) {
  .inquiry-page .submit-container {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: var(--h5-shell-width);
    max-width: 100%;
  }
  .inquiry-page .customer-service-fixed,
  .history-page .customer-service-fixed {
    left: calc(50vw + var(--h5-shell-width) / 2 - 0.75rem - 2rem);
    right: auto;
  }
}
.history-page .copy-toast {
  position: fixed;
  left: 50%;
  bottom: 6rem;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.875rem;
  border-radius: 0.25rem;
  z-index: 1001;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ========== Service ========== */
.page.service { max-width: 600px; margin: 0 auto; padding: 1.5rem; }
.page.service .nav-bar { display: flex; align-items: center; padding: 0.5rem 0.75rem; background: #fff; border-bottom: 1px solid #e5e5e5; min-height: 44px; margin: -1.5rem -1.5rem 1rem -1.5rem; }
.page.service .nav-back { color: #4a90e2; font-size: 1rem; text-decoration: none; margin-right: 0.5rem; }
.page.service .nav-back:active { opacity: 0.8; }
.page.service .nav-title { font-size: 1rem; font-weight: 600; color: #333; }
.page.service h1 { margin-bottom: 1rem; font-size: 1.5rem; }
.page.service p { color: #666; }

/* ========== Order ========== */
.order-page { min-height: 100vh; background: #e6f3ff; padding: 0.5rem; }
.order-page .nav-bar {
  display: flex; align-items: center; padding: 0.5rem 0.75rem; background: #fff; border-bottom: 1px solid #e5e5e5; min-height: 44px; margin: -0.5rem -0.5rem 0.5rem -0.5rem;
}
.order-page .nav-back { color: #4a90e2; font-size: 1rem; text-decoration: none; margin-right: 0.5rem; }
.order-page .nav-back:active { opacity: 0.8; }
.order-page .nav-title { font-size: 1rem; font-weight: 600; color: #333; }
.order-page .order-card { background: #fff; border-radius: 0.375rem; padding: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.order-page .order-title { font-size: 1rem; font-weight: 600; color: #333; margin-bottom: 1rem; text-align: center; }
.order-page .info-section { margin-bottom: 1rem; }
.order-page .section-title { font-size: 0.8125rem; font-weight: 600; color: #333; margin-bottom: 0.375rem; }
.order-page .info-item {
  padding: 0.375rem 0;
  border-bottom: 1px solid #f7f7f7;
  line-height: 1.45;
}
.order-page .info-label { display: inline; font-size: 0.8125rem; color: #666; }
.order-page .info-value {
  display: inline;
  font-size: 0.8125rem;
  color: #333;
  font-weight: 500;
  word-break: break-word;
}
.order-page .quote-value {
  color: #ffb300;
  font-weight: 700;
}
.order-page .divider { height: 1px; background: #e5e5e5; margin: 1rem 0; }
.order-page .form-section { margin-top: 1rem; }
.order-page .form-item { margin-bottom: 1rem; }
.order-page .form-label { font-size: 0.8125rem; font-weight: 500; color: #333; margin-bottom: 0.375rem; }
.order-page .form-input-wrapper { position: relative; display: flex; align-items: center; }
.order-page .form-input {
  flex: 1; height: 2rem; padding: 0 0.5rem; padding-right: 4rem;
  background: #e6f3ff; border: 1px solid #e5e5e5; border-radius: 0.25rem; font-size: 0.8125rem; color: #333;
}
.order-page .form-input:focus { border-color: #07c160; outline: none; }
.order-page .input-unit { position: absolute; right: 1rem; font-size: 0.8125rem; color: #666; }
.order-page .execution-price-options { display: flex; gap: 0.3rem; margin-bottom: 0.375rem; }
.order-page .price-option-item {
  flex: 1; height: 2rem; background: #e6f3ff; border: 1px solid #e5e5e5; border-radius: 0.25rem;
  display: flex; align-items: center; justify-content: center; gap: 0.25rem;
}
.order-page .price-option-item.selected { background: rgba(7,193,96,0.1); border-color: #07c160; }
.order-page .price-radio { width: 1rem; height: 1rem; border: 2px solid #e5e5e5; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; }
.order-page .price-radio.checked { border-color: #07c160; }
.order-page .radio-dot { width: 0.55rem; height: 0.55rem; background: #07c160; border-radius: 50%; }
.order-page .price-option-label { font-size: 0.75rem; color: #333; }
.order-page .price-option-item.selected .price-option-label { color: #07c160; }
.order-page .limit-price-input,
.order-page .twap-input { margin-top: 0.375rem; overflow: hidden; transition: all 0.3s; }
.order-page .limit-price-input.hide,
.order-page .twap-input.hide { max-height: 0; margin-top: 0; opacity: 0; }
.order-page .limit-price-input.show,
.order-page .twap-input.show { max-height: 20rem; opacity: 1; }
.order-page .twap-type-selector { display: flex; gap: 0.3rem; margin-bottom: 0.375rem; }
.order-page .twap-type-option {
  flex: 1; height: 1.75rem; background: #e6f3ff; border: 1px solid #e5e5e5; border-radius: 0.25rem;
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: #333;
}
.order-page .twap-type-option.selected { background: rgba(7,193,96,0.1); border-color: #07c160; color: #07c160; }
.order-page .twap-duration-input,
.order-page .twap-time-input { overflow: hidden; transition: all 0.3s; }
.order-page .twap-duration-input.hide,
.order-page .twap-time-input.hide { max-height: 0; opacity: 0; }
.order-page .twap-time-input.show { max-height: 12rem; opacity: 1; }
.order-page .time-input-row { display: flex; align-items: center; margin-bottom: 0.375rem; }
.order-page .time-label { font-size: 0.75rem; color: #666; width: 5rem; }
.order-page .time-picker { flex: 1; height: 2rem; padding: 0 0.5rem; background: #e6f3ff; border: 1px solid #e5e5e5; border-radius: 0.25rem; font-size: 0.8125rem; }
.order-page .submit-btn-container { margin-top: 1rem; }
.order-page .submit-btn {
  width: 100%; height: 2.5rem; background: #07c160; border-radius: 2rem; font-size: 0.9375rem; font-weight: 500;
  color: #fff; border: none; box-shadow: 0 4px 12px rgba(7,193,96,0.3);
}
.order-page .copy-btn-container { margin-top: 1.5rem; }
.order-page .copy-btn {
  width: 100%; height: 2.75rem; background: #4a90e2; border-radius: 2.25rem; font-size: 1rem; font-weight: 500;
  color: #fff; border: none; box-shadow: 0 4px 12px rgba(74,144,226,0.3);
}
.order-page .order-confirm-content { padding: 1rem 0; }
.order-page .order-confirm-title { font-size: 1rem; font-weight: 600; color: #333; margin-bottom: 1rem; text-align: center; }
.order-page .order-confirm-line { font-size: 0.8125rem; color: #333; line-height: 1.8; padding: 2px 0; }
.order-page .order-confirm-empty { height: 0.5rem; padding: 0; }

/* ========== Mine ========== */
.page.mine { max-width: 600px; margin: 0 auto; padding: 1.5rem; }
.page.mine .nav-bar { display: flex; align-items: center; padding: 0.5rem 0.75rem; background: #fff; border-bottom: 1px solid #e5e5e5; min-height: 44px; margin: -1.5rem -1.5rem 1rem -1.5rem; }
.page.mine .nav-back { color: #4a90e2; font-size: 1rem; text-decoration: none; margin-right: 0.5rem; }
.page.mine .nav-back:active { opacity: 0.8; }
.page.mine .nav-title { font-size: 1rem; font-weight: 600; color: #333; }
.page.mine h1 { margin-bottom: 1rem; font-size: 1.5rem; }
.page.mine p { margin-bottom: 1rem; color: #666; }
.page.mine .btn-logout { padding: 0.5rem 1rem; background: #f5f5f5; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; }
