/* 现货通 · UI UX Pro Max 设计系统
   Style: Trust & Authority | B2B Service
   Colors: Navy #0F172A + CTA #0369A1 | Font: IBM Plex Sans */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #0f172a;
  --color-secondary: #334155;
  --color-cta: #0369a1;
  --color-background: #f8fafc;
  --color-text: #020617;
  --bg: var(--color-background);
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: var(--color-text);
  --text-2: var(--color-secondary);
  --text-3: #64748b;
  --accent: var(--color-cta);
  --accent-soft: #e0f2fe;
  --accent-hover: #075985;
  --gold: #ca8a04;
  --gold-soft: #fef9c3;
  --up: #dc2626;
  --down: #059669;
  --warn: #d97706;
  --border: #e2e8f0;
  --radius-card: 12px;
  --radius-btn: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(2, 6, 23, 0.06);
  --shadow-md: 0 4px 12px rgba(2, 6, 23, 0.08);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "IBM Plex Sans", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --touch-min: 44px;
  --transition: 200ms ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111827;
    --surface-2: #1e293b;
    --text: #f1f5f9;
    --text-2: #94a3b8;
    --text-3: #64748b;
    --accent: #3b82f6;
    --accent-soft: #1e3a5f;
    --accent-hover: #60a5fa;
    --border: #1e293b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; cursor: pointer; }
a:focus-visible, .btn:focus-visible, .chip:focus-visible,
.app-tabbar a:focus-visible, .grid-menu a:focus-visible,
.menu-list a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body.preview-mode {
  background: linear-gradient(160deg, #e2e8f0 0%, #cbd5e1 100%);
  padding: 32px 0 48px;
}
body.preview-mode .phone-shell {
  max-width: 390px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 780px;
  border-radius: 36px;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255,255,255,0.6) inset;
  overflow: hidden;
  border: 11px solid #0f172a;
  display: flex;
  flex-direction: column;
  position: relative;
}
body.preview-mode .phone-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #0f172a;
  border-radius: 0 0 18px 18px;
  z-index: 300;
}
body.preview-mode .preview-hint {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  margin-top: 16px;
  line-height: 1.8;
}

.app-header {
  background: var(--surface);
  color: var(--text);
  padding: calc(12px + var(--safe-top)) 16px 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}
.app-header .title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.app-header .sub {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
  font-weight: 500;
}
.app-header .back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.app-header .back:active { opacity: 0.7; }

.app-main {
  flex: 1;
  padding: 14px 16px calc(72px + var(--safe-bottom));
  overflow-y: auto;
}
.app-main.no-tab { padding-bottom: calc(20px + var(--safe-bottom)); }

.app-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  display: flex;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding-bottom: var(--safe-bottom);
}
.app-tabbar a {
  flex: 1;
  text-align: center;
  padding: 8px 4px 6px;
  min-height: var(--touch-min);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: color var(--transition);
}
.app-tabbar a .ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0 auto 3px;
}
.app-tabbar a .ico svg { width: 22px; height: 22px; }
.app-tabbar a.on { color: var(--accent); }

