:root {
  --bg: #f0f2f5;
  --ink: #262626;
  --muted: #8c8c8c;
  --accent: #1890ff;
  --accent-hover: #40a9ff;
  --accent-active: #096dd9;
  --side: #001529;
  --side-2: #000c17;
  --header: #001529;
  --card: #ffffff;
  --line: #e8e8e8;
  --ok: #52c41a;
  --warn: #faad14;
  --danger: #ff4d4f;
  --sold: #f5f5f5;
  --verified: #e6f7ff;
  --reserved: #fff7e6;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px rgba(0, 0, 0, 0.02);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5715;
}
body.admin-body {
  overflow: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img, video { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--ink); }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 15px; }
p { margin: 0; }

/* ========== App shell ========== */
/* 顶栏 + 侧栏固定视口，仅主内容区滚动，避免长页把导航滚没 */
.app-shell {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.app-header {
  height: 48px;
  background: var(--header);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: relative;
  z-index: 100;
  flex-shrink: 0;
}
#units, #layouts, #plan-carousel, #banner-carousel { scroll-margin-top: 56px; }
.app-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.app-header .brand:hover { color: #e8c48a; }
.header-left {
  display: flex;
  align-items: center;
  min-width: 0;
}
.side-toggle { display: none; }
.side-front { display: flex; }
.side-mask { display: none; }
.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: #1890ff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
  display: block;
}
.brand-logo-img.brand-logo-wide,
.brand-logo-wide {
  width: auto;
  height: 33px;
  max-width: min(220px, 58vw);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.brand-logo-only {
  gap: 0;
}
.auth-brand-logo-only {
  justify-content: center;
}
.auth-brand-logo-only .brand-logo-wide {
  height: 49px;
  max-width: min(240px, 72vw);
}
.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.85);
  font-size: 13px;
}
/* 侧栏语言区仅手机端显示（顶栏精简后入口放进抽屉） */
.app-side .side-lang { display: none; }
.header-user a { color: rgba(255,255,255,.85); }
.header-user a:hover { color: #fff; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.lang-switch a {
  color: rgba(255,255,255,.72);
  text-decoration: none;
}
.lang-switch a:hover,
.lang-switch a.active {
  color: #e8c48a;
}
.lang-switch-sep {
  color: rgba(255,255,255,.35);
}
.header-user .lang-switch {
  margin-right: 8px;
}
.m-lang-bar {
  display: none !important;
}
.m-lang-bar .lang-switch a {
  color: rgba(30, 24, 16, .55);
}
.front-body .m-lang-bar .lang-switch a:hover,
.front-body .m-lang-bar .lang-switch a.active {
  color: #8a6a2b;
}
.auth-lang {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 20;
}
.auth-lang .lang-switch a {
  color: rgba(30, 24, 16, .55);
}
.auth-lang .lang-switch a:hover,
.auth-lang .lang-switch a.active {
  color: #8a6a2b;
}
.header-settings {
  position: relative;
  margin-left: 4px;
}
.header-settings-btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.1);
  color: #fff;
  border-radius: 6px;
  width: 36px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  line-height: 0;
}
.header-settings-btn img {
  width: 18px;
  height: 18px;
  display: block;
}
.header-settings-btn:hover,
.header-settings.open .header-settings-btn {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.45);
}
.header-settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--line, #e8e8e8);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  padding: 6px 0;
  z-index: 80;
}
.header-settings-menu a {
  display: block;
  padding: 10px 14px;
  color: #262626;
  font-size: 14px;
  text-decoration: none;
}
.header-settings-menu a:hover {
  background: #f5f5f5;
  color: #262626;
}
.header-settings-menu a.m-settings-danger {
  color: #cf1322;
}
.header-settings-menu a.m-settings-danger:hover {
  background: #fff1f0;
  color: #cf1322;
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1890ff;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  flex-shrink: 0;
}
.header-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  min-width: 0;
  max-width: 160px;
}
.header-name {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.header-role {
  color: rgba(255,255,255,.65);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.side-user-name {
  display: block;
  margin-top: 4px;
}

.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.app-side {
  width: 200px;
  background: var(--side);
  color: rgba(255,255,255,.65);
  flex-shrink: 0;
  padding: 12px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.app-side nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(255,255,255,.65);
  border-left: 3px solid transparent;
  transition: all .15s;
}
.app-side nav a:hover {
  color: #fff;
  background: rgba(255,255,255,.04);
}
/* 业务岗页面原先为手机壳，嵌入 PC 后台时去掉顶栏/底栏 */
.app-main .m-topbar,
.app-main .m-tabbar,
.app-main .m-settings:not(.m-settings-in-topbar) {
  display: none !important;
}
.app-main .m-page,
.app-main .agent-page {
  max-width: none;
  min-height: 0;
  padding: 0 0 24px;
  margin: 0;
}
.app-main .submit-done-page {
  min-height: 420px;
}
.field-staff-body .app-main .agent-panel,
.field-staff-body .app-main .card-table {
  max-width: 1100px;
}

.app-side nav a.active {
  color: #fff;
  background: var(--accent);
  border-left-color: #fff;
}
.nav-ico {
  width: 16px;
  text-align: center;
  opacity: .9;
  font-style: normal;
}

.app-main {
  flex: 1;
  min-width: 0;
  padding: 16px 20px 28px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--ink); }
.page-title {
  margin-bottom: 16px;
}

/* ========== Cards ========== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  min-height: 48px;
}
.card-head h2, .card-head h3 {
  font-size: 15px;
  font-weight: 600;
}
.card-body { padding: 16px; }
.card-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fafafa;
}

/* ========== Dashboard grid (project home) ========== */
.dash-grid {
  display: grid;
  grid-template-columns: 240px 1fr 300px 1fr;
  gap: 16px;
  align-items: start;
}
.dash-grid .card { margin-bottom: 0; height: 100%; }
@media (max-width: 1400px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
}

.carousel {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  width: 100%;
  aspect-ratio: 1 / 1;
}
.carousel-slide { display: none; height: 100%; }
.carousel-slide.active { display: block; height: 100%; }
.carousel-slide img,
.carousel-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 轮播视频：无浏览器控件条 */
.carousel-slide video {
  pointer-events: auto;
  object-fit: contain;
  background: #111;
}
.carousel-slide video::-webkit-media-controls,
.carousel-slide video::-webkit-media-controls-enclosure,
.carousel-slide video::-webkit-media-controls-panel {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.carousel-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 8px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  color: #fff;
  font-size: 12px;
}
.placeholder-slide {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  background: #e6f7ff;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}
.placeholder-slide.active { display: flex; }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.35);
  color: #fff;
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 4px;
}
.carousel-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d9d9d9;
}
.carousel-dots span.active { background: var(--accent); }

.media-stack { display: grid; gap: 8px; }
.media-stack img, .media-stack video {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--line);
}

.info-list {
  margin: 0;
  display: grid;
  gap: 10px;
}
.info-list .row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  font-size: 13px;
}
.info-list .row dt { color: var(--muted); }
.info-list .row dd { margin: 0; color: var(--ink); word-break: break-all; }

