/* ============ 设计变量 ============ */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #dbeafe;
  --color-bg: #f1f5f9;
  --color-surface: #ffffff;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-danger: #dc2626;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.10);
  --header-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 14px;
}

/* ============ 顶部导航 ============ */
.app-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.brand-text h1 { font-size: 19px; font-weight: 700; letter-spacing: 0.5px; }
.brand-text p { font-size: 12px; opacity: 0.85; margin-top: 1px; }
.header-meta { flex-shrink: 0; }
.data-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ============ 主体 ============ */
.app-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px 28px 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid #eef2f7;
  padding: 20px 24px;
}
.panel-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.panel-title h2 { font-size: 15px; font-weight: 600; letter-spacing: 0.2px; }
.panel-title h2::before {
  content: "";
  display: inline-block;
  width: 4px; height: 16px;
  background: var(--color-primary);
  border-radius: 2px;
  margin-right: 9px;
  vertical-align: -2px;
}

/* ============ 筛选区 ============ */
.filter-panel { padding-bottom: 16px; }
.filter-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12px; color: var(--color-text-muted); font-weight: 600; letter-spacing: 0.2px; }
.field input, .field select {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--color-text);
  background: #fff;
  outline: none;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.field input:hover, .field select:hover { border-color: #cbd5e1; }
.field input::placeholder { color: #a0aec0; }
.filter-note {
  margin-top: 14px;
  font-size: 12px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  line-height: 1.8;
}
.cache-status {
  margin-top: 10px;
  font-size: 12px;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  line-height: 1.8;
}
.cache-status .cs-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  background: #22c55e;
  vertical-align: 1px;
}
.cache-status.syncing .cs-dot { background: #f59e0b; animation: cs-blink 1s infinite; }
@keyframes cs-blink { 50% { opacity: 0.3; } }
.field-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.auto-refresh {
  display: flex; flex-direction: column; gap: 6px;
  flex: 1;
}
.auto-refresh label {
  font-size: 12px; color: var(--color-text-muted); font-weight: 600;
}
.auto-refresh select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--color-text);
  background: #fff;
  outline: none;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auto-refresh select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* 按钮 */
.btn {
  height: 38px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
  font-weight: 500;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  padding: 0 32px;
}
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.32); }
.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border);
  height: 32px;
  padding: 0 16px;
}
.btn-ghost:hover { background: var(--color-bg); color: var(--color-text); border-color: #cbd5e1; }

/* ============ 统计卡 ============ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid #eef2f7;
  padding: 20px 22px;
  border-top: 4px solid var(--color-primary);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 108px;
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -30px; top: -30px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
}
.stat-card.stat-green { border-top-color: #16a34a; }
.stat-card.stat-green::after { background: radial-gradient(circle, rgba(22,163,74,0.06) 0%, transparent 70%); }
.stat-card.stat-orange { border-top-color: #ea580c; }
.stat-card.stat-orange::after { background: radial-gradient(circle, rgba(234,88,12,0.06) 0%, transparent 70%); }
.stat-card.stat-purple { border-top-color: #7c3aed; }
.stat-card.stat-purple::after { background: radial-gradient(circle, rgba(124,58,237,0.06) 0%, transparent 70%); }
.stat-value {
  font-size: 30px; font-weight: 700;
  color: var(--color-primary-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  word-break: break-all;
}
.stat-green .stat-value { color: #15803d; }
.stat-orange .stat-value { color: #c2410c; }
.stat-purple .stat-value { color: #6d28d9; }
.stat-label { font-size: 12.5px; color: var(--color-text-muted); margin-top: 6px; font-weight: 500; }

/* ============ 图表区 ============ */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}
.chart-card {
  min-height: 340px;
  display: flex;
  flex-direction: column;
}
.chart-card .panel-title { flex-shrink: 0; }
.chart-box { width: 100%; height: 280px; flex: 1; }

