/**
 * 水母报告 ·移动端 H5 基础样式（第一块：布局与首页结构）
 * 若设计稿有完整 style.css，可将其中规则合并进本文件或拆分为多文件引入。
 */
:root {
  --bg-page: #f3f5f9;
  --text: #1a1d26;
  --text-sub: #6b7280;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --card: #fff;
  --border: #e8ecf2;
  --badge-blue: #3b82f6;
  --badge-gold: #d4a012;
  --radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg-page);
  line-height: 1.45;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.page-shell {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg-page);
}

.page {
  padding-bottom: 24px;
}

/* 顶栏 */
.top-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 4px;
  font-size: 12px;
  color: var(--text-sub);
}

.status-bar__icons-img {
  display: block;
  height: 14px;
  width: auto;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px 12px;
}

.nav-bar__title {
  flex: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
}

.nav-bar__icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav-bar__icon-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* 插画区 */
.hero {
  background: linear-gradient(180deg, #e8eef9 0%, var(--bg-page) 100%);
  padding: 0 16px 8px;
}

.hero__clip {
  border-radius: var(--radius);
  overflow: hidden;
 background: #dbeafe;
  min-height: 120px;
}

.hero__img {
  width: 100%;
  display: block;
}

/* 用户信息 */
.profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -32px 16px 16px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  position: relative;
}

.profile__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
}

.profile__meta {
  flex: 1;
  min-width: 0;
}

.profile__name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile__name {
  font-size: 18px;
  font-weight: 600;
}

.profile__edit img {
  width: 20px;
  height: 20px;
}

.profile__phone {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-sub);
}

/* 卡片通用 */
.card {
  margin: 0 16px 14px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.card--dd__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card--dd__row--head {
  margin-bottom: 8px;
}

.card--dd__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.card--dd__row--sub {
  margin-bottom: 12px;
}

.card--dd__hint {
  font-size: 12px;
  color: var(--text-sub);
}

.card--dd__link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}

.card--dd__underline-wrap,
.card--dd__divider {
  margin: 8px 0;
}

.card--dd__underline-wrap img,
.card--dd__divider img {
  width: 100%;
  height: 2px;
  object-fit: scale-down;
}

.card--dd__row--action {
  margin-top: 4px;
}

.card--dd__action-label {
  font-size: 14px;
  font-weight: 500;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.btn--sm {
  padding: 6px 14px;
}

.btn--md {
  padding: 8px 18px;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:active {
  background: var(--primary-hover);
}

.btn--outline {
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

/* 使用情况 */
.card--usage__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.card--usage__subtitle {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-sub);
}

.stats {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}

.stats__cell {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border-right: 1px solid var(--border);
}

.stats__cell:last-child {
  border-right: none;
}

.stats__value {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.stats__label {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-sub);
}

.promo {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  min-height: 72px;
  background: linear-gradient(90deg, #1e3a5f 0%, #2d5a87 100%);
}

.promo__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.promo__content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.promo__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.promo__desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.promo__btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: #1e3a5f;
  font-size: 13px;
  font-weight: 600;
}

/* 单行卡片 */
.card--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card--row__label {
  font-size: 15px;
  font-weight: 500;
}

/* 搜索 */
.search-panel {
  margin: 0 16px 14px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 8px 12px;
  border: 1px solid var(--border);
}

.search-bar__field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.search-bar__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
 opacity: 0.5;
}

.search-bar__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  min-width: 0;
  background: transparent;
}

.search-bar__submit {
  flex-shrink: 0;
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
}

/* 报告列表 */
.report-section {
  margin: 0 16px;
}

.report-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.report-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 10px;
  border: 1px solid var(--border);
}

.report-card__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.report-card__time {
  margin: 0;
  font-size: 12px;
  color: var(--text-sub);
}

.report-card__badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}

.report-card__badge--blue {
  background: var(--badge-blue);
}

.report-card__badge--gold {
  background: var(--badge-gold);
}

/* ---------- 个人信息页（application/index/view/user/profile.html） ---------- */
.page--profile {
  position: relative;
  min-height: 100vh;
  padding-bottom: 32px;
}

.page--profile__bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  min-height: 100%;
  background-color: var(--bg-page);
  background-image: url(../img/profile-bg.png);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  pointer-events: none;
  z-index: 0;
}

.page--profile .top-header,
.page--profile .page--profile__body {
  position: relative;
  z-index: 1;
}

.top-header--profile {
  background: transparent;
  border-bottom: none;
  padding-top: env(safe-area-inset-top, 0);
}

.top-header--on-white .nav-bar__title {
  color: var(--text);
}

.nav-bar__icon-btn--placeholder {
  visibility: hidden;
  pointer-events: none;
}

.sub-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 14px;
  gap: 8px;
}

.sub-nav__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: none;
  line-height: 0;
  flex-shrink: 0;
}

.sub-nav__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  flex: 1;
  text-align: center;
}

.sub-nav__spacer {
  width: 36px;
  flex-shrink: 0;
}

.page--profile__body {
  padding: 4px 16px 24px;
}

.info-card {
  background: var(--card);
  border-radius: 14px;
  border: none;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  margin-bottom: 16px;
}

.info-card--links {
  margin-bottom: 24px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  min-height: 52px;
  color: inherit;
  text-decoration: none;
}

.info-row:not(:last-child) {
  border-bottom: 1px solid rgba(232, 236, 242, 0.95);
}

