/* 重置样式 */
.page-onsite-stock, .page-onsite-stock view, .page-onsite-stock text, .page-onsite-stock image, .page-onsite-stock svg, .page-onsite-stock button, .page-onsite-stock input {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.page-onsite-stock {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'SF Pro SC', 'Helvetica Neue', Arial, sans-serif;
  background: #F0F4FA;
  min-height: 100vh;
  overflow-x: hidden;
  color: #1F2937;
}

/* ===== 状态栏 ===== */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  height: 44px;
  background: linear-gradient(180deg, #1E3A8A 0%, #1E40AF 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.status-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-bar-right svg {
  width: 16px;
  height: 16px;
}

/* ===== 头部 ===== */
.header {
  background: linear-gradient(180deg, #1E40AF 0%, #2563EB 100%);
  padding: 0 16px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 44px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.back-icon {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.header-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.more-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.avatar-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

/* ===== 蓝色背景 ===== */
.blue-bg {
  background: linear-gradient(180deg, #1E40AF 0%, #2563EB 100%);
  padding-bottom: 30px;
}

/* ===== 页面标题 ===== */
.page-title {
  text-align: center;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  padding: 8px 0 20px;
}

/* ===== 内容区域 ===== */
.content-area {
  background: #F0F4FA;
  padding: 0 16px 120px;
  margin-top: -16px;
  position: relative;
  z-index: 5;
}

/* ===== 买入表单卡片 ===== */
.form-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.form-label {
  font-size: 16px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 16px;
}

.input-group {
  border: 1.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  transition: border-color 0.2s;
}

.input-group:focus-within {
  border-color: #3B82F6;
}

.input-group input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  color: #1F2937;
}

.input-group input::placeholder {
  color: #D1D5DB;
  font-weight: 400;
  font-size: 15px;
}

.input-suffix {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #9CA3AF;
  font-size: 13px;
}

.input-arrow {
  width: 16px;
  height: 16px;
  filter: brightness(0) saturate(100%) invert(60%) sepia(0%) saturate(0%) hue-rotate(0deg);
}

.input-hint {
  font-size: 12px;
  color: #9CA3AF;
  margin-bottom: 20px;
  padding-left: 2px;
}

.btn-confirm {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 28px;
  background: linear-gradient(135deg, #2563EB, #3B82F6);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  letter-spacing: 1px;
}

/* ===== 交易记录 ===== */
.records-section {
  margin-top: 4px;
}

.records-title {
  font-size: 16px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 14px;
}

.records-list {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.record-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #F3F4F6;
}

.record-item:last-child {
  border-bottom: none;
}

.record-date {
  font-size: 14px;
  color: #6B7280;
  flex-shrink: 0;
  width: 80px;
}

.record-dots {
  flex: 1;
  border-bottom: 1px dashed #D1D5DB;
  margin: 0 8px;
  min-width: 20px;
}

.record-amount {
  font-size: 15px;
  font-weight: 600;
  color: #1F2937;
  flex-shrink: 0;
}

/* ===== 统计总览 ===== */
.stats-section {
  background: #fff;
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.stats-title {
  font-size: 16px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 16px;
}

.stats-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 50px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 4px;
}

.stat-value.correct {
  color: #F53F3F;
}

.stat-value.wrong {
  color: #2563EB;
}

.stat-value.rate {
  color: #3B82F6;
}

.stat-value.profit {
  color: #F59E0B;
}

.stat-label {
  font-size: 11px;
  color: #9CA3AF;
}

/* ===== 筛选区域 ===== */
.filter-section {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.filter-item {
  flex: 1;
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #1F2937;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.filter-arrow {
  width: 16px;
  height: 16px;
  filter: brightness(0) saturate(100%) invert(60%) sepia(0%) saturate(0%) hue-rotate(0deg);
}

/* ===== 交易记录（新样式） ===== */
.record-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.record-time {
  font-size: 13px;
  color: #6B7280;
}

.record-action {
  font-size: 14px;
  font-weight: 600;
  color: #1F2937;
}

.record-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

.record-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.record-result {
  font-size: 13px;
  font-weight: 600;
}

.record-result.correct {
  color: #F53F3F;
}

.record-result.wrong {
  color: #2563EB;
}

.record-profit {
  font-size: 14px;
  font-weight: 700;
}

.record-profit.correct {
  color: #F53F3F;
}

.record-profit.wrong {
  color: #2563EB;
}

.empty-tip,
.loading-tip {
  padding: 30px 16px;
  text-align: center;
  color: #9CA3AF;
  font-size: 14px;
}

/* 主页指示器 */
.home-indicator {
  position: fixed;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 4px;
  border-radius: 2px;
  background: #333;
  z-index: 101;
}
