/* ==========================================================================
   邻讯 · 移动端 H5 皮肤（对齐小程序 v2.8.0 移动端设计系统）
   设计口径：卡片化、圆角、渐变品牌头、胶囊标签、触控友好、色彩以品牌蓝为主。

   ★ 作用域隔离：本文件只被 layout/staff.php（员工端）与 layout/portal.php（业主端）
     引用，PC 后台（layout/main.php）不引用；且所有规则都限定在 .m-shell 之内。
     两道保险 —— 即便被误引入后台也不会命中任何元素。
   ========================================================================== */

/* ---------------- 设计令牌 ---------------- */
body.m-shell{
  --brand:#2f6fed; --brand-d:#1b4fd8; --brand-l:#eef4ff; --brand-2:#12b3a8;
  --success:#16a34a; --warn:#d97706; --danger:#dc2626; --info:#0ea5e9;
  --text:#1f2937; --text-2:#6b7280; --text-3:#9ca3af;
  --line:#f1f3f7; --line-2:#f1f3f7; --bg:#f2f5fa; --card:#fff;
  --radius:12px; --radius-sm:12px; --radius-xs:8px;
  --shadow:0 3px 12px rgba(15,23,42,.06);
  --shadow-lg:0 12px 32px rgba(15,23,42,.12);
  --ring:0 0 0 3px rgba(47,111,237,.16);
  background:#f2f5fa;
  font-size:14px;
  color:#1f2937;
}