.info-row--tappable:active {
  background: rgba(0, 0, 0, 0.02);
}

.info-row--avatar {
  align-items: center;
}

.info-row--static {
  padding-top: 14px;
  padding-bottom: 14px;
}

.info-row__label {
  flex-shrink: 0;
  font-size: 15px;
  color: var(--text);
}

.info-row__trail {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.info-row__value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--text-sub);
}

.info-row__avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(232, 236, 242, 0.35);
  flex-shrink: 0;
}

.info-row__value--text {
  color: var(--text);
  font-weight: 500;
}

.info-row__value--phone {
  font-size: 15px;
  color: var(--text);
  letter-spacing: 0.03em;
}

.info-row__chevron {
  width: 17px;
  height: 17px;
  opacity: 0.4;
  flex-shrink: 0;
}

.info-row--nickname .info-row__chevron-wrap {
  flex-shrink: 0;
  pointer-events: none;
}

.profile-logout {
  display: block;
  width: 100%;
  margin: 0;
  padding: 15px 16px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: #e53935;
  background: var(--card);
  border: none;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  text-decoration: none;
}

.profile-logout:active {
  opacity: 0.92;
}

.profile-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.info-row--nickname {
  align-items: center;
}

.info-row__input--plain {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  padding: 0 4px 0 0;
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  text-align: right;
  color: var(--text);
  border: none;
  border-radius: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.info-row__input--plain::placeholder {
  color: #9ca3af;
}

.info-row__input--plain:focus {
  outline: none;
}

#profile-form {
  margin: 0;
}

/* 协议/政策单页富文本 */
.page--richtext {
  min-height: 100vh;
  padding-bottom: 24px;
  background: var(--bg-page);
}

.richtext-page {
  padding: 12px 16px 24px;
}

.richtext-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  word-break: break-word;
}

.richtext-body p {
  margin: 0 0 0.85em;
}

.richtext-body img {
  max-width: 100%;
  height: auto;
}

.richtext-body h1,
.richtext-body h2,
.richtext-body h3 {
  margin: 1em 0 0.5em;
  font-size: 1.05em;
  font-weight: 600;
}

.richtext-body ul,
.richtext-body ol {
  margin: 0 0 0.85em;
  padding-left: 1.35em;
}

/* 个人信息页：保存成功等轻提示 */
.profile-toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + env(safe-area-inset-bottom, 0));
  z-index: 10050;
  max-width: min(280px, 86vw);
  padding: 10px 18px;
  font-size: 14px;
  line-height: 1.4;
  color: #fff;
  text-align: center;
  background: rgba(26, 29, 38, 0.88);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translate3d(-50%, 10px, 0);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.profile-toast.profile-toast--show {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

/* ---------- 税务授权 / 查询页（application/index/view/index/query.html，源自 moban/auth.html） ---------- */
a.btn--block-link {
  text-decoration: none;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}

.page--auth {
  padding-bottom: 32px;
  background: var(--bg-page);
}

.page--auth__head {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.page--auth__head .sub-nav {
  padding-bottom: 12px;
}

.page--auth__hero {
  padding: 12px 16px 0;
  background: var(--card);
}

.page--auth__banner {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 10px;
}

.auth-stepper {
  margin-top: 16px;
  padding-bottom: 8px;
}

.auth-stepper__track {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 100%;
}

.auth-stepper__step {
  flex: 0 0 auto;
  width: 76px;
  text-align: center;
}

.auth-stepper__ring {
  width: 56px;
  height: 56px;
  margin: 0 auto 6px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.auth-stepper__num {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.auth-stepper__label {
  margin: 0;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.3;
}

.auth-stepper__line {
  flex: 1 1 20px;
  min-width: 12px;
  max-width: 36px;
  height: 2px;
  margin-top: 28px;
  background: linear-gradient(90deg, #bfdbfe, #93c5fd);
  border-radius: 1px;
}

.page--auth__gradient {
  height: 20px;
  background: linear-gradient(180deg, var(--card) 0%, var(--bg-page) 100%);
}

.auth-panel {
  margin: 0 16px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.auth-panel__field-label {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.auth-field--input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  background: #fafbfc;
}

.auth-field__input {
  width: 100%;
  padding: 12px 0;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--text);
}

.auth-field__input::placeholder {
  color: #9ca3af;
}

.auth-field__input:focus {
  outline: none;
}

.auth-results {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
}

.auth-results__item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.auth-results__item:last-child {
  border-bottom: none;
}

.auth-results__item:active {
  background: rgba(37, 99, 235, 0.06);
}

.auth-results__name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.auth-results__tax {
  margin: 0;
  font-size: 12px;
  color: var(--text-sub);
}

.auth-results__empty {
  padding: 14px;
  font-size: 13px;
  color: var(--text-sub);
  text-align: center;
  list-style: none;
}

.auth-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 0;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-sub);
}

.auth-agree__box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 2px solid var(--primary);
  border-radius: 4px;
  background: var(--primary);
  position: relative;
}

.auth-agree__input:not(:checked) + .auth-agree__box {
  background: #fff;
}

.auth-agree__input:not(:checked) + .auth-agree__box::after {
  display: none;
}

.auth-agree__input:checked + .auth-agree__box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-agree__text {
  flex: 1;
  min-width: 0;
}

.auth-agree__link {
  color: var(--primary);
  text-decoration: none;
}

.auth-agree__link:active {
  opacity: 0.85;
}

.auth-submit {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.auth-submit:active {
  background: var(--primary-hover);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
