/* ============================================================
   pages.css — 各页面特有样式
   ============================================================ */

/* ---------- 首页 Banner ---------- */
.banner {
  margin: 4px 16px 14px;
  border-radius: 16px;
  padding: 24px 20px;
  background: linear-gradient(135deg, #1a5f7a, #2e86ab);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.banner-title { font-size: 18px; font-weight: 700; }
.banner-sub { font-size: 12px; opacity: 0.85; margin-top: 7px; }
.banner-tag {
  position: absolute; right: 16px; top: 16px;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 12px; border-radius: 999px; font-size: 11px;
}

/* ---------- 快捷入口 ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 8px;
}
.quick-item { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.quick-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--primary-bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.quick-icon svg { width: 23px; height: 23px; }
.quick-label { font-size: 12px; color: var(--text-sub); }

/* ---------- 地图页 ---------- */
.page.fullscreen { position: relative; }
/* z-index:0 建立层叠上下文，封装 Leaflet 内部 200-700 的层级，避免穿透遮挡弹窗 */
.map-wrap { position: absolute; inset: 0; z-index: 0; }

.map-tool {
  position: absolute; right: 14px; bottom: 22px;
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); z-index: 20;
}
.map-loading {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.94);
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; color: var(--text-sub); z-index: 20;
}

/* 地图打点 */
.map-dot span {
  display: block; width: 14px; height: 14px; border-radius: 50%;
  background: var(--primary); border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.map-dot.active span { background: var(--accent); width: 18px; height: 18px; }
.map-dot { background: transparent; border: none; }

/* 底部弹层卡片 */
.sheet-card { display: flex; gap: 12px; }
.sheet-card .sc-cover { width: 104px; height: 104px; margin: 0; }
.sheet-card .sc-info { margin-left: 0; }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  display: flex; background: #fff;
  margin: 0 16px; border-radius: 10px; padding: 4px 0;
}
.filter-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 0; font-size: 13px; color: var(--text-sub);
}
.filter-btn.selected { color: var(--primary); }

.filter-panel {
  display: none; background: #fff; margin: 8px 16px 0;
  border-radius: 10px; padding: 10px;
  max-height: 250px; overflow-y: auto; box-shadow: var(--shadow);
}
.filter-panel.show {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px;
}
.fp-option {
  padding: 8px 4px; text-align: center; font-size: 12px;
  background: var(--bg-page); border-radius: 8px; color: var(--text-sub);
}
.fp-option.active { background: var(--primary-bg); color: var(--primary); }

/* ---------- 详情页 ---------- */
.swiper { position: relative; width: 100%; height: 230px; overflow: hidden; }
.swiper-track { display: flex; height: 100%; transition: transform 0.25s ease; }
.swiper-slide { flex: 0 0 100%; height: 100%; }
.swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.swiper-slide.no-img {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
.swiper-slide.no-img .sc-ph { height: 100%; }
.swiper-count {
  position: absolute; right: 14px; bottom: 14px;
  background: rgba(0, 0, 0, 0.45); color: #fff;
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
}
.swiper-dots {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 12px; display: flex; gap: 5px;
}
.swiper-dots .dot {
  width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.5);
}
.swiper-dots .dot.on { width: 14px; border-radius: 3px; background: #fff; }

.detail-head { background: #fff; padding: 14px 16px; margin-bottom: 10px; }
.detail-title { font-size: 18px; font-weight: 700; }
.detail-price { color: var(--accent); font-size: 18px; font-weight: 700; margin-top: 8px; }
.detail-tags { margin-top: 10px; }

.card-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.info-row {
  display: flex; padding: 7px 0; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }
.info-label { width: 84px; color: var(--text-muted); flex-shrink: 0; }
.info-value { flex: 1; color: var(--text-main); min-width: 0; }
.mini-map {
  height: 150px; border-radius: 10px; overflow: hidden;
  margin-bottom: 12px; z-index: 0;
}

.detail-actions {
  position: sticky; bottom: 0;
  display: flex; align-items: center; gap: 10px;
  background: #fff; padding: 10px 16px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}
.da-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; font-size: 11px; color: var(--text-sub);
}
.da-item.faved { color: var(--accent); }
.da-item.faved svg path { fill: var(--accent); stroke: var(--accent); }
.da-primary {
  flex: 1; background: var(--primary); color: #fff;
  text-align: center; padding: 11px; border-radius: 999px; font-size: 15px;
}
.da-primary:active { opacity: 0.85; }

/* ---------- 我的 ---------- */
.user-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; padding: 26px 18px; display: flex; align-items: center; gap: 14px;
}
.user-avatar {
  width: 60px; height: 60px; border-radius: 50%; overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
  display: flex; align-items: center; justify-content: center;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-meta { flex: 1; min-width: 0; }
.user-name { font-size: 18px; font-weight: 600; }
.user-phone { font-size: 12px; opacity: 0.85; margin-top: 4px; }
.user-login-btn {
  background: rgba(255, 255, 255, 0.22);
  padding: 6px 18px; border-radius: 999px; font-size: 13px;
}

.user-stats { display: flex; }
.stat-item { flex: 1; display: flex; flex-direction: column; gap: 4px; text-align: center; }
.stat-num { font-size: 19px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-muted); }

.user-menu { padding: 4px 16px; }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--border);
}
.menu-item:last-child { border-bottom: none; }
.menu-ico { color: var(--primary); display: flex; }
.menu-label { flex: 1; font-size: 14px; }
.menu-arrow { color: var(--text-faint); }

