/**
 * 业主端公共组件样式
 * 引用方式：<link rel="stylesheet" href="./asset/css/components.css">
 *
 * 目录：
 *   1. Design Tokens（设计变量）
 *   2. 字体声明
 *   3. 卡片组件
 *   4. 区块标题
 *   5. 图标徽章
 *   6. 分类 Tab 栏
 *   7. 搜索栏
 *   8. 商品卡片
 *   9. 底部购物车栏
 *  10. 返回顶部按钮
 *  11. 页面底部提示
 *  12. 页面背景
 *  13. 状态标签
 *  14. 通用列表行
 *  15. 表单分组 & 表单行
 *  16. 详情信息行
 *  17. 按钮
 *  18. 底部操作栏
 *  19. 空状态
 */

/* ══════════════════════════════════════════════
   1. Design Tokens（设计变量）
   ══════════════════════════════════════════════ */

:root {
  /* ── 颜色 · 主色 ── */
  --color-primary:        #1F69FF;
  --color-primary-light:  #4395FC;
  --color-primary-dark:   #0E5FD9;
  --color-primary-pale:   #D8EBFF;
  --color-primary-bg:     rgba(31,105,255,0.06);

  /* ── 颜色 · 状态 ── */
  --color-success:        #52C41A;
  --color-success-bg:     #F6FFED;
  --color-warning:        #FAAD14;
  --color-warning-bg:     #FFFBE6;
  --color-danger:         #FF4D4F;
  --color-danger-bg:      #FFF2F0;

  /* ── 颜色 · 文字 ── */
  --color-text-1:         #12151A;   /* 强调文字 */
  --color-text-2:         #4B535C;   /* 次要文字 */
  --color-text-3:         #7B838C;   /* 描述/占位 */
  --color-text-4:         #A9B0B8;   /* 禁用/辅助 */
  --icon-chevron-right-16:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 4L10 8L6 12' stroke='%234B535C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  /* ── 颜色 · 背景 ── */
  --color-bg-white:       #FFFFFF;
  --color-bg-page:        #F2F5F7;   /* 通用页面底色（灰） */
  --color-bg-page-blue:   #f0f6ff;   /* 蓝色系页面底色（与渐变头部衔接） */
  --color-bg-page-alt:    #F5F7FA;
  --color-nav-scrolled-bg:#BFE8FF;   /* 导航栏滚动态背景色 */

  /* ── 颜色 · 描边/分割 ── */
  --color-border:         rgba(18,21,26,0.08);
  --color-border-strong:  rgba(18,21,26,0.12);
  --color-divider:        rgba(18,21,26,0.06);

  /* ── 渐变 ── */
  --gradient-primary:     linear-gradient(135deg, #4395FC 0%, #1F69FF 100%);
  --gradient-page-top:    radial-gradient(98% 38% at 20% 7%, rgba(182,234,255,0.7) 22%, rgba(255,255,255,0) 100%),
                          linear-gradient(180deg, #D0E5FE 0%, #f0f6ff 100%);
  --gradient-card:        linear-gradient(180deg, rgba(81,165,255,0.1) 0%, rgba(255,255,255,0) 67%), #FFFFFF;
  --gradient-card-hero-blue: linear-gradient(135deg, #44A3FF 0%, #348EF3 48%, #2E7DE8 100%);

  /* ── 字体族 ── */
  --font-body:            'PingFang SC', sans-serif;
  --font-brand:           'Alibaba PuHuiTi 2.0', 'Alibaba PuHuiTi', 'PingFang SC', sans-serif;
  --font-number:          'DingTalk JinBuTi', 'PingFang SC', sans-serif;

  /* ── 圆角 ── */
  --radius-xs:            4px;
  --radius-sm:            6px;
  --radius-md:            8px;
  --radius-lg:            10px;   /* 卡片默认 */
  --radius-xl:            12px;   /* 图标徽章 */
  --radius-full:          999px;  /* 胶囊/圆形按钮 */

  /* ── 间距 ── */
  --space-1:              4px;
  --space-2:              8px;
  --space-3:              12px;
  --space-4:              16px;
  --space-5:              20px;
  --space-6:              24px;
  --space-7:              32px;

  /* ── 阴影 ── */
  --shadow-card:          0px 4px 16px 0px rgba(31,105,255,0.08);
  --shadow-card-hero-blue:0px 10px 24px 0px rgba(31,105,255,0.26);
  --shadow-bar:           0px -1px 0px 0px rgba(18,21,26,0.08), 0px -4px 12px 0px rgba(18,21,26,0.06);
  --shadow-float:         0px 4px 12px 0px rgba(18,21,26,0.12);
  --shadow-search:        0px 8px 20px 0px rgba(31,105,255,0.05);
  --shadow-tab-bar:       0px -4px 10px 0px rgba(0,0,0,0.12);

  /* ── 页面结构高度 ── */
  --height-status-bar:    44px;
  --height-navbar:        44px;
  --height-navbar-full:   88px;   /* 状态栏 + 导航行 */
  --height-tab-bar:       48px;
  --height-filter-tab:    42px;
  --wx-checkbox-size:         18px;  /* 小程序对应 36rpx */
  --wx-checkbox-border:       1.5px; /* 小程序对应 3rpx */
  --wx-checkbox-mark-left:    5px;   /* 小程序对应 10rpx */
  --wx-checkbox-mark-top:     2px;   /* 小程序对应 4rpx */
  --wx-checkbox-mark-width:   4px;   /* 小程序对应 8rpx */
  --wx-checkbox-mark-height:  7px;   /* 小程序对应 14rpx */
}

.wx-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: var(--wx-checkbox-size) !important;
  height: var(--wx-checkbox-size) !important;
  min-width: var(--wx-checkbox-size);
  margin: 0;
  padding: 0 !important;
  display: inline-block;
  flex-shrink: 0;
  box-sizing: border-box;
  border-radius: 50%;
  border: var(--wx-checkbox-border) solid #C8CDD4;
  background: #FFFFFF;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s;
}

.wx-checkbox:checked {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.wx-checkbox:checked::after {
  content: "";
  position: absolute;
  left: var(--wx-checkbox-mark-left);
  top: var(--wx-checkbox-mark-top);
  width: var(--wx-checkbox-mark-width);
  height: var(--wx-checkbox-mark-height);
  border: var(--wx-checkbox-border) solid #FFFFFF;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.wx-checkbox:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}


/* ══════════════════════════════════════════════
   2. 字体声明
   ══════════════════════════════════════════════ */

/* 钉钉进步体 — 数字/英文展示专用（本地文件） */
@font-face {
  font-family: 'DingTalk JinBuTi';
  src: url('../fonts/DingTalk-JinBuTi.woff2') format('woff2'),
       url('../fonts/DingTalk-JinBuTi.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* 阿里巴巴普惠体 — 标题/品牌文字（系统已安装） */
@font-face {
  font-family: 'Alibaba PuHuiTi';
  src: local('Alibaba PuHuiTi Regular'), local('Alibaba-PuHuiTi-Regular');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Alibaba PuHuiTi';
  src: local('Alibaba PuHuiTi Medium'), local('Alibaba-PuHuiTi-Medium');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Alibaba PuHuiTi';
  src: local('Alibaba PuHuiTi Bold'), local('Alibaba-PuHuiTi-Bold');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Alibaba PuHuiTi';
  src: local('Alibaba PuHuiTi Heavy'), local('Alibaba-PuHuiTi-Heavy');
  font-weight: 900;
  font-style: normal;
}
/* Alibaba PuHuiTi 2.0 映射到同一字体族 */
@font-face {
  font-family: 'Alibaba PuHuiTi 2.0';
  src: local('Alibaba PuHuiTi Regular'), local('Alibaba-PuHuiTi-Regular');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Alibaba PuHuiTi 2.0';
  src: local('Alibaba PuHuiTi Bold'), local('Alibaba-PuHuiTi-Bold');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Alibaba PuHuiTi 2.0';
  src: local('Alibaba PuHuiTi Heavy'), local('Alibaba-PuHuiTi-Heavy');
  font-weight: 900;
  font-style: normal;
}


/* ══════════════════════════════════════════════
   3. 卡片组件
   ══════════════════════════════════════════════ */

/**
 * .content-card — 白底卡片（默认）
 * 用法：<div class="content-card"> ... </div>
 */
.content-card {
  width: 100%;
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/**
 * .content-card.card-gradient — 渐变底卡片
 * 用法：<div class="content-card card-gradient"> ... </div>
 */
.content-card.card-gradient {
  background: var(--gradient-card);
  border: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

/**
 * .content-card.card-gradient.card-hero-blue — 统一蓝色统计卡（我的工单/房屋卡复用）
 * 用法：<div class="content-card card-gradient card-hero-blue"> ... </div>
 */
.content-card.card-gradient.card-hero-blue {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: var(--gradient-card-hero-blue);
  box-shadow: var(--shadow-card-hero-blue);
}

.content-card.card-gradient.card-hero-blue::before {
  content: "";
  position: absolute;
  right: -72px;
  bottom: -86px;
  width: 238px;
  height: 238px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.06) 52%, rgba(255,255,255,0) 74%);
  pointer-events: none;
  z-index: 0;
}

.content-card.card-gradient.card-hero-blue::after {
  content: "";
  position: absolute;
  left: -90px;
  top: -110px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.04) 52%, rgba(255,255,255,0) 74%);
  pointer-events: none;
  z-index: 0;
}

.content-card.card-gradient.card-hero-blue > * {
  position: relative;
  z-index: 1;
}


/* ══════════════════════════════════════════════
   4. 区块标题
   ══════════════════════════════════════════════ */

/**
 * .section-title-wrap — 带渐变高亮底纹的标题容器
 * 用法：
 *   <div class="section-title-wrap">
 *     <img class="section-title-deco" src="./asset/icons/svg_dd0df76a.svg">
 *     <span class="section-title">标题文字</span>
 *   </div>
 */
.section-title-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-3);
}

.section-title-deco {
  position: absolute;
  left: 0;
  bottom: 1px;
  z-index: 0;
}

.section-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 900;
  color: var(--color-text-1);
  line-height: 22px;
}


/* ══════════════════════════════════════════════
   5. 图标徽章
   ══════════════════════════════════════════════ */

/**
 * .icon-badge — 36×36 圆角图标容器，搭配色彩修饰类使用
 * 用法：
 *   <div class="icon-badge blue">
 *     <svg>...</svg>
 *   </div>
 *
 * 修饰类：.blue  .teal  .purple
 */
.icon-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-badge.blue {
  background: radial-gradient(145% 145% at 50% 0%, rgba(67,149,252,0.22) 21%, rgba(216,235,255,0.22) 98%);
  box-shadow: 0px 6px 8px 0px rgba(104,170,252,0.26);
}

.icon-badge.teal {
  background: radial-gradient(145% 145% at 50% 0%, rgba(49,188,165,0.2) 21%, rgba(210,255,248,0.25) 98%);
  box-shadow: 0px 6px 8px 0px rgba(49,188,165,0.16);
}

.icon-badge.purple {
  background: radial-gradient(145% 145% at 50% 0%, rgba(87,121,255,0.2) 21%, rgba(210,217,255,0.25) 98%);
  box-shadow: 0px 6px 8px 0px rgba(110,139,255,0.18);
}


/* ══════════════════════════════════════════════
   6. 分类 Tab 栏
   ══════════════════════════════════════════════ */

/**
 * .filter-tabs — Tab 栏容器
 * .filter-tab  — 单个 Tab 项，.active 表示选中态
 * 用法：
 *   <div class="filter-tabs">
 *     <div class="filter-tab active" data-tab="推荐">推荐</div>
 *     <div class="filter-tab" data-tab="生鲜">生鲜</div>
 *   </div>
 */
.filter-tabs {
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 0.5px solid var(--color-border);
}

.filter-tab {
  flex: 1;
  height: var(--height-filter-tab);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-2);
  position: relative;
  cursor: pointer;
  white-space: nowrap;
}

