/* C 端 H5（司机端）样式 —— 严格对齐参考稿：
   第 1 页 活动规则（扫码首屏）｜第 2 页 活动主页（进度+上传+记录）｜达标态
   暖橙 + 米白配色，卡片化，大字号关键数字。 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #FDF3E8; color: #2A1A0F; font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #FDF3E8; padding-bottom: 78px; position: relative; }

/* ---------------- 顶部橙色区 ---------------- */
.hero { background: linear-gradient(165deg, #C85D16 0%, #B34A0E 55%, #A0430C 100%); color: #fff; padding: 18px 16px 22px; position: relative; }
.hero .kicker { font-size: 13px; opacity: .95; display: flex; align-items: center; gap: 6px; }
.hero .kicker b { font-weight: 600; }
.hero .hero-label { margin-top: 10px; font-size: 13px; opacity: .92; }
.hero .hero-amount { font-size: 46px; font-weight: 800; line-height: 1.08; letter-spacing: -1px; }
.hero .hero-amount small { font-size: 20px; font-weight: 700; margin-left: 4px; letter-spacing: 0; }
.hero .pending-pill { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.16); border-radius: 12px; padding: 9px 14px; font-size: 14px; }
.hero .pending-pill b { font-size: 19px; font-weight: 800; }
.hero .pending-pill .pill-ic { opacity: .9; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hero-refresh { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 30px; height: 30px; border-radius: 50%; font-size: 15px; line-height: 1; cursor: pointer; }

/* ---------------- 区块标题 ---------------- */
.body { padding: 14px 12px 0; }
.section-h { display: flex; align-items: center; gap: 6px; margin: 14px 4px 10px; font-size: 16px; font-weight: 800; color: #2A1A0F; }
.section-h .ic { font-size: 15px; }
.section-h .more { margin-left: auto; font-size: 12px; font-weight: 400; color: #9A7B62; text-decoration: none; }

/* ---------------- 进度卡 ---------------- */
.prog-card { background: #fff; border-radius: 16px; padding: 14px 16px 12px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(120, 60, 20, .05); }
.prog-head { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #4A3527; }
.prog-head .target { margin-left: auto; font-size: 13px; color: #8A6A4F; }
.prog-line { margin-top: 10px; display: flex; align-items: baseline; gap: 6px; font-size: 15px; color: #3A2A1D; }
.prog-line b { font-size: 19px; font-weight: 800; color: #2A1A0F; }
.prog-bar { margin-top: 9px; height: 8px; border-radius: 99px; background: #F1E2D0; overflow: hidden; }
.prog-bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #C9641A, #9A3E08); transition: width .45s ease; }
.prog-note { margin-top: 11px; font-size: 14px; color: #4A3527; }
.prog-note b { color: #C2410C; font-size: 17px; font-weight: 800; margin: 0 2px; }
.prog-deadline { margin-top: 7px; display: flex; gap: 6px; font-size: 12.5px; color: #8A6A4F; line-height: 1.55; }
.prog-deadline .ic { flex: none; }
.prog-card.done { background: #FFF6EC; border: 1px solid #F6D5B4; }
.prog-card.done .prog-bar > i { background: linear-gradient(90deg, #E08B37, #C2410C); }
.prog-done-bar { margin-top: 11px; background: #FBE3CB; border-radius: 10px; padding: 11px 12px; display: flex; gap: 8px; font-size: 13.5px; color: #8A3E0B; line-height: 1.6; }
.prog-done-bar b { font-weight: 800; }

/* ---------------- 上传卡 ---------------- */
.upload-card { background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(120, 60, 20, .05); }
.shot-box { border: 1.5px dashed #D9B48E; border-radius: 12px; background: #FDF6EC; padding: 22px 12px; text-align: center; cursor: pointer; }
.shot-ic { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 50%; background: #C2560F; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.shot-text { font-size: 14px; color: #5A4232; }
.btn-upload { width: 100%; margin-top: 12px; border: 0; border-radius: 10px; padding: 14px; font-size: 17px; font-weight: 800; color: #fff; background: #C2560F; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-upload:active { background: #A8450B; }
.upload-tip { margin-top: 10px; font-size: 12.5px; color: #8A6A4F; line-height: 1.6; }

/* ---------------- 上传记录卡 ---------------- */
.rec-card { background: #fff; border-radius: 16px; padding: 15px 16px 14px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(120, 60, 20, .05); }
.rec-top { display: flex; align-items: center; gap: 8px; }
.rec-date { font-size: 17px; font-weight: 800; color: #2A1A0F; }
.rec-pill { margin-left: auto; font-size: 12.5px; padding: 4px 12px; border-radius: 99px; white-space: nowrap; }
.rec-pill.green { background: #DCF5E3; color: #1F7A45; }
.rec-pill.orange { background: #FBE3CB; color: #B45309; }
.rec-pill.gray { background: #F1EDE8; color: #7A6653; }
.rec-metrics { margin-top: 8px; display: flex; align-items: baseline; gap: 4px; }
.rec-kwh { font-size: 30px; font-weight: 800; color: #2A1A0F; letter-spacing: -.5px; }
.rec-unit { font-size: 14px; color: #6B5443; margin-right: 10px; }
.rec-amount { font-size: 15px; color: #4A3527; }
.rec-platform { margin-left: auto; align-self: flex-end; font-size: 13.5px; color: #5A4232; }
.rec-order { margin-top: 6px; font-size: 13px; color: #8A6A4F; }
.rec-banner { margin-top: 11px; background: #FBE3CB; border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #8A3E0B; display: flex; gap: 7px; align-items: center; }
.rec-banner.warn { background: #F1EDE8; color: #7A6653; }

/* ---------------- 规则页（第 1 页） ---------------- */
.mask { position: fixed; inset: 0; background: rgba(28, 16, 8, .58); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px; overflow-y: auto; }
.rule-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.28); animation: pop .22s ease; }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: .7; } to { transform: none; opacity: 1; } }
.rule-head { background: linear-gradient(160deg, #C85D16, #A0430C); color: #fff; padding: 20px 20px 22px; }
.rule-kicker { font-size: 13px; opacity: .95; display: flex; gap: 6px; align-items: center; }
.rule-title { margin-top: 12px; font-size: 27px; font-weight: 800; line-height: 1.25; letter-spacing: -.5px; }
.rule-sub { margin-top: 10px; font-size: 14px; line-height: 1.65; opacity: .95; }
.rule-body { padding: 18px 20px 6px; }
.rule-row { display: flex; gap: 10px; font-size: 15px; color: #3A2A1D; line-height: 1.6; margin-bottom: 14px; }
.rule-row .ic { flex: none; font-size: 17px; line-height: 1.4; }
.rule-row b { color: #C2410C; font-weight: 800; margin: 0 2px; }
.rule-foot { padding: 6px 20px 20px; }
.rule-cta { width: 100%; border: 0; border-radius: 12px; padding: 16px; font-size: 18px; font-weight: 800; color: #fff; background: #C2560F; font-family: inherit; cursor: pointer; }
.rule-cta:active { background: #A8450B; }
.rule-agree { margin-top: 12px; text-align: center; font-size: 12.5px; color: #8A6A4F; }
.rule-agree a { color: #C2410C; }
.rule-mini { margin-top: 10px; text-align: center; font-size: 12.5px; color: #9A7B62; }

/* ---------------- 手机号验证（弹窗） ---------------- */
.phone-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 22px 20px 20px; box-shadow: 0 20px 50px rgba(0,0,0,.3); animation: pop .22s ease; }
.phone-title { font-size: 21px; font-weight: 800; }
.phone-sub { margin-top: 6px; font-size: 13px; color: #8A6A4F; line-height: 1.6; }
.phone-body { margin-top: 16px; }
.phone-field { margin-bottom: 12px; }
.phone-field label { display: block; font-size: 13px; color: #5A4232; margin-bottom: 6px; }
.phone-field input { width: 100%; border: 1px solid #E8D9C8; background: #FDF9F3; border-radius: 10px; padding: 12px; font-size: 16px; color: #2A1A0F; font-family: inherit; }
.phone-field input:focus { outline: none; border-color: #C2560F; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-btn { flex: none; border: 1px solid #E0C6AC; background: #fff; color: #B45309; border-radius: 10px; padding: 0 12px; font-size: 13px; font-family: inherit; cursor: pointer; white-space: nowrap; }
.code-btn:disabled { color: #B7A28F; border-color: #EEE3D6; }
.phone-cta { width: 100%; border: 0; border-radius: 12px; padding: 15px; font-size: 17px; font-weight: 800; color: #fff; background: #C2560F; font-family: inherit; cursor: pointer; }
.phone-cta:disabled { opacity: .6; }
.phone-close { margin-top: 12px; text-align: center; font-size: 13px; color: #9A7B62; }
.phone-tip { margin-top: 10px; font-size: 12px; color: #9A7B62; line-height: 1.6; }

/* ---------------- 底部导航 ---------------- */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; border-top: 1px solid #F1E6D9; display: flex; padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
.tabbar a { flex: 1; text-align: center; padding: 8px 0 7px; color: #A08A76; font-size: 11px; text-decoration: none; }
.tabbar a.active { color: #C2560F; font-weight: 700; }
.tabbar a .ic { display: block; font-size: 19px; line-height: 1.25; }

/* ---------------- 通用 ---------------- */
.topbar { display: flex; align-items: center; justify-content: center; position: relative; height: 46px; padding: 0 12px; background: #FDF3E8; }
.topbar h2 { font-size: 17px; margin: 0; font-weight: 700; }
.back-link { position: absolute; left: 10px; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: #2A1A0F; display: flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 1px 5px rgba(0,0,0,.08); font-size: 18px; }
.wrap { padding: 0 12px; }
.card { background: #fff; border-radius: 16px; padding: 16px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(120, 60, 20, .05); }
.card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.empty { padding: 22px 10px; text-align: center; color: #A08A76; font-size: 13px; }
.muted { color: #9A7B62; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: #5A4232; margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #E8D9C8; border-radius: 10px; padding: 11px 12px; font-size: 15px; background: #fff; color: #2A1A0F; font-family: inherit; }
.field textarea { min-height: 120px; font-size: 13px; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #C2560F; }
.help { font-size: 12px; color: #9A7B62; margin-top: 6px; line-height: 1.6; }
.btn { border: 0; border-radius: 12px; padding: 13px 16px; font-size: 16px; font-weight: 600; cursor: pointer; width: 100%; font-family: inherit; }
.btn.primary { background: #C2560F; color: #fff; }
.btn.ghost { background: #F4EBDF; color: #5A4232; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 8px; width: auto; }
.btn:disabled { opacity: .55; }
.btn-row { display: flex; gap: 10px; margin-top: 8px; }
.btn-row .btn { flex: 1; }
.banner { border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; line-height: 1.6; }
.banner.warn { background: #FFF6EC; color: #8A3E0B; border: 1px solid #F6D5B4; }
.banner.error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.banner.info { background: #FDF6EC; color: #6B4A2A; border: 1px solid #EAD9C4; }
.conf { font-size: 12px; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: #DCF5E3; color: #1F7A45; white-space: nowrap; }
.conf.low { background: #FBE3CB; color: #B45309; }

/* 上传流程 */
.file-label { display: block; border: 1.5px dashed #D9B48E; background: #FDF6EC; border-radius: 14px; padding: 26px 12px; text-align: center; color: #B45309; font-size: 14px; cursor: pointer; }
.file-label b { display: block; font-size: 26px; margin-bottom: 6px; }
.preview { width: 100%; border-radius: 12px; background: #2A1A0F; max-height: 300px; object-fit: contain; }
.tag { font-size: 12px; padding: 2px 10px; border-radius: 99px; white-space: nowrap; }
.tag.green { background: #DCF5E3; color: #1F7A45; }
.tag.gray { background: #F1EDE8; color: #7A6653; }
.tag.orange { background: #FBE3CB; color: #B45309; }

/* 老板端 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: #8A6A4F; font-weight: 500; padding: 8px 6px; border-bottom: 1px solid #F1E6D9; white-space: nowrap; }
.table td { padding: 9px 6px; border-bottom: 1px solid #FAF3EA; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; }
.kpi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi .item { background: #FDF6EC; border-radius: 12px; padding: 12px; }
.kpi .item .n { font-size: 20px; font-weight: 800; }
.kpi .item .t { font-size: 12px; color: #8A6A4F; margin-top: 2px; }
.seg { display: flex; background: #F4EBDF; border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 8px; font-size: 13px; color: #6B5443; font-family: inherit; }
.seg button.active { background: #fff; color: #2A1A0F; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* 加载与提示 */
.loading { text-align: center; padding: 40px 0; color: #A08A76; font-size: 13px; }
.spinner { width: 22px; height: 22px; border: 2px solid #F1E6D9; border-top-color: #C2560F; border-radius: 50%; margin: 0 auto 8px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.96); background: rgba(42, 26, 15, .92); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; max-width: 80%; text-align: center; opacity: 0; pointer-events: none; transition: .18s; z-index: 99; }
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* 顶栏标题 + 站点名（用于识别当前站点） */
.topbar-title { display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.topbar-title h2 { margin: 0; }
.topbar-title span { font-size: 11px; color: #9A7B62; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 站点切换 / 当前站点信息 */
.switch-station {
  margin: 18px 0 6px;
  text-align: center;
  font-size: 12px;
  color: #A08A76;
}
.switch-station span { display: block; margin-bottom: 6px; }
.switch-station button {
  border: 1px solid #E8D9C8;
  background: #fff;
  color: #8A6A4F;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.station-meta { margin-top: 16px; text-align: center; font-size: 12px; color: #A08A76; line-height: 1.7; }
