/* ============================================================
   摩洛哥房产中介网站 - 主样式表
   配色：新中式浅暖高级感（米白底 / 墨绿主色 / 暖金点缀 / 深棕文字）
   双语：法语（默认LTR）/ 阿拉伯语（RTL自动适配）
   ============================================================ */

:root {
  --color-bg: #f7f3ec;          /* 米白暖底 */
  --color-bg-alt: #efe8dc;      /* 稍深暖底 */
  --color-card: #ffffff;        /* 卡片白 */
  --color-primary: #2d4a3e;     /* 墨绿主色 */
  --color-primary-light: #3d6354;
  --color-accent: #c9a96e;      /* 暖金点缀 */
  --color-accent-dark: #a88a4f;
  --color-text: #2c2620;        /* 深棕文字 */
  --color-text-light: #6b6258;
  --color-border: #e0d8c8;
  --color-success: #4a7c59;
  --color-warning: #d4a843;
  --color-danger: #b85c4e;
  --shadow-sm: 0 2px 8px rgba(44, 38, 32, 0.06);
  --shadow-md: 0 4px 20px rgba(44, 38, 32, 0.1);
  --shadow-lg: 0 8px 40px rgba(44, 38, 32, 0.14);
  --radius: 12px;
  --radius-lg: 20px;
  --font-sans: 'Noto Sans Arabic', 'Tajawal', 'Segoe UI', sans-serif;
  --font-serif: 'Noto Naskh Arabic', 'Georgia', serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 阿拉伯语 RTL 适配 ---------- */
body[dir="rtl"] {
  text-align: right;
  font-family: 'Noto Naskh Arabic', 'Tajawal', sans-serif;
}
body[dir="rtl"] .text-start { text-align: right !important; }
body[dir="rtl"] .text-end { text-align: left !important; }
body[dir="rtl"] .float-start { float: right !important; }
body[dir="rtl"] .float-end { float: left !important; }
body[dir="rtl"] .me-auto { margin-right: 0 !important; margin-left: auto !important; }
body[dir="rtl"] .ms-auto { margin-left: 0 !important; margin-right: auto !important; }

/* ---------- 通用容器 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
  font-family: var(--font-serif);
}
.section-subtitle {
  color: var(--color-text-light);
  font-size: 1.05rem;
  margin-bottom: 48px;
  max-width: 640px;
}
.text-center { text-align: center; }
.text-center .section-subtitle { margin-left: auto; margin-right: auto; }

/* ---------- 导航栏 ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247, 243, 236, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.navbar-brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
  font-family: var(--font-serif);
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-brand .logo-icon {
  width: 36px; height: 36px;
  background: var(--color-primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-accent);
  font-size: 1.1rem;
  font-weight: 900;
}
.navbar-nav {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}
.navbar-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}
.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--color-primary);
}
.navbar-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0; right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}
body[dir="rtl"] .navbar-nav a.active::after { left: 0; right: 0; }

.nav-cta {
  background: var(--color-primary);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600;
}
.nav-cta:hover {
  background: var(--color-primary-light);
  transform: translateY(-1px);
}
.lang-switcher {
  display: flex;
  gap: 4px;
  background: var(--color-bg-alt);
  border-radius: 50px;
  padding: 4px;
}
.lang-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text-light);
  transition: var(--transition);
}
.lang-btn.active {
  background: var(--color-primary);
  color: #fff;
}

/* 移动端汉堡菜单 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-primary);
}

/* ---------- Hero 区 ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e3329 100%);
  color: #fff;
  padding: 100px 0 120px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(201, 169, 110, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201, 169, 110, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  background: rgba(201, 169, 110, 0.2);
  border: 1px solid rgba(201, 169, 110, 0.4);
  color: var(--color-accent);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  font-family: var(--font-serif);
}
.hero h1 .highlight { color: var(--color-accent); }
.hero p {
  font-size: 1.15rem;
  opacity: 0.85;
  margin-bottom: 40px;
  max-width: 560px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-text);
  box-shadow: 0 4px 20px rgba(201, 169, 110, 0.35);
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(201, 169, 110, 0.45);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}
.btn-dark {
  background: var(--color-primary);
  color: #fff;
}
.btn-dark:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
}
.btn-lg { padding: 18px 40px; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* ---------- 双入口大按钮（首页核心） ---------- */
.dual-entry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: -60px;
  position: relative;
  z-index: 2;
}
.entry-card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: var(--transition);
  border-top: 4px solid var(--color-accent);
  position: relative;
  overflow: hidden;
}
.entry-card:nth-child(2) { border-top-color: var(--color-primary); }
.entry-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 48px rgba(44, 38, 32, 0.18);
}
.entry-card .entry-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}
.entry-card:nth-child(1) .entry-icon { background: rgba(201, 169, 110, 0.15); color: var(--color-accent-dark); }
.entry-card:nth-child(2) .entry-icon { background: rgba(45, 74, 62, 0.1); color: var(--color-primary); }
.entry-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  font-family: var(--font-serif);
}
.entry-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 20px;
}
.entry-card .entry-link {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
body[dir="rtl"] .entry-card .entry-link { transform: scaleX(-1); }

/* ---------- 服务卡片网格 ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid transparent;
}
.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border);
  transform: translateY(-4px);
}
.service-card .svc-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(201, 169, 110, 0.12);
  color: var(--color-accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
}
.service-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-primary);
}
.service-card p {
  color: var(--color-text-light);
  font-size: 0.92rem;
}

/* ---------- 为何选择我们 ---------- */
.why-us {
  background: var(--color-bg-alt);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.why-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.why-item .check-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-success);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}