.filter-tab.active {
  font-weight: 600;
  color: var(--color-primary);
}

.filter-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px 2px 0 0;
}

.filter-tab:active { opacity: 0.6; }

.filter-tab .tab-count {
  margin-left: 2px;
  font-size: 11px;
  color: inherit;
  opacity: 0.7;
}


/* ══════════════════════════════════════════════
   7. 搜索栏
   ══════════════════════════════════════════════ */

/**
 * .search-bar — 胶囊搜索框
 * 用法：
 *   <div class="search-bar">
 *     <div class="search-bar-inner">
 *       <input type="text" placeholder="搜索...">
 *     </div>
 *     <button class="search-bar-btn">搜索</button>
 *   </div>
 */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--color-bg-white);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-search);
  padding: 4px 4px 4px 12px;
}

.search-bar-inner {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 28px;
}

.search-bar-inner input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 28px;
  border: none;
  background: transparent url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='6.67' cy='6.27' r='5.07' stroke='%234B535C' stroke-width='1.2'/%3E%3Cpath d='M10.5 10.5l3 3' stroke='%234B535C' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center;
  padding-left: 20px;
  outline: none;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-text-1);
  flex: 1;
  line-height: 28px;
  text-align: left;
}

.search-bar-inner input:focus {
  border: none;
  background: transparent url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='6.67' cy='6.27' r='5.07' stroke='%234B535C' stroke-width='1.2'/%3E%3Cpath d='M10.5 10.5l3 3' stroke='%234B535C' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left center;
  box-shadow: none;
}

