/* 小程序录入端样式 */
body { background: #e8edf3; }
.phone-stage { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 12px; gap: 14px; }
.stage-tip { color: #8794a6; font-size: 13px; }
.phone {
  width: 390px; height: 820px; background: var(--bg); border-radius: 42px;
  box-shadow: 0 24px 70px rgba(20,40,70,.28), 0 0 0 10px #1c2430, 0 0 0 12px #2c3746;
  position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.statusbar { height: 40px; flex-shrink: 0; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; font-size: 13px; font-weight: 600; position: relative; }
.sb-notch { position: absolute; left: 50%; transform: translateX(-50%); top: 7px; width: 108px; height: 26px; background: #1c2430; border-radius: 16px; }
.sb-icons { font-size: 11px; letter-spacing: 1px; }
.navbar { height: 46px; flex-shrink: 0; background: var(--primary); color: #fff; display: flex; align-items: center; padding: 0 12px; position: relative; }
.nav-title { position: absolute; left: 0; right: 0; text-align: center; font-size: 16px; font-weight: 600; pointer-events: none; }
.nav-back { font-size: 30px; width: 30px; cursor: pointer; z-index: 2; line-height: 1; }
.nav-capsule { margin-left: auto; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.4); border-radius: 18px; padding: 4px 10px; font-size: 12px; z-index: 2; background: rgba(255,255,255,.12); }
.nav-capsule i { width: 1px; height: 14px; background: rgba(255,255,255,.4); }
.pages { flex: 1; position: relative; overflow: hidden; }
.page { position: absolute; inset: 0; display: none; }
.page.active { display: block; }
.scroll { height: 100%; overflow-y: auto; overflow-x: hidden; padding: 12px 12px 80px; -webkit-overflow-scrolling: touch; }
.scroll::-webkit-scrollbar { width: 0; }

/* Hero */
.hero { background: linear-gradient(135deg, #0d9488, #0e9aa7 55%, #0ea5e9); border-radius: 16px; padding: 16px 16px 14px; color: #fff; box-shadow: 0 8px 22px rgba(13,148,136,.3); }
.hero-top { display: flex; align-items: center; gap: 10px; }
.hero-logo { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.hero-org { font-size: 13px; font-weight: 600; line-height: 1.4; }
.hero-sub { font-size: 11px; opacity: .85; margin-top: 3px; }
.hero-stat { display: flex; margin-top: 16px; border-top: 1px solid rgba(255,255,255,.25); padding-top: 12px; }
.hero-stat > div { flex: 1; text-align: center; border-right: 1px solid rgba(255,255,255,.2); }
.hero-stat > div:last-child { border: none; }
.hero-stat strong { display: block; font-size: 20px; }
.hero-stat span { font-size: 11px; opacity: .85; }

.card.pad { padding: 16px; margin-top: 12px; }
.block-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.step { width: 20px; height: 20px; border-radius: 6px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.step.warn { background: var(--warning); }
.choose-row select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b95a5' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 32px; }
.tip { font-size: 11px; color: var(--muted); margin-top: 8px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.field .seg label { padding: 7px 12px; font-size: 12px; }
.field .input, .field .textarea, .field .select { font-size: 14px; padding: 9px 11px; }
.footer-note { text-align: center; color: #aab3c0; font-size: 11px; line-height: 1.6; padding: 18px 10px 8px; }

/* 记录页 */
.search-bar { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 10px; padding: 2px 12px; box-shadow: var(--shadow); }
.search-bar span { color: var(--muted); }
.search-bar .input { border: none; box-shadow: none !important; padding-left: 0; }
.filter-chips { display: flex; gap: 8px; margin: 12px 0; overflow-x: auto; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 18px; padding: 6px 14px; font-size: 12px; white-space: nowrap; cursor: pointer; }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.record-list { display: flex; flex-direction: column; gap: 10px; }
.rec-card { background: #fff; border-radius: 13px; padding: 13px 14px; box-shadow: var(--shadow); cursor: pointer; border-left: 3px solid var(--success); }
.rec-card.abn { border-left-color: var(--danger); }
.rec-top { display: flex; align-items: center; gap: 10px; }
.rec-name { font-size: 15px; font-weight: 600; }
.rec-tag { margin-left: auto; }
.rec-meta { color: var(--muted); font-size: 11px; margin-top: 7px; display: flex; gap: 10px; flex-wrap: wrap; }
.rec-eyes { margin-top: 8px; font-size: 12px; color: var(--ink-2); background: #f7f9fb; border-radius: 8px; padding: 7px 10px; }

/* 统计页 */
.stat-head { padding: 6px 4px 12px; }
.sh-title { font-size: 18px; font-weight: 700; }
.sh-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-box { background: #fff; border-radius: 13px; padding: 14px; box-shadow: var(--shadow); }
.stat-box .num { font-size: 24px; font-weight: 700; }
.stat-box .lbl { font-size: 11px; color: var(--muted); margin-top: 3px; }
.stat-box .num.g { color: var(--success); }
.stat-box .num.r { color: var(--danger); }
.stat-box .num.b { color: var(--accent); }
.chart-box { width: 100%; }

/* 我的页 */
.me-top { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg,#0d9488,#0ea5e9); border-radius: 16px; padding: 18px; color: #fff; }
.me-avatar { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.me-name { font-size: 16px; font-weight: 600; }
.me-org { font-size: 11px; opacity: .85; margin-top: 4px; }
.me-item { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.me-item:last-child { border-bottom: none; }
.me-item span { font-size: 16px; }
.me-item b { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12px; }
.me-item.clickable { cursor: pointer; }
.me-item.danger { color: var(--danger); }

/* TabBar */
.tabbar { position: absolute; bottom: 0; left: 0; right: 0; height: 62px; background: #fff; border-top: 1px solid var(--line); display: flex; z-index: 10; padding-bottom: 6px; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #9aa4b2; font-size: 10px; cursor: pointer; }
.tab .ti { font-size: 20px; filter: grayscale(1); opacity: .6; }
.tab.active { color: var(--primary); font-weight: 600; }
.tab.active .ti { filter: none; opacity: 1; }

/* 详情底部弹层 */
.sheet-mask { position: absolute; inset: 0; background: rgba(15,23,42,.45); z-index: 50; display: flex; align-items: flex-end; }
.sheet { width: 100%; background: #fff; border-radius: 18px 18px 0 0; padding: 20px; max-height: 78%; overflow-y: auto; animation: up .25s; }
@keyframes up { from { transform: translateY(100%) } to { transform: none } }
.sheet h3 { margin: 0 0 14px; font-size: 17px; }
.kv { display: flex; padding: 9px 0; border-bottom: 1px solid #f0f2f5; font-size: 13px; }
.kv .k { color: var(--muted); width: 96px; flex-shrink: 0; }
.kv .v { color: var(--ink); flex: 1; }

@media (max-width: 480px) {
  .phone-stage { padding: 0; }
  .stage-tip { display: none; }
  .phone { width: 100vw; height: 100vh; border-radius: 0; box-shadow: none; }
  .sb-notch { display: none; }
}
