/* ============================================
   个人工作台 - 简约清新绿色主题
   ============================================ */

:root {
  /* 主色 - 清新绿 */
  --primary: #4CAF7C;          /* 主绿 */
  --primary-light: #6FC79A;    /* 浅绿 */
  --primary-soft: #E8F5EE;     /* 极浅绿 */
  --primary-deep: #3A8E63;     /* 深绿 */

  /* 辅色 */
  --accent: #A8D8B9;           /* 薄荷绿 */
  --warm: #F5C56A;             /* 暖黄（提醒/待办） */
  --warm-soft: #FFF4DC;
  --info: #5BA3D0;             /* 蓝（信息） */
  --info-soft: #E5F1F9;
  --danger: #E87A7A;           /* 红（紧急） */
  --danger-soft: #FCE7E7;
  --success: #4CAF7C;

  /* 中性色 */
  --bg: #F7FAF7;               /* 整体背景 */
  --surface: #FFFFFF;          /* 卡片背景 */
  --border: #E5EAE5;           /* 边框 */
  --text: #2C3A2C;             /* 主文字 */
  --text-secondary: #6B7868;   /* 次文字 */
  --text-muted: #9AA59A;       /* 辅助文字 */
  --sidebar-bg: #FAFCFA;
  --sidebar-active: #E8F5EE;
  --hover: #F0F5F0;

  /* 圆角与阴影 */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(60, 100, 70, 0.05);
  --shadow: 0 2px 8px rgba(60, 100, 70, 0.08);
  --shadow-lg: 0 8px 24px rgba(60, 100, 70, 0.12);

  /* 尺寸 */
  --sidebar-w: 240px;
  --header-h: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body { overflow: hidden; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--primary-deep); text-decoration: none; }

/* ============================================
   整体布局
   ============================================ */
.app {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* ============================================
   侧边栏
   ============================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.25s ease;
  z-index: 100;
}

.sidebar-header {
  padding: 18px 20px 14px;
  border-bottom: 1px dashed var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-deep);
}
.brand-icon {
  width: 28px; height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
}
.nav-group {
  margin-bottom: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13.5px;
  position: relative;
}
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--primary-deep);
  font-weight: 500;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto;
  background: var(--warm);
  color: #fff;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 500;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sync-status { display: flex; align-items: center; gap: 4px; }
.sync-dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
}

/* ============================================
   主内容区
   ============================================ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.topbar {
  height: var(--header-h);
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.page-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-title-icon { font-size: 18px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }

.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

/* ============================================
   通用组件
   ============================================ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}
.card + .card { margin-top: 16px; }
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-title-extra { font-size: 12px; color: var(--text-muted); font-weight: 400; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-deep); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-soft {
  background: var(--primary-soft);
  color: var(--primary-deep);
}
.btn-soft:hover { background: #D7EBE0; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #F8D4D4; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-icon {
  width: 32px; height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.input, .textarea, .select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: all 0.15s;
  outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.label {
  display: block;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-row { margin-bottom: 14px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 640px) {
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  font-size: 11.5px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 500;
}
.tag-warm { background: var(--warm-soft); color: #B68930; }
.tag-info { background: var(--info-soft); color: #2E6E94; }
.tag-danger { background: var(--danger-soft); color: #B85450; }
.tag-muted { background: #EEF0EE; color: var(--text-secondary); }
.tag-removable { padding-right: 4px; }
.tag-remove {
  cursor: pointer;
  opacity: 0.6;
  font-size: 12px;
  line-height: 1;
}
.tag-remove:hover { opacity: 1; }

.badge {
  display: inline-block;
  padding: 1px 7px;
  font-size: 11px;
  border-radius: 8px;
  font-weight: 500;
}
.badge-A { background: #E8F5EE; color: var(--primary-deep); }
.badge-B { background: var(--info-soft); color: #2E6E94; }
.badge-C { background: var(--warm-soft); color: #B68930; }
.badge-D { background: #EEF0EE; color: var(--text-secondary); }

/* 表格 */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.table th {
  background: #FAFCFA;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 12px;
}
.table tr { transition: background 0.1s; cursor: pointer; }
.table tbody tr:hover { background: var(--hover); }
.table tr:last-child td { border-bottom: none; }