.search-bar-inner input::placeholder { color: var(--color-text-3); }

.search-bar-btn {
  width: 56px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  border: none;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0 16px;
  box-sizing: border-box;
  transition: background 0.15s;
  white-space: nowrap;
}

.search-bar-btn:active { background: #1554CC; }


/* ══════════════════════════════════════════════
   8. 商品卡片（瀑布流）
   ══════════════════════════════════════════════ */

/**
 * .product-grid — 瀑布流容器（两列）
 * .product-card — 商品卡片
 * 用法：
 *   <div class="product-grid">
 *     <a class="product-card" href="mall-detail.html" data-category="生鲜">
 *       <div class="product-img"><img src="..." alt=""></div>
 *       <div class="product-info">
 *         <div class="product-name">商品名称</div>
 *         <div class="product-bottom">
 *           <div class="product-price-group">
 *             <div class="product-price-row">
 *               <span class="product-price">¥29.9</span>
 *               <span class="product-price-original">¥49.9</span>
 *             </div>
 *             <span class="product-sold">已售 328</span>
 *           </div>
 *           <img class="product-add-btn" src="./asset/icons/加入购物车.svg" alt="加入购物车">
 *         </div>
 *       </div>
 *     </a>
 *   </div>
 */
.product-grid {
  columns: 2;
  column-gap: 10px;
}

.product-grid .product-card {
  break-inside: avoid;
  margin-bottom: 10px;
}

.product-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-white);
}

