/* ============================================================
   业主服务网 · 全站样式（移动优先 Mobile First）
   ------------------------------------------------------------
   默认样式 = 手机（竖屏 320 ~ 767px）
   @media (min-width:768px) = 平板 / 电脑
   核心原则：
   1. 输入框字号 ≥16px，避免 iOS 聚焦自动放大（字忽大忽小的主因）
   2. 可点区域 ≥44px，手指点得准
   3. 中文正文 16px / 行高 1.75，小字不低于 13px
   4. 手机用底部导航，电脑用顶部导航
   ============================================================ */

/* ---------- 1. 设计变量 ---------- */
:root{
  --brand:#1659c7;
  --brand-dark:#12459e;
  --brand-light:#eaf1fd;
  --teal:#0d9488;

  --ink:#101828;
  --ink-2:#344054;
  --ink-3:#5a6779;
  --ink-4:#8b95a5;

  --line:#e4e7ec;
  --line-2:#eff1f5;
  --bg:#f6f7f9;
  --white:#fff;

  --ok:#067647;      --ok-bg:#ecfdf3;
  --warn:#b54708;    --warn-bg:#fffaeb;
  --danger:#b42318;  --danger-bg:#fef3f2;

  --radius:10px;
  --radius-lg:14px;
  --shadow-sm:0 1px 2px rgba(16,24,40,.06);
  --shadow:0 4px 14px rgba(16,24,40,.08);
  --shadow-lg:0 14px 36px rgba(16,24,40,.12);

  /* 字号阶梯（手机） */
  --fs-h1:24px;
  --fs-h2:19px;
  --fs-h3:17px;
  --fs-body:16px;
  --fs-sm:14px;
  --fs-xs:13px;
  --fs-min:13px;

  --gutter:16px;
  --topbar-h:56px;
  --tabbar-h:58px;
  --safe-t:env(safe-area-inset-top,0px);
  --safe-b:env(safe-area-inset-bottom,0px);

  --font:-apple-system,BlinkMacSystemFont,"PingFang SC","HarmonyOS Sans SC",
         "MiSans","Hiragino Sans GB","Source Han Sans SC","Noto Sans CJK SC",
         "Microsoft YaHei",system-ui,"Segoe UI",sans-serif;
}

/* 平板 / 电脑：放大字号与间距 */
@media (min-width:768px){
  :root{
    --fs-h1:32px;
    --fs-h2:23px;
    --fs-h3:18px;
    --gutter:20px;
    --topbar-h:64px;
  }
}

/* ---------- 2. 基础重置 ---------- */
*,*::before,*::after{box-sizing:border-box}

html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  scroll-behavior:smooth;
}

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font);
  font-size:var(--fs-body);
  line-height:1.75;
  font-weight:400;
  letter-spacing:.01em;
  overflow-wrap:break-word;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  -webkit-tap-highlight-color:transparent;
  /* 给底部导航让位 */
  padding-bottom:calc(var(--tabbar-h) + var(--safe-b) + 4px);
}
@media (min-width:768px){
  body{padding-bottom:0}
}
/* 不带底部导航的简洁布局（登录、错误页等） */
body.no-tabbar{padding-bottom:0}

a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
img,svg,video{max-width:100%;height:auto}
hr{border:0;border-top:1px solid var(--line);margin:20px 0}

h1,h2,h3,h4{
  margin:0 0 .55em;
  font-weight:600;
  line-height:1.4;
  letter-spacing:-.2px;
}
h1{font-size:var(--fs-h1)}
h2{font-size:var(--fs-h2)}
h3{font-size:var(--fs-h3)}
h4{font-size:var(--fs-body)}
p{margin:0 0 .9em}
p:last-child{margin-bottom:0}
strong,b{font-weight:600}

/* ---------- 3. 布局容器 ---------- */
.wrap{
  width:100%;
  max-width:1120px;
  margin:0 auto;
  padding:0 var(--gutter);
}
.main{
  min-height:50vh;
  padding-top:var(--gutter);
  padding-bottom:28px;
}
@media (min-width:768px){
  .main{padding-top:28px;padding-bottom:56px}
}

/* 页面标题区 */
.page-head{margin-bottom:16px}
.page-head h1{margin-bottom:6px}
.page-head p{color:var(--ink-3);font-size:14.5px;line-height:1.75;margin:0}

