/* 赵一鸣零食 · H5 数据看板 */
:root {
  --brand: #ff6b35;
  --brand-dark: #ee5a22;
  --brand-light: #fff2ec;
  --text: #1f1f1f;
  --text-2: #595959;
  --muted: #9aa0a8;
  --line: #f0f2f5;
  --up: #f5222d;
  --down: #00a870;
}

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

html {
  background: #e9ecf1;
  height: 100%;
}

body {
  margin: 0 auto;
  max-width: 480px;
  min-height: 100%;
  background: #f5f6f8;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.06);
}

/* ---------- 开屏广告 ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #f2561c;
  overflow: hidden;
  transition: opacity 0.45s ease;
}

.splash.hide {
  opacity: 0;
  pointer-events: none;
}

.splash img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}

.splash-skip {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  border: none;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 8px 15px;
  border-radius: 16px;
  cursor: pointer;
  backdrop-filter: blur(3px);
}

/* ---------- 顶部 ---------- */
.h5-header {
  background: linear-gradient(160deg, #ff8a5c 0%, var(--brand) 48%, #f2561c 100%);
  padding: 20px 18px 56px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.h5-header::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -56px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.h5-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.h5-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.h5-link {
  color: #fff;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  padding: 4px 12px;
  text-decoration: none;
}

.h5-store {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.pin {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
  flex: none;
}

/* ---------- 主体 ---------- */
.h5-main {
  margin-top: -44px;
  padding: 0 12px 28px;
  position: relative;
  z-index: 2;
}

.h5-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 14px;
  box-shadow: 0 3px 14px rgba(24, 30, 45, 0.07);
}

.h5-card + .h5-card { margin-top: 12px; }

.h5-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.h5-card-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}

.h5-card-head h3::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--brand);
}

.h5-sub { color: var(--muted); font-size: 12px; }

/* ---------- 顶部标签 ---------- */
.h5-tabs {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}

.h5-tabs button {
  flex: 1;
  border: none;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 4px;
  border-radius: 16px;
  background: #f2f4f7;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.16s;
}

.h5-tabs button.active {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.32);
}

/* ---------- 时间选择 ---------- */
.h5-range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.h5-range > span {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
}

.h5-pickers { display: flex; gap: 6px; }

.h5-pickers input,
.h5-pickers select {
  font-family: inherit;
  font-size: 12px;
  color: var(--text-2);
  border: 1px solid #e6e9ee;
  background: #fafbfc;
  border-radius: 8px;
  padding: 5px 8px;
  outline: none;
  max-width: 118px;
}

.h5-pickers select { max-width: 106px; }

/* ---------- 指标 ---------- */
.h5-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
}

.h5-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}

.h5-value {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.h5-trends {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}

.h5-trends span { display: block; }

.trend { font-weight: 600; }
.trend.up { color: var(--up); }
.trend.down { color: var(--down); }
.trend.flat { color: var(--muted); }

/* ---------- 月度累计 ---------- */
.h5-row {
  display: flex;
  gap: 12px;
}

.h5-row-item {
  flex: 1;
  background: #fafbfc;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.h5-row-item strong {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.h5-row-item em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- 图表 ---------- */
.h5-chart { width: 100%; height: 200px; overflow: hidden; }

/* ---------- 明细 ---------- */
.h5-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}

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

.h5-item-date {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.h5-item-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.h5-item-right { text-align: right; }

.h5-item-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.h5-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 30px 0;
}
