/* ================= 基础 ================= */
:root{
  --primary:#1f5fa8; --primary-dark:#17497f; --bg:#f4f6f9; --card:#fff;
  --text:#1f2733; --muted:#7a8699; --line:#e5e9f0;
  --green:#1e8e5a; --amber:#b97c0e; --red:#d64545; --blue:#2b6cb0; --cyan:#0e8fa0;
  --gray:#8a94a6; --dark:#4a5568;
  --radius:10px;
}
*{box-sizing:border-box; margin:0; padding:0;}
body{font-family:"Microsoft YaHei","PingFang SC","Helvetica Neue",Arial,sans-serif; background:var(--bg); color:var(--text); font-size:14px; -webkit-font-smoothing:antialiased;}
a{color:var(--primary); text-decoration:none;}
a:hover{text-decoration:underline;}
.hidden{display:none !important;}

/* ================= 布局 ================= */
#app{display:flex; min-height:100vh;}
#sidebar{width:220px; background:#16283e; color:#cfd8e3; flex-shrink:0; display:flex; flex-direction:column; position:fixed; top:0; bottom:0; left:0; z-index:60;}
#main{flex:1; margin-left:220px; min-width:0; display:flex; flex-direction:column;}
.brand{padding:20px 18px 16px; border-bottom:1px solid rgba(255,255,255,.08);}
.brand-title{font-size:20px; font-weight:700; color:#fff; letter-spacing:3px;}
.brand-sub{font-size:12px; color:#8fa3ba; margin-top:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
#nav{padding:12px 0; flex:1; overflow-y:auto;}
#nav a{display:block; padding:12px 20px; color:#cfd8e3; font-size:14px; border-left:3px solid transparent;}
#nav a:hover{background:rgba(255,255,255,.05); color:#fff; text-decoration:none;}
#nav a.active{background:rgba(31,95,168,.28); border-left-color:var(--primary); color:#fff;}
.sidebar-foot{padding:14px 18px; border-top:1px solid rgba(255,255,255,.08); font-size:12px; color:#8fa3ba; line-height:1.7;}
.sidebar-foot b{color:#dce6f2;}
.link-sm{font-size:12px; margin-left:6px;}

#topbar{position:sticky; top:0; z-index:40; background:#fff; border-bottom:1px solid var(--line); padding:0 20px; height:54px; display:flex; align-items:center; gap:12px;}
.page-title{font-size:17px; font-weight:600; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.top-actions{display:flex; gap:8px; flex-shrink:0;}
.menu-btn{display:none; background:none; border:1px solid var(--line); border-radius:6px; width:34px; height:34px; font-size:14px; color:var(--text); cursor:pointer;}
#view{padding:20px; flex:1;}

/* ================= 通用组件 ================= */
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:16px; margin-bottom:16px; overflow-x:auto;}
a.card{display:block;}   /* 修复：<a> 卡片内嵌块级 div 被碎片化，导致内边距/边框丢失、内容左溢出（iOS 企微浏览器实测）*/
.card-h{font-size:15px; font-weight:600; margin-bottom:12px; padding-bottom:10px; border-bottom:1px solid var(--line);}
.card-h.c-red{color:var(--red);}
.card-h.c-amber{color:var(--amber);}
.card-danger{border-color:#f0c9c9;}
.tip{font-size:12px; color:var(--muted); margin-bottom:10px; line-height:1.6;}
.note-bar{background:#fdf6e8; border:1px solid #f0ddb5; color:#8a6410; border-radius:8px; padding:8px 12px; font-size:12px; margin-bottom:16px;}

.stat-row{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:16px;}
.stat-card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:16px;}
.stat-num{font-size:26px; font-weight:700; margin-top:6px;}
.stat-num.c-red{color:var(--red);}
.stat-num.c-green{color:var(--green);}
.stat-num.c-blue{color:var(--blue);}
.stat-label{font-size:12px; color:var(--muted);}

.card-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px;}
.card-grid-4{display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; margin-bottom:16px;}

/* 小区卡片 */
.estate-card{display:block; color:var(--text);}
.estate-card:hover{text-decoration:none; border-color:var(--primary); box-shadow:0 2px 10px rgba(31,95,168,.10);}
.ec-head{display:flex; justify-content:space-between; align-items:baseline; gap:8px;}
.ec-name{font-size:16px; font-weight:600;}
.ec-area{font-size:12px; color:var(--muted);}
.ec-stats{display:flex; gap:14px; margin:10px 0; font-size:13px; color:var(--dark);}
.ec-status{display:flex; gap:6px; flex-wrap:wrap;}

/* 经纪人卡片 */
.acard-name{font-size:15px; font-weight:600; margin-bottom:8px;}
.acard-row{display:flex; gap:10px; flex-wrap:wrap; font-size:13px; color:var(--dark);}
.c-red{color:var(--red);}
.c-green{color:var(--green);}
.c-amber{color:var(--amber);}

/* 资产看板完成率进度条 */
.rate-bar{position:relative;height:22px;background:#eef1f5;border-radius:6px;overflow:hidden;min-width:90px;}
.rate-bar i{position:absolute;left:0;top:0;bottom:0;display:block;border-radius:6px 0 0 6px;}
.rate-bar i.rate-green{background:var(--green);}
.rate-bar i.rate-amber{background:var(--amber);}
.rate-bar i.rate-red{background:var(--red);}
.rate-bar span{position:relative;z-index:1;font-size:12px;line-height:22px;padding-left:8px;font-weight:700;color:#33404f;}

/* 房源卡片列表（楼栋下） */
.prop-list{display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:12px;}
.prop-card{background:#fff; border:1px solid var(--line); border-radius:10px; padding:12px 14px; display:flex; flex-direction:column; gap:8px;}
.pc-head{display:flex; justify-content:space-between; align-items:center; gap:8px;}
.pc-room{font-size:17px; font-weight:700; color:var(--primary);}
.pc-owner{font-size:14px; font-weight:600;}
.pc-meta{font-size:12px; color:var(--muted);}
.pc-badges{display:flex; gap:6px; flex-wrap:wrap;}
.pc-actions{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:2px;}

/* 表格 */
.tbl{width:100%; border-collapse:collapse; font-size:13px;}
.tbl th{text-align:left; font-weight:600; color:var(--muted); font-size:12px; padding:8px 10px; border-bottom:1px solid var(--line); white-space:nowrap; background:#fafbfd;}
.tbl td{padding:9px 10px; border-bottom:1px solid #f0f3f7; vertical-align:middle;}
.tbl tbody tr:hover{background:#f8fafc;}
.tbl .ops{white-space:nowrap;}
.td-empty{text-align:center; color:var(--muted); padding:26px 0;}
.td-note{max-width:280px; color:var(--dark);}
.row-warn{background:#fdf6e8;}

/* 徽章 */
.bdg{display:inline-block; padding:2px 8px; border-radius:20px; font-size:12px; line-height:1.6; white-space:nowrap;}
.bdg-green{background:#e3f5ec; color:var(--green);}
.bdg-amber{background:#fbf0d9; color:var(--amber);}
.bdg-red{background:#fde8e8; color:var(--red);}
.bdg-blue{background:#e6eff9; color:var(--blue);}
.bdg-cyan{background:#e0f3f6; color:var(--cyan);}
.bdg-gray{background:#eef0f4; color:var(--gray);}
.bdg-dark{background:#e4e7ec; color:var(--dark);}
.bdg-muted{background:#f4f6f8; color:#a3adbd;}

/* 面包屑 / 搜索 / 筛选 / 标签页 */
.crumb{font-size:13px; color:var(--muted); margin-bottom:14px;}
.search-bar{margin-bottom:14px;}
.search-bar input{width:100%; max-width:380px;}
.chips{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px;}
.chip{padding:5px 14px; border-radius:20px; background:#fff; border:1px solid var(--line); font-size:13px; cursor:pointer; user-select:none;}
.chip.on{background:var(--primary); border-color:var(--primary); color:#fff;}
.tabs{display:flex; gap:4px; border-bottom:2px solid var(--line); margin-bottom:16px;}
.tab{padding:8px 18px; cursor:pointer; font-size:14px; color:var(--muted); border-bottom:2px solid transparent; margin-bottom:-2px; user-select:none;}
.tab.on{color:var(--primary); font-weight:600; border-bottom-color:var(--primary);}

/* 按钮 */
.btn{display:inline-block; padding:7px 16px; border-radius:7px; border:1px solid var(--line); background:#fff; color:var(--text); font-size:13px; cursor:pointer; line-height:1.5;}
.btn:hover{background:#f5f7fa; text-decoration:none;}
.btn-primary{background:var(--primary); border-color:var(--primary); color:#fff;}
.btn-primary:hover{background:var(--primary-dark);}
.btn-danger{background:#fff; border-color:#eec2c2; color:var(--red);}
.btn-danger:hover{background:#fdf1f1;}
.btn-sm{padding:4px 10px; font-size:12px;}
.btn-row{display:flex; gap:10px; margin-top:12px; flex-wrap:wrap;}

/* 电话防泄露：查看电话按钮 + 隐藏电话区 */
.phone-btn{color:var(--primary); border-color:#c6d8ec; font-weight:600;}
.phone-btn.on{background:var(--primary); border-color:var(--primary); color:#fff;}
.phone-detail{display:none; margin-top:8px; flex-direction:column; gap:8px; align-items:flex-start;}
.phone-detail.on{display:flex;}
.phone-num{font-size:16px; font-weight:700; color:var(--text); letter-spacing:1px; padding:2px 0;}
.btn-call{background:var(--green); border-color:var(--green); color:#fff; font-size:15px; font-weight:700; padding:10px 26px; letter-spacing:2px;}
.btn-call:hover{background:#187a4c;}

/* 核实状态快速勾选 */
.btn-verify{color:var(--primary); border-color:#c6d8ec; font-weight:600;}

/* 楼栋挂牌总览色块图 */
.floor-map{display:flex; flex-direction:column; gap:6px;}
.floor-row{display:flex; align-items:flex-start; gap:8px;}
.floor-label{width:34px; font-size:12px; color:var(--muted); padding-top:6px; flex-shrink:0; text-align:right;}
.floor-cells{display:flex; flex-wrap:wrap; gap:5px;}
.cell{width:44px; height:44px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:600; color:#fff; cursor:pointer; text-shadow:0 1px 2px rgba(0,0,0,.2); transition:transform .08s;}
.cell:hover{transform:scale(1.06);}
.cell-blank{color:#8a94a6; text-shadow:none;}
.map-legend{display:flex; flex-wrap:wrap; gap:6px 12px; margin-top:14px; padding:10px; background:#fff; border:1px solid var(--line); border-radius:8px;}
.lg-item{display:flex; align-items:center; gap:5px; font-size:12px; color:var(--dark);}
.lg-item i{width:14px; height:14px; border-radius:4px; display:inline-block; flex-shrink:0;}
@media (max-width:640px){
  .cell{width:40px; height:40px; font-size:12px;}
  .floor-label{width:28px; font-size:11px;}
}
.verify-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:10px;}
.verify-opt{padding:13px 10px; font-size:15px; border:1px solid var(--line); border-left:5px solid #ccc; border-radius:8px; background:#fff; cursor:pointer; text-align:left;}
.verify-opt:hover{border-color:var(--primary); background:#f5f8fc;}
.verify-opt.on{background:#eef4fb; border-color:var(--primary); font-weight:700;}
@media (max-width:640px){
  .verify-grid{grid-template-columns:repeat(2,1fr);}
  .verify-opt{padding:15px 12px; font-size:16px;}
}

/* 表单 */
input,select,textarea{font-family:inherit; font-size:13px; padding:8px 10px; border:1px solid #d4dae3; border-radius:7px; background:#fff; color:var(--text); width:100%;}
input:focus,select:focus,textarea:focus{outline:none; border-color:var(--primary); box-shadow:0 0 0 2px rgba(31,95,168,.12);}
input:disabled{background:#f4f6f8; color:var(--muted);}
textarea{resize:vertical;}
.form-sec{font-size:13px; font-weight:600; color:var(--primary); margin:16px 0 10px; padding-left:8px; border-left:3px solid var(--primary);}
.form-sec:first-child{margin-top:0;}
.form-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:10px 14px;}
.fld{display:block; font-size:12px; color:var(--muted); line-height:1.6;}
.fld input,.fld select,.fld textarea{margin-top:3px;}
.fld-check{display:flex; align-items:center; gap:6px; font-size:13px; color:var(--text); margin:10px 0;}
.fld-check input{width:auto;}

/* 详情键值 */
.kv-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px 16px;}
.kv{display:flex; justify-content:space-between; gap:10px; padding:7px 10px; background:#f8fafc; border-radius:7px; font-size:13px;}
.kv span{color:var(--muted); flex-shrink:0;}
.kv b{font-weight:600; text-align:right; word-break:break-all;}

/* 分布图 */
.dist-row{display:flex; align-items:center; gap:10px; margin-bottom:8px; font-size:12px;}
.dist-label{width:56px; color:var(--dark); text-align:right; flex-shrink:0;}
.dist-bar{flex:1; height:12px; background:#eef1f5; border-radius:6px; overflow:hidden;}
.dist-bar i{display:block; height:100%; background:var(--primary); border-radius:6px;}
.dist-num{width:36px; color:var(--muted); flex-shrink:0;}

/* 时间线 */
.tl-item{padding:10px 0 10px 14px; border-left:2px solid var(--line); position:relative; margin-left:6px;}
.tl-item::before{content:""; position:absolute; left:-5px; top:16px; width:8px; height:8px; border-radius:50%; background:var(--primary);}
.tl-date{font-size:13px; font-weight:600;}
.tl-meta{font-size:12px; color:var(--muted); font-weight:400; margin-left:8px;}
.tl-note{font-size:13px; color:var(--dark); margin-top:4px; line-height:1.6;}
.tl-next{font-size:12px; color:var(--red); margin-top:3px;}

/* 弹窗 */
.modal-mask{position:fixed; inset:0; background:rgba(15,25,40,.45); z-index:100; display:flex; align-items:flex-start; justify-content:center; padding:40px 16px; overflow-y:auto;}
.modal-box{background:#fff; border-radius:12px; width:640px; max-width:100%; box-shadow:0 10px 40px rgba(0,0,0,.2);}
.modal-head{display:flex; justify-content:space-between; align-items:center; padding:14px 18px; border-bottom:1px solid var(--line);}
.modal-title{font-size:15px; font-weight:600;}
.modal-close{background:none; border:none; font-size:22px; color:var(--muted); cursor:pointer; line-height:1;}
.modal-body{padding:16px 18px; max-height:70vh; overflow-y:auto;}
.modal-foot{padding:12px 18px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px;}
.confirm-msg{font-size:14px; line-height:1.8; color:var(--text);}
.import-result{font-size:14px; line-height:2;}

/* Toast / 空态 */
.toast{position:fixed; top:66px; left:50%; transform:translateX(-50%); background:#243447; color:#fff; padding:9px 22px; border-radius:8px; font-size:13px; z-index:200; box-shadow:0 4px 16px rgba(0,0,0,.25);}
.empty{text-align:center; color:var(--muted); padding:40px 0; font-size:13px; line-height:2.2; grid-column:1/-1;}

/* 响应式 */
@media (max-width:900px){
  #sidebar{transform:translateX(-100%); transition:transform .2s;}
  #sidebar.open{transform:translateX(0); box-shadow:0 0 40px rgba(0,0,0,.3);}
  #main{margin-left:0;}
  .menu-btn{display:block;}
  .stat-row{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:640px){
  #view{padding:12px;}
  .form-grid{grid-template-columns:1fr;}
  .top-actions .btn{padding:8px 12px; font-size:13px;}
  .kv-grid{grid-template-columns:1fr;}
  .modal-mask{padding:12px 6px; align-items:flex-start;}
  .modal-box{border-radius:10px;}
  .modal-body{padding:14px 14px; max-height:75vh;}
  .modal-foot{padding:10px 14px;}
  /* 手机端按钮放大，减少误触 */
  .btn{padding:10px 16px; font-size:14px;}
  .btn-sm{padding:7px 12px; font-size:13px;}
  .btn-call{display:block; width:100%; text-align:center; padding:13px 0; font-size:16px;}
  .phone-num{font-size:18px;}
  /* 输入框字号>=16px 防止 iOS 聚焦缩放 */
  input,select,textarea{font-size:16px; padding:10px 12px;}
  .fld input,.fld select,.fld textarea{font-size:16px;}
  /* 表格卡片留白 */
  .tbl td,.tbl th{padding:8px 6px;}
  /* 小区卡片单列 */
  .card-grid{grid-template-columns:1fr;}
  .prop-list{grid-template-columns:1fr;}
  .stat-row{grid-template-columns:repeat(2,1fr); gap:10px;}
  .stat-num{font-size:22px;}
  /* 顶部栏 */
  #topbar{padding:0 12px; height:50px;}
  .page-title{font-size:16px;}
  /* 登录框 */
  .login-box{padding:28px 22px 20px;}
}

/* =========================================================
 * 登录 / 账号管理（市占通）
 * ========================================================= */
.login-mask{position:fixed; inset:0; z-index:999; background:linear-gradient(160deg,#16324f 0%,#1f5fa8 100%); display:flex; align-items:center; justify-content:center; padding:20px;}
.login-box{background:#fff; border-radius:14px; box-shadow:0 18px 50px rgba(0,0,0,.28); padding:34px 30px 24px; width:min(92vw,360px); text-align:center;}
.login-brand{font-size:30px; font-weight:800; letter-spacing:4px; color:var(--primary,#1f5fa8);}
.login-sub{font-size:12px; color:#8a94a6; margin:6px 0 22px; letter-spacing:1px;}
.login-form{display:flex; flex-direction:column; gap:12px;}
.login-input{font-size:15px; padding:11px 12px; text-align:center; letter-spacing:1px;}
.login-btn{font-size:15px; padding:11px 0; letter-spacing:8px;}
.login-remember{display:flex; align-items:center; gap:6px; font-size:12px; color:#6b7789; justify-content:flex-start; padding:0 2px;}
.login-remember input{width:14px; height:14px; cursor:pointer;}
.btn-wxwork{background:#1aad19; color:#fff; border:none; letter-spacing:2px;}
.btn-wxwork:hover{background:#159b14;}
.login-msg{min-height:18px; font-size:12px; color:var(--red,#c0392b); margin-top:2px;}
.login-foot{font-size:11px; color:#aab3c2; margin-top:14px; padding-top:12px; border-top:1px dashed #e3e8ef;}
.muted-note{font-size:12px; color:#8a94a6; margin-top:10px;}
@media (max-width:640px){ .login-brand{font-size:26px;} }

/* =========================================================
 * 业主跟进模块（views-own.js）
 * ========================================================= */
.follow-item{padding:10px 0; border-bottom:1px dashed #e6eaf0;}
.follow-item:last-child{border-bottom:none;}
.follow-meta{font-size:12px; color:#6b7789; margin-bottom:4px;}
.follow-content{font-size:14px; line-height:1.6; white-space:pre-wrap;}
.follow-status{background:#f7f8fa; border-radius:8px; padding:8px 10px;}

/* =========================================================
 * 楼栋亮灯监控（装修托管监控场景）
 * ========================================================= */
.lt-scenes{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:6px;}
.lt-scene{border:1px solid #d8dee7; background:#fff; border-radius:20px; padding:5px 16px; font-size:13px; cursor:pointer; color:#4a5568;}
.lt-scene.on{background:#1a202c; color:#fff; border-color:#1a202c; font-weight:600;}
.lt-desc{font-size:12.5px; color:#6b7789; margin:6px 0 12px;}
.lt-desc a{color:#2b6cb0; margin-left:8px;}
.lt-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(108px,1fr)); gap:10px;}
.lt-cell{position:relative; background:#232a35; border-radius:12px; padding:14px 8px 10px; text-align:center; cursor:pointer; transition:all .18s ease; border:1px solid #313a48;}
.lt-cell:hover{transform:translateY(-2px);}
.lt-cell.lt-on{border-color:#fff; animation:ltGlow 1.6s ease-in-out infinite;}
.lt-cell.lt-dim{opacity:.32;}
@keyframes ltGlow{0%,100%{box-shadow:0 0 4px 1px rgba(255,255,255,.25);}50%{box-shadow:0 0 16px 4px rgba(255,255,255,.55);}}
.lt-dot{display:inline-block; width:18px; height:18px; border-radius:50%; margin-bottom:6px;}
.lt-dot.lt-blink{animation:ltBlink 1s step-start infinite;}
@keyframes ltBlink{50%{opacity:.25;}}
.lt-name{display:block; color:#fff; font-size:14px; font-weight:600;}
.lt-text{display:block; color:#aab4c2; font-size:11.5px; margin-top:2px;}
.lt-go{position:absolute; right:6px; top:4px; color:#7b8794; font-size:16px; text-decoration:none; padding:2px 6px;}
.lt-go:hover{color:#fff;}
.bdg-purple{background:#efe9fd; color:#6d3fd1;}
.bdg-dark{background:#e2e5ea; color:#37404c;}

/* ===== 作业工具（tools）：团队共享素材空间 ===== */
.folder-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px;}
.folder-card{display:flex; align-items:center; gap:14px; padding:16px 18px; text-decoration:none;}
.folder-card:hover{transform:translateY(-2px);}
.fc-icon{flex:0 0 44px; width:44px; height:44px; border-radius:10px; color:#fff; font-size:19px; font-weight:600; display:flex; align-items:center; justify-content:center;}
.fc-body{min-width:0;}
.fc-name{font-weight:600; color:var(--dark);}
.fc-count{font-size:12.5px; color:var(--muted, #7b8794); margin-top:3px;}
.tools-list{display:flex; flex-direction:column; gap:12px;}
.tool-item{margin:0; padding:14px 16px;}
.ti-head{display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap;}
.ti-title{font-weight:600; color:var(--dark);}
.ti-meta{font-size:12px;}
.ti-content{font-size:13.5px; color:#3d4757; line-height:1.7; margin:8px 0 0; word-break:break-all;}
.ti-full{font-size:14px; color:var(--dark); line-height:1.8; white-space:pre-wrap; word-break:break-all; background:#f6f8fa; border-radius:8px; padding:12px 14px; margin-bottom:10px;}
.ti-thumbs{display:flex; flex-wrap:wrap; gap:8px; margin-top:10px;}
.ti-thumbs img{width:72px; height:72px; object-fit:cover; border-radius:8px; border:1px solid #e4e7ec; cursor:pointer; background:#f1f3f6;}
.ti-thumb-wrap{position:relative; display:inline-block;}
.ti-thumb-del{position:absolute; right:-6px; top:-6px; width:20px; height:20px; border-radius:50%; background:var(--red, #e05a5a); color:#fff; font-size:13px; line-height:20px; text-align:center; text-decoration:none; cursor:pointer;}
.ti-more{align-self:center; color:#7b8794; font-size:12.5px;}
.ti-actions{display:flex; gap:8px; margin-top:10px; flex-wrap:wrap;}
.ti-preview{text-align:center;}
.ti-preview img{max-width:100%; max-height:60vh; border-radius:8px;}

/* ===== xa 房源跟进系统（v3） ===== */
.nav-badge { display: inline-block; background: #e74c3c; color: #fff; font-size: 11px;
  min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; text-align: center;
  padding: 0 5px; margin-left: 4px; vertical-align: 2px; }
.xa-progress { padding: 12px 14px; }
.xa-progress-top { display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 6px; font-size: 13.5px; }
.xa-hot-toggle { font-size: 12.5px; color: #666; cursor: pointer; white-space: nowrap; }
.xa-progress-bar { position: relative; height: 16px; background: #eee; border-radius: 8px; margin-top: 8px; }
.xa-progress-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #27ae60;
  border-radius: 8px; transition: width .3s; }
.xa-progress-bar span { position: absolute; width: 100%; text-align: center; font-size: 11px;
  line-height: 16px; color: #333; }
.xa-estate-h { font-size: 15px; font-weight: 700; margin: 16px 0 6px; color: #333; }
.xa-bld-h { font-size: 13px; font-weight: 600; margin: 10px 0 4px; color: #555; }
.xa-bld-h .muted { font-weight: 400; margin-left: 8px; font-size: 12px; }
.xa-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; padding: 8px 12px; margin: 6px 0; }
.xa-row-hot { border-left: 4px solid #27ae60; }
.xa-row-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.xa-room { font-weight: 700; }
.xa-owner { color: #333; }
.xa-phone { color: #555; font-family: Consolas, monospace; font-size: 13px; }
.xa-nophone { color: #e74c3c; font-style: normal; font-size: 12px; }
.xa-hot-tag { background: #27ae60; color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 9px; }
.xa-fc { font-size: 11px; color: #999; }
.xa-mark { width: 100%; margin-top: 8px; border-top: 1px dashed #e0e0e0; padding-top: 8px; }
.xa-mark-tip { font-size: 12.5px; color: #888; margin: 6px 0; }
.xa-status-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.xa-st-btn { border: none; border-radius: 8px; padding: 9px 0; min-width: 88px; flex: 1;
  font-size: 14px; font-weight: 600; cursor: pointer; }
.xa-mark-note { display: flex; gap: 8px; margin-top: 8px; }
.xa-mark-note input { flex: 1; }
.xa-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.xa-dots { margin-top: 6px; }
.xa-todo-bdg { background: #e74c3c; color: #fff; font-size: 11.5px; padding: 2px 8px; border-radius: 10px; }
.xa-done-bdg { background: #e8f5e9; color: #1e8e3e; font-size: 11.5px; padding: 2px 8px; border-radius: 10px; }
.xa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.xa-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #ddd;
  border-radius: 12px; padding: 2px 9px; font-size: 12px; color: #444; }
.xa-chip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.xa-chip-btn { cursor: pointer; }
.xa-chip-on { box-shadow: 0 0 0 2px rgba(0,0,0,.25); font-weight: 700; }
.xa-floor { margin: 10px 0; }
.xa-floor-h { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.xa-floor-h .muted { font-weight: 400; font-size: 12px; margin-left: 8px; }
.xa-cells { display: flex; flex-wrap: wrap; gap: 6px; }
.xa-cell { min-width: 62px; text-align: center; padding: 8px 6px; border-radius: 6px;
  font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid rgba(0,0,0,.08); }
.xa-cell-dim { opacity: .18; }
.xa-modal-info > div { margin: 5px 0; font-size: 13.5px; }
.xa-modal-info .muted { display: inline-block; width: 42px; }
.xa-follows { max-height: 180px; overflow-y: auto; }
.xa-follow { font-size: 12.5px; padding: 5px 0; border-bottom: 1px dashed #eee; }
.xa-follow-t { color: #999; margin-right: 8px; font-size: 12px; }
.xa-report-sum { font-size: 14px; margin: 8px 0; }
.xa-bad-row td { color: #c0392b; }
.xa-admin-edit { border-top: 1px dashed #e0e0e0; margin-top: 8px; padding-top: 4px; }

/* ===== 楼栋图 v2（CRM 参照风，手机优先） ===== */
.xab-card { padding: 14px 12px; }
.xab-head { margin-bottom: 8px; }
.xab-title { font-size: 17px; font-weight: 700; color: #14304a; }
.xab-sum { font-size: 13px; color: #555; margin-top: 3px; }
.c-blue { color: #1f6fb2; }
.c-green { color: #27ae60; }
.xab-row { display: flex; align-items: stretch; margin: 5px 0; }
.xab-flabel { flex: 0 0 34px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #8a94a3; background: #f0f3f7; border-radius: 7px; margin-right: 6px; }
.xab-cells { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 5px; }
.xab-cell { aspect-ratio: 1; border-radius: 7px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 1px 2px rgba(20,48,74,.12);
  transition: transform .08s; }
.xab-cell:active { transform: scale(.92); }
.xab-cell-dim { opacity: .18; }
.xab-tip { text-align: center; font-size: 12px; color: #9aa3b0; margin-top: 10px; }

/* 单户弹层（CRM 详情风） */
.xam-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.xam-room { font-size: 20px; font-weight: 800; color: #14304a; }
.xam-info { background: #f7f9fc; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.xam-row { font-size: 14px; padding: 4px 0; display: flex; gap: 10px; }
.xam-row .muted { flex: 0 0 44px; }
.xam-phone { font-size: 19px; font-weight: 800; color: #1f6fb2; letter-spacing: 1px; }
.xam-call { flex: 1; text-align: center; font-size: 16px; padding: 11px 0; }
.xam-tl { margin-top: 6px; }
.xam-tl-item { position: relative; padding: 0 0 14px 20px; border-left: 2px solid #dbe6f2; margin-left: 6px; }
.xam-tl-item:last-child { border-left-color: transparent; padding-bottom: 2px; }
.xam-tl-item i { position: absolute; left: -7px; top: 3px; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; border: 3px solid #1f6fb2; }
.xam-tl-t { font-size: 12px; color: #8a94a3; }
.xam-tl-c { font-size: 14px; font-weight: 600; color: #2b3038; margin-top: 2px; }

/* ===== 工作台首页 + 底部 Tab（v4） ===== */
.xah-wrap { max-width: 560px; margin: 0 auto; }
.xah-hello { background: linear-gradient(135deg, #dbe9f7, #eef4fb); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 6px; }
.xah-hello b { font-size: 17px; color: #14304a; }
.xah-hello-sub { font-size: 13px; color: #5a6b80; margin-top: 3px; }
.xah-red { color: #e74c3c; font-size: 16px; }
.xah-group { font-size: 12px; color: #8a94a3; font-weight: 700; margin: 14px 2px 7px; }
.xah-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.xah-tile { background: #fff; border-radius: 12px; padding: 12px; display: flex; align-items: center;
  gap: 10px; box-shadow: 0 1px 3px rgba(20,48,74,.07); position: relative; text-decoration: none; color: inherit; }
.xah-tile:active { transform: scale(.97); }
.xah-ic { width: 40px; height: 40px; border-radius: 11px; flex: 0 0 40px; display: flex;
  align-items: center; justify-content: center; color: #fff; font-size: 19px; }
.xah-tx { min-width: 0; }
.xah-tt { display: block; font-size: 14px; font-weight: 700; color: #2b3038; }
.xah-ss { display: block; font-size: 11.5px; color: #9aa3b0; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xah-ss b { color: #e67e22; }
.xah-badge { position: absolute; top: -6px; right: -5px; background: #e74c3c; color: #fff;
  font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; padding: 0 6px; box-shadow: 0 1px 3px rgba(231,76,60,.4); }

#tabbar { display: flex; background: #fff; border-top: 1px solid #e8ecf1; padding: 5px 0 calc(6px + env(safe-area-inset-bottom)); }
#tabbar a { flex: 1; text-align: center; font-size: 11px; color: #9aa3b0; text-decoration: none; padding: 3px 0; }
#tabbar a i { display: block; font-style: normal; font-size: 19px; margin-bottom: 1px; }
#tabbar a.on { color: #1f6fb2; font-weight: 700; }
#main { display: flex; flex-direction: column; }
#view { flex: 1; }
@media (min-width: 769px) { #tabbar { display: none; } } /* 桌面端靠左侧导航，不显示底栏 */

/* ===== 拨打追踪（v5） ===== */
.xam-callbox { background: #f0f7ff; border: 1px solid #cfe2f5; border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.xam-callbox-t { font-size: 14px; color: #14304a; margin-bottom: 8px; }
.xam-callbox-t b { font-size: 18px; color: #1f6fb2; font-variant-numeric: tabular-nums; }
.xam-callbox-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.xam-res-btn { color: #fff; border: none; border-radius: 9px; padding: 8px 14px; font-size: 13px; font-weight: 700; }
.xac-res { display: inline-block; color: #fff; font-size: 12px; font-weight: 700; border-radius: 8px; padding: 2px 8px; }
.xac-res-none { background: #eef1f5; color: #9aa3b0; }
.nowrap { white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }
.c-orange { color: #e67e22; }
.c-blue { color: #1f6fb2; }

/* ===== 拨打监控面板（v5） ===== */
.xmon-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-bottom: 12px; }
.xmon-card { background: #fff; border-radius: 12px; padding: 13px 12px; text-align: center; box-shadow: 0 1px 3px rgba(20,48,74,.07); }
.xmon-num { font-size: 19px; font-weight: 800; color: #14304a; }
.xmon-lb { font-size: 11.5px; color: #9aa3b0; margin-top: 3px; }
.xmon-zero td { color: #c0c7d1; }
.xmon-zero td b { color: #c0c7d1; font-weight: 400; }

/* ===== 管理看板 + 拨打优化（v6） ===== */
.xmon-trend { display: flex; align-items: flex-end; gap: 6px; height: 110px; padding: 4px 2px 0; }
.xmon-tcol { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.xmon-tnum { font-size: 10.5px; color: #5a6b80; font-weight: 700; height: 14px; }
.xmon-tbar { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.xmon-tbar i { display: block; width: 60%; max-width: 26px; background: linear-gradient(180deg, #5b9bd5, #1f6fb2); border-radius: 4px 4px 0 0; min-height: 0; }
.xmon-tday { font-size: 10px; color: #9aa3b0; margin-top: 3px; }
.xmon-low td { background: #fdf0ef; }
.xmon-low td b { color: #e74c3c; }
.xmon-op { color: #1f6fb2; text-decoration: none; }

/* B3：标完通话结果后，房屋状态按钮闪烁引导 */
@keyframes xamFlash { 0%,100% { box-shadow: 0 0 0 0 rgba(230,126,34,0); } 50% { box-shadow: 0 0 0 6px rgba(230,126,34,.25); } }
.xam-flash { animation: xamFlash .8s ease-in-out 3; border-radius: 10px; }