.product-card:active { opacity: 0.85; }

.product-img {
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-info {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-name {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.product-price {
  font-family: var(--font-number);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-danger);
}

.product-price-original {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--color-text-4);
  text-decoration: line-through;
}

.product-sold {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--color-text-4);
}

/* 加入购物车按钮 */
.product-add-btn {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
  transition: opacity 0.15s;
}

.product-add-btn:active { opacity: 0.7; }

/* 加购计数徽标 */
.add-btn-wrap {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
}

.add-btn-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  background: var(--color-danger);
  color: #fff;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  border-radius: 8px;
  text-align: center;
  box-sizing: border-box;
  display: none;
  pointer-events: none;
}


/* ══════════════════════════════════════════════
   9. 底部购物车栏
   ══════════════════════════════════════════════ */

/**
 * .cart-bar — 固定在底部 Tab 栏上方的购物车操作栏
 * 用法：
 *   <div class="cart-bar">
 *     <a href="cart.html" class="cart-bar-icon-wrap">
 *       <img src="./asset/icons/购物车.svg" width="44" height="44">
 *       <div class="cart-bar-badge" id="cartBadge">0</div>
 *     </a>
 *     <div class="cart-bar-info">
 *       <span class="cart-bar-label">购物车</span>
 *       <span class="cart-bar-total" id="cartTotal">¥0.00</span>
 *     </div>
 *     <a href="cart.html" class="cart-bar-btn">去下单</a>
 *   </div>
 */