.hero-card {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-cta) 100%);
  border-radius: var(--radius-card);
  padding: 18px 16px;
  color: #fff;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-card h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 6px;
}
.hero-card p {
  font-size: 12px;
  opacity: 0.88;
  max-width: 28ch;
  line-height: 1.5;
}
.hero-card .stat-line {
  margin-top: 12px;
  font-size: 11px;
  opacity: 0.85;
  font-weight: 500;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-2);
  cursor: default;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.trust-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--accent);
}
.trust-badge.gold svg { color: var(--gold); }
.trust-badge.gold { background: var(--gold-soft); border-color: #fde68a; color: #92400e; }

.trust-footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.trust-footer .item {
  text-align: center;
  font-size: 10px;
  color: var(--text-3);
  font-weight: 500;
}
.trust-footer .item strong {
  display: block;
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 2px;
}

@keyframes stat-reveal {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.stat-box .val, .price-card .val {
  animation: stat-reveal 0.4s ease both;
}

.price-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.price-strip::-webkit-scrollbar { display: none; }
.price-card {
  flex: 0 0 132px;
  scroll-snap-align: start;
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 12px 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.price-card .name { font-size: 11px; color: var(--text-2); font-weight: 600; }
.price-card .val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 4px 0;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.price-card .chg { font-size: 11px; font-weight: 600; }
.chg-up { color: var(--up); }
.chg-down { color: var(--down); }

.grid-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 6px;
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 14px 8px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.grid-menu a {
  text-align: center;
  color: var(--text-2);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition);
  min-height: var(--touch-min);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.grid-menu .ico {
  width: 44px;
  height: 44px;
  margin: 0 auto 6px;
  background: var(--surface-2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 18px 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-title a {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.list-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.list-card:active { transform: scale(0.985); }
.list-card .row1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.list-card .name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.list-card .tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
}
.list-card .tag.buy { background: #ffedd5; color: #c2410c; }
.list-card .tag.ok { background: #dcfce7; color: #15803d; }
.list-card .tag.warn { background: #fef3c7; color: #b45309; }
.list-card .meta {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
}
.list-card .price {
  font-size: 17px;
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.list-card .foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.btn {
  display: inline-block;
  padding: 12px 18px;
  min-height: var(--touch-min);
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  text-align: center;
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition);
}
.btn:active { opacity: 0.88; }
.btn-block { display: block; width: 100%; }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:active { background: var(--accent-hover); }
.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-warn { background: var(--warn); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 12px; min-height: 36px; }
.btn + .btn { margin-top: 10px; }

.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 2px;
}
.filter-bar .chip {
  flex-shrink: 0;
  padding: 10px 16px;
  min-height: var(--touch-min);
  background: var(--surface);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-bar .chip.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.form-group label .req { color: var(--up); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
.form-group textarea { min-height: 88px; resize: vertical; }

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.alert-info {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
}
.alert-warn {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
.alert-success {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.detail-block {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.detail-block h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; }
.detail-row .k { color: var(--text-2); flex-shrink: 0; }
.detail-row .v {
  color: var(--text);
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.msg-item {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
  border: 1px solid var(--border);
}
.msg-item.unread {
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface));
}
.msg-item .dot {
  width: 8px;
  height: 8px;
  background: var(--up);
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.msg-item .time { font-size: 11px; color: var(--text-3); margin-top: 4px; }

.mine-header {
  background: linear-gradient(145deg, var(--color-primary), #1e3a5f);
  margin: -14px -16px 16px;
  padding: 22px 16px;
  color: #fff;
}
.mine-header .company {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.mine-header .status {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(202, 138, 4, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(202, 138, 4, 0.4);
  color: #fde68a;
}
.mine-header .certs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.mine-header .cert {
  font-size: 10px;
  font-weight: 600;
  background: rgba(255,255,255,0.12);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
}

.menu-list {
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.menu-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  min-height: var(--touch-min);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}
.menu-list a:active { background: var(--surface-2); }
.menu-list a:last-child { border-bottom: none; }
.menu-list .arrow { color: var(--text-3); font-weight: 400; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.stat-box {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 14px;
  text-align: left;
  border: 1px solid var(--border);
}
.stat-box .label { font-size: 11px; color: var(--text-2); font-weight: 600; }
.stat-box .val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.flow-steps { display: flex; gap: 6px; margin: 12px 0; }
.flow-step {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  background: var(--surface-2);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.flow-step.done { background: var(--accent-soft); color: var(--accent); }
.flow-step.cur { background: var(--accent); color: #fff; border-color: var(--accent); }

.sitemap-page { max-width: 600px; margin: 0 auto; padding: 20px; }
.sitemap-page h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 16px;
}
.sitemap-group { margin-bottom: 22px; }
.sitemap-group h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.sitemap-group ul { list-style: none; }
.sitemap-group li { padding: 7px 0; font-size: 14px; }

.fixed-bottom {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 150;
}
.app-main.has-fixed-bottom { padding-bottom: calc(96px + var(--safe-bottom)); }

.sms-box { display: flex; gap: 8px; }
.sms-box input { flex: 1; }
.sms-box .btn { flex-shrink: 0; padding: 12px 14px; font-size: 12px; }

.login-brand {
  text-align: center;
  padding: 36px 0 28px;
}
.login-brand .logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-cta), var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.04em;
}
.login-brand h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.login-brand p {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .stat-box .val, .price-card .val { animation: none; }
}
