/* ============================================
   报告查询系统 - 移动端样式（基于UI参考图）
   ============================================ */

:root {
  /* 主色调：暖米白背景 + 深蓝强调色 */
  --bg-cream: #F2EDDF;
  --bg-cream-soft: #F5F0E4;
  --bg-card: #FFFFFF;
  --bg-input: #FAFAFA;
  --bg-selected: #E0EAF8;
  --bg-captcha: #EFE9DC;

  /* 文字色 */
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-tertiary: #94A3B8;
  --text-on-blue: #FFFFFF;

  /* 强调色 */
  --accent-blue: #1E40AF;
  --accent-blue-hover: #1D4ED8;
  --accent-blue-soft: #DBEAFE;

  /* 状态色 */
  --required-red: #DC2626;
  --success-green: #16A34A;

  /* 边框 */
  --border-light: #E5E7EB;
  --border-focus: #1E40AF;

  /* 圆角 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
}

body {
  background: var(--bg-cream);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: clamp(60px, 10vh, 100px);
}

/* ============================================
   装饰性 iPhone 状态栏
   ============================================ */
.phone-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(10px, 2.5vh, 16px) 28px clamp(6px, 1.5vh, 12px);
  font-size: clamp(13px, 2vw, 15px);
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

.status-time {
  font-weight: 600;
  font-feature-settings: "tnum";
}

.status-notch {
  position: absolute;
  left: 50%;
  top: clamp(6px, 1.5vh, 12px);
  transform: translateX(-50%);
  width: clamp(90px, 28vw, 120px);
  height: clamp(24px, 4.5vh, 32px);
  background: #000;
  border-radius: 0 0 20px 20px;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
}

/* ============================================
   页面容器
   ============================================ */
.page-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 24px);
}

/* ============================================
   顶部品牌区：系统名称 + LOGO
   ============================================ */
.brand-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: clamp(8px, 2vh, 16px) 0 clamp(16px, 4vh, 28px);
  gap: 12px;
}
.brand-left { justify-self: start; }
.brand-title.brand-center { justify-self: center; }

/* 报告页头部右上角二维码 */
.header-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.header-qr img {
  width: clamp(48px, 12vw, 64px);
  height: clamp(48px, 12vw, 64px);
  border-radius: 6px;
  display: block;
}
.header-qr span {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1;
  margin-top: 2px;
}

.brand-title {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  font-size: clamp(20px, 6vw, 32px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
  line-height: 1.3;
}

.brand-logo {
  width: clamp(40px, 12vw, 80px);
  height: auto;
  flex-shrink: 0;
  display: block;
}

/* ============================================
   主标题（放大的引导语）
   ============================================ */
.main-title {
  font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.5px;
  margin: 0 0 clamp(20px, 4vh, 36px);
}

/* ============================================
   副标题（已不再使用，保留兼容）
   ============================================ */
.page-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
  line-height: 1.6;
}

/* ============================================
   Tab 切换导航
   ============================================ */
.tab-nav {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 5px;
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.tab-item {
  flex: 1;
  padding: clamp(10px, 2vh, 12px) 8px;
  border: none;
  background: transparent;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  white-space: nowrap;
}

.tab-item:active {
  transform: scale(0.97);
}

.tab-item.active {
  background: var(--bg-selected);
  color: var(--accent-blue);
  font-weight: 600;
}

/* ============================================
   表单卡片
   ============================================ */
.form-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: clamp(16px, 4vw, 24px);
  box-shadow: var(--shadow-sm);
  margin-bottom: clamp(12px, 2vh, 20px);
}

.form-group {
  margin-bottom: clamp(14px, 2.5vh, 22px);
}

.form-group:last-of-type {
  margin-bottom: clamp(18px, 3vh, 28px);
}

.form-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(6px, 1.5vh, 10px);
}