.cart-bar {
  position: fixed;
  bottom: var(--height-tab-bar);
  left: 50%;
  transform: translateX(-50%);
  width: 375px;
  height: 64px;
  background: var(--color-bg-white);
  box-shadow: var(--shadow-bar);
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  gap: var(--space-3);
  box-sizing: border-box;
  z-index: 150;
}

.cart-bar-icon-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
}

.cart-bar-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--color-danger);
  color: #fff;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  box-sizing: border-box;
}

.cart-bar-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-bar-label {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-text-2);
  line-height: 1;
}

.cart-bar-total {
  font-family: var(--font-number);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-danger);
  line-height: 1.2;
}

.cart-bar-btn {
  height: 40px;
  padding: 0 24px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.cart-bar-btn:active { opacity: 0.8; }


/* ══════════════════════════════════════════════
   10. 返回顶部按钮
   ══════════════════════════════════════════════ */

/**
 * .back-to-top — 悬浮返回顶部按钮（JS 控制显隐与定位）
 * 用法：
 *   <div class="back-to-top" id="backToTop">
 *     <svg>...</svg>
 *   </div>
 *
 *   JS：滚动超过 200px 时添加 .visible 类
 */
.back-to-top {
  position: absolute;
  right: 16px;
  width: 40px;
  height: 40px;
  background: var(--color-bg-white);
  border-radius: 50%;
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 160;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:active { opacity: 0.7; }


/* ══════════════════════════════════════════════
   11. 页面底部提示
   ══════════════════════════════════════════════ */

/**
 * .list-end-tip — 列表底部"已经到底了"提示
 * 用法：<div class="list-end-tip">已经到底啦~</div>
 */
.list-end-tip {
  padding: 24px 0 8px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-text-4);
}


/* ══════════════════════════════════════════════
   12. 页面背景
   ══════════════════════════════════════════════ */

/**
 * .page-bg-gradient — 一级页面顶部蓝色渐变背景
 * 使用场景：固定头部容器 或 page-content
 */
.page-bg-gradient {
  background: var(--gradient-page-top);
}

/**
 * .page-bg-gray — 内容区灰色背景
 * 使用场景：page-content
 */
.page-bg-gray {
  background: var(--color-bg-page);
}

/**
 * .page-bg-blue — 蓝色系内容区背景（一级页面 + 列表页 + repair 基线表单页）
 * 与渐变头部 --gradient-page-top 底色衔接，避免色差断层
 * 使用场景：phone-shell 或 page-content
 */
.page-bg-blue {
  background: var(--color-bg-page-blue);
}

/**
 * .form-page — 业主端表单页内容区基线（以 repair.html 为准）
 * 使用场景：page-content / 表单页主容器
 */
.form-page {
  min-height: 100%;
  background: var(--color-bg-page-blue);
  padding: 12px 16px 96px;
}

/**
 * .section-card / .section-head — 表单分组卡片基线（以 repair.html 为准）
 * 用法：
 *   <div class="content-card section-card">
 *     <div class="section-head">...</div>
 *   </div>
 */
.section-card {
  padding: 14px 16px;
  margin-bottom: 12px;
}

.section-card:last-child {
  margin-bottom: 0;
}

.section-head {
  margin-bottom: 10px;
}

.section-head .section-title-wrap {
  margin-bottom: 0;
}

/* Fixed top nav scroll tint */
.top-fixed-wrap {
  transition: background 0.22s ease, box-shadow 0.22s ease;
}

.top-fixed-wrap.is-scrolled {
  background: var(--color-nav-scrolled-bg);
  box-shadow: 0 2px 8px rgba(18, 21, 26, 0.06);
}


/* ══════════════════════════════════════════════
   13. 状态标签
   ══════════════════════════════════════════════ */

/**
 * .tag — 状态/分类标签基础类，搭配颜色修饰类使用
 * 用法：
 *   <span class="tag tag-red">投诉</span>
 *   <span class="tag tag-orange">待回复</span>
 *   <span class="tag tag-blue">建议</span>
 *   <span class="tag tag-green">已回复</span>
 *   <span class="tag tag-gray">已关闭</span>
 *
 * 修饰类：.tag-red  .tag-orange  .tag-blue  .tag-green  .tag-gray
 */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

.tag-red {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 0.5px solid rgba(255, 77, 79, 0.2);
}

.tag-orange {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border: 0.5px solid rgba(250, 173, 20, 0.2);
}

.tag-blue {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  border: 0.5px solid rgba(31, 105, 255, 0.2);
}

.tag-green {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 0.5px solid rgba(82, 196, 26, 0.2);
}

.tag-gray {
  background: var(--color-bg-page);
  color: var(--color-text-3);
  border: 0.5px solid var(--color-border);
}


/* ══════════════════════════════════════════════
   14. 通用列表行
   ══════════════════════════════════════════════ */

/**
 * .list-item — 图标 + 内容 + 右侧信息的横向列表项
 * 用法：
 *   <a href="bill-detail.html" class="list-item">
 *     <div class="list-item-icon" style="background:#e6f7ff;">
 *       <svg>...</svg>
 *     </div>
 *     <div class="list-item-body">
 *       <div class="list-item-title">2026年一季度物业费</div>
 *       <div class="list-item-desc">2026.01-2026.03 · 截止 03-25</div>
 *     </div>
 *     <div class="list-item-right">
 *       <span class="list-item-amount">¥1,342.50</span>
 *       <span class="tag tag-red">逾期</span>
 *     </div>
 *   </a>
 */
.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  margin-bottom: 10px;
}

