/* 微信开票 H5（application/app 模块） */
/* 前台 frontend.css 会给 body 加 padding-top:60px（顶栏占位），开票页无顶栏，全部去掉 */
body.inv-body {
  padding-top: 0 !important;
}
.inv-body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  color: #333;
  background: #f5f5f5;
  padding-bottom: 0;
}
/* 非「主 Tab 全屏」页（如登录）仍可为底部安全区留白；主 Tab 页底栏已含 safe-area，避免 body 再垫一层空白 */
.inv-body:not(.inv-main-tabs) {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html.inv-html-tabs {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
}
/* 开票首页含底栏：html/body 满高 + flex，去掉 max-height 以免部分 WebView 底部露灰条 */
html.inv-html-tabs body.inv-body.inv-main-tabs {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0 !important;
  height: 100%;
  min-height: 100%;
  min-height: -webkit-fill-available;
  overflow: hidden;
  box-sizing: border-box;
}
body.inv-body.inv-main-tabs .inv-app-page {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  background: #f5f5f5;
}
.inv-app-page > .inv-shell {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
a { color: #07c160; text-decoration: none; }
.inv-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 44px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid #eee;
}
.inv-topbar .back {
  position: absolute;
  left: 12px;
  font-size: 28px;
  line-height: 44px;
  color: #333;
}
/* 申请记录：状态分栏（待审核 / 已审核 / 已驳回） */
.inv-record-tabs {
  display: flex;
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 0 4px;
  position: sticky;
  top: 44px;
  z-index: 45;
}
.inv-record-tabs a {
  flex: 1;
  text-align: center;
  padding: 10px 4px 8px;
  font-size: 14px;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
}
.inv-record-tabs a.active {
  color: #07c160;
  font-weight: 600;
  border-bottom-color: #07c160;
}
.inv-shell {
  min-height: 0;
  padding-bottom: 20px;
  box-sizing: border-box;
  position: relative;
}
.inv-home-header {
  background: linear-gradient(135deg, #07c160 0%, #0aab50 100%);
  padding: 20px 16px 40px;
  color: #fff;
  position: relative;
  z-index: 0;
}
/* viewport-fit=cover 后顶栏与刘海区衔接 */
body.inv-main-tabs .inv-home-header {
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
}
.inv-home-user { display: flex; align-items: center; gap: 12px; }
.inv-home-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.3); display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 20px;
}
.inv-home-avatar img { width: 100%; height: 100%; object-fit: cover; }
.inv-home-welcome { font-size: 14px; opacity: .9; }
.inv-home-name { font-size: 17px; font-weight: 700; margin-top: 2px; }
.inv-home-entry-row {
  display: flex;
  gap: 12px;
  margin: -24px 12px 0;
  position: relative;
  z-index: 2;
}
.inv-home-entry {
  flex: 1;
  background: #fff;
  border-radius: 10px;
  padding: 18px 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  color: #333;
  position: relative;
  z-index: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
}
.inv-home-entry-icon { font-size: 28px; margin-bottom: 6px; }
.inv-home-entry-text { font-size: 13px; }
.inv-card {
  background: #fff; border-radius: 8px; margin: 12px; padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.inv-tip-text { font-size: 14px; color: #666; line-height: 1.7; white-space: pre-line; }
/* 底栏随 inv-app-page 在文档流内贴底，避免 position:fixed 在部分微信/WebView 中无法命中点击 */
.inv-tabbar {
  flex: 0 0 auto;
  position: relative;
  z-index: 4;
  display: flex;
  pointer-events: auto;
  align-items: stretch;
  background: #fff;
  border-top: 1px solid #eee;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  min-height: calc(52px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
}
.inv-tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  font-size: 11px;
  color: #666;
  position: relative;
  cursor: pointer;
  touch-action: manipulation;
}
.inv-tabbar a.active { color: #07c160; }
.inv-tabbar .ico { font-size: 22px; line-height: 1.2; }
.inv-tabbar .badge {
  position: absolute; top: 4px; right: calc(50% - 22px);
  min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px;
  background: #ee0a24; color: #fff; font-size: 10px; border-radius: 10px; text-align: center;
}
.inv-topbar-right { position: absolute; right: 12px; font-size: 13px; color: #07c160; }
.inv-scroll-list { min-height: 200px; padding: 8px 0 16px; }
.inv-empty { padding: 60px 20px; text-align: center; color: #bbb; font-size: 14px; }
.inv-empty .ico { font-size: 48px; margin-bottom: 12px; }
.inv-msg-item {
  padding: 14px 16px; border-bottom: 1px solid #f5f5f5; display: flex; gap: 12px;
}
.inv-msg-dot { width: 8px; height: 8px; border-radius: 50%; background: #07c160; margin-top: 6px; flex-shrink: 0; }
.inv-msg-dot.read { background: #ddd; }
.inv-msg-title { font-size: 15px; font-weight: 600; color: #222; }
.inv-msg-summary { font-size: 13px; color: #888; margin-top: 4px; }
.inv-msg-time { font-size: 12px; color: #bbb; margin-top: 4px; }
.inv-list-item {
  background: #fff; border-radius: 8px; margin: 8px 12px; padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.inv-list-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.inv-list-item-row { font-size: 13px; color: #666; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inv-record-tip { font-size: 13px; color: #1989fa; margin-top: 6px; line-height: 1.4; }
.inv-tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.inv-tag.bus { background: #e3f2fd; color: #1565c0; }
.inv-tag.park { background: #f3e5f5; color: #6a1b9a; }
.inv-tag.gray { background: #f5f5f5; color: #555; margin-left: 6px; }
.inv-tag-pending { background: #fff3e0; color: #e65100; }
.inv-tag-pass { background: #e8f5e9; color: #2e7d32; }
.inv-tag-reject { background: #ffebee; color: #c62828; }
.inv-tag-revoke { background: #eceff1; color: #455a64; }
.inv-amount { font-size: 16px; font-weight: 700; color: #1976d2; }
.inv-edit-wrap { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.inv-btn-outline {
  display: block; width: 100%; text-align: center; padding: 8px; font-size: 13px;
  border: 1px solid #07c160; color: #07c160; background: #fff; border-radius: 4px; cursor: pointer;
}
.inv-profile-header {
  background: linear-gradient(135deg, #07c160 0%, #0aab50 100%);
  padding: 28px 16px 20px; display: flex; align-items: center; gap: 14px; color: #fff;
}
.inv-profile-avatar {
  width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 28px;
}
.inv-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.inv-profile-name { font-size: 17px; font-weight: 700; }
.inv-profile-sub { font-size: 13px; opacity: .75; margin-top: 4px; }
.inv-cell-group { margin: 12px; background: #fff; border-radius: 8px; overflow: hidden; }
.inv-cell { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid #f5f5f5; color: #333; }
.inv-cell:last-child { border-bottom: none; }
.inv-cell-label { flex: 1; font-size: 15px; }
.inv-cell-arrow { color: #ccc; font-size: 20px; }
.inv-segment { display: flex; background: #f0f2f5; border-radius: 8px; padding: 2px; margin: 8px 12px; }
.inv-segment label { flex: 1; text-align: center; }
.inv-segment label span {
  display: block; height: 34px; line-height: 34px; font-size: 14px; border-radius: 6px; color: #666; cursor: pointer;
}
.inv-segment input { display: none; }
.inv-segment input:checked + span { background: #fff; color: #07c160; font-weight: 600; }
.inv-cell-form { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid #f5f5f5; background: #fff; margin: 0 12px; }
.inv-cell-form:first-of-type { border-radius: 8px 8px 0 0; }
.inv-cell-form:last-of-type { border-radius: 0 0 8px 8px; border-bottom: none; }
.inv-cell-group-form { margin: 8px 12px 12px; border-radius: 8px; overflow: hidden; }
.inv-label { width: 88px; font-size: 14px; flex-shrink: 0; }
.inv-label.req::after { content: ' *'; color: #ee0a24; }
.inv-input, .inv-textarea {
  flex: 1; border: none; font-size: 14px; font-family: inherit; background: transparent;
}
.inv-textarea { min-height: 72px; resize: vertical; }
.inv-upload {
  width: 80px; height: 80px; border: 1px dashed #ddd; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden;
}
.inv-upload img { width: 100%; height: 100%; object-fit: cover; }
.inv-hint { font-size: 12px; color: #aaa; margin-top: 4px; }
.inv-submit-wrap { padding: 16px 12px; }
.inv-btn-primary {
  display: block; width: 100%; padding: 12px; background: #07c160; color: #fff; border: none;
  border-radius: 6px; font-size: 16px; cursor: pointer; text-align: center;
}
.inv-btn-block { display: block; width: 100%; padding: 10px; margin: 8px 12px; box-sizing: border-box; border-radius: 6px; text-align: center; font-size: 14px; border: none; cursor: pointer; }
.inv-add-wrap { padding: 10px 12px; }
.inv-sec-title { padding: 10px 14px 4px; font-size: 13px; color: #888; font-weight: 600; }
.inv-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.inv-actions .btn { font-size: 12px; padding: 6px 10px; border-radius: 4px; cursor: pointer; border: 1px solid #ddd; background: #f5f5f5; }
.inv-actions .btn-o { border-color: #07c160; color: #07c160; background: #fff; }
.inv-actions .btn-d { border-color: #ee0a24; color: #ee0a24; background: #fff; }
.inv-grid { display: flex; flex-wrap: wrap; gap: 12px 8px; }
.inv-g-item { width: calc(50% - 4px); box-sizing: border-box; }
.inv-g-item.full { width: 100%; }
.inv-g-label { display: block; font-size: 12px; color: #888; }
.inv-g-val { display: block; font-size: 14px; font-weight: 600; margin-top: 4px; word-break: break-all; }
.inv-inv-img { max-width: 100%; border-radius: 8px; margin-top: 8px; }
.inv-login-page {
  min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 32px 20px calc(32px + env(safe-area-inset-bottom));
  background: linear-gradient(165deg, #e8f8ef 0%, #f0f4f8 45%, #f5f5f7 100%);
}
.inv-login-card {
  width: 100%; max-width: 340px; background: #fff; border-radius: 20px;
  padding: 36px 28px 32px; box-shadow: 0 12px 40px rgba(0, 0, 0, .08), 0 0 1px rgba(0, 0, 0, .06);
  text-align: center; box-sizing: border-box;
}
.inv-login-brand {
  width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 20px;
  background: linear-gradient(145deg, #07c160 0%, #06a050 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(7, 193, 96, .35);
}
.inv-login-brand-svg { width: 40px; height: 40px; opacity: .95; }
.inv-login-title {
  font-size: 21px; font-weight: 700; margin: 0 0 12px; color: #1a1a1a; letter-spacing: -0.02em;
}
.inv-login-sub {
  font-size: 14px; color: #666; line-height: 1.65; margin: 0 0 28px; text-align: center;
}
.inv-login-btn {
  display: block; width: 100%; box-sizing: border-box; padding: 14px 20px; background: #07c160; color: #fff;
  border-radius: 12px; font-size: 16px; font-weight: 600; border: none; cursor: pointer;
  text-align: center; text-decoration: none; line-height: 1.35;
  box-shadow: 0 6px 20px rgba(7, 193, 96, .32); transition: background .2s, transform .15s, box-shadow .2s;
}
.inv-login-btn:active { transform: scale(0.98); box-shadow: 0 4px 14px rgba(7, 193, 96, .28); }
.inv-login-btn--secondary {
  background: #fff; color: #07c160; border: 1.5px solid rgba(7, 193, 96, .45);
  box-shadow: none; margin-top: 0;
}
.inv-login-btn--secondary:active { background: #f6fffb; }
.inv-login-footnote { font-size: 12px; color: #aaa; margin: 14px 0 0; line-height: 1.5; }
.inv-login-demo { margin-top: 20px; width: 100%; }
.inv-login-tip { font-size: 12px; color: #aaa; text-align: center; }
.inv-mask {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 200;
  align-items: flex-end; justify-content: center;
}
.inv-mask.show { display: flex; }
.inv-popup {
  width: 100%; max-height: 70vh; background: #fff; border-radius: 16px 16px 0 0; overflow: hidden;
}
.inv-popup-hd { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #f5f5f5; }
.inv-popup-title { font-size: 16px; font-weight: 600; }
.inv-popup-close { font-size: 22px; color: #999; cursor: pointer; border: none; background: none; }
.inv-preset-row {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5; cursor: pointer;
}
.inv-preset-title { font-size: 14px; font-weight: 600; }
.inv-def-tag { font-size: 11px; color: #07c160; margin-left: 8px; }
.inv-preset-sub { font-size: 12px; color: #888; margin-top: 4px; }
.inv-page-pad { padding-bottom: 24px; }
.segment-disabled { opacity: .5; pointer-events: none; }