.why-item h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--color-primary);
}
.why-item p {
  font-size: 0.88rem;
  color: var(--color-text-light);
  margin: 0;
}

/* ---------- 成交案例 ---------- */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.case-card {
  background: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.case-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.case-img {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 3rem;
  position: relative;
}
.case-img .case-tag {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--color-accent);
  color: var(--color-text);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}
body[dir="rtl"] .case-img .case-tag { left: auto; right: 12px; }
.case-body { padding: 24px; }
.case-body h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-primary);
}
.case-meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.case-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-accent-dark);
}

/* ---------- 客户评价 ---------- */
.testimonials {
  background: var(--color-primary);
  color: #fff;
}
.testimonials .section-title { color: #fff; }
.testimonials .section-subtitle { color: rgba(255,255,255,0.7); }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.testimonial-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(8px);
}
.testimonial-card .stars {
  color: var(--color-accent);
  font-size: 1rem;
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.testimonial-card p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 24px;
  opacity: 0.9;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.author-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-text);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}
.author-info h6 { font-size: 0.95rem; font-weight: 700; }
.author-info span { font-size: 0.8rem; opacity: 0.6; }

/* ---------- CTA 横幅 ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  padding: 60px 0;
  text-align: center;
}
.cta-banner h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 12px;
  font-family: var(--font-serif);
}
.cta-banner p {
  color: rgba(44, 38, 32, 0.75);
  margin-bottom: 28px;
  font-size: 1.05rem;
}
.cta-banner .btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.cta-banner .btn-primary:hover { background: #1e3329; }

/* ---------- 表单页 ---------- */
.form-page {
  padding: 60px 0 80px;
  min-height: calc(100vh - 200px);
}
.form-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 48px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.progress-step .step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-text-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
}
.progress-step.active .step-num {
  background: var(--color-primary);
  color: #fff;
}
.progress-step.done .step-num {
  background: var(--color-success);
  color: #fff;
}
.progress-step .step-label {
  font-size: 0.82rem;
  color: var(--color-text-light);
  font-weight: 500;
}
.progress-step.active .step-label { color: var(--color-primary); font-weight: 700; }
.progress-line {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  margin: 0 8px;
  margin-bottom: 24px;
}
.progress-line.done { background: var(--color-success); }