.list-item:active { opacity: 0.85; }

.list-item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.list-item-body {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-1);
  line-height: 20px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item-desc {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-text-3);
  line-height: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.list-item-amount {
  font-family: var(--font-number);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-danger);
  line-height: 1.2;
}

/* ── 仅右侧箭头的简洁列表行 ── */
.chevron-right-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  flex-shrink: 0;
  background: var(--icon-chevron-right-16) no-repeat center / 16px 16px;
}

.list-item-arrow::after {
  content: '';
  width: 16px;
  height: 16px;
  background: var(--icon-chevron-right-16) no-repeat center / 16px 16px;
  flex-shrink: 0;
  margin-left: var(--space-1);
}


/* ══════════════════════════════════════════════
   15. 表单分组 & 表单行
   ══════════════════════════════════════════════ */

/**
 * .form-section — 表单分组容器（白色圆角卡片）
 * .form-row     — 表单行：左侧 label + 右侧输入控件
 * 用法：
 *   <div class="form-section">
 *     <div class="form-section-title">基本信息</div>
 *     <div class="form-row">
 *       <div class="form-row-label"><span class="required">*</span>姓名</div>
 *       <div class="form-row-input">
 *         <input type="text" placeholder="请输入">
 *       </div>
 *     </div>
 *     <div class="form-row">
 *       <div class="form-row-label">备注</div>
 *       <div class="form-row-input">
 *         <input type="text" placeholder="选填">
 *       </div>
 *     </div>
 *   </div>
 */
.form-section {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-1);
  border-bottom: 0.5px solid var(--color-divider);
}

.form-row {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px var(--space-4);
  border-bottom: 0.5px solid var(--color-divider);
}

.form-row:last-child { border-bottom: none; }

.form-row-label {
  width: 80px;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-1);
  line-height: 1.4;
}

.form-row-label .required {
  color: var(--color-danger);
  margin-right: 2px;
}

.required { color: var(--color-danger); }

.form-row-input {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.form-row-input input,
.form-row-input select,
.form-row-input textarea {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-1);
  text-align: right;
  width: 100%;
}

.form-row-input input::placeholder,
.form-row-input textarea::placeholder {
  color: var(--color-text-4);
}

/* textarea 行专属样式 */
.form-row.form-row-textarea {
  align-items: flex-start;
  padding-top: var(--space-3);
}

.form-row-input textarea {
  text-align: left;
  resize: none;
  line-height: 1.6;
  min-height: 80px;
}


/* ══════════════════════════════════════════════
   16. 详情信息行
   ══════════════════════════════════════════════ */