/* ---------------- 顶部品牌头（渐变） ---------------- */
body.m-shell .portal-top{
  background:linear-gradient(135deg,#2f6fed,#1b4fd8);
  box-shadow:0 6px 20px rgba(47,111,237,.22);
  border-bottom:0;
}
body.m-shell .portal-top .btn{
  background:rgba(255,255,255,.18); border:0; color:#fff;
  border-radius:999px; box-shadow:none; backdrop-filter:blur(4px);
}
body.m-shell .portal-top .btn:hover{background:rgba(255,255,255,.3);color:#fff}
body.m-shell .portal-top .who .av{
  border-radius:12px; background:rgba(255,255,255,.26); font-weight:600;
}

/* ---------------- 内容区 ---------------- */
body.m-shell .mobile-body{padding:12px 12px 92px; max-width:720px; margin:0 auto}

/* ---------------- 卡片 ---------------- */
body.m-shell .mcard,
body.m-shell .card{
  background:#fff; border:0; border-radius:12px;
  box-shadow:0 3px 12px rgba(15,23,42,.06);
  padding:14px; margin-bottom:10px; overflow:hidden;
}
body.m-shell .card-hd{
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:10px; padding:0; border:0; background:none;
  font-size:15px; font-weight:600; letter-spacing:.2px;
}
body.m-shell .card-hd .more,
body.m-shell .card-hd a{font-size:12.5px;color:#2f6fed;font-weight:400}
body.m-shell .card-bd{padding:0}

/* ---------------- 键值行 ---------------- */
body.m-shell .row,
body.m-shell .kv-line{
  display:flex; justify-content:space-between; align-items:center;
  padding:11px 0; border-bottom:1px solid #f1f3f7;
}
body.m-shell .row:last-child,
body.m-shell .kv-line:last-child{border-bottom:0}
body.m-shell .k{color:#6b7280}
body.m-shell .v{font-weight:500; text-align:right}
body.m-shell .kv{display:flex;justify-content:space-between;padding:11px 0;border-bottom:1px solid #f1f3f7}
body.m-shell .kv:last-child{border-bottom:0}
body.m-shell .vl{color:#6b7280;flex:none;margin-right:10px}
body.m-shell .tt{font-size:15px;font-weight:600;letter-spacing:.2px}
body.m-shell .meta,
body.m-shell .hint{color:#6b7280;font-size:12.5px;line-height:1.7}
body.m-shell .num{color:#dc2626;font-weight:700}

/* ---------------- 按钮（渐变主按钮） ---------------- */
body.m-shell .btn{
  background:linear-gradient(135deg,#2f6fed,#1b4fd8); color:#fff; border:0;
  border-radius:8px; font-weight:500; box-shadow:0 4px 10px rgba(47,111,237,.22);
  transition:transform .12s,opacity .12s;
}
body.m-shell .btn:hover{opacity:.94}
body.m-shell .btn:active{transform:scale(.985);opacity:.9}
body.m-shell .btn-primary{background:linear-gradient(135deg,#2f6fed,#1b4fd8);border:0;color:#fff}
body.m-shell .btn-success{background:linear-gradient(135deg,#22c55e,#16a34a);border:0;color:#fff;box-shadow:0 4px 10px rgba(22,163,74,.22)}
body.m-shell .btn-danger{background:linear-gradient(135deg,#ef5350,#dc2626);border:0;color:#fff;box-shadow:0 4px 10px rgba(220,38,38,.22)}
body.m-shell .btn-warn{background:linear-gradient(135deg,#f59e0b,#d97706);border:0;color:#fff;box-shadow:0 4px 10px rgba(217,119,6,.22)}
body.m-shell .btn[disabled],
body.m-shell .btn.disabled{background:#c7d2e5;box-shadow:none}
/* 次要按钮：白底描边 */
body.m-shell .btn-sm:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warn){
  background:#fff; color:#2f6fed; border:1px solid #cddcff; box-shadow:none;
}
body.m-shell .ops .btn{box-shadow:none}

/* ---------------- 标签：胶囊 + 语义底色 ---------------- */
body.m-shell .badge{
  display:inline-block; padding:3px 9px; border-radius:999px;
  font-size:11px; line-height:1.6; border:0;
  background:#eef4ff; color:#2f6fed;
}
body.m-shell .badge-blue{background:#eef4ff;color:#2f6fed}
body.m-shell .badge-orange{background:#fff4e5;color:#d97706}
body.m-shell .badge-green{background:#e8f8ef;color:#16a34a}
body.m-shell .badge-red{background:#fdecec;color:#dc2626}
body.m-shell .badge-gray{background:#f1f3f7;color:#6b7280}
body.m-shell .pill{border-radius:999px;background:#eef4ff;color:#2f6fed;border:0}

/* ---------------- 列表 ---------------- */
body.m-shell .mlist{background:transparent}
body.m-shell .mlist>li,
body.m-shell .mlist>*{
  background:#fff; border-radius:12px; box-shadow:0 3px 12px rgba(15,23,42,.06);
  padding:14px; margin-bottom:10px;
}
body.m-shell .empty{color:#9ca3af;text-align:center;padding:32px 12px}

/* ---------------- 表单 ---------------- */
body.m-shell .form-item{margin-bottom:12px}
body.m-shell .form-item label,
body.m-shell .form-item>label{display:block;font-size:13px;color:#6b7280;margin-bottom:6px}
body.m-shell .form-item input[type=text],
body.m-shell .form-item input[type=number],
body.m-shell .form-item input[type=tel],
body.m-shell .form-item input[type=datetime-local],
body.m-shell .form-item select,
body.m-shell .form-item textarea{
  width:100%; border:1px solid #e5e9f2; border-radius:8px; padding:10px 12px;
  font-size:14px; background:#fff; color:#1f2937;
}
body.m-shell .form-item input:focus,
body.m-shell .form-item select:focus,
body.m-shell .form-item textarea:focus{
  outline:0; border-color:#2f6fed; box-shadow:0 0 0 3px rgba(47,111,237,.16);
}
body.m-shell .req{color:#dc2626}

/* ---------------- 统计块 ---------------- */
body.m-shell .stat{
  background:#fff; border-radius:12px; box-shadow:0 3px 12px rgba(15,23,42,.06);
  padding:14px; text-align:center;
}
body.m-shell .stat .lb{color:#6b7280;font-size:12.5px}
body.m-shell .stat .num,
body.m-shell .stat b{color:#1f2937;font-size:22px;font-weight:700}

/* ---------------- 缩略图 ---------------- */
body.m-shell .thumbs img{border-radius:8px;box-shadow:0 2px 8px rgba(15,23,42,.08)}

/* ---------------- 底部菜单 ---------------- */
body.m-shell .mobile-tabs{
  background:rgba(255,255,255,.96); border-top:1px solid #eef1f6;
  box-shadow:0 -2px 12px rgba(15,23,42,.05); backdrop-filter:blur(8px);
}
body.m-shell .mobile-tabs a.active{color:#2f6fed;font-weight:600}
body.m-shell .mobile-tabs a.active::before{background:#2f6fed}

/* ---------------- 结构对齐：meta 行单行化（小程序用 · 分隔一行） ----------------
   不逐个改视图，用 CSS 让相邻的纯文本 span 之间自动出现 · 分隔符；
   带 class 的（状态标签）不受影响，仍按胶囊渲染。 */
body.m-shell .meta{
  display:flex; flex-wrap:wrap; align-items:center; gap:2px 6px;
  font-size:12.5px; color:#6b7280; line-height:1.7;
}
body.m-shell .meta>span:not([class])+span:not([class])::before{
  content:"·"; margin-right:6px; color:#c7cdd8;
}

/* ---------------- 结构对齐：tag 系列也统一成胶囊（小程序口径） ---------------- */
body.m-shell .tag{
  display:inline-block; padding:3px 9px; border-radius:999px;
  font-size:11px; line-height:1.6; border:0;
  background:#f1f3f7; color:#6b7280;
}
body.m-shell .tag-ok{background:#e8f8ef;color:#16a34a}
body.m-shell .tag-warn{background:#fff4e5;color:#d97706}
body.m-shell .tag-lock{background:#f1ebff;color:#6b3fd4}
body.m-shell .tag-info{background:#eef4ff;color:#2f6fed}
body.m-shell .tag-red{background:#fdecec;color:#dc2626}
body.m-shell .badge-purple{background:#f1ebff;color:#6b3fd4}

/* ---------------- 结构对齐：卡片头一行放下（标题 + 右侧操作） ---------------- */
body.m-shell .mcard>.row:first-child{
  padding-top:0; border-bottom:0; margin-bottom:8px; gap:10px;
}
body.m-shell .mcard>.row:first-child .tt{flex:1;min-width:0}
body.m-shell .ops{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
body.m-shell .ops .btn{flex:1;min-width:88px;text-align:center}

/* ---------------- 窄屏呼吸感：单列表单 + 行间距 ----------------
   手机上 390px 宽，表单双列会把标签和输入框挤在一起，统一改单列。 */
body.m-shell .form-row{display:block}
body.m-shell .form-row>.form-item{margin-bottom:12px}
body.m-shell .form-row>.form-item:last-child{margin-bottom:0}
body.m-shell .kv-line{padding:12px 0}
body.m-shell .kv-line .k{flex:none;margin-right:12px}
body.m-shell .kv-line .v{min-width:0;word-break:break-all}
body.m-shell .meta{gap:4px 8px; line-height:1.8}
body.m-shell .mcard>.row:first-child{margin-bottom:10px}
body.m-shell .mcard{padding:15px}
body.m-shell .ops{gap:8px}
body.m-shell .thumbs{gap:8px;margin-top:10px}