.cover-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 14px;
  background: #f5f5f5;
  border: 1px solid var(--line);
}

.building-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.building-list li {
  padding: 6px 0;
  color: var(--danger);
  font-size: 13px;
  border-bottom: 1px dashed #f0f0f0;
}
.building-list a { color: var(--danger); }
.building-list a:hover { color: #cf1322; }

.login-panel {
  text-align: center;
}
.login-illus {
  width: 88px;
  height: 88px;
  margin: 8px auto 16px;
  border-radius: 50%;
  background: #e6f7ff;
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 36px;
  border: 1px solid #91d5ff;
}
.login-illus-img {
  width: 72px;
  height: 72px;
  margin: 8px auto 16px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(24,144,255,.25);
}
.login-panel h3 { margin-bottom: 4px; }
.login-panel .muted { margin-bottom: 16px; }
.switch-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.switch-tabs a {
  padding: 8px;
  text-align: center;
  color: var(--muted);
  background: #fafafa;
  font-size: 13px;
}
.switch-tabs a:hover { color: var(--accent); }
.switch-tabs a.active {
  background: #fff;
  color: var(--accent);
  font-weight: 600;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 15px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.btn-outline { background: #fff; }
.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #ff7875; border-color: #ff7875; color: #fff; }
.btn-whatsapp { background: #25D366; border-color: #25D366; color: #fff; }
.btn-whatsapp:hover { filter: brightness(1.05); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 40px; font-size: 15px; }
.btn-link {
  border: 0;
  background: none;
  color: var(--accent);
  height: auto;
  padding: 0;
}
.btn-link:hover { border: 0; color: var(--accent-hover); }
.btn-link-danger { color: #cf1322; }
.btn-link-danger:hover { color: #a8071a; }
.table-actions { white-space: nowrap; }
.table-actions form { display: inline; }
.customers-search input {
  flex: 1 1 auto;
  min-width: 160px;
  width: auto;
  max-width: 420px;
  height: 36px;
}
.customers-table-wrap {
  overflow: visible;
  margin-top: 4px;
}
.inline-status-form { display: flex; align-items: center; gap: 6px; }
.inline-status-form select { width: auto; min-width: 88px; height: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mt { margin-top: 16px; }
.muted { color: var(--muted); }
.lead { color: var(--muted); line-height: 1.7; white-space: pre-wrap; }

/* ========== Forms ========== */
label {
  display: block;
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
}
label > span, .label-text {
  display: block;
  margin-bottom: 6px;
  color: rgba(0,0,0,.85);
}
input, select, textarea {
  width: 100%;
  height: 36px;
  margin-top: 0;
  /* 上下 padding 用 0 + 等高 line-height，避免华为 WebView placeholder 顶齐 */
  padding: 0 11px;
  border-radius: var(--radius);
  border: 1px solid #d9d9d9;
  background: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 36px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
  vertical-align: middle;
}
/* 复选/单选需保留系统勾选样式，否则看起来永远未勾选 */
input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  line-height: 1;
  -webkit-appearance: auto;
  appearance: auto;
  accent-color: var(--accent, #1a5fb4);
  cursor: pointer;
}
textarea {
  height: auto;
  min-height: 72px;
  padding: 8px 11px;
  line-height: 1.5;
  resize: vertical;
}
select {
  line-height: normal;
  padding: 0 28px 0 11px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, .2);
}
.row-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-inline input { flex: 1; min-width: 120px; }
.users-search-bar {
  margin-bottom: 12px;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}
.users-search-bar input[name="q"] {
  flex: 1 1 auto;
  min-width: 160px;
  width: auto;
  height: 32px;
  margin: 0;
}
.users-search-label {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  line-height: 32px;
}
.users-expired-select {
  flex: 0 0 auto;
  width: auto;
  min-width: 88px;
  max-width: 120px;
  height: 32px;
  margin: 0;
}
.users-search-bar .btn {
  flex: 0 0 auto;
  height: 32px;
  margin: 0;
}
@media (max-width: 720px) {
  .users-search-bar { flex-wrap: wrap; }
}
/* 用户管理：添加人员尽量一行；过窄可横向滑动 */
.users-add-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding-bottom: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.users-add-label {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: #262626;
  white-space: nowrap;
  line-height: 28px;
  margin-right: 2px;
}
.users-add-bar .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 26px;
}
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 12px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
}
.filter-bar label { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.filter-bar .label-text { font-size: 12px; color: #8c8c8c; }
.filter-bar-actions { display: flex; gap: 8px; align-items: center; padding-bottom: 2px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 4px 12px;
  align-items: end;
}
.form-grid .full { grid-column: 1 / -1; }

/* ========== Tables ========== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th, .data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.data-table th {
  background: #fafafa;
  color: rgba(0,0,0,.85);
  font-weight: 600;
  white-space: nowrap;
}
.data-table tbody tr:hover { background: #fafafa; }

/* 业绩明细：横向滚动，客户信息/状态加宽且不折行 */
.sales-detail-wrap { width: 100%; }
.sales-detail-table {
  width: max-content;
  min-width: 1280px;
  table-layout: auto;
}
.sales-detail-table th,
.sales-detail-table td {
  white-space: nowrap;
  vertical-align: top;
}
.sales-detail-table .col-customer {
  min-width: 220px;
  white-space: normal;
}
.sales-detail-table .col-customer .cust-line {
  white-space: nowrap;
  line-height: 1.45;
}
.sales-detail-table .col-status {
  min-width: 160px;
  white-space: nowrap;
}
.sales-detail-table .col-ops {
  white-space: nowrap;
}
.units-table tr.units-row { cursor: pointer; }
.units-table tr.units-row:active { background: #f0f5ff; }
.units-table .room-no { font-weight: 700; }
.units-table tr.status-available { background: #b7eb8f; }
.units-table tr.status-available td,
.units-table tr.status-available td .room-no { color: #135200; font-weight: 600; }
.units-table tr.status-reserved { background: #b7eb8f; }
.units-table tr.status-sold,
.units-table tr.status-verified { background: #fff; }
.units-table tr.status-sold td,
.units-table tr.status-sold td .room-no,
.units-table tr.status-verified td,
.units-table tr.status-verified td .room-no {
  color: #cf1322;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.units-table tr.status-sold:hover,
.units-table tr.status-verified:hover { background: #fff1f0; }
/* 已售待审核：不标红、不删除线 */
.units-table tr.status-pending-sold { background: #fff7e6; }
.units-table tr.status-pending-sold td,
.units-table tr.status-pending-sold td .room-no {
  color: #ad6800;
  text-decoration: none;
  font-weight: 600;
}
.units-table tr.status-pending-sold:hover { background: #fff1b8; }
.status-pending-label {
  color: #d48806;
  font-weight: 600;
  white-space: nowrap;
}
.submit-done-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 48px - 56px);
  padding: 24px 16px;
  box-sizing: border-box;
}
.submit-done-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 28px 20px 22px;
}
.submit-done-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #f6ffed;
  border: 2px solid #b7eb8f;
  color: #52c41a;
  font-size: 32px;
  font-weight: 700;
  line-height: 60px;
}
.submit-done-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
}
.submit-done-room {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #262626;
}
.submit-done-msg {
  margin: 0 0 8px;
  font-size: 15px;
  color: #595959;
}
.submit-done-card .btn {
  margin-top: 18px;
}
.unit-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.slide-kind-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 2px;
  z-index: 2;
}
.layout-carousel .carousel-slide { position: relative; }
.unit-floor-tip {
  margin: 14px 12px 24px;
  padding: 14px 16px;
  background: #fff7e6;
  border: 1px solid #ffe58f;
  border-radius: 6px;
}
.unit-floor-tip-title {
  font-size: 16px;
  font-weight: 700;
  color: #d4380d;
  margin-bottom: 6px;
}
.unit-floor-tip-text {
  margin: 0;
  font-size: 13px;
  color: #8c8c8c;
  line-height: 1.5;
}
.badge {
  display: inline-block;
  padding: 0 7px;
  height: 22px;
  line-height: 20px;
  border-radius: 2px;
  background: #fafafa;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.badge.status-available { color: var(--ok); background: #f6ffed; border-color: #b7eb8f; }
.badge.status-reserved { color: #d48806; background: #fffbe6; border-color: #ffe58f; }
.badge.status-sold { color: #595959; background: #fafafa; border-color: #d9d9d9; }
.badge.status-verified { color: var(--accent); background: #e6f7ff; border-color: #91d5ff; }

.building-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 13px;
}
.tag.active, .tag:hover {
  background: #e6f7ff;
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}
.status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}
.filter-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #595959;
}
.filter-chip:hover { text-decoration: none; }
.filter-chip.active { font-weight: 600; }
.filter-chip.sale,
.filter-chip.sold {
  min-width: 72px;
  padding: 6px 28px;
  text-align: center;
}
.filter-chip.sale { color: #389e0d; border-color: #b7eb8f; background: #f6ffed; }
.filter-chip.sale.active { background: #52c41a; color: #fff; border-color: #52c41a; }
.filter-chip.reserved { color: #d48806; border-color: #ffe58f; background: #fffbe6; }
.filter-chip.reserved.active { background: #faad14; color: #fff; border-color: #faad14; }
.filter-chip.sold { color: #cf1322; border-color: #ffa39e; background: #fff1f0; }
.filter-chip.sold.active { background: #ff4d4f; color: #fff; border-color: #ff4d4f; }
.filter-chip.active:not(.sale):not(.reserved):not(.sold) {
  background: #262626;
  color: #fff;
  border-color: #262626;
}

/* ========== Project list ========== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  display: block;
  overflow: hidden;
  transition: box-shadow .15s;
}
.project-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  text-decoration: none;
  color: inherit;
}
.project-card-cover {
  height: 140px;
  background: #f5f5f5;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.project-card-cover-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}
.project-card-body { padding: 16px; }
.project-card-body h2 { font-size: 16px; margin-bottom: 8px; }
.project-card-body p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.link-more { color: var(--accent); font-size: 13px; }

/* ========== Unit detail ========== */
.unit-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 20px;
}
@media (max-width: 800px) { .unit-grid { grid-template-columns: 1fr; } }
.unit-info dl {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px 12px;
  margin: 0;
}
.unit-info dt { color: var(--muted); }
.unit-info dd { margin: 0; }
.price-box, .price-locked {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: #fafafa;
  border: 1px solid var(--line);
}
.price-box strong { font-size: 22px; color: var(--danger); margin: 0 4px; }
.placeholder-box {
  min-height: 220px;
  display: grid;
  place-items: center;
  background: #fafafa;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.media-grid img, .media-row video {
  border-radius: 2px;
  border: 1px solid var(--line);
}
.media-row { display: grid; gap: 12px; }
.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 2px; }
.thumb-lg { width: 120px; height: 80px; }
video.thumb { background: #111; }
button.thumb-btn {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: inline-block;
  line-height: 0;
}
button.thumb-btn:hover .thumb { outline: 2px solid var(--accent); }
.media-preview-card {
  width: min(920px, 100%);
  max-height: 92vh;
  overflow: auto;
}
.media-preview-body {
  margin-top: 12px;
  background: #111;
  border-radius: 4px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-preview-body img,
.media-preview-body video {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  display: block;
}
.media-grid .js-media-preview { cursor: pointer; }
.media-grid video { width: 100%; }

/* ========== Flash / Modal ========== */
.flash {
  padding: 10px 16px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.flash-success { background: #f6ffed; border-color: #b7eb8f; color: #389e0d; }
.flash-error { background: #fff2f0; border-color: #ffccc7; color: #cf1322; }

/* Element UI 风格 Message */
.app-message-root {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: min(92vw, 420px);
}
.app-message {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  max-width: 100%;
  padding: 12px 18px;
  border-radius: 4px;
  border: 1px solid #ebeef5;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
  color: #606266;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .25s ease, transform .25s ease;
  cursor: pointer;
}
.app-message.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.app-message.is-leave {
  opacity: 0;
  transform: translateY(-12px);
}
.app-message-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.app-message-text { word-break: break-word; }
.app-message-success { background: #f0f9eb; border-color: #e1f3d8; color: #67c23a; }
.app-message-success .app-message-icon { background: #67c23a; }
.app-message-error { background: #fef0f0; border-color: #fde2e2; color: #f56c6c; }
.app-message-error .app-message-icon { background: #f56c6c; }
.app-message-warning { background: #fdf6ec; border-color: #faecd8; color: #e6a23c; }
.app-message-warning .app-message-icon { background: #e6a23c; }
.app-message-info { background: #f4f4f5; border-color: #e9e9eb; color: #909399; }
.app-message-info .app-message-icon { background: #909399; }

.modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: -webkit-fill-available;
  background: rgba(0,0,0,.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
  /* 强制独立合成层，减少华为 WebView fixed 错位 */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.modal:target, .modal.open { display: flex; }
body.modal-open {
  overflow: hidden;
  height: 100%;
  height: 100dvh;
}
.modal-card.dialog-card {
  width: min(640px, 100%);
  max-height: 90vh;
  overflow: auto;
}
.dialog-card form label { display: block; margin-bottom: 10px; }
.dialog-card .label-text { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.modal-card {
  background: #fff;
  width: min(420px, 100%);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.modal-card h3 { margin-bottom: 8px; }
.modal-close {
  position: absolute;
  right: 16px;
  top: 12px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.maintain-modal {
  z-index: 260;
}
.maintain-card {
  text-align: center;
  width: min(360px, 100%);
}
.maintain-card p {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 14px;
}
.maintain-wechat {
  margin: 16px 0 8px;
  padding: 14px 12px;
  border-radius: 6px;
  background: #e6f7ff;
  border: 1px solid #91d5ff;
  color: #096dd9;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.maintain-note {
  margin-bottom: 16px !important;
}
.maintain-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ========== Auth ========== */
.auth-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: var(--bg);
  padding: 24px 12px 16px;
}
.auth-wrap {
  width: min(400px, 92%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-card {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.auth-brand .brand-en {
  font-size: 12px;
  letter-spacing: .1em;
  color: #b8864e;
  margin-bottom: 2px;
}
.auth-brand strong {
  font-size: 18px;
  color: #2b1b16;
  letter-spacing: .12em;
}
.auth-card h1 { margin-bottom: 4px; font-size: 22px; }
.auth-company {
  margin: 0;
  padding: 0 4px;
  text-align: center;
  color: #8c8c8c;
  font-size: 11px;
  line-height: 1.55;
}
.auth-company p {
  margin: 0 0 4px;
  word-break: break-word;
}
.auth-company p:last-child { margin-bottom: 0; }
.auth-company-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  align-items: center;
}
.auth-company a {
  color: #8c8c8c;
  text-decoration: none;
}
.auth-company a:hover { color: var(--accent); }
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.auth-brand .brand-en {
  font-size: 11px;
  letter-spacing: .1em;
  color: #b08958;
}
.auth-brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: .12em;
}
.demo-hint {
  font-size: 12px;
  color: var(--muted);
  background: #fafafa;
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: var(--radius);
  margin: 12px 0;
}

/* ========== Admin extras ========== */
.section { /* compat alias */
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 16px;
  box-shadow: var(--shadow);
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.js-media-fold > summary.section-head {
  list-style: none;
  cursor: pointer;
  margin-bottom: 0;
}
.js-media-fold > summary.section-head::-webkit-details-marker { display: none; }
.js-media-fold > summary.section-head::marker { content: none; }
.js-media-fold .fold-close { display: none; }
.js-media-fold[open] .fold-edit { display: none; }
.js-media-fold[open] .fold-close { display: inline; }
.js-media-fold[open] > summary.section-head { margin-bottom: 12px; }
.js-media-fold > .fold-body { margin-top: 0; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.stat strong { font-size: 20px; font-weight: 600; }
/* 销售业绩：统计不挤、销售金额突出 */
.sales-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.sales-stats .stat {
  min-width: 0;
  padding: 12px 14px;
}
.sales-stats .stat strong {
  font-size: 18px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: block;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.25;
}
.sales-stats .stat-amount {
  border-color: #ffa39e;
  background: #fff7f7;
}
.sales-stats .stat-amount span { color: #cf1322; }
.sales-stats .stat-amount strong {
  color: #ff4d4f;
  font-size: clamp(13px, 3.6vw, 20px);
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: normal;
  overflow: visible;
}
.sales-stats .stat-rooms {
  grid-column: span 1;
}
.sales-stats .stat-rooms-list {
  margin: 6px 0 0;
  font-size: 12px;
  color: #595959;
  line-height: 1.4;
  word-break: break-all;
}
@media (max-width: 1200px) {
  .sales-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .sales-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-stats .stat {
    padding: 12px 10px;
  }
  .sales-stats .stat strong {
    font-size: 15px;
  }
  /* 仅已售/回款总额拉满整行，当月/当日与套数并排 */
  .sales-stats .stat-amount-wide {
    grid-column: span 2;
  }
  .sales-stats .stat-amount strong {
    font-size: clamp(13px, 3.6vw, 16px);
  }
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
}
.panel h2 { margin-bottom: 12px; }

/* 管理员首页统计 */
.admin-stats .stat strong { color: var(--accent); }
.admin-home-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  align-items: start;
}
.admin-home-grid .section { margin-bottom: 0; }
.admin-info dl {
  margin: 0 0 14px;
}
.admin-info dl > div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}
.admin-info dt { color: var(--muted); }
.admin-info dd { margin: 0; }
.admin-layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.admin-layout-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
}
.admin-layout-card:hover {
  border-color: var(--accent);
  color: inherit;
}
@media (max-width: 900px) {
  .admin-home-grid { grid-template-columns: 1fr; }
}

.contract-paper {
  background: #fff;
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: var(--radius);
}
.contract-paper pre {
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.7;
  margin: 0;
}

.site-footer {
  display: none;
}

/* ========== Responsive shell ========== */
@media (max-width: 960px) {
  /* 手机端后台顶栏：只保留左上角菜单按钮 */
  .app-header {
    padding: 0 10px;
    justify-content: flex-start;
  }
  .app-header .brand,
  .app-header .header-user {
    display: none !important;
  }
  .side-toggle {
    display: grid;
    place-items: center;
    /* 加大可点区域，避免手机难点 */
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: rgba(255,255,255,.25);
    touch-action: manipulation;
  }
  .side-toggle:active {
    background: rgba(255,255,255,.28);
  }
  .app-header .header-left {
    gap: 4px;
  }
  .app-side .side-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 4px;
  }
  .app-side .side-lang .lang-switch {
    color: rgba(255,255,255,.9);
  }
  .side-front { display: flex !important; }
  .app-side {
    position: fixed;
    top: 48px;
    left: 0;
    bottom: 0;
    width: min(260px, 86vw);
    z-index: 130;
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: none;
    padding-top: 8px;
  }
  body.side-open { overflow: hidden; }
  body.side-open .app-side {
    transform: none;
    box-shadow: 8px 0 24px rgba(0,0,0,.25);
  }
  .side-mask {
    display: none;
    position: fixed;
    inset: 48px 0 0 0;
    background: rgba(0,0,0,.45);
    z-index: 120;
  }
  body.side-open .side-mask { display: block; }
  .app-main { padding: 12px 10px 24px; }
  .section { padding: 12px; }
  .section-head h1 { font-size: 18px; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar-actions { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat strong { font-size: 16px; word-break: break-all; }
  .section, .panel, .card-body, .fold-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .data-table { min-width: 640px; }
  .units-table { min-width: 520px; }
  .modal {
    padding: 0;
    align-items: flex-end;
    justify-content: stretch;
  }
  .modal-card, .modal-card.dialog-card {
    width: 100%;
    max-width: none;
    max-height: min(92vh, 92dvh);
    margin: 0;
    border-radius: 12px 12px 0 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  .auth-wrap { width: min(400px, 100%); }
  .auth-card { width: 100%; padding: 20px 16px; border: 0; box-shadow: none; }
  .auth-body { display: block; background: #fff; padding: 12px; }
  .m-app { width: 100%; max-width: none; box-shadow: none; }
}
@media (max-width: 520px) {
  .filter-bar { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .role-form-grid { grid-template-columns: 1fr; }
  .section-head .actions { width: 100%; }
  .section-head .actions .btn { flex: 1; justify-content: center; text-align: center; }
}
@media print {
  .app-header, .app-side, .actions, .modal, .m-tabbar, .m-topbar, .m-cta-bar, .m-settings, .header-settings { display: none !important; }
  .app-main { padding: 0; }
  .card, .section { box-shadow: none; border: 0; }
}

/* ========== Mobile front flow (PDF) ========== */
html {
  overflow-x: hidden;
  max-width: 100%;
}
.front-body {
  background: #f5f5f5;
  overflow-x: hidden;
  max-width: 100%;
  overscroll-behavior-x: none;
}
.m-app {
  width: min(480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  position: relative;
  padding-bottom: 56px;
  box-shadow: 0 0 24px rgba(0,0,0,.06);
  overflow-x: hidden;
  max-width: 100%;
}
@media (max-width: 960px) {
  .m-app { width: 100%; max-width: none; box-shadow: none; }
}
.m-topbar {
  /* fixed：避免华为 WebView 对 sticky 合成层残影/白条 */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  z-index: 80;
  height: 52px;
  display: grid;
  grid-template-columns: 56px 1fr 64px;
  align-items: center;
  background: #001529;
  color: #fff;
  padding: 0 4px;
  overflow: visible;
  /* 向下多盖 2px，堵住顶栏与轮播接缝白线 */
  box-shadow: 0 2px 0 0 #001529;
}
.m-app > .m-page,
.m-app > .flash {
  padding-top: 52px;
}
/* brand 顶栏改为 sticky 后，页面不再预留 fixed 占位 */
.m-app > .m-topbar-brand + .m-page,
.m-app > .m-topbar-brand ~ .flash {
  padding-top: 0;
}
.m-topbar.has-settings:not(.m-topbar-brand) {
  grid-template-columns: 48px 1fr auto;
}
.m-topbar.has-settings:not(.m-topbar-brand) .m-topbar-title[style*="grid-column"] {
  grid-column: auto !important;
}
.m-topbar-brand.has-settings {
  grid-template-columns: 1fr;
}
.m-topbar-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 2px;
}
.m-topbar-title {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 申请销售：左右等宽，设置挂到右侧后标题仍居中 */
.m-topbar.m-topbar-apply,
.m-topbar.m-topbar-apply.has-settings {
  grid-template-columns: 56px 1fr 56px;
}
.m-topbar-apply .m-settings-in-topbar {
  justify-self: end;
  align-self: center;
  width: 48px;
  display: grid;
  place-items: center;
}
.m-topbar-logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: contain;
  background: #2b1b16;
  justify-self: center;
}
.m-topbar-brand {
  /* sticky：跟在文档流里，轮播紧贴下方，不会出现「顶栏很长」的空白带 */
  position: sticky !important;
  top: 0;
  left: auto;
  right: auto;
  width: 100%;
  max-width: none;
  margin: 0;
  height: 48px;
  grid-template-columns: 1fr;
  background: #1c100c;
  padding: 0 12px;
  border-bottom: 0;
  box-shadow: none;
  z-index: 80;
}
.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  /* 右侧留给设置按钮，避免标题文字盖住齿轮 */
  max-width: calc(100% - 88px);
  margin: 0 auto;
  pointer-events: none;
}
.brand-lockup img {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 6px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
}
.brand-lockup-logo-only img.brand-logo-wide,
.brand-lockup img.brand-logo-wide {
  width: auto;
  height: 40px;
  max-width: min(240px, 70vw);
  flex: 0 1 auto;
  border-radius: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}
.brand-en {
  font-size: 13px;
  letter-spacing: .12em;
  color: #e8c48a;
  font-weight: 500;
  white-space: nowrap;
}
.brand-zh {
  font-size: 15px;
  font-weight: 600;
  color: #f3d7a8;
  letter-spacing: .08em;
  white-space: nowrap;
}
.m-back, .m-share {
  color: #fff;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  padding: 4px;
  text-align: center;
}
.m-back {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-left: 2px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  border-radius: 8px;
}
.m-back:hover, .m-share:hover { color: #91d5ff; background: rgba(255,255,255,.12); }
.m-page { padding-bottom: 12px; }
.m-tabbar {
  /* 不用 translateX 居中：华为/百度 WebView 里 transform 父级易导致 fixed 层错位、白条 */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: calc(52px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-top: 1px solid #e8e8e8;
  z-index: 60;
}
.m-tabbar a {
  display: grid;
  place-items: center;
  color: #595959;
  font-size: 14px;
}
.m-tabbar a.active, .m-tabbar a:hover {
  color: #1890ff;
  text-decoration: none;
  background: #f0f7ff;
}
.m-tabbar.m-tabbar-icons {
  height: calc(58px + env(safe-area-inset-bottom, 0px));
}
.m-tabbar.m-tabbar-icons a {
  gap: 2px;
  padding: 6px 4px 4px;
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  position: relative;
}
.m-tabbar.m-tabbar-icons a.active {
  color: #1890ff;
  background: transparent;
}
.m-tabbar.m-tabbar-icons a.active::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #1890ff;
}
.m-tab-ico {
  width: 22px;
  height: 22px;
  display: block;
  background: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.m-tab-ico-home {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3C/svg%3E");
}
.m-tab-ico-units {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}
.m-tab-ico-user {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E");
}
.m-tabbar.m-tabbar-2 { grid-template-columns: 1fr 1fr; }
.m-tabbar.m-tabbar-3 { grid-template-columns: 1fr 1fr 1fr; }
.m-tabbar.m-tabbar-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.m-tabbar.m-tabbar-5 { grid-template-columns: repeat(5, 1fr); }

/* 右上角设置：无顶栏时固定右上；有顶栏则挂进顶栏 */
.m-app > .m-settings {
  display: block;
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 90;
}
.m-settings.m-settings-in-topbar {
  display: block;
  position: relative;
  top: auto;
  right: auto;
  justify-self: end;
  z-index: 90;
}
.m-settings-lang {
  padding: 8px 16px 10px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 4px;
}
.m-settings-lang-label {
  font-size: 12px;
  color: #8c8c8c;
  margin-bottom: 6px;
}
.m-settings-menu .lang-switch a {
  display: inline;
  padding: 0;
  color: rgba(30, 24, 16, .55);
  font-size: 13px;
  font-weight: 600;
}
.m-settings-menu .lang-switch a:hover,
.m-settings-menu .lang-switch a.active {
  background: transparent;
  color: #8a6a2b;
}
.m-settings-menu .lang-switch-sep {
  color: #d9d9d9;
}
.m-settings-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  line-height: 0;
}
.m-settings-btn img,
.m-settings-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}
.m-settings-btn:hover,
.m-settings.open .m-settings-btn {
  background: rgba(255,255,255,.1);
}
.m-topbar-brand .m-settings-in-topbar {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  justify-self: auto;
  z-index: 91;
}
.m-topbar-brand {
  /* 勿改回 relative，否则会盖掉上面的 sticky，顶栏与轮播之间又会空一大截 */
  position: sticky !important;
  overflow: visible;
  padding-right: 48px;
}
.m-topbar-brand .m-settings-btn {
  color: #e8c48a;
  position: relative;
  z-index: 2;
}
.m-topbar-brand .m-settings-btn:hover,
.m-topbar-brand .m-settings.open .m-settings-btn {
  background: rgba(232,196,138,.14);
}
.m-settings-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 176px;
  max-width: 240px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
  padding: 6px 0;
  z-index: 100;
}
/* 手机端：菜单改为 fixed，避免被轮播/overflow 裁切或盖住 */
.m-settings-menu.is-fixed-popover {
  position: fixed;
  top: auto;
  right: auto;
  left: auto;
  margin: 0;
}
.m-settings.open > .m-settings-menu {
  display: block;
}
.m-settings-menu[hidden] {
  display: none !important;
}
.m-settings-menu a {
  display: block;
  padding: 12px 16px;
  color: #262626;
  font-size: 14px;
  text-decoration: none;
}
.m-settings-menu a:hover {
  background: #f5f5f5;
  color: #262626;
}
.m-settings-menu a.m-settings-danger {
  color: #cf1322;
}
.m-settings-menu a.m-settings-danger:hover {
  background: #fff1f0;
  color: #cf1322;
}

.project-dir { padding: 12px; }
.dir-card {
  display: block;
  margin-bottom: 14px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  background: #fff;
  color: inherit;
  box-shadow: var(--shadow);
}
.dir-card:hover { text-decoration: none; color: inherit; }
.dir-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.dir-card-empty {
  height: 180px;
  display: grid;
  place-items: center;
  background: #f5f5f5;
  color: #8c8c8c;
}
.dir-card-name {
  padding: 10px 12px;
  font-weight: 600;
  font-size: 15px;
}
.scroll-hint {
  text-align: center;
  color: #8c8c8c;
  font-size: 13px;
  padding: 8px 0 20px;
}

/* 项目首页：顶栏下方紧贴正方形轮播，下方留白给广告位 */
.m-app > .m-page.project-home,
.m-page.project-home {
  padding: 0 !important;
  padding-top: 0 !important;
  margin: 0 !important;
  background: #fff;
  overflow-x: hidden;
  /* CTA 固定：约 88 + Tab 52 + 安全区 */
  padding-bottom: calc(88px + 52px + env(safe-area-inset-bottom, 0px)) !important;
  min-height: 0;
  height: auto;
}
/* brand 顶栏若是 sticky：确保首页无额外顶距 */
.m-app > .m-topbar-brand + .m-page.project-home {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
/* 首页广告位：正方形轮播与报价按钮之间，按原图完整显示（不裁切） */
.project-home .home-ad-slot {
  width: 100%;
  background: #fff;
  line-height: 0;
  overflow: hidden;
}
.project-home .home-ad-carousel.carousel,
.project-home .home-ad-carousel {
  position: relative;
  width: 100%;
  /* 覆盖全局 .carousel 的 1:1，按原图完整显示，避免左右裁切 */
  aspect-ratio: auto !important;
  height: auto !important;
  min-height: 0;
  max-height: none;
  background: #fff;
  overflow: hidden;
}
.project-home .home-ad-carousel .carousel-slide,
.project-home .home-ad-carousel .carousel-slide.active {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  overflow: hidden;
}
.project-home .home-ad-carousel .carousel-slide {
  display: none;
}
.project-home .home-ad-carousel .carousel-slide.active {
  display: block;
}
.project-home .home-ad-carousel .carousel-slide img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center top;
  background: #fff;
  vertical-align: top;
}
.project-home .home-ad-carousel .carousel-btn {
  width: 28px;
  height: 28px;
  font-size: 18px;
  opacity: .75;
}
.project-home .home-ad-carousel .carousel-dots,
.project-home .home-ad-carousel .home-ad-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  z-index: 3;
  padding: 0;
  margin: 0;
  background: transparent;
}
.project-home .home-ad-carousel .carousel-dots span {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}
.project-home .home-ad-carousel .carousel-dots span.active {
  background: #fff;
}
/* 管理端：首页广告位编辑面板 */
.home-ad-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(240px, 1fr);
  gap: 20px;
  align-items: start;
  padding: 4px 0 2px;
}
.home-ad-panel-preview {
  display: grid;
  gap: 10px;
}
.home-ad-frame {
  position: relative;
  width: 100%;
  min-height: 120px;
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(135deg, #f5f7fa 0%, #e9eef5 100%);
  border: 1px dashed #c9d4e3;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.home-ad-frame.has-image {
  border-style: solid;
  border-color: #e6ebf2;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  min-height: 0;
}
.home-ad-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: unset;
}
.home-ad-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(24, 144, 255, .92);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
.home-ad-empty {
  height: 100%;
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  padding: 16px;
  color: #64748b;
}
.home-ad-empty strong {
  color: #334155;
  font-size: 15px;
}
.home-ad-empty span {
  font-size: 12px;
  line-height: 1.5;
  max-width: 28em;
}
.home-ad-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.home-ad-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f0f7ff;
  color: #1677ff;
  border: 1px solid #d6e8ff;
  font-size: 12px;
  font-weight: 600;
}
.home-ad-panel-form {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 10px;
  background: #fafbfd;
  border: 1px solid #eef2f7;
}
.home-ad-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
}
.home-ad-form {
  display: grid;
  gap: 12px;
}
.home-ad-field {
  display: grid;
  gap: 6px;
  margin: 0;
}
.home-ad-field .label-text {
  font-size: 12px;
  color: #8c8c8c;
  font-weight: 600;
}
.home-ad-field input[type="text"],
.home-ad-field input:not([type]),
.home-ad-field input[name="title"] {
  width: 100%;
  height: 36px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}
.home-ad-file input[type="file"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px dashed #c5d0de;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}
.home-ad-file-hint {
  font-size: 12px;
  color: #94a3b8;
}
.home-ad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 4px;
}
.home-ad-actions .btn-primary {
  min-width: 120px;
}
.home-ad-delete-form {
  margin: 0;
}
.home-ad-delete-form .btn {
  color: #cf1322;
  border-color: #ffa39e;
}
.home-ad-delete-form .btn:hover {
  color: #a8071a;
  border-color: #ff7875;
  background: #fff1f0;
}
@media (max-width: 900px) {
  .home-ad-panel {
    grid-template-columns: 1fr;
  }
}
.project-home .hero-carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  /* 全宽正方形，贴顶无黑边空隙 */
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 0;
  max-height: none;
  background: #111;
  overflow: hidden;
  z-index: 1;
  line-height: 0;
}
.project-home .hero-carousel .carousel-slide,
.project-home .hero-carousel .carousel-slide.active {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.project-home .hero-carousel .carousel-slide {
  display: none;
}
.project-home .hero-carousel .carousel-slide.active {
  display: block;
}
.project-home .hero-carousel .carousel-slide img,
.project-home .hero-carousel .carousel-slide video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  /* cover 铺满正方形，消除 contain 上下黑边 */
  object-fit: cover;
  object-position: center center;
  display: block;
  background: #111;
}
.project-home .hero-carousel .hero-dots,
.project-home .hero-carousel .carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 3;
  padding: 0;
  margin: 0;
  background: transparent;
  pointer-events: auto;
}
.project-home .hero-carousel .carousel-dots span {
  background: rgba(255, 255, 255, .45);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}
.project-home .hero-carousel .carousel-dots span.active {
  background: #fff;
}

@media (max-width: 960px) {
  .site-plan-carousel {
    aspect-ratio: 1 / 1;
    width: 100%;
    min-height: 0;
  }
  .site-plan-carousel .carousel-slide img,
  .site-plan-carousel .carousel-slide video,
  .site-plan {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}
.project-home-body { padding: 16px; }
.project-home-body h1 { font-size: 20px; margin-bottom: 8px; }
.m-cta-bar {
  /* fixed 替代 sticky，规避华为合成层错位/残影 */
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  z-index: 50;
  box-sizing: border-box;
}
@media (max-width: 960px) {
  .m-topbar,
  .m-tabbar,
  .m-cta-bar {
    max-width: none;
  }
}
.project-home .m-cta-bar {
  /* 略抬高、加内边距，避免按钮贴底/贴 Tab */
  bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  padding: 16px 16px 18px;
  border-top: 1px solid #f0f0f0;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
}

.buildings-page { padding: 12px; }
.site-plan-wrap {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  background: #fafafa;
  position: relative;
}
.site-plan-carousel {
  min-height: 0;
  aspect-ratio: 1 / 1;
  background: #111;
}
.site-plan-carousel .carousel-slide img,
.site-plan-carousel .carousel-slide video,
.site-plan {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #111;
}
/* 电脑窄栏：顶栏+轮播+楼栋+底栏一屏显示完，轮播吃剩余高度 */
@media (min-width: 961px) {
  .m-app:has(.buildings-page) {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
  }
  .m-app:has(.buildings-page) > .m-topbar {
    flex: 0 0 52px;
  }
  .buildings-page {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 8px 12px 4px;
  }
  .buildings-page .site-plan-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .buildings-page .site-plan-carousel {
    flex: 1 1 auto;
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
  }
  .buildings-page .site-plan-carousel .carousel-slide,
  .buildings-page .site-plan-carousel .carousel-slide.active {
    height: 100%;
  }
  .buildings-page .sale-box {
    flex: 0 0 auto;
    margin-top: 8px;
  }
  .buildings-page .hint-red {
    flex: 0 0 auto;
    margin: 6px 0 0;
  }
}
.site-plan-wrap .carousel-dots {
  padding: 8px 0 10px;
  background: #fff;
}
.sale-box {
  margin-top: 14px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  overflow: hidden;
}
.sale-box-title {
  padding: 10px 12px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
}
.building-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.building-cell {
  padding: 18px 12px;
  text-align: center;
  color: #262626;
  font-weight: 600;
  border-right: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.building-cell:nth-child(2n) { border-right: 0; }
.building-cell:hover {
  background: #f5f5f5;
  color: #1677ff;
  text-decoration: none;
}
.hint-red {
  color: #8c8c8c;
  font-size: 13px;
  text-align: center;
  margin: 12px 0;
}
.room-search { margin-top: 8px; }
.units-page { padding: 12px; }
.units-search {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
}
.units-search input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
}
.units-scroll {
  max-height: calc(100vh - 280px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.units-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 #e8e8e8;
}
.price-tip { color: #8c8c8c; font-size: 12px; margin-bottom: 10px; }
.card-table {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: auto;
}
.link-red { color: #ff4d4f !important; font-weight: 600; }
/* 用户管理：已到期账号整行标红 */
.data-table tr.user-row-expired td {
  color: #cf1322;
  background: #fff1f0;
}
.data-table tr.user-row-expired:hover td {
  background: #ffccc7;
}
.data-table tr.user-row-expired a {
  color: #a8071a;
}

/* 房源详情：轮播为正方形，完整显示图片，页面可滚动 */
.front-body:has(.unit-page) {
  height: auto;
  overflow: auto;
}
.m-app:has(.unit-page) {
  height: auto;
  max-height: none;
  overflow: visible;
  display: block;
  padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}
.m-app:has(.unit-page) > .m-topbar {
  flex: 0 0 48px;
}
.m-app:has(.unit-page) > .flash {
  flex: 0 0 auto;
}
.unit-page {
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: visible;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}
.unit-page .layout-panel {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.unit-page .layout-carousel {
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0;
  align-self: stretch;
  background: #111;
}
.unit-page .layout-carousel .carousel-slide,
.unit-page .layout-carousel .carousel-slide.active {
  height: 100%;
}
.unit-page .placeholder-slide,
.unit-page .placeholder-slide.active {
  min-height: 0;
  height: 100%;
}
.unit-page .unit-meta.card-block {
  flex: 0 0 auto;
  padding: 6px 8px;
  margin-bottom: 0;
}
.unit-page .meta-row {
  padding: 4px 0;
  font-size: 13px;
}
.unit-page .meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.unit-page .meta-cell {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px dashed #f0f0f0;
}
.unit-page .meta-cell:nth-child(odd) {
  padding-right: 8px;
}
.unit-page .meta-cell:nth-child(even) {
  padding-left: 8px;
  border-left: 1px solid #f0f0f0;
}
.unit-page .meta-cell:nth-child(3),
.unit-page .meta-cell:nth-child(4) {
  border-bottom: 1px dashed #f0f0f0;
}
.unit-page .meta-cell:nth-last-child(-n+2) {
  border-bottom: none;
  padding-bottom: 0;
  padding-top: 6px;
}
.unit-page .meta-cell span {
  color: #8c8c8c;
  flex-shrink: 0;
  font-size: 11px;
}
.unit-page .meta-cell strong {
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.unit-page .meta-cell.meta-price strong {
  color: #ff4d4f;
  font-size: 16px;
  font-weight: 700;
}
.unit-page .meta-cell.meta-price strong small {
  font-size: 11px;
  font-weight: 500;
  margin-left: 2px;
}
.unit-page .unit-floor-tip {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 10px;
}
.unit-page .unit-floor-tip-title {
  font-size: 13px;
  margin-bottom: 6px;
}
.unit-page .unit-floor-tip-text {
  font-size: 11px;
  line-height: 1.35;
}
.unit-page .unit-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.unit-page .uc-btn {
  min-height: 48px;
  padding: 8px 6px;
  border-radius: 6px;
}
.unit-page .uc-label { font-size: 11px; }
.unit-page .uc-num { font-size: 12px; }
.unit-page .carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  margin: 0;
  padding: 0;
  z-index: 3;
}
.unit-page .carousel-dots span {
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .2);
}
.unit-page .carousel-dots span.active {
  background: #fff;
}
@media (max-height: 640px) {
  .unit-page { gap: 4px; padding: 4px 6px; }
  .unit-page .meta-cell { padding: 3px 0; }
  .unit-page .meta-cell.meta-price strong { font-size: 15px; }
  .unit-page .unit-floor-tip { padding: 6px 8px; }
}
@media (max-height: 560px) {
  .unit-page .unit-floor-tip-text { display: none; }
  .unit-page .meta-cell.meta-price strong { font-size: 14px; }
}
.layout-panel {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #fafafa;
  position: relative;
}
.layout-carousel {
  min-height: 0;
  aspect-ratio: 1 / 1;
  background: #111;
}
.layout-carousel .carousel-slide img,
.layout-carousel .carousel-slide video {
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  object-fit: contain;
  display: block;
  background: #111;
}
.layout-panel img {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: none;
  object-fit: contain;
  background: #111;
}
.carousel-dots span { cursor: pointer; }
.drag-handle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 6px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fafafa;
  cursor: grab;
  color: #595959;
  font-weight: 700;
  letter-spacing: -1px;
  user-select: none;
}
tr.is-dragging { opacity: .45; }
tr.drop-target { outline: 2px solid #1677ff; }
.layout-label {
  padding: 8px 12px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.card-block {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
}
.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #f0f0f0;
  font-size: 14px;
}
.meta-row span { color: #8c8c8c; }
.price-block {
  margin-top: 12px;
  padding: 12px;
  background: #fff7e6;
  border: 1px solid #ffe58f;
  border-radius: 4px;
}
.price-block em {
  font-style: normal;
  color: #ff4d4f;
  font-size: 20px;
  font-weight: 700;
  margin: 0 4px;
}
.unit-actions {
  display: grid;
  gap: 10px;
}
.unit-contact-wrap {
  margin-top: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}
.unit-contact-title {
  font-size: 15px;
  font-weight: 600;
  color: #262626;
  margin: 0 0 10px;
}
.unit-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.uc-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 10px 8px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  color: #fff;
  box-sizing: border-box;
}
.uc-label {
  font-size: 12px;
  opacity: 0.92;
  line-height: 1;
}
.uc-num {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-all;
}
.uc-wa { background: #25d366; }
.uc-wa:active { background: #1ebe57; }
.uc-tel { background: #1677ff; }
.uc-tel:active { background: #0958d9; }
.uc-off {
  background: #f5f5f5;
  color: #8c8c8c;
}
.unit-floor-price {
  margin-top: 12px;
  height: 48px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
}
.unit-staff-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
}
.unit-staff-actions .btn {
  width: 100%;
  max-width: 100%;
  height: 48px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}
.unit-sold-form { margin: 0; }
.btn-sold {
  background: #262626;
  border-color: #262626;
  color: #fff;
}
.btn-sold:hover {
  background: #434343;
  border-color: #434343;
  color: #fff;
}
.unit-staff-off {
  background: #fff7e6;
  border-color: #ffe58f;
  color: #d48806;
  pointer-events: none;
}
.unit-to-admin {
  margin-top: 10px;
  margin-bottom: 16px;
  height: 48px;
  font-size: 16px;
  font-weight: 600;
}
.m-cta-bar .unit-to-admin {
  margin-top: 10px;
  margin-bottom: 0;
}
.m-login-card { width: min(400px, 100%); }
.m-login-card input[type="tel"],
.m-login-card input[type="password"],
.m-login-card input[type="text"] {
  height: 44px;
  line-height: 44px;
  padding: 0 12px;
  font-size: 16px;
}
.m-login-head {
  text-align: center;
  margin-bottom: 12px;
}
.m-login-head img {
  margin: 0 auto 10px;
  border-radius: 8px;
}
.m-login-head h3 { margin-bottom: 4px; }
.m-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 14px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  overflow: hidden;
}
.m-auth-tab {
  border: 0;
  background: #fafafa;
  color: #595959;
  padding: 10px 8px;
  font-size: 14px;
  cursor: pointer;
}
.m-auth-tab.active {
  background: #1677ff;
  color: #fff;
  font-weight: 600;
}
.m-auth-panel { display: none; }
.m-auth-panel.active { display: block; }

@media (min-width: 900px) {
  .front-body {
    background:
      radial-gradient(circle at 20% 0%, #e6f7ff 0, transparent 35%),
      #f0f2f5;
  }
}

/* 用户管理：分角色录入卡片 */
.role-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.role-form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow);
}
.role-form-title {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
  color: var(--ink);
}
.role-form-card label { margin-bottom: 12px; }
.add-role-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0 12px;
}
.add-role-actions .btn {
  text-align: center;
  padding: 12px 10px;
  font-weight: 600;
}
@media (max-width: 520px) {
  .add-role-actions { grid-template-columns: 1fr; }
}
.role-form-note {
  margin-top: 12px;
  text-align: center;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

/* 经纪人 / 中介管理端 */
.agent-app .m-tabbar { grid-template-columns: 1fr 1fr 1fr; }
.agent-app .m-tabbar a { font-size: 12px; }
.agent-app .m-tabbar:has(a:nth-child(4)) { grid-template-columns: repeat(4, 1fr); }
.agent-app .m-tabbar:has(a:nth-child(5)) { grid-template-columns: repeat(5, 1fr); font-size: 11px; }
.share-panel { margin-bottom: 14px; }
.share-body { padding: 14px; }
.share-name {
  font-size: 16px;
  font-weight: 600;
  color: #2b1b16;
}
.share-input {
  width: 100%;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 12px;
  background: #fafafa;
  color: #595959;
}
.inline-assign {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}
.inline-assign select {
  flex: 1 1 auto;
  min-width: 100px;
  max-width: 160px;
  width: auto;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
}
.inline-assign .btn {
  flex: 0 0 auto;
}
.agent-page { padding: 12px 14px 20px; }
.agent-user {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  font-weight: 600;
}
.agent-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.agent-panel-head {
  padding: 12px 14px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}
.room-list { list-style: none; margin: 0; padding: 0; }
.room-list li { border-bottom: 1px solid #f0f0f0; }
.room-list li:last-child { border-bottom: 0; }
.room-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  color: inherit;
}
.room-list a:hover { background: #fafafa; text-decoration: none; }
.room-list .arrow { margin-left: auto; color: #bfbfbf; font-size: 18px; }
.agent-actions { display: grid; gap: 10px; margin-top: 16px; }
.kv-list { padding: 4px 0; }
.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px dashed #f0f0f0;
  font-size: 14px;
}
.kv-row:last-child { border-bottom: 0; }
.kv-row span { color: var(--muted); }
.kv-row strong { font-weight: 600; text-align: right; }
.em-red { color: var(--danger) !important; }

/* ========== Nav permission matrix ========== */
.perm-panel { max-width: none; }
.perm-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.perm-table { min-width: 960px; }
.perm-table th,
.perm-table td { text-align: center; vertical-align: middle; }
.perm-table .perm-menu-col { text-align: left; min-width: 140px; white-space: nowrap; }
.perm-table .perm-role-col { min-width: 88px; max-width: 110px; }
.perm-role-name { display: block; font-weight: 600; line-height: 1.3; }
.perm-col-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 400; margin-top: 4px; cursor: pointer; }
.perm-href { font-size: 12px; margin-top: 2px; }
.perm-check { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 8px; }
.perm-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  cursor: pointer;
  -webkit-appearance: auto;
  appearance: auto;
  accent-color: var(--accent, #1a5fb4);
}

/* ========== 列表分页 ========== */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0 4px;
}
.pager-info { font-size: 13px; }
.pager-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.pager-ellipsis { color: #8c8c8c; padding: 0 2px; }
.btn-disabled,
.btn.btn-disabled {
  opacity: .45;
  pointer-events: none;
  cursor: default;
}
.filter-bar.panel label .label-text {
  display: block;
  font-size: 12px;
  color: #8c8c8c;
  margin-bottom: 4px;
}
@media (max-width: 640px) {
  .pager { flex-direction: column; align-items: stretch; }
  .pager-links { justify-content: center; }
}