/* 列表 */
.list-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border);
}
.list-item:hover { background: var(--hover); }
.list-item:last-child { border-bottom: none; }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.list-item-main { flex: 1; min-width: 0; }
.list-item-title {
  font-weight: 500;
  font-size: 13.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.list-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.list-item-extra { color: var(--text-muted); font-size: 12px; text-align: right; }

/* 空状态 */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.6; }
.empty-text { font-size: 13px; }
.empty-action { margin-top: 16px; }

/* 工具栏 */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar-left, .toolbar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search-box {
  position: relative;
}
.search-box .input { padding-left: 32px; min-width: 220px; }
.search-box::before {
  content: "🔍";
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.6;
}

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(40, 60, 45, 0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-lg { max-width: 820px; }
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.modal-title { font-size: 15px; font-weight: 600; }
.modal-close {
  font-size: 20px;
  color: var(--text-muted);
  width: 28px; height: 28px;
  border-radius: 6px;
}
.modal-close:hover { background: var(--hover); color: var(--text); }
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 70px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.2s ease;
}
.toast.success { background: var(--primary-deep); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--info); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D8E2DA; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #B5C5B8; }

/* ============================================
   首页仪表盘
   ============================================ */
.dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 900px) { .dashboard { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 3px;
  background: var(--primary);
}
.stat-card.warn::before { background: var(--warm); }
.stat-card.info::before { background: var(--info); }
.stat-card.danger::before { background: var(--danger); }
.stat-label { font-size: 12px; color: var(--text-muted); }
.stat-value { font-size: 24px; font-weight: 600; color: var(--text); margin-top: 4px; }
.stat-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

.dashboard-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) { .dashboard-row { grid-template-columns: 1fr; } }

.todo-list .todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.todo-list .todo-item:last-child { border-bottom: none; }
.todo-check {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.todo-check.done {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.todo-content { flex: 1; font-size: 13px; }
.todo-content.done { color: var(--text-muted); text-decoration: line-through; }
.todo-time { font-size: 11.5px; color: var(--text-muted); }
.todo-priority {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.todo-priority.high { background: var(--danger); }
.todo-priority.mid { background: var(--warm); }
.todo-priority.low { background: var(--info); }

/* ============================================
   客户详情
   ============================================ */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }
.detail-section { margin-bottom: 18px; }
.detail-section:last-child { margin-bottom: 0; }
.detail-section-title {
  font-size: 12.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  font-weight: 600;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
}
@media (max-width: 640px) { .info-grid { grid-template-columns: 1fr; } }
.info-item { font-size: 13px; }
.info-label { color: var(--text-muted); font-size: 11.5px; margin-bottom: 2px; }
.info-value { color: var(--text); }

.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 14px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -20px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--primary);
}
.timeline-time { font-size: 11.5px; color: var(--text-muted); }
.timeline-content { font-size: 13px; margin-top: 3px; line-height: 1.6; }
.timeline-meta { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }

.match-card {
  background: linear-gradient(135deg, var(--primary-soft), #fff);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.match-score {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.match-score.mid { background: var(--warm); }
.match-score.low { background: var(--text-muted); }
.match-info { flex: 1; min-width: 0; }
.match-title { font-size: 13px; font-weight: 600; }
.match-meta { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; }

/* ============================================
   回复库
   ============================================ */
.reply-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.reply-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: all 0.15s;
  cursor: pointer;
  position: relative;
}
.reply-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.reply-category {
  font-size: 11px;
  color: var(--primary-deep);
  font-weight: 500;
  margin-bottom: 6px;
}
.reply-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.reply-content {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  max-height: 60px;
}
.reply-footer {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
}

.reply-categories {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.cat-pill {
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.cat-pill:hover { background: var(--hover); }
.cat-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================
   小红书生成器
   ============================================ */
.xhs-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) { .xhs-layout { grid-template-columns: 1fr; } }

.xhs-preview {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px;
  min-height: 400px;
}
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.preview-tabs { display: flex; gap: 4px; }
.preview-tab {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-secondary);
}
.preview-tab.active { background: var(--primary-soft); color: var(--primary-deep); }

.xhs-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.xhs-cover {
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--primary-soft), #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px;
  text-align: center;
  color: var(--primary-deep);
}
.xhs-cover-title { font-size: 18px; font-weight: 700; line-height: 1.4; }
.xhs-cover-sub { font-size: 12px; margin-top: 8px; opacity: 0.7; }
.xhs-cover-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(255,255,255,0.85);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  color: var(--primary-deep);
  font-weight: 500;
}
.xhs-body { padding: 12px; }
.xhs-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 6px;
}
.xhs-content {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.xhs-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ============================================
   数据管理
   ============================================ */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.data-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.data-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}
.data-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.data-desc { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }

/* ============================================
   手机端适配
   ============================================ */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    width: 32px; height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--text-secondary);
  }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .topbar { padding: 0 16px; }
  .content { padding: 16px; }
  .modal { max-width: 100%; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .search-box .input { min-width: 0; }
  .table th:nth-child(n+4), .table td:nth-child(n+4) { display: none; }
}

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 99;
}
.sidebar-overlay.show { display: block; }
@media (max-width: 768px) {
  .sidebar-overlay.show { display: block; }
}

/* 状态选择器 */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.tab {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary-deep); border-bottom-color: var(--primary); font-weight: 500; }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  margin-left: -8px;
}
.back-btn:hover { background: var(--hover); color: var(--text); }

/* 紧急程度颜色 */
.urgent-today { color: var(--danger); font-weight: 600; }
.urgent-soon { color: var(--warm); font-weight: 500; }
.urgent-later { color: var(--text-muted); }

/* 房源卡片 */
.property-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.property-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
}
.property-title { font-size: 14px; font-weight: 600; }
.property-meta { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.property-price {
  color: var(--danger);
  font-weight: 600;
  font-size: 16px;
  margin-top: 6px;
}
.property-tags { margin-top: 8px; display: flex; gap: 4px; flex-wrap: wrap; }

.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

/* ===========================================================
   房源图片画廊 & 缩略图
   ============================================================ */
.gallery-main {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--primary-soft);
  border: 1px solid var(--border);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery-thumb {
  width: 72px; height: 54px;
  border-radius: 6px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.7;
  transition: all 0.15s;
}
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { border-color: var(--primary); opacity: 1; }

.img-thumb-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.img-thumb {
  position: relative;
  width: 84px; height: 84px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--primary-soft);
  flex-shrink: 0;
}
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-thumb-del {
  position: absolute; top: 2px; right: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff; font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.img-thumb-del:hover { background: var(--danger); }
.img-thumb-cover {
  position: absolute; left: 0; bottom: 0; right: 0;
  background: rgba(76,175,124,0.92);
  color: #fff; font-size: 10px;
  text-align: center; padding: 1px 0;
}

/* ===========================================================
   小红书封面 & 配图
   ============================================================ */
.xhs-cover { position: relative; overflow: hidden; }
.xhs-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xhs-cover-text { position: relative; z-index: 1; }
.xhs-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(76,175,124,0.3));
}
.xhs-imgs-row { display: flex; gap: 6px; flex-wrap: wrap; }
.xhs-img-mini {
  width: 56px; height: 56px;
  border-radius: 6px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
}
.xhs-img-mini:hover { border-color: var(--primary-light); }