/* ---------- 4. 顶栏 ---------- */
.topbar{
  position:sticky;top:0;z-index:50;
  background:rgba(255,255,255,.96);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
  padding-top:var(--safe-t);
}
.topbar-inner{
  display:flex;align-items:center;gap:10px;
  height:var(--topbar-h);
}
.brand{
  display:flex;align-items:center;gap:8px;
  color:var(--ink);font-weight:600;font-size:16px;
  flex:0 0 auto;min-width:0;
}
.brand:hover{text-decoration:none}
.brand-mark{
  width:30px;height:30px;border-radius:8px;flex:0 0 auto;
  background:linear-gradient(135deg,var(--brand),#0d7fc4);
  color:#fff;display:grid;place-items:center;
  font-size:15px;font-weight:600;line-height:1;
}
.brand-text{white-space:nowrap}
/* 品牌全称较长：手机显示简称，宽屏显示全称 */
.bt-short{display:inline}
.bt-full{display:none}
@media (min-width:768px){
  .bt-short{display:none}
  .bt-full{display:inline}
}

/* 电脑顶部导航：手机上隐藏，改用底部标签栏 */
.nav{display:none}
@media (min-width:768px){
  .nav{display:flex;gap:22px;font-size:15px;margin-left:8px}
  .nav a{
    color:var(--ink-2);padding:6px 0;
    border-bottom:2px solid transparent;
  }
  .nav a:hover{color:var(--brand);text-decoration:none;border-bottom-color:var(--brand-light)}
  .nav a.active{color:var(--brand);border-bottom-color:var(--brand);font-weight:550}
}

.topbar-right{
  margin-left:auto;display:flex;align-items:center;gap:8px;flex:0 0 auto;
}
.user-chip{
  width:34px;height:34px;border-radius:50%;flex:0 0 auto;
  background:var(--brand-light);color:var(--brand);
  display:grid;place-items:center;font-weight:600;font-size:15px;line-height:1;
}
.user-chip:hover{text-decoration:none;background:#dce9fd}
.link-muted{color:var(--ink-3);font-size:14px}

/* 只在电脑显示 */
.desktop-only{display:none!important}
@media (min-width:768px){
  .desktop-only{display:inline-flex!important}
}

/* ---------- 5. 底部标签栏（仅手机） ---------- */
.tabbar{
  position:fixed;left:0;right:0;bottom:0;z-index:60;
  display:flex;
  background:rgba(255,255,255,.98);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  border-top:1px solid var(--line);
  padding-bottom:var(--safe-b);
}
.tabbar a{
  flex:1 1 0;min-width:0;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:3px;height:var(--tabbar-h);
  color:var(--ink-4);font-size:12.5px;line-height:1;
  text-decoration:none;-webkit-tap-highlight-color:transparent;
}
.tabbar a:hover{text-decoration:none}
.tabbar a svg{width:22px;height:22px;display:block;stroke-width:1.8}
.tabbar a.active{color:var(--brand);font-weight:550}
@media (min-width:768px){
  .tabbar{display:none}
}

/* ---------- 6. 按钮 ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-height:44px;padding:0 18px;
  border:1px solid var(--line);border-radius:var(--radius);
  background:var(--white);color:var(--ink-2);
  font-family:inherit;font-size:15px;font-weight:500;line-height:1;
  text-align:center;white-space:nowrap;cursor:pointer;
  transition:background .15s,border-color .15s,transform .1s;
  -webkit-tap-highlight-color:transparent;
}
.btn:hover{text-decoration:none;border-color:var(--ink-4)}
.btn:active{transform:scale(.985)}
.btn-primary{background:var(--brand);color:#fff;border-color:var(--brand)}
.btn-primary:hover{background:var(--brand-dark);border-color:var(--brand-dark);color:#fff}
.btn-ghost{background:transparent;border-color:var(--line)}
.btn-sm{min-height:36px;padding:0 14px;font-size:14px;border-radius:8px}
.btn-lg{min-height:50px;padding:0 26px;font-size:16px;border-radius:12px}
.btn-block{width:100%}
.btn:disabled,.btn[disabled]{opacity:.5;cursor:not-allowed;transform:none}

/* 微信登录按钮 */
.btn-wx{background:#07c160;border-color:#07c160;color:#fff;gap:8px;display:inline-flex;align-items:center;justify-content:center}
.btn-wx:hover{background:#06ad56;border-color:#06ad56;color:#fff}
.btn-wx svg{flex:0 0 auto}

/* 分隔线（或使用手机号） */
.divider{display:flex;align-items:center;gap:12px;margin:20px 0;color:var(--ink-4);font-size:13px;line-height:1}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--line)}
@media (min-width:768px){
  .btn-sm{min-height:34px}
}

/* ---------- 7. 卡片 ---------- */
.card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
  overflow:hidden;
}
.card-pad{padding:18px}
.card-head{
  padding:14px 18px;border-bottom:1px solid var(--line-2);
  display:flex;align-items:center;gap:10px;
}
.card-head h2,.card-head h3{margin:0;font-size:16px}
.card-body{padding:18px}
@media (min-width:768px){
  .card-pad,.card-body{padding:24px}
  .card-head{padding:18px 24px}
  .card-head h2,.card-head h3{font-size:17px}
}

/* ---------- 8. 首页 Hero ---------- */
.hero{
  position:relative;overflow:hidden;
  border-radius:16px;color:#fff;
  padding:26px 20px;
  background:linear-gradient(135deg,#1659c7 0%,#0d7fc4 55%,#0d9488 100%);
  box-shadow:0 10px 30px rgba(22,89,199,.18);
}
.hero:after{
  content:"";position:absolute;right:-80px;top:-80px;
  width:250px;height:250px;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,rgba(255,255,255,.16),transparent 68%);
}
.hero h1{
  position:relative;
  font-size:26px;line-height:1.35;letter-spacing:-.5px;
  margin-bottom:10px;
}
.hero p{
  position:relative;
  font-size:15px;line-height:1.75;
  color:rgba(255,255,255,.92);
  margin-bottom:20px;
}
.hero-actions{position:relative;display:flex;flex-direction:column;gap:10px}
.hero-actions .btn{width:100%}
.hero .btn-primary{background:#fff;color:var(--brand);border-color:#fff}
.hero .btn-primary:hover{background:#f0f5ff;color:var(--brand);border-color:#f0f5ff}
.hero .btn-ghost{background:rgba(255,255,255,.14);color:#fff;border-color:rgba(255,255,255,.38)}
.hero .btn-ghost:hover{background:rgba(255,255,255,.24);color:#fff;border-color:rgba(255,255,255,.5)}
.hero-stats{
  position:relative;
  display:grid;grid-template-columns:1fr 1fr;gap:14px 10px;
  margin-top:22px;padding-top:18px;
  border-top:1px solid rgba(255,255,255,.2);
}
.hero-stat b{display:block;font-size:22px;font-weight:650;line-height:1.2}
.hero-stat span{font-size:13px;color:rgba(255,255,255,.85)}
@media (min-width:768px){
  .hero{padding:52px 44px;border-radius:18px;box-shadow:0 18px 44px rgba(22,89,199,.20)}
  .hero h1{font-size:38px;margin-bottom:14px}
  .hero p{font-size:17px;max-width:640px;margin-bottom:26px}
  .hero-actions{flex-direction:row;flex-wrap:wrap;gap:12px}
  .hero-actions .btn{width:auto}
  .hero-stats{display:flex;gap:38px;margin-top:34px;padding-top:0;border-top:0}
  .hero-stat b{font-size:26px}
  .hero-stat span{font-size:13px}
}

/* ---------- 9. 网格与特性块 ---------- */
.grid{display:grid;gap:12px}
.grid-2,.grid-3,.grid-4{grid-template-columns:1fr}
@media (min-width:560px){
  .grid-2{grid-template-columns:repeat(2,1fr)}
}
@media (min-width:768px){
  .grid{gap:16px}
  .grid-3{grid-template-columns:repeat(3,1fr)}
  .grid-4{grid-template-columns:repeat(4,1fr)}
}

.feature{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:16px;
  box-shadow:var(--shadow-sm);
  transition:box-shadow .18s,border-color .18s,transform .18s;
}
.feature .ico{
  width:38px;height:38px;border-radius:10px;
  background:var(--brand-light);color:var(--brand);
  display:grid;place-items:center;font-size:19px;line-height:1;
  margin-bottom:10px;
}
.feature .ico svg{width:21px;height:21px;stroke-width:1.7}
.feature h3{font-size:16px;margin-bottom:6px}
.feature p{color:var(--ink-3);font-size:14.5px;line-height:1.75;margin:0}
@media (min-width:768px){
  .feature{padding:22px}
  .feature:hover{box-shadow:var(--shadow);transform:translateY(-2px);border-color:#cfd8e8}
  .feature .ico{width:42px;height:42px;font-size:20px;margin-bottom:14px}
  .feature h3{font-size:17px}
}

/* ---------- 10. 表单（手机重点） ---------- */
.field{margin-bottom:16px}
.field label{
  display:block;font-size:15px;font-weight:500;
  color:var(--ink-2);margin-bottom:7px;line-height:1.5;
}
.field .hint{font-size:13.5px;color:var(--ink-4);margin-top:6px;line-height:1.65}
.field.has-error .input{border-color:var(--danger)}
.field .err{font-size:13.5px;color:var(--danger);margin-top:6px}

/*
  关键：font-size 必须 ≥16px。
  iOS Safari 对 <16px 的输入框会在聚焦时自动放大整个页面，
  用户会觉得“字忽然变大了/页面歪了”。
*/
.input,
input[type="text"],input[type="tel"],input[type="password"],
input[type="number"],input[type="search"],input[type="email"],
input[type="date"],input[type="url"],
select,textarea{
  width:100%;min-height:48px;
  padding:12px 14px;
  font-family:inherit;font-size:16px;line-height:1.4;
  color:var(--ink);background:var(--white);
  border:1px solid #d5dae3;border-radius:var(--radius);
  -webkit-appearance:none;appearance:none;
  transition:border-color .15s,box-shadow .15s;
}
.input:focus,
input:focus,select:focus,textarea:focus{
  outline:none;border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(22,89,199,.14);
}
input::placeholder,textarea::placeholder{color:#9aa4b2;font-size:15px}

textarea,textarea.input{
  min-height:120px;resize:vertical;line-height:1.7;padding:12px 14px;
}

select,select.input{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235a6779' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 13px center;
  background-size:11px 7px;
  padding-right:38px;
}
select:disabled,select.input:disabled,
.input:disabled{background:#f4f6f9;color:var(--ink-4);cursor:not-allowed}

/* 勾选框：加大点击区域 */
input[type="checkbox"],input[type="radio"]{
  width:20px;height:20px;min-height:0;flex:0 0 auto;
  accent-color:var(--brand);cursor:pointer;
}

/* 两列字段：手机单列，宽屏两列 */
.field-row{display:grid;grid-template-columns:1fr;gap:0}
@media (min-width:560px){
  .field-row{grid-template-columns:1fr 1fr;gap:14px}
}
.checkbox{
  display:flex;align-items:flex-start;gap:10px;
  font-size:14.5px;line-height:1.65;color:var(--ink-2);
  cursor:pointer;padding:2px 0;
}
.checkbox input{margin:1px 0 0}
.checkbox a{text-decoration:underline}

/* 四级区划选择：手机 2×2，电脑 4 列 */
.region-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (min-width:768px){
  .region-grid{grid-template-columns:repeat(4,1fr)}
}

/* ---------- 11. 认证页 ---------- */
.auth-wrap{max-width:440px;margin:0 auto;padding-top:4px}
.auth-card{
  background:var(--white);border:1px solid var(--line);
  border-radius:16px;padding:24px 18px;
  box-shadow:var(--shadow);
}
.auth-card h1{font-size:22px;text-align:center;margin-bottom:6px}
.auth-card .sub{
  text-align:center;color:var(--ink-3);font-size:14px;
  line-height:1.65;margin-bottom:22px;
}
.auth-foot{text-align:center;font-size:14.5px;color:var(--ink-3);margin-top:18px}
@media (min-width:768px){
  .auth-wrap{margin:48px auto}
  .auth-card{padding:36px 32px}
  .auth-card h1{font-size:24px}
}

/* ---------- 12. 提示条 ---------- */
.flash-wrap{padding-top:12px}
.flash{
  padding:11px 14px;border-radius:var(--radius);
  font-size:14.5px;line-height:1.65;margin-bottom:8px;
}
.flash-success{background:var(--ok-bg);color:var(--ok);border:1px solid #abefc6}
.flash-error{background:var(--danger-bg);color:var(--danger);border:1px solid #fecdca}
.flash-info{background:var(--brand-light);color:var(--brand);border:1px solid #c7d9f7}
.flash-warn{background:var(--warn-bg);color:var(--warn);border:1px solid #fedf89}

/* ---------- 13. 标签 ---------- */
.tag{
  display:inline-flex;align-items:center;gap:4px;
  padding:3px 9px;border-radius:6px;
  font-size:13px;font-weight:500;line-height:1.5;
  white-space:nowrap;
}
.tag-gray{background:var(--line-2);color:var(--ink-3)}
.tag-blue{background:var(--brand-light);color:var(--brand)}
.tag-green{background:var(--ok-bg);color:var(--ok)}
.tag-amber{background:var(--warn-bg);color:var(--warn)}
.tag-red{background:var(--danger-bg);color:var(--danger)}

/* ---------- 14. 列表（手机上代替表格） ---------- */
.list{display:flex;flex-direction:column}
.list-item{
  display:flex;align-items:flex-start;gap:12px;
  padding:14px 16px;border-bottom:1px solid var(--line-2);
}
.list-item:last-child{border-bottom:0}
.list-item .li-main{flex:1 1 auto;min-width:0}
.list-item .li-title{
  font-size:15.5px;font-weight:550;color:var(--ink);
  line-height:1.5;overflow-wrap:break-word;
}
.list-item .li-sub{
  font-size:13.5px;color:var(--ink-3);line-height:1.6;margin-top:3px;
}
.list-item .li-side{
  flex:0 0 auto;display:flex;flex-direction:column;
  align-items:flex-end;gap:4px;font-size:13px;color:var(--ink-4);
}
@media (min-width:768px){
  .list-item{padding:16px 22px}
}

/* 表格：手机上横向可滑，不撑破版面 */
.table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.table-wrap table{width:100%;border-collapse:collapse;font-size:14.5px;min-width:520px}
.table-wrap th,.table-wrap td{padding:12px 10px;text-align:left;border-bottom:1px solid var(--line-2)}
.table-wrap th{font-weight:550;color:var(--ink-3);font-size:13.5px;white-space:nowrap}

/* ---------- 15. 页脚 ---------- */
.footer{
  border-top:1px solid var(--line);background:var(--white);
  margin-top:28px;padding:24px 0 18px;
}
.footer-inner{display:grid;grid-template-columns:1fr;gap:18px}
.footer-col strong{display:block;font-size:14.5px;margin-bottom:6px}
.footer-col p{font-size:13.5px;color:var(--ink-3);margin:0;line-height:1.75}
.copyright{
  font-size:13px;color:var(--ink-4);text-align:center;
  margin-top:20px;padding-top:16px;border-top:1px solid var(--line-2);
}
@media (min-width:768px){
  .footer{margin-top:40px;padding:36px 0 22px}
  .footer-inner{grid-template-columns:1.2fr 1.4fr 1fr;gap:32px}
  .copyright{margin-top:26px;padding-top:18px}
}

/* ---------- 16. 通用工具类 ---------- */
.muted{color:var(--ink-3)}
.small{font-size:var(--fs-sm);line-height:1.7}
.center{text-align:center}
.nowrap{white-space:nowrap}
.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}
.mt-3{margin-top:24px}.mt-4{margin-top:36px}
.mb-0{margin-bottom:0}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.flex{display:flex}
.items-center{align-items:center}
.items-start{align-items:flex-start}
.justify-between{justify-content:space-between}
.flex-wrap{flex-wrap:wrap}
.gap-2{gap:12px}
.divider{height:1px;background:var(--line-2);margin:18px 0}

/* ---------- 17. 小屏手机（≤360px）微调 ---------- */
@media (max-width:360px){
  :root{--gutter:14px;--fs-h1:22px}
  .hero h1{font-size:23px}
  .brand-text{font-size:15px}
  .hero-stat b{font-size:20px}
}

/* ---------- 18. 桌面悬停才生效的动效 ---------- */
@media (hover:none){
  .feature:hover{transform:none;box-shadow:var(--shadow-sm)}
}

/* ---------- 19. 无障碍：减少动画 ---------- */
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important;scroll-behavior:auto!important}
}