.logout-wrap { padding: 22px 40px; }
.logout-wrap .btn-outline {
  width: 100%; color: var(--text-muted); border-color: var(--border);
}

/* ---------- 搜索 ---------- */
.search-page-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.search-page-bar .search-box { flex: 1; padding: 8px 12px; margin: 0; box-shadow: none; }
.search-page-bar input { flex: 1; border: none; background: transparent; }
.search-confirm { color: var(--primary); font-size: 14px; white-space: nowrap; }
.clear-input {
  width: 19px; height: 19px; border-radius: 50%;
  background: #c2c9d0; color: #fff;
  align-items: center; justify-content: center; font-size: 15px; line-height: 1;
}
.word-wrap { padding: 6px 16px; display: flex; flex-wrap: wrap; gap: 9px; }
.word-chip {
  padding: 7px 14px; background: #fff; border-radius: 999px;
  font-size: 13px; color: var(--text-sub); box-shadow: var(--shadow-soft);
}
.word-chip:active { background: var(--primary-bg); }

/* ---------- 登录 ---------- */
.login-wrap { padding: 34px 24px; }
.login-logo { text-align: center; }
.login-brand { text-align: center; font-size: 24px; font-weight: 700; margin-top: 16px; }
.login-slogan { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 6px; }
.login-form { margin-top: 32px; }
.login-input {
  display: flex; align-items: center; background: #fff;
  border-radius: 10px; padding: 13px 14px; margin-bottom: 14px;
}
.li-prefix {
  color: var(--text-sub); margin-right: 10px; padding-right: 10px;
  border-right: 1px solid var(--border);
}
.login-input input { flex: 1; border: none; background: transparent; }
.code-btn { color: var(--primary); font-size: 13px; white-space: nowrap; }
.code-btn.disabled { color: var(--text-muted); }
.agree-line {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 12px; color: var(--text-muted); margin: 16px 0;
}
.agree-line .link { color: var(--primary); }