/* ============ 表格 ============ */
.table-panel { padding-bottom: 20px; }
.table-title { margin-bottom: 14px; }
.table-tools { display: flex; align-items: center; gap: 12px; }
.table-hint { font-size: 12px; color: var(--color-text-muted); }
.btn-export {
  background: #16a34a;
  color: #fff;
}
.btn-export:hover { background: #15803d; box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3); }
.btn-export:disabled { opacity: 0.6; cursor: not-allowed; }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.data-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.data-table thead th {
  position: sticky; top: 0;
  background: #f1f5f9;
  font-size: 12px;
  color: #475569;
  font-weight: 600;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid #e8edf4;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.data-table thead th:last-child { border-right: none; }
.data-table thead th:hover { color: var(--color-primary); }
.data-table thead th.sort-asc::after { content: " ↑"; color: var(--color-primary); }
.data-table thead th.sort-desc::after { content: " ↓"; color: var(--color-primary); }
.data-table th.num, .data-table td.num { text-align: right; }
/* 列宽分配（百分比，自适应全览） */
.data-table th:nth-child(1), .data-table td:nth-child(1) { width: 16%; }
.data-table th:nth-child(2), .data-table td:nth-child(2) { width: 12%; }
.data-table th:nth-child(3), .data-table td:nth-child(3) { width: 15%; }
.data-table th:nth-child(4), .data-table td:nth-child(4) { width: 8%; }
.data-table th:nth-child(5), .data-table td:nth-child(5) { width: 6%; }
.data-table th:nth-child(6), .data-table td:nth-child(6) { width: 11%; }
.data-table th:nth-child(7), .data-table td:nth-child(7) { width: 20%; }
.data-table th:nth-child(8), .data-table td:nth-child(8) { width: 12%; }
.data-table tbody td {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid #eef2f7;
  border-right: 1px solid #f1f5f9;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table tbody td:last-child { border-right: none; }
.data-table tbody tr:nth-child(even) { background: #fafbfc; }
.data-table tbody tr:hover { background: var(--color-primary-light); }
.table-empty { text-align: center; color: var(--color-text-muted); padding: 36px 0 !important; }

/* 徽标 */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.badge-method {
  background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe;
}

/* ============ 分页 ============ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 38px; height: 38px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.page-btn:hover:not(:disabled) { border-color: var(--color-primary); color: var(--color-primary); background: #f8fafc; }
.page-btn.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; font-weight: 600; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-info { font-size: 12.5px; color: var(--color-text-muted); padding: 0 8px; font-variant-numeric: tabular-nums; }

/* ============ 页脚 ============ */
.app-footer {
  text-align: center;
  padding: 20px;
  color: var(--color-text-muted);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.footer-beian {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.footer-beian a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-beian a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ============ 登录引导 ============ */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(241, 245, 249, 0.92);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: var(--color-surface);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  border: 1px solid #eef2f7;
  padding: 40px 48px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}
.login-logo {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}
.login-card h2 { font-size: 20px; font-weight: 700; color: var(--color-text); }
.login-desc { font-size: 13px; color: var(--color-text-muted); margin: 10px 0 26px; line-height: 1.7; }
.btn-login {
  width: 100%;
  height: 44px;
  font-size: 15px;
  border-radius: 10px;
}
.btn-demo-login {
  width: 100%;
  margin-top: 10px;
  height: 40px;
}
.login-tip { font-size: 12px; color: var(--color-text-muted); margin-top: 14px; line-height: 1.6; }
.login-qr { margin-top: 16px; text-align: center; }
.login-qr img {
  width: 220px; height: 220px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.login-qr .login-tip { margin-top: 10px; }

/* ============ 头部用户区 ============ */
.user-area {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 14px;
  padding-right: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-login-mini {
  height: 34px;
  padding: 0 18px;
  font-size: 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn-login-mini:hover { background: rgba(255, 255, 255, 0.26); }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.user-avatar-text {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.user-name { font-size: 13px; color: #fff; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest-tag {
  font-size: 11px;
  background: rgba(156, 163, 175, 0.9);
  color: #fff;
  padding: 1px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.admin-tag {
  font-size: 11px;
  background: rgba(22, 163, 74, 0.95);
  color: #fff;
  padding: 1px 7px;
  border-radius: 999px;
}
.demo-tag {
  font-size: 11px;
  background: rgba(234, 88, 12, 0.9);
  color: #fff;
  padding: 1px 7px;
  border-radius: 999px;
}
.btn-logout {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-logout:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }

/* ============ 我的查询记录 ============ */
.logs-panel { }
.logs-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.logs-table { min-width: 760px; }
.logs-table th:nth-child(1), .logs-table td:nth-child(1) { min-width: 180px; }
.logs-table th:nth-child(2), .logs-table td:nth-child(2) { min-width: 70px; }
.logs-table th:nth-child(3), .logs-table td:nth-child(3) { min-width: 380px; }
.logs-table th:nth-child(4), .logs-table td:nth-child(4) { min-width: 100px; }
.logs-table td { white-space: normal; word-break: break-all; }
.logs-table td.num { white-space: nowrap; }

/* ============ Toast ============ */
.toast {
  position: fixed;
  top: 88px; left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: #1e293b;
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
  box-shadow: var(--shadow-md);
  max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--color-danger); }

/* ============ 加载骨架 ============ */
.skeleton-row {
  padding: 12px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 6px;
  margin-bottom: 6px;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ============ 响应式 ============ */
@media (max-width: 1200px) {
  .filter-grid { grid-template-columns: repeat(4, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .charts-row { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .brand-text h1 { font-size: 17px; }
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .filter-grid { grid-template-columns: 1fr; }
  .app-main { padding: 14px 14px 30px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 12px 14px; min-height: 76px; border-top-width: 3px; }
  .stat-value { font-size: 20px; }
  .stat-label { font-size: 11px; margin-top: 4px; }
}

/* ============ 账号密码登录 + 账号管理 ============ */
.login-tabs { display: flex; gap: 0; margin: 14px 0 4px; background: rgba(255,255,255,0.06); border-radius: 10px; padding: 4px; }
.login-tab { flex: 1; padding: 8px 0; font-size: 13px; border: none; background: transparent; color: rgba(255,255,255,0.7); border-radius: 8px; cursor: pointer; }
.login-tab.active { background: rgba(255,255,255,0.16); color: #fff; font-weight: 600; }
.login-input {
  width: 100%; box-sizing: border-box;
  padding: 10px 14px; margin: 6px 0;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #1f2937; font-size: 14px;
  outline: none;
}
.login-input:focus { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }
.login-input::placeholder { color: #9ca3af; }

.acc-manage { margin: 16px 0 0; }
.acc-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.acc-form .login-input { width: 200px; margin: 0; }
.acc-msg { font-size: 13px; }
.acc-msg.ok { color: #4ade80; }
.acc-msg.err { color: #f87171; }
.acc-table { width: 100%; border-collapse: collapse; }
.acc-table th, .acc-table td { padding: 9px 12px; border-bottom: 1px solid rgba(0,0,0,0.08); text-align: left; font-size: 13px; }
.acc-table th { color: #6b7280; font-weight: 600; }
.acc-ops { white-space: nowrap; }
.acc-ops .btn { margin-right: 6px; }
.btn-xs { padding: 3px 10px; font-size: 12px; height: auto; }
.btn-danger { background: rgba(239,68,68,0.9); border-color: transparent; color: #fff; }
.btn-danger:hover { background: rgba(239,68,68,1); }
.btn-acc { height: 30px; padding: 0 12px; font-size: 12px; background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-acc:hover { background: rgba(255,255,255,0.22); }
.acc-admin-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,0.85); cursor: pointer; }
.acc-admin-check input { width: 15px; height: 15px; accent-color: #2563eb; }
.apply-box { text-align: center; margin: 14px 0 6px; }
.apply-box img { width: 190px; height: auto; max-height: 300px; border-radius: 10px; background: #fff; padding: 8px; object-fit: contain; }
.login-divider { display: flex; align-items: center; margin: 12px 0 4px; color: #6b7280; font-size: 12px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: rgba(0,0,0,0.12); }
.login-divider span { padding: 0 10px; }
.acc-role-select { cursor: pointer; }

/* ============ 顶部广告横幅（每次会话一次，可关闭） ============ */
.ad-banner {
  position: relative;
  max-width: 1200px;
  margin: 14px auto 0;
  padding: 0 16px;
}
.ad-banner a { display: block; }
.ad-banner img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: #fff;
  transition: transform 0.15s ease;
}
.ad-banner a:hover img { transform: translateY(-2px); }
.ad-close {
  position: absolute;
  top: 8px;
  right: 26px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}
.ad-close:hover { background: rgba(220, 38, 38, 0.9); }

/* ============ 移动端适配（平板 / 手机） ============ */
@media (max-width: 640px) {
  .header-inner { padding: 10px 14px; gap: 8px; }
  .brand-icon { width: 36px; height: 36px; font-size: 17px; }
  .brand-text h1 { font-size: 16px; }
  .brand-text p { font-size: 11px; }
  .header-meta { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .user-area { margin-right: 0; padding-right: 0; border-right: none; }
  .data-tag { font-size: 11px; padding: 5px 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-main { padding: 14px 12px 32px; gap: 14px; }
  .panel { padding: 16px 14px; }
  .panel-title h2 { font-size: 14px; }
  .ad-banner { padding: 0 12px; }
  .login-card { padding: 28px 20px; }
  .login-card h2 { font-size: 17px; }
  .login-logo { width: 54px; height: 54px; font-size: 24px; }
  .chart-box { height: 240px; }
  .field-actions { flex-direction: column; align-items: stretch; }
  .field-actions .btn-primary { width: 100%; }
  .auto-refresh { flex: none; width: 100%; }
  .acc-form { flex-direction: column; align-items: stretch; }
  .acc-form .login-input { width: 100%; margin: 2px 0; }
  .acc-manage { overflow-x: auto; }
  .acc-manage .acc-table { min-width: 520px; }
  .table-tools { gap: 8px; }
}
@media (max-width: 480px) {
  .data-tag { white-space: normal; line-height: 1.5; }
  .brand-text h1 { font-size: 15px; }
  .btn { height: 42px; }
  .btn-ghost { height: 34px; }
  .btn-login-mini { height: 36px; }
  .table-title { flex-wrap: wrap; gap: 8px; }
  .table-tools { width: 100%; justify-content: space-between; }
  .data-table thead th { font-size: 11px; padding: 9px 10px; }
  .data-table tbody td { font-size: 12px; padding: 8px 10px; }
  .stat-value { font-size: 20px; }
  .stat-card { padding: 12px 14px; min-height: 74px; }
  .page-btn { min-width: 34px; height: 36px; }
  .pagination { gap: 6px; }
  .apply-box img { width: 170px; }
  .toast { top: 120px; font-size: 12px; padding: 9px 16px; }
}

/* ============ 手机端：交易记录卡片化展示（≤640px） ============ */
@media (max-width: 640px) {
  .table-wrap {
    overflow: visible;
    border: none;
  }
  .data-table thead { display: none; }
  .data-table, .data-table tbody { display: block; width: 100%; }
  .data-table tbody tr {
    display: block;
    background: #fff !important;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 4px 14px 10px;
    margin-bottom: 12px;
  }
  .data-table tbody tr:nth-child(even) { background: #fff !important; }
  .data-table tbody td {
    display: block !important;
    position: relative;
    width: auto !important;   /* 覆盖桌面端各列百分比宽度 */
    padding: 7px 0 7px 78px !important;
    border: none !important;
    border-bottom: 1px dashed #eef2f7 !important;
    white-space: normal !important;   /* 覆盖桌面端 nowrap，允许完整换行 */
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: left !important;
    font-size: 13px;
    line-height: 1.5;
    min-height: 30px;
    word-break: break-all;
  }
  .data-table tbody td:last-child { border-bottom: none !important; }
  .data-table tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    top: 7px;
    width: 70px;
    font-weight: 600;
    color: #94a3b8;
    font-size: 12px;
  }
  .data-table tbody td.num { text-align: left !important; }
  .data-table tbody td:last-child { border-right: none !important; }
}

/* ============ 手机端：交易记录卡片美化（突出卡片、协调大方） ============ */
@media (max-width: 640px) {
  /* 卡片容器：阴影加深、左侧品牌色竖条、更清晰层次 */
  .data-table tbody tr {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    margin-bottom: 14px;
  }
  .data-table tbody tr::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
  }
  /* 字段标签：统一浅灰、更精致 */
  .data-table tbody td::before { font-size: 11px; color: #94a3b8; }
  /* 采购单位 / 供应商：深色加粗，突出主体 */
  .data-table tbody td:nth-child(1),
  .data-table tbody td:nth-child(3) { color: #1e293b; font-weight: 500; }
  /* 单价：品牌蓝加粗突出 */
  .data-table tbody td:nth-child(4) { color: #1d4ed8; font-weight: 700; font-size: 14px; }
  /* 产品名称 */
  .data-table tbody td:nth-child(7) { color: #334155; }
  /* 签订日期：弱化灰色 */
  .data-table tbody td:nth-child(8) { color: #64748b; font-size: 12px; }
}
