: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;
}
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 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-header {
  height: 48px;
  background: var(--header);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  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: #2b1b16;
  flex-shrink: 0;
  display: block;
}
.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.85);
  font-size: 13px;
}
.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;
}

.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
}
.app-side {
  width: 200px;
  background: var(--side);
  color: rgba(255,255,255,.65);
  flex-shrink: 0;
  padding: 12px 0;
  overflow-y: auto;
}
.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-x: auto;
}
.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; }
.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: 32px;
  margin-top: 0;
  padding: 4px 11px;
  border-radius: var(--radius);
  border: 1px solid #d9d9d9;
  background: #fff;
  font: inherit;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 8px 11px; resize: vertical; }
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; }
.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; }
.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; }
.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;
  background: rgba(0,0,0,.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal:target, .modal.open { display: flex; }
.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);
}
.auth-card {
  width: min(400px, 92%);
  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-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;
  word-break: break-all;
}
.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: 24px;
  font-weight: 700;
}
.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-amount strong { font-size: 20px; }
}
.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; }
  .app-header .brand span { font-size: 15px; }
  .side-toggle {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-right: 8px;
    border: 0;
    border-radius: 6px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
  }
  .header-role {
    max-width: 7em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .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: 8px; align-items: flex-end; }
  .modal-card, .modal-card.dialog-card {
    width: 100%;
    max-height: 92vh;
    margin: 0;
    border-radius: 12px 12px 0 0;
  }
  .auth-card { width: min(400px, 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) ========== */
.front-body {
  background: #f5f5f5;
}
.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);
}
@media (max-width: 960px) {
  .m-app { width: 100%; max-width: none; box-shadow: none; }
}
.m-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 52px;
  display: grid;
  grid-template-columns: 56px 1fr 64px;
  align-items: center;
  background: #001529;
  color: #fff;
  padding: 0 4px;
}
.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-logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: contain;
  background: #2b1b16;
  justify-self: center;
}
.m-topbar-brand {
  height: 64px;
  grid-template-columns: 1fr;
  background: #1c100c;
  padding: 0 12px;
  border-bottom: 1px solid rgba(212, 165, 116, .28);
}
.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  max-width: calc(100% - 48px);
  margin: 0 auto;
}
.brand-lockup img {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 8px;
  object-fit: contain;
  object-position: center;
  background: #2b1b16;
  box-shadow: 0 0 0 1px rgba(212, 165, 116, .35);
}
.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: 18px;
  font-weight: 600;
  color: #f3d7a8;
  letter-spacing: .18em;
  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 {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(480px, 100%);
  height: 52px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-top: 1px solid #e8e8e8;
  z-index: 40;
}
.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-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: 40;
}
.m-settings.m-settings-in-topbar {
  display: block;
  position: relative;
  top: auto;
  right: auto;
  justify-self: end;
  z-index: 36;
}
.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: 6px;
  top: 50%;
  transform: translateY(-50%);
  justify-self: auto;
}
.m-topbar-brand {
  position: relative;
  overflow: visible;
}
.m-topbar-brand .m-settings-btn {
  color: #e8c48a;
}
.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% + 4px);
  right: 0;
  min-width: 168px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.16);
  padding: 6px 0;
  z-index: 50;
}
.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;
}

.project-home { padding-bottom: 80px; }
.project-home .hero-carousel {
  min-height: 0;
  height: auto;
  aspect-ratio: auto;
  background: #000;
}
.project-home .hero-carousel .carousel-slide,
.project-home .hero-carousel .carousel-slide.active {
  height: auto;
}
.project-home .hero-carousel .carousel-slide img,
.project-home .hero-carousel .carousel-slide video {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #000;
}
@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 { padding-bottom: 0; }
.project-home-body { padding: 16px; }
.project-home-body h1 { font-size: 20px; margin-bottom: 8px; }
.m-cta-bar {
  position: sticky;
  bottom: 52px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.96);
  border-top: 1px solid #f0f0f0;
  z-index: 20;
}

.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; }

/* 房源详情：轮播为正方形，完整显示图片，页面可滚动 */
.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 1fr;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 16px;
}
.unit-staff-actions .btn {
  width: 100%;
  height: 48px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
}
.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-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;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.inline-assign select {
  min-width: 120px;
  max-width: 180px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
}
.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; }