.form-label {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.required-badge {
  background: var(--required-red);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ============================================
   输入框
   ============================================ */
.form-input {
  width: 100%;
  height: clamp(44px, 8vh, 52px);
  background: var(--bg-input);
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  padding: 0 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-input:focus {
  background: white;
  border-color: var(--accent-blue);
}

/* 输入框抖动动画（错误提示） */
.form-input.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.helper-text {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px;
  line-height: 1.5;
}

/* ============================================
   验证码行
   ============================================ */
.captcha-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.captcha-input {
  flex: 1;
  min-width: 0;
}

.captcha-image {
  width: clamp(80px, 22vw, 100px);
  height: clamp(44px, 8vh, 52px);
  background: var(--bg-captcha);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  position: relative;
  border: 1.5px solid transparent;
  transition: border-color 0.2s;
}

.captcha-image:hover {
  border-color: var(--border-light);
}

.captcha-image:active {
  transform: scale(0.97);
}

.captcha-image svg {
  width: 100%;
  height: 100%;
}

.captcha-refresh {
  width: 44px;
  height: clamp(44px, 8vh, 52px);
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border-radius: var(--r-md);
  transition: all 0.2s ease;
}

.captcha-refresh:hover {
  color: var(--accent-blue);
}

.captcha-refresh:active {
  transform: rotate(180deg);
}

/* ============================================
   提交按钮
   ============================================ */
.submit-btn {
  width: 100%;
  height: clamp(48px, 8vh, 56px);
  background: var(--accent-blue);
  color: var(--text-on-blue);
  border: none;
  border-radius: var(--r-lg);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 1px;
}

.submit-btn:hover {
  background: var(--accent-blue-hover);
}

.submit-btn:active {
  transform: scale(0.98);
  background: var(--accent-blue-hover);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.paper-plane {
  transform: rotate(-15deg);
}

/* 客服联系区块 */
.contact-block {
  margin-top: 24px;
  padding: 16px 12px 20px;
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.contact-block .contact-hint {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 10px;
}
.contact-block .wechat-qr {
  width: clamp(120px, 30vw, 160px);
  height: clamp(120px, 30vw, 160px);
  display: block;
  margin: 0 auto 10px;
  border-radius: 8px;
}
.contact-block .contact-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* ============================================
   查询结果区
   ============================================ */
.results-section {
  margin-top: 8px;
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px;
  margin-bottom: 16px;
}

.results-title {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', serif;
  font-size: 20px;
  font-weight: 600;
}

.results-count {
  font-size: 13px;
  color: var(--text-secondary);
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s ease;
  cursor: pointer;
  animation: fadeUp 0.3s ease backwards;
}

.result-card:nth-child(1) { animation-delay: 0.05s; }
.result-card:nth-child(2) { animation-delay: 0.10s; }
.result-card:nth-child(3) { animation-delay: 0.15s; }
.result-card:nth-child(4) { animation-delay: 0.20s; }

.result-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.result-card:active {
  transform: scale(0.99);
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.result-report-no {
  font-family: 'SF Mono', 'Menlo', monospace;
  background: var(--bg-cream-soft);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--text-primary);
}

.result-project {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.result-fields {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.field-chip {
  display: inline-block;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 14px;
  background: var(--bg-cream-soft);
  color: var(--text-secondary);
}

.field-chip.breed {
  background: rgba(30, 64, 175, 0.08);
  color: var(--accent-blue);
}

.field-chip.gender-male {
  background: rgba(37, 99, 235, 0.1);
  color: #2563EB;
}

.field-chip.gender-female {
  background: rgba(219, 39, 119, 0.1);
  color: #DB2777;
}

/* 关键词高亮 */
.kw-hl {
  background: linear-gradient(transparent 60%, rgba(255, 220, 90, 0.5) 60%);
  font-weight: 600;
  padding: 0 1px;
}

/* ============================================
   空状态
   ============================================ */
.result-empty {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 48px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.result-empty .empty-title {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.result-empty .empty-desc {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ============================================
   悬浮按钮 FAB
   ============================================ */
.fab {
  position: fixed;
  bottom: clamp(16px, 3vh, 32px);
  right: clamp(16px, 4vw, 24px);
  width: clamp(48px, 8vw, 56px);
  height: clamp(48px, 8vw, 56px);
  background: var(--bg-card);
  border: none;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--accent-blue);
  z-index: 100;
  transition: all 0.2s ease;
}

.fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}

.fab:active {
  transform: scale(0.95);
}

/* ============================================
   Toast 提示
   ============================================ */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.92);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 9999;
  animation: toastIn 0.25s ease;
  box-shadow: var(--shadow-lg);
  max-width: 280px;
  text-align: center;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -45%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ============================================
   响应式调整
   ============================================ */

/* 小屏手机 (iPhone SE / 320-374px) */
@media (max-width: 374px) {
  .phone-status-bar {
    padding: 8px 16px 4px;
    font-size: 12px;
  }
  .status-notch {
    width: 70px;
    height: 20px;
    top: 4px;
  }
  .page-container {
    padding: 0 14px;
  }
  .brand-header {
    padding: 4px 0 12px;
    gap: 8px;
  }
  .brand-logo { width: 36px; }
  .brand-title { font-size: 16px; letter-spacing: 0; }
  .main-title { font-size: 20px; margin-bottom: 16px; }
  .form-card { padding: 14px; }
  .form-group { margin-bottom: 12px; }
  .form-group:last-of-type { margin-bottom: 16px; }
  .tab-item { font-size: 13px; padding: 10px 4px; }
  .form-input { font-size: 14px; }
  .captcha-input { font-size: 14px; }
  .helper-text { font-size: 11px; }
  .submit-btn { font-size: 15px; height: 48px; }
  .fab { bottom: 12px; right: 12px; width: 44px; height: 44px; }
}

/* 中等手机 (iPhone 6/7/8 / 375px) */
@media (min-width: 375px) and (max-width: 413px) {
  .phone-status-bar {
    padding: 10px 20px 6px;
  }
  .status-notch {
    width: 80px;
    height: 24px;
    top: 6px;
  }
  .brand-header {
    padding: 4px 0 14px;
  }
  .main-title {
    font-size: 24px;
    margin-bottom: 20px;
  }
  .form-card {
    padding: 18px;
  }
  .form-group {
    margin-bottom: 14px;
  }
  .form-group:last-of-type {
    margin-bottom: 20px;
  }
}

/* 大屏手机 (iPhone 14 Pro Max / 430px+) */
@media (min-width: 430px) {
  .brand-header {
    padding: 12px 0 28px;
  }
  .main-title {
    font-size: 32px;
    margin-bottom: 36px;
  }
}

/* 桌面端：手机外观预览 */
@media (min-width: 768px) {
  body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 24px 0;
    overflow-y: auto;
  }

  .page-container {
    max-width: 400px;
    width: 100%;
    background: var(--bg-cream);
    min-height: auto;
    border-radius: 36px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    padding-top: 12px;
    padding-bottom: 100px;
  }

  .phone-status-bar { padding-top: 20px; }

  .fab {
    bottom: 120px;
  }
}

/* ============================================
   报告列表页样式
   ============================================ */

/* 系统名头部 */
.report-header {
  padding-top: clamp(8px, 2vh, 16px);
  text-align: left;
}
.report-system-name {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.report-subtitle {
  font-size: clamp(12px, 2.5vw, 13px);
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.divider {
  height: 1px;
  background: var(--border-light);
  margin: 8px 0 18px;
}

/* 标题区 */
.report-title-section {
  margin-bottom: 20px;
}
.current-version-tag {
  font-size: clamp(11px, 2vw, 12px);
  color: #B45309; /* 暖琥珀 */
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.report-main-title {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}
.report-date {
  font-size: clamp(12px, 2.5vw, 13px);
  color: var(--text-secondary);
  font-feature-settings: "tnum";
}

/* 查询概要卡片 */
.query-summary-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  margin-bottom: 16px;
}
.query-cell {
  padding: clamp(14px, 3vw, 18px) clamp(14px, 4vw, 20px);
}
.query-cell + .query-cell {
  border-left: 1px solid var(--border-light);
}
.query-cell-label {
  font-size: clamp(12px, 2.5vw, 13px);
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.query-cell-value {
  font-size: clamp(16px, 3.5vw, 18px);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

/* 提示框 */
.notice-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: clamp(12px, 3vw, 14px) clamp(14px, 4vw, 18px);
  background: #FEF6E4;
  border: 1px solid #F0D9A0;
  border-radius: var(--r-md);
  margin-bottom: 16px;
}
.dot-amber {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #B45309;
  flex-shrink: 0;
  margin-top: 6px;
}
.notice-text {
  font-size: clamp(12px, 2.5vw, 13px);
  color: #78350F;
  line-height: 1.6;
}

/* 操作提示 */
.instruction-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  margin-bottom: 14px;
}
.instruction-center {
  justify-content: center;
  margin-top: 18px;
  margin-bottom: 18px;
}
.dot-blue {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-blue);
  flex-shrink: 0;
}
.instruction-text {
  font-size: clamp(13px, 2.8vw, 14px);
  color: var(--accent-blue);
  font-weight: 500;
}

/* 列表表头 */

/* 报告汇总总览卡片 */
.summary-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-light);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.summary-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-align: center;
}
.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.summary-table th, .summary-table td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}
.summary-table thead th {
  background: #F8FAFC;
  color: var(--text-secondary);
  font-weight: 600;
}
.summary-table tfoot td {
  font-weight: 700;
  color: var(--text-primary);
  border-top: 2px solid var(--border-light);
  border-bottom: none;
}

.list-header {
  display: grid;
  grid-template-columns: 28px 1fr 1fr 1fr 0.7fr 1.4fr 20px;
  gap: 8px;
  align-items: center;
  padding: 12px;
  font-size: clamp(13px, 2.8vw, 14px);
  color: #000000;
  font-weight: 800;
  font-family: 'Microsoft YaHei', 'SimHei', 'PingFang SC', '黑体', sans-serif;
  letter-spacing: 0.5px;
}
.hide-ring-col .lh-ring,
.hide-ring-col .row-ring { display: none; }
.list-header.hide-ring-col,
.records-list.hide-ring-col .record-row {
  grid-template-columns: 28px 1fr 1fr 0.7fr 1.4fr 20px;
}
.lh-arrow { width: 20px; justify-self: end; text-align: right; }
.list-header > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  line-height: 1.2;
}
/* 性别列标题必须与下方徽章一样居中：此处必须用高优先级选择器，
   否则会被上面 .list-header > span 的 text-align:left 压制 */
.list-header > span.lh-gender { text-align: center; }

/* 列表行容器 */
.records-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

/* 单个记录项 */
.record-item {
  background: var(--bg-card);
  border-radius: var(--r-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.2s ease;
}

.record-row {
  display: grid;
  grid-template-columns: 28px 1fr 1fr 1fr 0.7fr 1.4fr 20px;
  gap: 8px;
  align-items: center;
  padding: 12px;
  font-size: clamp(12px, 2.6vw, 13px);
  cursor: pointer;
  transition: background 0.2s ease;
}
.record-row:hover { background: #F8FAFC; }
.record-row:active { background: #F1F5F9; }

.record-item.expanded .record-row {
  background: #EFF6FF;
  border-bottom: 1px solid var(--border-light);
}

.row-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #E2E8F0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.row-num.active {
  background: var(--accent-blue);
  color: white;
}

.row-gender { text-align: center; }
.row-owner { font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-ring { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-breed { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-date { color: var(--text-secondary); font-feature-settings: "tnum"; }

.row-arrow {
  color: var(--text-tertiary);
  font-size: 18px;
  text-align: right;
  justify-self: end;
  font-weight: 300;
}

/* 性别徽章 */
.gender-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.gender-badge.male {
  background: #EFF6FF;
  color: #2563EB;
  border-color: #BFDBFE;
}
.gender-badge.female {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #FCA5A5;
}
.gender-badge.none { background: #F1F5F9; color: var(--text-tertiary); }
.gender-badge .sym { font-size: 14px; line-height: 1; }

/* 检测结果徽章（PBFD/APV） */
.row-test {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  line-height: 1.2;
}
.test-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  width: fit-content;
}
.test-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.test-badge.neg {
  background: #DCFCE7;
  color: #166534;
}
.test-badge.neg .dot { background: #22C55E; }
.test-badge.pos {
  background: #FEE2E2;
  color: #991B1B;
}
.test-badge.pos .dot { background: #EF4444; }
.test-badge.none {
  background: #F1F5F9;
  color: var(--text-tertiary);
}
.test-badge.none .dot { background: #CBD5E1; }

/* 详情面板（展开） */
.record-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.record-item.expanded .record-detail {
  max-height: 1200px;
}

.detail-body {
  padding: clamp(14px, 3vw, 18px);
}

.detail-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(10px, 2.5vw, 12px) 4px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}
.detail-field:last-of-type { border-bottom: none; }

.field-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.field-left svg { color: var(--text-tertiary); }
.field-label {
  font-size: clamp(13px, 2.8vw, 14px);
  color: var(--text-secondary);
}
.field-right {
  font-size: clamp(14px, 3vw, 15px);
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
  word-break: break-all;
}

.collapse-btn {
  width: 100%;
  height: 48px;
  margin-top: 16px;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: var(--r-lg);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.collapse-btn:active { transform: scale(0.98); }

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 0;
}
.page-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: 8px 16px;
  color: var(--accent-blue);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.page-btn:hover { background: #EFF6FF; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-info {
  font-size: 13px;
  color: var(--text-secondary);
  font-feature-settings: "tnum";
}

/* 底部按钮组 */
.bottom-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 40px;
}
.action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: clamp(12px, 3vw, 14px) 0;
  font-size: clamp(14px, 3vw, 15px);
  color: var(--text-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.action-btn:hover { background: #F8FAFC; }
.action-btn:active { transform: scale(0.98); }

/* 页面状态 */
.page-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}
.page-state p { margin-top: 12px; font-size: 14px; }
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E2E8F0;
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 小屏适配（报告列表） */
@media (max-width: 374px) {
  .list-header,
  .record-row {
    grid-template-columns: 22px 1fr 0.9fr 0.7fr 1fr 16px;
    gap: 6px;
    padding: 10px 8px;
    font-size: 12px;
  }
  .list-header { color: #000000; font-weight: 800; }
  .lh-ring, .row-ring {
    display: none;
  }
  .report-main-title { font-size: 24px; }
  .report-system-name { font-size: 18px; }
}
