/* 房产中介管理系统 - 统一样式表 */

/* 全局样式 */
:root {
  --primary-color: #0D6EFD;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --info-color: #0dcaf0;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  padding-top: 70px;
}

/* 导航栏样式 */
.navbar {
  background-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 卡片样式 */
.card {
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  border: none;
  margin-bottom: 20px;
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid rgba(0,0,0,.05);
  padding: 15px 20px;
}

/* 表格样式 */
.table th {
  border-top: none;
  color: #495057;
  font-weight: 600;
}

.table-hover tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.04);
}

/* 按钮样式 */
.btn {
  border-radius: 5px;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* 表单样式 */
.form-control {
  border-radius: 5px;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 徽章样式 */
.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
}

/* 警告框样式 */
.alert {
  border-radius: 8px;
}

/* 页脚样式 */
.footer {
  background-color: #fff;
  padding: 15px 0;
  border-top: 1px solid #eee;
}

/* 登录页样式 */
.login-container {
  max-width: 400px;
  margin: 80px auto;
}

.login-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 左侧菜单样式 */
.sidebar {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.sidebar .nav-link {
  color: #495057;
  padding: 12px 20px;
}

.sidebar .nav-link:hover {
  background-color: rgba(13, 110, 253, 0.04);
}

.sidebar .nav-link.active {
  background-color: var(--primary-color);
  color: white;
}

/* 详情页样式 */
.detail-header {
  padding-bottom: 15px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.detail-label {
  color: #6c757d;
  min-width: 100px;
  display: inline-block;
}

/* 跟进记录样式 */
.follow-item {
  padding: 12px;
  border-bottom: 1px solid #eee;
}

.follow-item:last-child {
  border-bottom: none;
}

.follow-alert {
  background-color: rgba(255, 193, 7, 0.1);
  border-left: 3px solid var(--warning-color);
  padding: 10px;
  margin-bottom: 10px;
}

/* 自适应样式 */
@media (max-width: 768px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .detail-label {
    min-width: 80px;
  }
}

/* ==============================
   PC房源详情：参考58同城/贝壳风
   作用域：.listing-detail
================================ */
.listing-detail {
  --ld-border: #eef0f3;
  --ld-text: #1f2329;
  --ld-muted: #667085;
  --ld-bg: #f7f9fb;
  --ld-card: #ffffff;
  --ld-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --ld-radius: 12px;
  --ld-accent: #ff552e; /* 58/贝壳常见橙红 */
}

.listing-detail .ld-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

@media (max-width: 1100px) {
  .listing-detail .ld-shell { grid-template-columns: 1fr; }
}

.listing-detail .ld-card {
  background: var(--ld-card);
  border: 1px solid var(--ld-border);
  border-radius: var(--ld-radius);
  box-shadow: var(--ld-shadow);
}

.listing-detail .ld-hero {
  overflow: hidden;
}

.listing-detail .ld-hero .carousel,
.listing-detail .ld-hero .carousel-inner,
.listing-detail .ld-hero .carousel-item {
  border-radius: var(--ld-radius);
}

.listing-detail .ld-hero img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  background: #f1f3f5;
}

@media (max-width: 768px) {
  .listing-detail .ld-hero img { height: 280px; }
}

.listing-detail .ld-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
  border-top: 1px solid var(--ld-border);
}

.listing-detail .ld-thumb {
  width: 76px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  flex: 0 0 auto;
  cursor: pointer;
}

.listing-detail .ld-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.listing-detail .ld-thumb.active { border-color: var(--ld-accent); }

.listing-detail .ld-right-sticky {
  position: sticky;
  top: 86px;
}

@media (max-width: 1100px) {
  .listing-detail .ld-right-sticky { position: static; }
}

.listing-detail .ld-price {
  padding: 14px 16px;
}

.listing-detail .ld-price .ld-title {
  font-weight: 700;
  font-size: 18px;
  color: var(--ld-text);
  line-height: 1.3;
}

.listing-detail .ld-price .ld-sub {
  margin-top: 8px;
  color: var(--ld-muted);
  font-size: 13px;
}

.listing-detail .ld-price .ld-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 12px;
}

.listing-detail .ld-price .ld-price-val {
  font-size: 38px;
  font-weight: 800;
  color: var(--ld-accent);
  letter-spacing: -0.5px;
}

.listing-detail .ld-price .ld-price-unit {
  font-size: 14px;
  color: var(--ld-muted);
}

.listing-detail .ld-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.listing-detail .ld-kpi {
  border-top: 1px dashed var(--ld-border);
  padding-top: 10px;
}

.listing-detail .ld-kpi .k {
  color: var(--ld-muted);
  font-size: 12px;
}

.listing-detail .ld-kpi .v {
  color: var(--ld-text);
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}

.listing-detail .ld-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.listing-detail .ld-section {
  padding: 12px 14px;
}

.listing-detail .ld-section + .ld-section {
  border-top: 1px solid var(--ld-border);
}

.listing-detail .ld-section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ld-text);
  margin-bottom: 10px;
}

.listing-detail .ld-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 992px) {
  .listing-detail .ld-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 576px) {
  .listing-detail .ld-grid { grid-template-columns: 1fr; }
}

.listing-detail .ld-field {
  background: #fbfcfe;
  border: 1px solid var(--ld-border);
  border-radius: 10px;
  padding: 8px 10px;
}

.listing-detail .ld-field .k {
  color: var(--ld-muted);
  font-size: 12px;
}

.listing-detail .ld-field .v {
  color: var(--ld-text);
  font-size: 13px;
  font-weight: 600;
  margin-top: 3px;
  word-break: break-word;
}

.listing-detail .ld-reco {
  margin-top: 12px;
}

.listing-detail .ld-reco-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--ld-border);
  border-radius: 10px;
  background: #fff;
}

.listing-detail .ld-reco-item + .ld-reco-item { margin-top: 10px; }

.listing-detail .ld-reco-item img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f3f5;
}

.listing-detail .ld-reco-item .t {
  font-weight: 700;
  color: var(--ld-text);
  font-size: 14px;
  line-height: 1.3;
}

.listing-detail .ld-reco-item .m {
  color: var(--ld-muted);
  font-size: 12px;
  margin-top: 4px;
}

.listing-detail .ld-reco-item .p {
  color: var(--ld-accent);
  font-weight: 800;
  margin-top: 6px;
}