/* ---------- 预约卡片 ---------- */
.appoint-card {
  background: #fff; border-radius: 12px; padding: 14px 16px;
  margin: 0 16px 12px; box-shadow: var(--shadow-soft);
}
.appoint-name { font-size: 15px; font-weight: 600; max-width: 70%; }
.appoint-status { font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.st-pending { background: var(--accent-bg); color: var(--accent); }
.st-confirmed { background: var(--primary-bg); color: var(--primary); }
.st-done { background: #eef2f5; color: var(--text-muted); }
.st-cancel { background: #f4f4f4; color: #aaa; }
.appoint-line { font-size: 13px; margin-top: 8px; color: var(--text-main); }

/* ============================================================
   管理员模块
   ============================================================ */

/* ---------- 工作台顶部 ---------- */
.admin-hero {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  padding: 20px 18px; margin-bottom: 16px;
}
.ah-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ah-name { font-size: 17px; font-weight: 600; color: #fff; }
.ah-role { font-size: 12px; color: rgba(255,255,255,0.78); margin-top: 4px; }

/* ---------- 统计网格 ---------- */
.admin-stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; overflow: hidden; padding: 0;
}
.as-cell {
  padding: 16px 6px; text-align: center;
  display: flex; flex-direction: column; gap: 5px;
}
.as-num { font-size: 21px; font-weight: 700; color: var(--primary); }
.as-label { font-size: 12px; color: var(--text-muted); }

/* ---------- 类型分布 ---------- */
.dist-list { display: flex; flex-direction: column; gap: 12px; }
.dist-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.dist-name { width: 64px; flex-shrink: 0; color: var(--text-sub); }
.dist-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--bg-page); overflow: hidden; }
.dist-bar i { display: block; height: 100%; background: var(--primary-light); border-radius: 999px; }
.dist-val { width: 86px; flex-shrink: 0; text-align: right; color: var(--text-muted); font-size: 12px; }

/* ---------- 常用功能入口 ---------- */
.admin-entry-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 18px 8px;
}
.ae-cell { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 2px; }
.ae-ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--primary-bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.ae-label { font-size: 12px; color: var(--text-sub); }

/* ---------- 我的页管理员入口 ---------- */
.admin-entry { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.admin-entry-state { font-size: 12px; color: var(--text-muted); }

/* ---------- 管理员搜索 ---------- */
.admin-search { display: flex; gap: 8px; padding: 12px 16px 0; }
.admin-search .form-input { flex: 1; }
.admin-search .btn-primary { padding: 0 18px; font-size: 14px; }

/* ---------- 资产行 ---------- */
.admin-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); margin: 0 16px 10px;
  border-radius: var(--radius); padding: 14px 14px;
  box-shadow: var(--shadow-soft);
}
.ar-main { flex: 1; min-width: 0; }
.ar-title { font-size: 15px; font-weight: 600; color: var(--text-main); }
.ar-sub { font-size: 12px; color: var(--text-muted); margin: 6px 0 8px; }
.ar-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ar-price { font-size: 14px; font-weight: 600; color: var(--accent); }
.ar-status { font-size: 11px; padding: 3px 9px; border-radius: 999px; }
.st-on { background: var(--primary-bg); color: var(--primary); }
.st-off { background: #f0f1f3; color: var(--text-muted); }
.st-deal { background: var(--accent-bg); color: var(--accent); }
.ar-arrow { color: var(--text-faint); flex-shrink: 0; }

/* ---------- 新增浮动按钮 ---------- */
.fab {
  position: absolute; right: 18px; bottom: 22px;
  width: 52px; height: 52px; border-radius: 50%; border: none;
  background: var(--primary); box-shadow: 0 6px 16px rgba(27,95,122,0.38);
  display: flex; align-items: center; justify-content: center; z-index: 20;
}
.fab:active { transform: scale(0.94); }

/* ---------- 图片上传 ---------- */
.img-upload-card { display: flex; flex-wrap: wrap; gap: 10px; }
.img-grid { display: contents; }
.img-cell { position: relative; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; }
.img-cell img { width: 100%; height: 100%; object-fit: cover; }
.img-del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
}
.img-add {
  width: 76px; height: 76px; border-radius: 8px;
  border: 1px dashed var(--text-faint); background: var(--bg-page);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--text-muted); font-size: 11px;
}
.img-add:active { background: var(--primary-bg); }

.loc-btn-wrap { padding: 14px 16px 4px; }
.form-actions { padding: 20px 16px 28px; }

/* ============================================================
   批量导入
   ============================================================ */
.step-list { margin: 0 0 14px; padding-left: 18px; color: var(--text-sub); font-size: 13px; line-height: 1.9; }
.step-list b { color: var(--primary); font-weight: 600; }

.import-drop {
  margin: 12px 0; padding: 26px 16px; border-radius: var(--radius);
  border: 1.5px dashed var(--text-faint); background: var(--bg-page);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-muted);
}
.import-drop:active { border-color: var(--primary-light); background: var(--primary-bg); }
.drop-text { font-size: 14px; color: var(--text-sub); }
.drop-hint { font-size: 12px; color: var(--text-muted); }