/**
 * .info-section  — 详情页信息分组容器（白底卡片）
 * .info-row      — 详情行：左侧标签 + 右侧内容
 * 用法：
 *   <div class="info-section">
 *     <div class="info-section-header">工单信息</div>
 *     <div class="info-row">
 *       <div class="info-label">工单号</div>
 *       <div class="info-value">WO202603170002</div>
 *     </div>
 *     <div class="info-row">
 *       <div class="info-label">状态</div>
 *       <div class="info-value"><span class="tag tag-orange">处理中</span></div>
 *     </div>
 *   </div>
 */
.info-section {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 10px;
}

.info-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-1);
  border-bottom: 0.5px solid var(--color-divider);
}

.info-row {
  display: flex;
  align-items: flex-start;
  padding: 12px var(--space-4);
  border-bottom: 0.5px solid var(--color-divider);
}

.info-row:last-child { border-bottom: none; }

.info-label {
  width: 72px;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-3);
  line-height: 20px;
}

.info-value {
  flex: 1;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-1);
  line-height: 20px;
  text-align: right;
  word-break: break-all;
}


/* ══════════════════════════════════════════════
   17. 按钮
   ══════════════════════════════════════════════ */

/**
 * .btn          — 基础按钮（需配合尺寸/样式修饰类）
 * .btn-primary  — 主操作：蓝色渐变
 * .btn-outline  — 次要操作：描边样式
 * .btn-danger   — 危险操作：红色描边
 * .btn-ghost    — 幽灵按钮：无背景纯文字
 *
 * 用法：
 *   <button class="btn btn-primary">提交</button>
 *   <button class="btn btn-outline">取消</button>
 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-full);
  border: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
  box-sizing: border-box;
  text-decoration: none;
}

.btn:active { opacity: 0.8; }
.btn:disabled { opacity: 0.4; pointer-events: none; }

/* 满宽修饰 */
.btn-block { width: 100%; }

.btn-primary {
  background: var(--gradient-primary);
  color: #FFFFFF;
  border: none;
  box-shadow: none;
}

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

.btn-danger {
  background: transparent;
  color: var(--color-danger);
  border: 1.5px solid var(--color-danger);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-2);
  border: 1.5px solid var(--color-border-strong);
}

/* 小尺寸按钮 */
.btn-sm {
  height: 32px;
  padding: 0 var(--space-4);
  font-size: 13px;
}


/* ══════════════════════════════════════════════
   18. 底部操作栏
   ══════════════════════════════════════════════ */

/**
 * .action-bar — 固定在底部的操作按钮栏
 * 用法（单按钮）：
 *   <div class="action-bar">
 *     <button class="btn btn-primary btn-block">提交报修</button>
 *   </div>
 *
 * 用法（双按钮）：
 *   <div class="action-bar action-bar-split">
 *     <button class="btn btn-ghost">取消</button>
 *     <button class="btn btn-primary">确认</button>
 *   </div>
 */
.action-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 375px;
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 0.5px solid var(--color-border);
  box-shadow: var(--shadow-bar);
  box-sizing: border-box;
  z-index: 200;
}

/* 双按钮：左侧次操作 + 右侧主操作 */
.action-bar-split {
  display: flex;
  gap: var(--space-3);
}

.action-bar-split .btn {
  flex: 1;
}

/* 为固定 action-bar 预留底部空间 */
.has-action-bar {
  padding-bottom: 72px;
}


/* ══════════════════════════════════════════════
   19. 空状态
   ══════════════════════════════════════════════ */

/**
 * .empty-state — 列表/详情页无数据时的占位提示
 * 用法：
 *   <div class="empty-state">
 *     <svg class="empty-state-icon">...</svg>
 *     <div class="empty-state-title">暂无数据</div>
 *     <div class="empty-state-desc">提交第一条报修后将在此显示</div>
 *   </div>
 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px var(--space-6) var(--space-7);
  text-align: center;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  color: var(--color-text-4);
  margin-bottom: var(--space-4);
  opacity: 0.6;
}

.empty-state-title {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-3);
  line-height: 21px;
  margin-bottom: var(--space-2);
}

.empty-state-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-4);
  line-height: 1.6;
  max-width: 240px;
}