.form-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-md);
}
.form-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
  font-family: var(--font-serif);
}
.form-card .form-desc {
  color: var(--color-text-light);
  margin-bottom: 32px;
  font-size: 0.95rem;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--color-text);
}
.form-group label .required { color: var(--color-danger); }
.form-control, .form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(45, 74, 62, 0.1);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* 单选按钮组 */
.radio-group {
  display: flex;
  gap: 12px;
}
.radio-option {
  flex: 1;
  position: relative;
}
.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}
.radio-option label {
  display: block;
  padding: 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
  background: var(--color-bg);
  margin: 0;
}
.radio-option input[type="radio"]:checked + label {
  border-color: var(--color-primary);
  background: rgba(45, 74, 62, 0.06);
  color: var(--color-primary);
}

/* 文件上传 */
.upload-area {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--color-bg);
}
.upload-area:hover {
  border-color: var(--color-primary);
  background: rgba(45, 74, 62, 0.03);
}
.upload-area .upload-icon {
  font-size: 2rem;
  color: var(--color-text-light);
  margin-bottom: 8px;
}
.upload-area p {
  color: var(--color-text-light);
  font-size: 0.9rem;
}
.upload-area .upload-hint {
  font-size: 0.8rem;
  color: var(--color-text-light);
  opacity: 0.7;
  margin-top: 4px;
}
.upload-preview {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.upload-preview .preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-bg-alt);
}
.upload-preview .preview-item img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.upload-preview .preview-item .remove-btn {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}
body[dir="rtl"] .upload-preview .preview-item .remove-btn { right: auto; left: 4px; }

.form-note {
  background: rgba(201, 169, 110, 0.1);
  border-left: 3px solid var(--color-accent);
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--color-text-light);
  margin-bottom: 24px;
}
body[dir="rtl"] .form-note { border-left: none; border-right: 3px solid var(--color-accent); }

/* 成功页 */
.success-page {
  text-align: center;
  padding: 80px 0;
}
.success-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--color-success);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 24px;
}
.success-page h2 {
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-bottom: 12px;
  font-family: var(--font-serif);
}
.success-page p {
  color: var(--color-text-light);
  max-width: 480px;
  margin: 0 auto 32px;
}

/* ---------- 房源列表页 ---------- */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.listing-card {
  background: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.listing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.listing-img {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #3d6354, #2d4a3e);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.25);
  font-size: 2.5rem;
  position: relative;
}
.listing-img .badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-sale { background: var(--color-accent); color: var(--color-text); }
.badge-rent { background: var(--color-primary); color: #fff; }
body[dir="rtl"] .listing-img .badge { left: auto; right: 12px; }
.listing-body { padding: 24px; }
.listing-body h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-primary);
}
.listing-location {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.listing-features {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
.listing-features span { display: flex; align-items: center; gap: 4px; }
.listing-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-accent-dark);
}