.ir-summary { display: flex; padding: 6px 0 14px; }
.ir-cell {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.ir-num { font-size: 26px; font-weight: 700; color: var(--text-main); }
.ir-cell.ok .ir-num { color: var(--primary); }
.ir-cell.bad .ir-num { color: #d9534f; }
.ir-label { font-size: 12px; color: var(--text-muted); }

.fail-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.fail-row {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; padding: 10px 12px; border-radius: 8px; background: var(--bg-page);
}
.fail-row-no { flex-shrink: 0; color: #d9534f; font-weight: 600; }
.fail-reason { color: var(--text-sub); flex: 1; min-width: 0; }

/* ============================================================
   数据大屏（深色科技风，对齐原小程序 adminPages/screen）
   ============================================================ */
.screen-page {
  min-height: 100%; height: 100%; overflow-y: auto;
  background: radial-gradient(circle at 50% 0%, #123a5c 0%, #0a1f33 55%, #071626 100%);
  color: #dce8f2;
}
.screen-wrap { padding: 14px 14px 22px; display: flex; flex-direction: column; }

/* 标题 */
.sp-header { display: flex; align-items: center; justify-content: center; padding: 8px 0 18px; }
.sp-title { font-size: 18px; font-weight: 700; color: #e8f4ff; letter-spacing: 2px; margin: 0 12px; }
.sp-line { width: 32px; height: 2px; background: linear-gradient(90deg, transparent, #36c5f0); }
.sp-line.right { background: linear-gradient(90deg, #36c5f0, transparent); }

/* KPI */
.kpi-grid { display: flex; margin-bottom: 12px; gap: 10px; }
.kpi-cell {
  flex: 1; min-width: 0;
  background: rgba(23, 58, 88, 0.7);
  border: 1px solid rgba(54, 197, 240, 0.25);
  border-radius: 10px; padding: 14px 4px; text-align: center;
}
.kpi-num { font-size: 22px; font-weight: 700; color: #e8f4ff; line-height: 1.1; }
.kpi-num.green { color: #4ecb71; }
.kpi-num.gray { color: #9fb4c7; }
.kpi-num.orange { color: #ffb04c; }
.kpi-num.cyan { color: #36c5f0; }
.kpi-num.yellow { color: #ecb22e; }
.kpi-label { font-size: 11px; color: #7fa8c4; margin-top: 7px; }

/* 图表卡片 */
.chart-card {
  background: rgba(13, 36, 56, 0.85);
  border: 1px solid rgba(54, 197, 240, 0.2);
  border-radius: 12px; padding: 16px; margin-top: 4px; margin-bottom: 14px;
}
.chart-title {
  font-size: 14px; font-weight: 600; color: #cfe6f5;
  padding-left: 10px; border-left: 3px solid #36c5f0; margin-bottom: 14px;
}

/* 环形图 */
.pie-box { display: flex; flex-direction: column; align-items: center; }
.donut-svg { width: 100%; max-width: 210px; height: auto; }
.dn-center-num { fill: #cfe6f5; font-size: 22px; font-weight: 700; }
.dn-center-label { fill: #7fa8c4; font-size: 11px; }
.dn-seg { opacity: 0; animation: dnSegIn .5s ease both; }
@keyframes dnSegIn { to { opacity: 1; } }

/* 图例 */
.sp-legend {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px 8px; width: 100%; margin-top: 16px;
}
.lg-item { display: flex; align-items: center; min-width: 0; }
.lg-dot { width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; flex-shrink: 0; }
.lg-name { font-size: 11px; color: #9fb4c7; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-value { font-size: 11px; color: #cfe6f5; margin-left: 4px; }

/* 柱状图 */
.bar-svg { width: 100%; height: auto; }
.bar-rect {
  transform-box: fill-box; transform-origin: center bottom;
  animation: barGrow .8s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.bar-val { fill: #cfe6f5; font-size: 12px; font-weight: 600; }
.bar-name { fill: #7fa8c4; font-size: 11px; }

.load-status { width: 100%; text-align: center; color: #7fa8c4; font-size: 13px; padding: 24px 0; }

@media (prefers-reduced-motion: reduce) {
  .dn-seg, .bar-rect { animation: none; opacity: 1; transform: none; }
}
