/* ============================================================
   华人短租网 · 全站样式
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
  background: #f5f7fa; color: #1f2937; line-height: 1.65;
}
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
a { color: #1f6feb; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ---------- 顶部导航 ---------- */
.site-header { background: #0f3d91; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 56px; flex-wrap: wrap; gap: 8px; }
.logo { color: #fff; font-size: 19px; font-weight: 700; }
.logo:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 6px 0; }
.nav a { color: #dfe8fb; font-size: 14px; }
.nav a:hover { color: #fff; text-decoration: none; }
.nav-msg { position: relative; }
.badge {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
  background: #f2994a; color: #fff; border-radius: 9px; font-size: 12px;
  text-align: center; margin-left: 4px; padding: 0 5px;
}

/* ---------- 按钮与表单 ---------- */
.btn {
  display: inline-block; background: #1f6feb; color: #fff !important;
  border: 1px solid #1f6feb; border-radius: 8px; padding: 10px 20px;
  font-size: 14px; cursor: pointer; text-align: center;
}
.btn:hover { background: #1859c2; text-decoration: none; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-outline { background: #fff; color: #0f3d91 !important; }
.btn-outline:hover { background: #eef4ff; }
.btn-danger { background: #dc2626; border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-green { background: #0e9f8a; border-color: #0e9f8a; }
.btn-green:hover { background: #0b7a6b; }
.btn-gray { background: #6b7280; border-color: #6b7280; }
.btn-gray:hover { background: #4b5563; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 14px; margin-bottom: 5px; color: #374151; }
.form-group .hint { font-size: 12px; color: #9ca3af; }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border: 1px solid #d1d9e8; border-radius: 8px;
  font-size: 14px; background: #fff; color: #1f2937;
}
.input:focus { outline: none; border-color: #1f6feb; box-shadow: 0 0 0 3px rgba(31,111,235,.12); }
textarea.input { min-height: 100px; resize: vertical; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > div { flex: 1 1 200px; }
.checkbox-line { display: inline-flex; align-items: center; gap: 5px; margin: 0 14px 8px 0; font-size: 14px; }

/* ---------- 提示消息 ---------- */
.flash { max-width: 1080px; margin: 12px auto 0; padding: 10px 16px; border-radius: 8px; font-size: 14px; }
.flash-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.flash-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ---------- 卡片与列表 ---------- */
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 22px 26px; }
.page-title { font-size: 22px; margin: 22px 0 16px; color: #0f3d91; }
.section-title { font-size: 17px; color: #0f3d91; margin: 26px 0 12px; border-left: 4px solid #1f6feb; padding-left: 10px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.listing-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; transition: box-shadow .15s; }
.listing-card:hover { box-shadow: 0 4px 14px rgba(15,61,145,.12); }
.listing-card .thumb { height: 160px; background: #e5e7eb; }
.listing-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-card .thumb .noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: #9ca3af; font-size: 13px; }
.listing-card .body { padding: 12px 14px 14px; }
.listing-card .title { font-size: 15px; font-weight: 600; color: #1f2937; margin-bottom: 4px; }
.listing-card .meta { font-size: 12.5px; color: #6b7280; margin-bottom: 6px; }
.listing-card .price { color: #f2994a; font-weight: 700; font-size: 17px; }
.listing-card .price span { font-size: 12px; color: #6b7280; font-weight: 400; }
.listing-card .guests { font-size: 12px; color: #9ca3af; }
.listing-card .fac-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.listing-card .fac-tag { font-size: 11px; color: #0f3d91; background: #eef4ff; border: 1px solid #d1d9e8; border-radius: 6px; padding: 1px 7px; }
.lang-switch { margin-left: 10px; font-size: 13px; white-space: nowrap; }
.lang-switch a { color: #9ca3af; text-decoration: none; padding: 2px 4px; border-radius: 4px; }
.lang-switch a.on { color: #0f3d91; font-weight: 700; background: #eef4ff; }
.lang-switch .sep { color: #d1d9e8; margin: 0 2px; }
@media (max-width: 900px) { .lang-switch { margin-left: 0; } }

/* ---------- 首页 ---------- */
.hero {
  background: linear-gradient(135deg, #0f3d91, #1f6feb); color: #fff;
  border-radius: 16px; padding: 40px 28px; margin-top: 20px; text-align: center;
}
.hero h1 { font-size: 26px; margin-bottom: 8px; }
.hero p { font-size: 14px; opacity: .92; margin-bottom: 18px; }
.search-box { display: flex; gap: 10px; max-width: 720px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.search-box .input { flex: 2 1 260px; }
.search-box select.input { flex: 1 1 140px; }
.search-box .btn { flex: 0 0 auto; }
.city-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
.city-chips a { color: #dbeafe; font-size: 13px; background: rgba(255,255,255,.12); padding: 4px 12px; border-radius: 14px; }
.city-chips a:hover { background: rgba(255,255,255,.25); text-decoration: none; }

/* ---------- 搜索筛选 ---------- */
.filter-bar { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filter-bar .input { width: auto; min-width: 120px; }
.filter-bar .btn { flex: 0 0 auto; }

/* ---------- 房源详情 ---------- */
.detail-wrap { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 20px; }
.detail-main { flex: 1 1 620px; }
.detail-side { flex: 1 1 300px; }
.detail-side .card { position: sticky; top: 72px; }
.gallery-main { border-radius: 12px; overflow: hidden; background: #e5e7eb; height: 380px; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery-thumbs img { width: 84px; height: 60px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.gallery-thumbs img.on { border-color: #1f6feb; }
.detail-title { font-size: 22px; color: #0f3d91; margin: 18px 0 4px; }
.detail-loc { color: #6b7280; font-size: 14px; margin-bottom: 12px; }
.tag { display: inline-block; background: #eef4ff; border: 1px solid #c7d7f5; color: #0f3d91; border-radius: 8px; padding: 2px 10px; font-size: 12.5px; margin: 2px 4px 2px 0; }
.facility { display: inline-block; background: #f3f4f6; border-radius: 8px; padding: 3px 10px; font-size: 12.5px; color: #374151; margin: 0 6px 8px 0; }
.price-big { font-size: 26px; color: #f2994a; font-weight: 700; }
.price-big span { font-size: 13px; color: #6b7280; font-weight: 400; }
.host-card { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.host-avatar { width: 46px; height: 46px; border-radius: 50%; background: #0f3d91; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }

/* ---------- 消息页 ---------- */
.msg-layout { display: flex; gap: 16px; margin-top: 20px; align-items: flex-start; }
.msg-list { flex: 1 1 300px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
.msg-list a { display: block; padding: 12px 14px; border-bottom: 1px solid #f3f4f6; color: #1f2937; }
.msg-list a:hover { background: #f0f7ff; text-decoration: none; }
.msg-list a.on { background: #eef4ff; }
.msg-list .m-title { font-size: 14px; font-weight: 600; }
.msg-list .m-sub { font-size: 12px; color: #6b7280; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-main { flex: 2 1 480px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; }
.msg-thread { height: 380px; overflow-y: auto; padding: 16px; }
.bubble { max-width: 72%; padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 10px; word-break: break-word; }
.bubble.me { background: #1f6feb; color: #fff; margin-left: auto; }
.bubble.other { background: #f3f4f6; color: #1f2937; }
.bubble .time { display: block; font-size: 11px; opacity: .65; margin-top: 4px; }
.msg-form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid #e5e7eb; }
.msg-form .input { flex: 1; }
.msg-form .btn { flex: 0 0 auto; }
.empty-box { padding: 40px 20px; text-align: center; color: #9ca3af; font-size: 14px; }

/* ---------- 表格与后台 ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: 13.5px; }
table.tbl th { background: #eef4ff; color: #0f3d91; text-align: left; padding: 10px 12px; border: 1px solid #d1d9e8; white-space: nowrap; }
table.tbl td { padding: 10px 12px; border: 1px solid #e5e7eb; vertical-align: middle; }
.status { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.status-active { background: #f0fdf4; color: #166534; }
.status-pending { background: #fffbeb; color: #92400e; }
.status-rejected, .status-cancelled { background: #fef2f2; color: #991b1b; }
.status-offline, .status-draft { background: #f3f4f6; color: #4b5563; }
.status-accepted { background: #eef4ff; color: #0f3d91; }
.mini { font-size: 12.5px; color: #6b7280; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 18px; }
.stat .num { font-size: 26px; font-weight: 700; color: #0f3d91; }
.stat .lab { font-size: 13px; color: #6b7280; margin-top: 2px; }

/* ---------- 评价 ---------- */
.stars { color: #f2994a; font-size: 15px; letter-spacing: 1px; }
.stars .off { color: #d1d9e8; }
.review-item { border-bottom: 1px solid #f3f4f6; padding: 12px 0; }
.review-item:last-child { border-bottom: none; }

/* ---------- 合规提示 ---------- */
.compliance-box {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px;
  padding: 12px 14px; font-size: 12.5px; color: #78350f; margin-top: 14px;
  line-height: 1.7;
}
.compliance-box h4 { font-size: 13px; margin-bottom: 6px; color: #92400e; }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin: 20px 0 30px; flex-wrap: wrap; }
.pager a, .pager span { padding: 6px 14px; border: 1px solid #d1d9e8; border-radius: 8px; font-size: 13px; color: #1f2937; background: #fff; }
.pager a:hover { background: #eef4ff; text-decoration: none; }
.pager .cur { background: #1f6feb; color: #fff; border-color: #1f6feb; }

/* ---------- 页脚 ---------- */
.site-footer { background: #0f3d91; color: #c7d7f5; margin-top: 40px; padding: 24px 0 28px; text-align: center; font-size: 13px; }
.foot-note { font-size: 12px; opacity: .75; margin-top: 4px; }

/* ---------- 响应式 ---------- */
/* 汉堡按钮：默认隐藏 */
.nav-toggle {
  display: none; background: none; border: none; color: #fff;
  cursor: pointer; padding: 6px; line-height: 1;
}
.nav-toggle svg { display: block; }

@media (max-width: 900px) {
  /* 导航折叠为汉堡菜单 */
  .nav-toggle { display: block; }
  .header-inner { flex-wrap: nowrap; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #0f3d91; flex-direction: column; align-items: stretch;
    gap: 0; padding: 8px 16px 14px; border-top: 1px solid rgba(255,255,255,.15);
  }
  .nav.open { display: flex; }
  .nav a { display: block; padding: 10px 4px; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav a:last-of-type { border-bottom: none; }
  .nav .btn { margin-top: 8px; text-align: center; }
  .lang-switch { padding: 10px 4px 2px; }
  .lang-switch a { font-size: 14px; }
}

@media (max-width: 720px) {
  .hero h1 { font-size: 21px; }
  .detail-main, .detail-side { flex-basis: 100%; }
  .msg-layout { flex-direction: column; }
  .msg-thread { height: 300px; }
  .gallery-main { height: 240px; }
}

@media (max-width: 600px) {
  .container { padding: 0 12px; }
  .hero { padding: 26px 16px; border-radius: 14px; margin-top: 14px; }
  .hero h1 { font-size: 19px; margin-bottom: 6px; }
  .hero p { font-size: 13px; margin-bottom: 14px; }
  .search-box { gap: 8px; }
  .search-box .input, .search-box select.input { flex: 1 1 100%; }
  .search-box .btn { flex: 1 1 100%; }
  .city-chips a { padding: 5px 10px; font-size: 12.5px; }
  .page-title { font-size: 19px; margin: 16px 0 12px; }
  .section-title { font-size: 16px; margin: 20px 0 10px; }
  .card { padding: 16px 14px; border-radius: 12px; }
  .filter-bar { padding: 12px; }
  .filter-bar .input { min-width: 100%; }
  .filter-bar .btn { flex: 1 1 100%; }
  .form-row > div { flex: 1 1 100%; }
  .gallery-main { height: 210px; }
  .detail-title { font-size: 19px; }
  .price-big { font-size: 23px; }
  .msg-form { flex-wrap: wrap; }
  .msg-form .btn { flex: 1 1 100%; }
  table.tbl th, table.tbl td { padding: 8px 10px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .listing-card .thumb { height: 150px; }
  .flash { margin: 10px auto 0; }
  .btn { padding: 10px 16px; }
}