/* ---------- 联系页 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-info-card {
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
}
.contact-info-card h3 {
  font-size: 1.4rem;
  margin-bottom: 24px;
  font-family: var(--font-serif);
}
.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}
.contact-item .ci-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.contact-item h6 { font-size: 0.95rem; margin-bottom: 2px; }
.contact-item p { font-size: 0.9rem; opacity: 0.8; margin: 0; }
.contact-item a { color: var(--color-accent); text-decoration: none; }
.map-placeholder {
  width: 100%;
  height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  margin-top: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  opacity: 0.6;
  border: 1px dashed rgba(255,255,255,0.2);
}

/* ---------- 后台管理 ---------- */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  background: var(--color-primary);
  color: #fff;
  padding: 32px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.admin-sidebar h2 {
  font-size: 1.2rem;
  margin-bottom: 32px;
  padding: 0 12px;
  font-family: var(--font-serif);
}
.admin-nav { list-style: none; }
.admin-nav li {
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 4px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-nav li:hover { background: rgba(255,255,255,0.08); }
.admin-nav li.active { background: rgba(201, 169, 110, 0.2); color: var(--color-accent); }
.admin-main {
  padding: 32px 40px;
  background: var(--color-bg);
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.admin-header h1 {
  font-size: 1.6rem;
  color: var(--color-primary);
  font-family: var(--font-serif);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 8px;
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
}
.stat-card .stat-value.accent { color: var(--color-accent-dark); }

/* 筛选栏 */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar .form-select {
  width: auto;
  min-width: 160px;
  padding: 8px 14px;
  font-size: 0.88rem;
}
.search-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.88rem;
  background: var(--color-card);
  font-family: inherit;
}

/* 线索表格 */
.leads-table {
  width: 100%;
  background: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border-collapse: collapse;
}
.leads-table th {
  background: var(--color-bg-alt);
  padding: 14px 16px;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
body[dir="rtl"] .leads-table th { text-align: right; }
.leads-table td {
  padding: 16px;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
}
.leads-table tr:hover { background: rgba(45, 74, 62, 0.02); }
.lead-name { font-weight: 600; color: var(--color-primary); }
.lead-contact { font-size: 0.82rem; color: var(--color-text-light); }

/* 状态标签 */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
}
.status-badge::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
}
.status-new { background: rgba(74, 124, 89, 0.12); color: var(--color-success); }
.status-new::before { background: var(--color-success); }
.status-contacted { background: rgba(212, 168, 67, 0.12); color: #a8820e; }
.status-contacted::before { background: var(--color-warning); }
.status-viewed { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.status-viewed::before { background: #3b82f6; }
.status-exclusive { background: rgba(147, 51, 234, 0.12); color: #7c3aed; }
.status-exclusive::before { background: #9333ea; }
.status-normal { background: rgba(249, 115, 22, 0.12); color: #ea580c; }
.status-normal::before { background: #f97316; }
.status-invalid { background: rgba(107, 102, 96, 0.12); color: var(--color-text-light); }
.status-invalid::before { background: var(--color-text-light); }

/* 房东类型标签 */
.type-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(201, 169, 110, 0.15);
  color: var(--color-accent-dark);
  margin: 2px;
}

/* 操作按钮 */
.action-btn {
  background: none;
  border: 1px solid var(--color-border);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
  color: var(--color-text-light);
  transition: var(--transition);
  margin: 2px;
}
.action-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.action-btn.danger:hover {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

/* 详情弹窗 */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 36px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.modal-header h3 {
  font-size: 1.3rem;
  color: var(--color-primary);
  font-family: var(--font-serif);
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-light);
}
.detail-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}
.detail-row .detail-label {
  width: 140px;
  color: var(--color-text-light);
  font-weight: 500;
  flex-shrink: 0;
}
.detail-row .detail-value {
  color: var(--color-text);
  font-weight: 600;
}
.detail-photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.detail-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

/* 标签选择器 */
.tag-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.tag-chip {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.tag-chip.selected {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ---------- 页脚 ---------- */
.footer {
  background: #1e2a24;
  color: rgba(255,255,255,0.7);
  padding: 60px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand h4 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 16px;
  font-family: var(--font-serif);
}
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 16px;
}
.footer-col h5 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 16px;
  font-weight: 700;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--transition);
}
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .services-grid, .why-grid, .cases-grid, .testimonial-grid, .listing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dual-entry { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; height: auto; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .section { padding: 56px 0; }
  .section-title { font-size: 1.6rem; }
  .menu-toggle { display: block; }
  .navbar-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
  }
  .navbar-nav.show { display: flex; }
  .services-grid, .why-grid, .cases-grid, .testimonial-grid, .listing-grid {
    grid-template-columns: 1fr;
  }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-card { padding: 32px 24px; }
  .upload-preview { grid-template-columns: repeat(3, 1fr); }
  .leads-table { font-size: 0.82rem; }
  .leads-table th, .leads-table td { padding: 10px 8px; }
}
