/* ========== UI UX Pro Max 设计系统 - 学途居后台 ========== */
/* 依据：SaaS Dashboard / B2B Enterprise / Trust & Authority */

@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;600;700&display=swap');

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

:root {
  --color-primary: #e74c3c;
  --color-primary-hover: #ca3f30;
  --color-primary-light: #fde9e6;
  --color-success: #059669;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --color-text: #1e293b;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-border: #e2e8f0;
  --color-bg: #f8fafc;
  --color-bg-card: #ffffff;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 登录页面 - Trust & Authority */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #1e3a5f 0%, #2563eb 50%, #3b82f6 100%);
}

.login-box {
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.05) inset;
  transition: box-shadow var(--transition-base);
}

.login-box:hover {
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.05) inset;
}

.login-box h2 {
  text-align: center;
  color: var(--color-text);
  margin-bottom: 32px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* 主布局：左侧固定，右侧可滚动 */
.main-container {
  min-height: 100vh;
}

.main-container > .el-aside {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 10;
  overflow-y: auto;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 4px 0 24px rgba(0,0,0,0.08);
}

.main-container > .el-container {
  margin-left: 220px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-container > .el-container > .el-main {
  flex: 1;
  overflow-y: auto;
}

.el-aside {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 4px 0 24px rgba(0,0,0,0.08);
}

/* 菜单 - 清晰层级与聚焦态 */
.el-menu {
  border-right: none;
  padding: 12px 8px;
}

.el-menu-item {
  height: 44px;
  line-height: 44px;
  margin: 2px 0;
  padding: 0 16px !important;
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.el-menu-item:hover {
  background-color: rgba(255,255,255,0.08) !important;
}

.el-menu-item.is-active {
  background-color: var(--color-primary) !important;
  color: #fff !important;
  font-weight: 600;
}

.el-menu-item:focus {
  outline: 2px solid rgba(255,255,255,0.4);
  outline-offset: 2px;
}

.el-menu-item i {
  margin-right: 12px;
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.el-menu-item span {
  font-size: 14px;
  font-weight: 500;
}

.logo {
  padding: 28px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo h3 {
  color: #fff;
  font-size: 20px;
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.logo span {
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  font-weight: 500;
}

.el-header {
  background: var(--color-bg-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--color-border);
  height: 64px !important;
}

.header-left span {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-dropdown-trigger {
  cursor: pointer;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.admin-dropdown-trigger:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.admin-dropdown-trigger:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.el-main {
  background: var(--color-bg);
  padding: 28px;
  overflow-x: hidden;
}

/* 页面头部 */
.page-header {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.page-header .el-button {
  margin-right: 12px;
}

.page-header .el-alert {
  flex: 1;
  margin-left: 0 !important;
}

/* SCRM 客户筛选条（参考：标签 + 输入框） */
.scrm-filter-panel {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #f9fbfd;
}

.scrm-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.scrm-filter-row-adaptive {
  align-items: flex-start;
  width: 100%;
}

.scrm-filter-row-extra {
  margin-top: 10px;
}

.scrm-filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  flex: 1 1 280px;
  max-width: 420px;
  min-width: 240px;
}

.scrm-filter-item .scrm-filter-label {
  width: 84px;
  flex: 0 0 84px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  text-align: right;
}

.scrm-filter-item .el-input,
.scrm-filter-item .el-select,
.scrm-filter-item .el-date-editor {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
}

.scrm-filter-item .el-date-editor--daterange {
  display: flex;
  align-items: center;
}

.scrm-filter-item .el-date-editor--daterange .el-range-input {
  width: auto;
  min-width: 0;
  flex: 1 1 0;
}

.scrm-filter-item .el-date-editor--daterange .el-range-separator {
  width: 28px;
  min-width: 28px;
  flex: 0 0 28px;
  padding: 0;
  color: #475569;
  font-weight: 500;
  text-align: center;
}

.scrm-filter-item .el-input__inner {
  background: #f2f4f7;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  color: #334155;
}

.scrm-filter-item .el-input__inner::placeholder {
  color: #a0aec0;
}

.scrm-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  margin-left: auto;
  flex: 0 0 auto;
}

.scrm-filter-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  white-space: nowrap;
  flex: 0 0 auto;
}

.scrm-filter-inline-actions .el-button,
.scrm-filter-actions .el-button {
  margin-right: 0;
}

.scrm-filter-inline-actions + .scrm-filter-actions {
  margin-left: 8px;
}

.scrm-step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.scrm-pagination-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.scrm-opportunity-meta {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.scrm-opportunity-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.scrm-opportunity-meta-item span {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.scrm-opportunity-meta-item strong {
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scrm-opportunity-tabs {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.scrm-opportunity-tab {
  border: none;
  background: none;
  padding: 2px 0 8px;
  font-size: 14px;
  color: #64748b;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.scrm-opportunity-tab.is-active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  font-weight: 600;
}

.scrm-opportunity-log-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scrm-opportunity-logs-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: flex-start;
}

.scrm-opportunity-log-side {
  min-width: 0;
}

.scrm-opportunity-log-side-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #f8fbff;
  padding: 12px;
}

.scrm-opportunity-log-side-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  min-width: 0;
}

.scrm-opportunity-log-side-item:last-child {
  margin-bottom: 0;
}

.scrm-opportunity-log-side-item span {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.scrm-opportunity-log-side-item strong {
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scrm-opportunity-log-item {
  border: 1px solid #e6edf5;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fbff;
}

.scrm-opportunity-log-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.scrm-opportunity-log-head strong {
  color: #0f172a;
}

.scrm-opportunity-log-head span {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.scrm-opportunity-log-line {
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .scrm-opportunity-meta {
    grid-template-columns: 1fr 1fr;
  }

  .scrm-opportunity-logs-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .scrm-opportunity-meta {
    grid-template-columns: 1fr;
  }
  .scrm-opportunity-tabs {
    gap: 14px;
  }
}

/* SCRM 客户列表操作：单行胶囊按钮 */
.scrm-op-btn-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
}

.scrm-op-btn-row .el-button + .el-button {
  margin-left: 0 !important;
}

.scrm-op-btn {
  min-width: 78px;
  padding: 6px 12px !important;
  font-weight: 600;
  color: #ffffff !important;
  border-width: 0 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.scrm-op-btn:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.scrm-op-btn.el-button--primary,
.scrm-op-btn.el-button--primary.is-plain {
  background: #e86b66 !important;
  border-color: #e86b66 !important;
  color: #ffffff !important;
}

.scrm-op-btn.scrm-op-btn-view {
  background: #63c59a !important;
  border-color: #63c59a !important;
  color: #ffffff !important;
}

.scrm-op-btn.scrm-op-btn-claim {
  background: #63c59a !important;
  border-color: #63c59a !important;
  color: #ffffff !important;
}

.scrm-op-btn.scrm-op-btn-pay {
  background: #6aa6f8 !important;
  border-color: #6aa6f8 !important;
  color: #ffffff !important;
}

.scrm-op-btn.scrm-op-btn-danger {
  background: #98a2b3 !important;
  border-color: #98a2b3 !important;
  color: #ffffff !important;
}

.scrm-order-btn-row .scrm-op-btn {
  min-width: 64px;
  padding: 6px 10px !important;
}

/* 卡片标题行：标题与右侧按钮同一行 */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.card-header-row span {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

/* 统计卡片 - 微交互动效 */
.stat-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: 1px solid var(--color-border);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.stat-icon i {
  font-size: 30px;
  color: #fff;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
  line-height: 1.2;
}

.stat-label {
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* 页面头部已在上方统一定义 */

/* 二维码 */
.qrcode-content {
  text-align: center;
  padding: 12px;
}

.qrcode-content img {
  display: block;
  margin: 0 auto 16px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
}

.qrcode-content img:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: scale(1.02);
}

.qrcode-content .el-button {
  margin: 4px;
}

.qrcode-content .el-button + .el-button {
  margin-left: 8px;
}

/* 表格 - 清晰层级与悬停反馈 */
.el-table {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.el-table th {
  background-color: #f8fafc !important;
  color: var(--color-text) !important;
  font-weight: 600;
  font-size: 13px;
}

.el-table td {
  padding: 16px 0;
}

.el-table .cell {
  padding: 0 16px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.el-table tbody tr:hover > td {
  background-color: #f8fafc !important;
}

/* 表格空状态 - 引导操作 */
.el-table__empty-block {
  padding: 80px 24px;
}

.el-table__empty-text {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* 标签管理 */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: #f5f5f5;
  border-radius: 4px;
}

.tag-icon-preview {
  width: 24px;
  height: 24px;
}

.geo-name-tip {
  margin-top: 6px;
  font-size: 12px;
  color: #909399;
}

/* 图标库 */
.icon-library {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 8px;
}

.icon-preview {
  width: 40px;
  height: 40px;
  margin-bottom: 5px;
}

/* 图标选择器 */
.icon-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.icon-option {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-option:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.icon-option.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

/* 轮播图管理 - 卡片式布局 */
.banner-management {
  padding: 0;
}

.banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.banner-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
}

.banner-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.banner-preview {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 比例 */
  background: #f5f5f5;
  overflow: hidden;
}

.banner-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  background: #fafafa;
}

.banner-placeholder i {
  font-size: 48px;
  margin-bottom: 10px;
  color: #ddd;
}

.banner-placeholder span {
  font-size: 14px;
  color: #bbb;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.banner-card:hover .banner-overlay {
  opacity: 1;
}

.banner-sort-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  backdrop-filter: blur(4px);
}

.banner-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(37, 99, 235, 0.9);
  color: #fff;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 14px;
  backdrop-filter: blur(4px);
}

.banner-type-badge i {
  font-size: 16px;
}

.banner-empty {
  text-align: center;
  padding: 80px 20px;
  background: #fff;
  border-radius: 12px;
  margin-top: 20px;
}

.banner-empty i {
  font-size: 64px;
  color: #ddd;
  margin-bottom: 20px;
  display: block;
}

.banner-empty p {
  color: #999;
  font-size: 16px;
  margin-bottom: 20px;
}

/* 上传区域样式 */
.upload-area {
  width: 100%;
  min-height: 300px;
  border: 2px dashed #d9d9d9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.upload-area:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.upload-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 400px;
}

.upload-placeholder {
  text-align: center;
  padding: 40px;
}

.upload-placeholder i {
  font-size: 48px;
  color: var(--color-primary);
  margin-bottom: 15px;
  display: block;
}

.upload-placeholder p {
  color: #666;
  font-size: 14px;
  margin: 5px 0;
}

.upload-hint {
  color: #999 !important;
  font-size: 12px !important;
}

/* 轮播图弹窗 - 确保可见且可点击 */
.banner-dialog {
  max-width: 95vw !important;
}

/* Element UI 将 custom-class 加在 wrapper 上，.el-dialog 为子元素 */
.banner-dialog .el-dialog {
  margin: auto !important;
  display: flex;
  flex-direction: column;
  width: 480px !important;
  min-width: 360px !important;
  max-width: 90vw !important;
  min-height: 320px !important;
  background: #fff !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

.banner-dialog .el-dialog__header {
  flex-shrink: 0;
  padding: 20px 20px 10px;
}

.banner-dialog .el-dialog__body {
  padding: 20px;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.banner-dialog .el-tabs {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.banner-dialog .el-tabs__content {
  flex: 1;
  overflow: hidden;
  display: flex;
}

.banner-dialog .el-tab-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 轮播图预览和裁剪 */
.banner-preview-container {
  text-align: center;
  padding: 10px;
  background: #fafafa;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
}

.banner-preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.banner-preview-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.banner-crop-container {
  padding: 10px;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

/* 房源弹窗 - 确保可见 */
.house-dialog .el-dialog {
  max-width: 95vw !important;
  background: #fff !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

.crop-wrapper {
  width: 100%;
  height: 100%;
  margin: 0 auto 10px;
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex: 1;
  min-height: 0;
}

.crop-wrapper img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 增强裁剪框可见性 */
.crop-wrapper .cropper-view-box,
.crop-wrapper .cropper-face {
  border: 3px solid var(--color-primary) !important;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5) !important;
}

.crop-wrapper .cropper-line {
  background-color: var(--color-primary) !important;
  opacity: 1 !important;
}

.crop-wrapper .cropper-point {
  background-color: var(--color-primary) !important;
  width: 12px !important;
  height: 12px !important;
  opacity: 1 !important;
  border: 2px solid #fff !important;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5) !important;
}

.crop-actions {
  text-align: center;
  padding: 10px 0;
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 10;
}

.crop-actions .el-button {
  margin: 0 10px;
}

/* 房源图片列表 */
.house-images-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
  background: #fafafa;
  border-radius: 8px;
}

.house-image-item {
  position: relative;
  width: 75px;
  height: 75px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e0e0e0;
  background: #fff;
  cursor: pointer;
}

.house-image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.house-image-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 8px;
  display: flex;
  justify-content: center;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.3s;
}

.house-image-item:hover .house-image-actions {
  opacity: 1;
}

.house-image-item.drag-over {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.house-image-actions .el-button {
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
}

.house-image-actions .el-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 仅保留中间红色删除按钮 */
.house-image-actions .btn-delete-only {
  color: #F56C6C !important;
  font-weight: 500;
}
.house-image-actions .btn-delete-only:hover {
  color: #ff8787 !important;
  background: rgba(245, 108, 108, 0.2) !important;
}

/* 户型图片列表：优化显示 */
.house-images-list--room {
  gap: 12px;
  padding: 12px;
  min-height: 80px;
  max-height: 320px;
}
.house-image-item--room {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}
.house-image-item--room .house-image-preview {
  object-fit: cover;
}
.house-image-item--room:first-child::after {
  content: '封面';
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 6px;
  font-size: 11px;
  color: #fff;
  background: var(--color-primary);
  border-radius: 4px;
  pointer-events: none;
}

/* 房源视频列表 */
.house-videos-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px;
  background: #f5f7fa;
  border-radius: 8px;
  min-height: 48px;
}

.house-video-item {
  display: flex;
  flex-direction: column;
  width: 200px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
  color: #606266;
}

.house-video-preview {
  width: 200px;
  height: 112px;
  object-fit: contain;
  background: #000;
  display: block;
}

.house-video-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  gap: 8px;
  flex-wrap: wrap;
}

.house-video-item .house-video-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.house-video-item .house-video-delete {
  padding: 0 4px;
  color: #f56c6c;
  flex-shrink: 0;
}

.house-video-poster-preview {
  width: 200px;
  height: 112px;
  object-fit: cover;
  display: block;
  margin-top: 4px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

/* 房源列表操作栏：置顶开关 + 编辑 + 删除，独立不重叠 */
.house-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}
.house-actions .house-actions-label {
  font-size: 13px;
  color: #606266;
  margin-right: 4px;
  font-weight: 500;
}
.house-actions .el-switch {
  flex-shrink: 0;
}
.house-actions .el-button {
  flex-shrink: 0;
  padding: 7px 15px;
  font-size: 12px;
}

/* 卡片 - 层级与留白 */
.el-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  margin-bottom: 24px;
  transition: box-shadow var(--transition-base);
}

.el-card:hover {
  box-shadow: var(--shadow-lg);
}

.el-card__header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
  background-color: #fafbfc;
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
}

.el-card__header .card-header-row {
  width: 100%;
}

.el-card__body {
  padding: 24px;
}

/* 按钮 - 明确聚焦态与加载态 */
.el-button {
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all var(--transition-base);
}

.el-button:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.el-button--primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.el-button--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.el-button--primary:active {
  transform: translateY(0);
}

.el-button--danger {
  background: var(--color-danger);
  border-color: var(--color-danger);
}

.el-button--danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

/* 输入框 - 聚焦环与对比度 */
.el-input__inner {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.el-input__inner:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* 统一选择器样式 */
.el-select .el-input__inner {
  border-radius: 6px;
}

/* 统一标签样式 */
.el-tag {
  border-radius: 4px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
}

/* 统一分页样式 */
.el-pagination {
  margin-top: 20px;
  text-align: right;
}

.el-pagination .el-pagination__total {
  font-weight: 500;
  color: #606266;
}

/* 对话框 */
.el-dialog {
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
}

.el-dialog__header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--color-border);
  background-color: #fafbfc;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.el-dialog__title {
  font-weight: 600;
  font-size: 17px;
  color: var(--color-text);
}

.el-dialog__body {
  padding: 28px;
  line-height: 1.6;
}

.el-dialog__footer {
  padding: 20px 28px;
  border-top: 1px solid var(--color-border);
  background-color: #fafbfc;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* 申请详情弹窗 - 信息总览布局 */
.application-detail-dialog .el-dialog {
  max-width: 760px;
}

.application-detail-dialog .el-dialog__body {
  background: #f9fafb;
}

.detail-section {
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px 12px;
  margin-bottom: 14px;
}

.detail-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 10px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-column-gap: 12px;
  grid-row-gap: 6px;
}

.detail-item {
  font-size: 13px;
  color: var(--color-text-secondary);
  display: flex;
}

.detail-item.full-width {
  grid-column: 1 / 4;
}

.detail-label {
  flex-shrink: 0;
  min-width: 86px;
  color: var(--color-text-muted);
}

.detail-value {
  flex: 1;
  color: var(--color-text);
  word-break: break-all;
}

.detail-attachments {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.detail-attach-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}

.detail-attach-row .detail-label {
  min-width: 110px;
  flex-shrink: 0;
}

.detail-attach-row .detail-value {
  color: var(--color-text-muted);
}

.detail-attachments .detail-label {
  min-width: 92px;
}

.detail-image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 2px;
}

.detail-image-list .detail-image,
.detail-image-list .el-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  object-fit: cover;
}

.detail-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-links a {
  font-size: 12px;
  color: var(--color-primary);
  text-decoration: none;
  background: var(--color-primary-light);
  padding: 2px 8px;
  border-radius: 999px;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.detail-links a:hover {
  background: var(--color-primary-hover);
  color: #ffffff;
}

/* 申请详情弹窗 - UI UX PRO MAX 分区与排版 */
.application-detail-dialog .el-dialog__body {
  padding: 24px 28px;
  max-height: 70vh;
  overflow-y: auto;
}
.detail-section {
  margin-bottom: 24px;
}
.detail-section:last-child {
  margin-bottom: 0;
}
.detail-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  letter-spacing: -0.01em;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 24px;
}
.detail-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
.detail-item.full-width {
  grid-column: 1 / -1;
}
.detail-label {
  font-size: 13px;
  color: var(--color-text-secondary);
  flex-shrink: 0;
  min-width: 88px;
}
.detail-value {
  font-size: 13px;
  color: var(--color-text);
  word-break: break-word;
}
.detail-attachments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-attachments .detail-label {
  margin-bottom: 2px;
}
.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-links a {
  font-size: 13px;
  color: var(--color-primary);
  text-decoration: none;
}
.detail-links a:hover {
  text-decoration: underline;
}

/* 表单 - 标签与错误位置 */
.el-form-item {
  margin-bottom: 22px;
}

.el-form-item__label {
  font-weight: 500;
  color: var(--color-text-secondary);
  padding-bottom: 8px;
}

.el-form-item__content {
  line-height: 1.6;
}

.el-form-item.is-error .el-input__inner {
  border-color: var(--color-danger);
}

.el-form-item__error {
  color: var(--color-danger);
  font-size: 12px;
  padding-top: 4px;
}

/* 警告/提示 */
.el-alert {
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

/* 标签页 */
.el-tabs__header {
  margin-bottom: 0;
  background: var(--color-bg-card);
  padding: 0 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  border-bottom: none;
}

.el-tabs__item {
  font-weight: 500;
  padding: 0 20px;
  height: 48px;
  line-height: 48px;
  color: var(--color-text-secondary);
}

.el-tabs__item.is-active {
  color: var(--color-primary);
  font-weight: 600;
}

.el-tabs__content {
  padding: 24px;
  background: var(--color-bg-card);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  border-top: none;
}

.el-tabs__active-bar {
  background-color: var(--color-primary);
}

.el-tabs__item:hover { color: var(--color-primary); }
.el-tabs__nav-wrap::after { background-color: var(--color-border); }

/* 空状态 - 可操作的引导 */
.empty-state {
  text-align: center;
  padding: 72px 32px;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-top: 24px;
  border: 1px dashed var(--color-border);
}

.empty-state i {
  font-size: 56px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  display: block;
  opacity: 0.6;
}

.empty-state p {
  color: var(--color-text-secondary);
  font-size: 15px;
  margin-bottom: 20px;
  font-weight: 500;
  line-height: 1.6;
}

.empty-state .el-button {
  margin-top: 12px;
}

.loading-state {
  padding: 24px;
  text-align: center;
  color: #909399;
}

/* 内容管理：顶部筛选栏 */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 0;
  margin-bottom: 12px;
  background: #fafafa;
  border-radius: 8px;
  padding-left: 16px;
  padding-right: 16px;
}

.filter-bar .filter-label {
  font-size: 14px;
  color: #606266;
  margin-right: 12px;
  flex-shrink: 0;
}

.filter-bar .el-radio-group {
  margin-right: 8px;
}

.filter-bar .el-radio-button__inner {
  padding: 8px 14px;
}

.op-disabled {
  color: #c0c4cc;
  font-size: 12px;
}

.market-detail p {
  margin-bottom: 12px;
  font-size: 14px;
}

.market-detail-desc {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 12px;
  background: #f5f5f5;
  border-radius: 8px;
  margin-bottom: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.market-detail-images {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.market-detail-img-wrap {
  display: block;
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
}

.market-detail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 优化滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 统一表格操作按钮样式 */
.el-table .el-button--mini {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
}

/* 统一表单布局 */
.el-form {
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 统一标签列表样式 */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  background: #fafafa;
  border-radius: 6px;
  min-height: 60px;
}

.tag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s;
}

.tag-item:hover {
  border-color: #409EFF;
  box-shadow: 0 2px 8px rgba(64, 158, 255, 0.15);
}

/* 统一图标库样式 */
.icon-library {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  background: #fafafa;
  border-radius: 6px;
  min-height: 60px;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s;
}

.icon-item:hover {
  border-color: #409EFF;
  box-shadow: 0 2px 8px rgba(64, 158, 255, 0.15);
  transform: translateY(-2px);
}

.icon-preview {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 4px;
}

/* 统一地理数据管理样式 */
.geo-management {
  padding: 0;
}

.geo-management .el-tabs {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 0;
}

.geo-management .el-button {
  margin-bottom: 12px;
}

.geo-management .el-table {
  margin-top: 12px;
}

/* 嵌套标签页样式优化 */
.el-tabs--border-card {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.el-tabs--border-card > .el-tabs__header {
  background-color: #fafafa;
  border-bottom: 1px solid #e0e0e0;
  margin: 0;
  padding: 0 20px;
}

.el-tabs--border-card > .el-tabs__content {
  padding: 20px;
  background: #fff;
}

/* 标签页切换动画 */
.el-tabs__content {
  transition: all 0.3s;
}

/* 优化标签页卡片样式 */
.el-tabs--card > .el-tabs__header {
  margin-bottom: 20px;
  background: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 0 20px;
}

.el-tabs--card > .el-tabs__header .el-tabs__item {
  border: none;
  border-bottom: 2px solid transparent;
  margin-right: 8px;
  padding: 0 24px;
  height: 48px;
  line-height: 48px;
  font-weight: 500;
  transition: all 0.3s;
}

.el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
  border-bottom-color: #409EFF;
  color: #409EFF;
  font-weight: 600;
}

.el-tabs--card > .el-tabs__header .el-tabs__item:hover {
  color: #409EFF;
}

/* 优化二维码卡片网格布局 */
.el-row {
  margin: 0 !important;
}

.el-col {
  padding: 0 10px;
  margin-bottom: 20px;
}

/* 统一操作按钮组样式 */
.el-table .el-button + .el-button {
  margin-left: 8px;
}

/* 优化表格中的图片显示 */
.el-table img {
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s;
}

.el-table img:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 10;
  position: relative;
}

/* 统一选择器下拉样式 */
.el-select-dropdown {
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.el-select-dropdown__item {
  padding: 10px 20px;
  font-size: 14px;
}

.el-select-dropdown__item:hover {
  background-color: #f5f7fa;
}

.el-select-dropdown__item.selected {
  background-color: #ecf5ff;
  color: #409EFF;
  font-weight: 600;
}

/* 统一开关样式 */
.el-switch {
  height: 24px;
}

.el-switch__core {
  width: 44px;
  height: 24px;
  border-radius: 12px;
}

.el-switch__core::after {
  width: 20px;
  height: 20px;
}

/* 统一上传组件样式 */
.el-upload {
  border-radius: 6px;
  transition: all 0.3s;
}

.el-upload:hover {
  border-color: #409EFF;
}

/* 优化卡片内按钮布局 */
.el-card .el-button {
  margin-right: 8px;
}

.el-card .el-button:last-child {
  margin-right: 0;
}

/* 统一警告提示在页面头部的样式 */
.page-header .el-alert {
  margin-bottom: 0;
  flex: 1;
}

.page-header .el-alert .el-alert__content {
  margin-left: 12px;
}

/* 优化表格边框 */
.el-table--border {
  border: 1px solid #ebeef5;
  border-radius: 8px;
  overflow: hidden;
}

.el-table--border th,
.el-table--border td {
  border-right: 1px solid #ebeef5;
}

.el-table--border::after,
.el-table--border::before {
  background-color: #ebeef5;
}

/* 优化表格斑马纹 */
.el-table--striped .el-table__body tr.el-table__row--striped td {
  background-color: #fafafa;
}

/* 统一加载状态 */
.el-loading-mask {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
}

.el-loading-spinner {
  margin-top: -25px;
}

.el-loading-spinner .circular {
  width: 50px;
  height: 50px;
}

/* 优化消息提示 */
.el-message {
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 300px;
}

.el-message--success {
  background-color: #f0f9ff;
  border-color: #67c23a;
}

.el-message--error {
  background-color: #fef0f0;
  border-color: #f56c6c;
}

.el-message--warning {
  background-color: #fdf6ec;
  border-color: #e6a23c;
}

.el-message--info {
  background-color: #f4f4f5;
  border-color: #909399;
}

/* 搜索筛选栏样式 */
.search-filter-bar {
  margin-bottom: 20px;
  padding: 16px;
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

/* 优化用户管理表格 */
.el-table--small {
  font-size: 13px;
}

.el-table--small .el-table__cell {
  padding: 12px 0;
}

/* 优化标签显示 */
.el-tag--success {
  background-color: #f0f9ff;
  border-color: #67c23a;
  color: #67c23a;
}

.el-tag--danger {
  background-color: #fef0f0;
  border-color: #f56c6c;
  color: #f56c6c;
}

.el-tag--info {
  background-color: #f4f4f5;
  border-color: #909399;
  color: #909399;
}

/* 优化分页器 */
.el-pagination {
  padding: 16px 0;
  background: #fff;
  border-radius: 8px;
  margin-top: 20px;
  padding-left: 20px;
  padding-right: 20px;
}

.el-pagination .el-pagination__total {
  font-weight: 500;
  color: #606266;
}

.el-pagination .btn-prev,
.el-pagination .btn-next,
.el-pagination .number {
  border-radius: 4px;
  margin: 0 4px;
  font-weight: 500;
}

.el-pagination .number.active {
  background: linear-gradient(135deg, #409EFF 0%, #66B1FF 100%);
  border-color: #409EFF;
  color: #fff;
}

/* 优化控制台统计卡片间距 */
.dashboard .el-row {
  margin-bottom: 0;
}

.dashboard .el-col {
  margin-bottom: 20px;
}

/* Mapbox API 免费额度进度条 */
.mapbox-usage-card {
  margin-top: 20px;
  border-radius: 10px;
}
.mapbox-usage-card .el-card__header {
  padding: 12px 20px;
  font-weight: 600;
}
.mapbox-usage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mapbox-usage-header i {
  margin-right: 6px;
  color: #409EFF;
}
.mapbox-usage-month {
  font-size: 12px;
  font-weight: normal;
  color: #909399;
}
.mapbox-usage-body {
  padding: 4px 0;
}
.mapbox-usage-text {
  margin-top: 10px;
  font-size: 13px;
  color: #606266;
}
.mapbox-usage-detail {
  margin-left: 12px;
  font-size: 12px;
  color: #909399;
}
.mapbox-usage-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #909399;
}
.mapbox-usage-loading .mapbox-usage-placeholder {
  color: #909399;
  font-size: 14px;
  margin: 8px 0;
}
.mapbox-usage-loading .mapbox-usage-hint {
  margin-top: 4px;
}

/* 房源表单：城市-区域 只读显示（地址下方） */
.house-location-display {
  margin-top: 6px;
  font-size: 12px;
  color: #909399;
  line-height: 1.4;
}

/* 优化轮播图管理页面 */
.banner-management {
  padding: 0;
}

.banner-management .page-header {
  margin-bottom: 24px;
}

/* 优化表格操作列 */
.el-table .el-button--mini {
  padding: 7px 15px;
  font-size: 12px;
  border-radius: 4px;
  font-weight: 500;
}

/* 统一卡片头部样式 */
.el-card__header {
  font-weight: 600;
  color: #303133;
  font-size: 15px;
}

/* 优化输入框组合 */
.el-input-group__append {
  background-color: #409EFF;
  border-color: #409EFF;
  color: #fff;
}

.el-input-group__append .el-button {
  color: #fff;
  border: none;
}

.el-input-group__append .el-button:hover {
  background-color: #66B1FF;
}

/* 优化选择器 */
.el-select .el-input.is-focus .el-input__inner {
  border-color: #409EFF;
}

/* 优化日期选择器 */
.el-date-editor.el-input {
  width: 100%;
}

/* 优化文本域 */
.el-textarea__inner {
  border-radius: 6px;
  border: 1px solid #dcdfe6;
  transition: all 0.3s;
}

.el-textarea__inner:focus {
  border-color: #409EFF;
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}

/* 优化上传组件 */
.el-upload-dragger {
  border-radius: 6px;
  border: 2px dashed #d9d9d9;
  transition: all 0.3s;
}

.el-upload-dragger:hover {
  border-color: #409EFF;
  background-color: #f0f7ff;
}

/* 优化步骤条 */
.el-steps {
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 优化进度条 */
.el-progress-bar__outer {
  border-radius: 10px;
  background-color: #f0f0f0;
}

.el-progress-bar__inner {
  border-radius: 10px;
}

/* 优化树形控件 */
.el-tree {
  background: #fff;
  border-radius: 6px;
  padding: 12px;
}

.el-tree-node__content {
  height: 32px;
  border-radius: 4px;
}

.el-tree-node__content:hover {
  background-color: #f5f7fa;
}

/* 优化时间选择器 */
.el-time-panel {
  border-radius: 6px;
}

/* 优化颜色选择器 */
.el-color-picker {
  vertical-align: middle;
}

/* 优化评分组件 */
.el-rate {
  display: inline-block;
}

/* 优化滑块 */
.el-slider {
  margin: 20px 0;
}

.el-slider__runway {
  background-color: #e4e7ed;
  border-radius: 3px;
}

.el-slider__bar {
  background: linear-gradient(135deg, #409EFF 0%, #66B1FF 100%);
  border-radius: 3px;
}

.el-slider__button {
  border: 2px solid #409EFF;
  background-color: #fff;
}

/* 优化开关动画 */
.el-switch.is-checked .el-switch__core {
  background-color: #409EFF;
}

/* 优化加载动画 */
.el-loading-spinner .path {
  stroke: #409EFF;
}

/* 优化消息框 */
.el-message-box {
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.el-message-box__header {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.el-message-box__title {
  font-weight: 600;
  font-size: 16px;
}

.el-message-box__content {
  padding: 24px;
}

.el-message-box__btns {
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
}

/* 优化通知 */
.el-notification {
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 优化工具提示 */
.el-tooltip__popper {
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
}

/* 优化弹出框 */
.el-popover {
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 优化抽屉 */
.el-drawer {
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
}

.el-drawer__header {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 0;
}

.el-drawer__body {
  padding: 24px;
}

/* 响应式优化 */
@media (max-width: 1200px) {
  .el-col {
    margin-bottom: 16px;
  }

  .scrm-filter-row {
    flex-wrap: wrap;
  }

  .scrm-filter-item {
    flex: 1 1 260px;
    max-width: none;
  }

  .scrm-filter-actions {
    width: auto;
    justify-content: flex-end;
  }

  .scrm-filter-inline-actions {
    margin-left: auto;
  }
  
  .page-header {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .page-header .el-alert {
    width: 100%;
    margin-top: 12px;
  }
}

@media (max-width: 768px) {
  .main-container > .el-aside {
    width: 200px !important;
  }
  .main-container > .el-container {
    margin-left: 200px;
  }
  .el-aside {
    width: 200px !important;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .stat-icon {
    width: 56px;
    height: 56px;
    margin-right: 12px;
  }
  
  .stat-value {
    font-size: 28px;
  }
  
  .el-table {
    font-size: 12px;
  }
  
  .el-button--mini {
    padding: 5px 10px;
    font-size: 11px;
  }
}

/* 视频帧选择器样式 */
.video-frame-selector {
  padding: 10px;
}

.video-preview-container {
  margin-bottom: 20px;
}

.frame-selector-video {
  width: 100%;
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  background: #000;
}

.frame-selector-controls {
  margin-top: 20px;
}

.frame-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin: 20px 0;
  max-height: 300px;
  overflow-y: auto;
}

.frame-preview-item {
  position: relative;
  cursor: pointer;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s;
  background: #f5f5f5;
}

.frame-preview-item:hover {
  border-color: #409EFF;
  transform: scale(1.05);
}

.frame-preview-item.active {
  border-color: #409EFF;
  border-width: 3px;
  box-shadow: 0 0 8px rgba(64, 158, 255, 0.5);
}

.frame-preview-item img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
}

.frame-preview-item.loading {
  border-color: #c0c4cc;
}

.frame-loading {
  width: 100%;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #909399;
  font-size: 12px;
}

.frame-loading i {
  font-size: 20px;
  margin-bottom: 4px;
  animation: rotating 2s linear infinite;
}

@keyframes rotating {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.frame-time {
  padding: 4px 6px;
  font-size: 11px;
  color: #666;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
}

.frame-selector-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}


.university-list { margin-top: 8px; }
.university-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 10px; background: #f5f7fa; border-radius: 6px; margin-bottom: 6px; font-size: 13px;
}
.university-item .uni-name { font-weight: 500; color: #303133; }
.university-item .uni-meta { color: #606266; }

/* 轮播图弹窗响应式 - 兼容各屏幕 */
@media (max-width: 768px) {
  .banner-dialog .el-dialog {
    width: 90vw !important;
    min-width: 280px !important;
    min-height: 300px !important;
  }
}

/* ==========================================================================
   Urban Red Theme (UI refresh)
   目标：功能不变，仅调整为小程序同款红色系主题
   ========================================================================== */
:root {
  --fresh-bg-0: #f8fafc;
  --fresh-bg-1: #fff3f1;
  --fresh-bg-2: #ffe8e5;
  --fresh-card: #ffffff;
  --fresh-line: #f1dfdb;
  --fresh-line-strong: #eec8c1;
  --fresh-text: #1e293b;
  --fresh-subtext: #64748b;
  --fresh-muted: #8b97a8;
  --fresh-primary: #e74c3c;
  --fresh-primary-deep: #d84334;
  --fresh-primary-soft: #fef2f2;
  --fresh-warning: #d9882f;
  --fresh-danger: #dc2626;
  --fresh-success: #16a34a;
  --fresh-radius-s: 10px;
  --fresh-radius-m: 14px;
  --fresh-radius-l: 20px;
  --fresh-shadow-s: 0 8px 20px rgba(131, 30, 30, 0.08);
  --fresh-shadow-m: 0 12px 26px rgba(131, 30, 30, 0.12);
  --fresh-shadow-l: 0 20px 38px rgba(131, 30, 30, 0.16);
}

body,
button,
input,
select,
textarea {
  font-family: 'Nunito', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
}

body {
  background:
    radial-gradient(circle at top right, #ffe8e5 0%, #fff3f1 45%, #f8fafc 100%),
    linear-gradient(180deg, var(--fresh-bg-1) 0%, var(--fresh-bg-0) 100%) !important;
  color: var(--fresh-text) !important;
}

#app {
  animation: freshFadeIn 0.35s ease-out;
}

@keyframes freshFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.main-container > .el-aside {
  background:
    radial-gradient(circle at top right, #fff0ed 0%, #fff7f6 55%, #ffffff 100%) !important;
  border-right: 1px solid #f1dfdb !important;
  box-shadow: 8px 0 20px rgba(131, 30, 30, 0.08) !important;
}

.main-container > .el-container {
  background: transparent !important;
}

.logo {
  border-bottom: 1px solid #f2dfdc !important;
  padding: 30px 20px 24px !important;
}

.logo h3 {
  color: #d84334 !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px !important;
}

.logo span {
  color: #8b6b67 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.el-menu {
  background: transparent !important;
  border-right: none !important;
  padding: 8px 10px 16px !important;
}

.el-menu-item {
  background: transparent !important;
  color: #64748b !important;
  border-radius: 12px !important;
  margin: 4px 0 !important;
  height: 46px !important;
  line-height: 46px !important;
  font-weight: 700 !important;
  transition: all 0.22s ease !important;
}

.el-submenu__title {
  background: transparent !important;
  color: #64748b !important;
  border-radius: 12px !important;
  margin: 4px 0 !important;
  height: 46px !important;
  line-height: 46px !important;
  font-weight: 700 !important;
  transition: all 0.22s ease !important;
}

.el-menu-item i {
  color: #a07a75 !important;
}

.el-submenu__title i {
  color: #a07a75 !important;
}

.el-menu-item:hover {
  background: #fff1ef !important;
  color: #d84334 !important;
  transform: translateX(2px);
}

.el-submenu__title:hover {
  background: #fff1ef !important;
  color: #d84334 !important;
}

.el-menu-item.is-active {
  background: linear-gradient(135deg, #fef2f2 0%, #ffe7e3 100%) !important;
  color: #d84334 !important;
  box-shadow: 0 6px 14px rgba(131, 30, 30, 0.10) !important;
}

.el-menu-item.is-active i {
  color: #d84334 !important;
}

.el-submenu.is-active > .el-submenu__title {
  color: #d84334 !important;
}

.el-menu .el-menu .el-menu-item {
  padding-left: 50px !important;
  font-size: 13px !important;
}

.el-submenu .el-menu {
  overflow: hidden !important;
}

.el-menu .el-menu--inline {
  transition: height 0.24s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.24s ease !important;
  will-change: height, opacity;
}

.el-submenu .el-menu-item {
  transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease !important;
}

.el-submenu__title .el-submenu__icon-arrow {
  transition: transform 0.24s ease !important;
}

.el-header {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #f1dfdb !important;
  box-shadow: 0 4px 12px rgba(131, 30, 30, 0.06) !important;
}

.header-left span {
  color: var(--fresh-text) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px;
}

.admin-dropdown-trigger {
  border: 1px solid var(--fresh-line) !important;
  border-radius: 999px !important;
  color: var(--fresh-subtext) !important;
  background: var(--fresh-card) !important;
  font-weight: 700 !important;
}

.admin-dropdown-trigger:hover {
  color: var(--fresh-primary-deep) !important;
  background: var(--fresh-primary-soft) !important;
  border-color: #fecaca !important;
}

.el-main {
  background: transparent !important;
  padding: 24px 26px 28px !important;
}

.page-header {
  background:
    radial-gradient(circle at 92% 10%, rgba(231, 76, 60, 0.10) 0%, transparent 42%),
    #ffffff !important;
  border: 1px solid var(--fresh-line) !important;
  border-radius: var(--fresh-radius-l) !important;
  box-shadow: var(--fresh-shadow-s) !important;
  padding: 16px 20px !important;
}

.dashboard .el-row > .el-col .stat-card {
  animation: freshLiftIn 0.45s ease both;
}

.dashboard .el-row > .el-col:nth-child(1) .stat-card { animation-delay: 0.02s; }
.dashboard .el-row > .el-col:nth-child(2) .stat-card { animation-delay: 0.08s; }
.dashboard .el-row > .el-col:nth-child(3) .stat-card { animation-delay: 0.14s; }
.dashboard .el-row > .el-col:nth-child(4) .stat-card { animation-delay: 0.20s; }

@keyframes freshLiftIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.stat-card {
  border-radius: 18px !important;
  border: 1px solid var(--fresh-line) !important;
  background:
    radial-gradient(circle at 88% 12%, rgba(240, 138, 127, 0.18) 0%, transparent 35%),
    #ffffff !important;
  box-shadow: var(--fresh-shadow-s) !important;
}

.stat-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--fresh-shadow-m) !important;
}

.stat-value {
  color: var(--fresh-text) !important;
}

.stat-label {
  color: var(--fresh-subtext) !important;
  font-weight: 700 !important;
}

.mapbox-usage-card,
.el-card,
.el-table,
.el-tabs__content,
.empty-state,
.banner-empty {
  border: 1px solid var(--fresh-line) !important;
  border-radius: 18px !important;
  box-shadow: var(--fresh-shadow-s) !important;
}

.el-card__header {
  background: #fff3f1 !important;
  color: var(--fresh-text) !important;
  border-bottom: 1px solid var(--fresh-line) !important;
}

.el-tabs__header {
  background: #fff3f1 !important;
  border: 1px solid var(--fresh-line) !important;
  border-radius: 16px 16px 0 0 !important;
}

.el-tabs__item {
  color: var(--fresh-subtext) !important;
  font-weight: 700 !important;
}

.el-tabs__item.is-active {
  color: var(--fresh-primary-deep) !important;
}

.el-tabs__active-bar {
  background: var(--fresh-primary) !important;
  height: 3px !important;
  border-radius: 99px;
}

.el-table th {
  background: #fdf0ed !important;
  color: #5a221b !important;
  font-weight: 700 !important;
}

.el-table td {
  border-bottom-color: #f5e3df !important;
}

.el-table .cell {
  color: #4a3b39 !important;
}

.el-table tbody tr:hover > td {
  background: #fff7f5 !important;
}

.el-button {
  border-radius: 12px !important;
  font-weight: 700 !important;
}

.el-button--primary {
  background: linear-gradient(135deg, #e74c3c 0%, #f06a5b 100%) !important;
  border-color: #e74c3c !important;
}

.el-button--primary:hover {
  background: linear-gradient(135deg, #d84334 0%, #e95c4f 100%) !important;
  border-color: #d84334 !important;
  box-shadow: 0 8px 18px rgba(216, 67, 52, 0.24) !important;
}

.el-button--danger {
  background: linear-gradient(135deg, #dc4a4a 0%, #ef6d6d 100%) !important;
  border-color: #dc4a4a !important;
}

.el-button--success {
  background: linear-gradient(135deg, #35b07a 0%, #56c490 100%) !important;
  border-color: #35b07a !important;
}

.el-button--text {
  color: var(--fresh-primary-deep) !important;
}

.el-button--text:hover {
  color: #b23629 !important;
}

.el-input__inner,
.el-textarea__inner,
.el-select .el-input__inner {
  background: #ffffff !important;
  border: 1px solid var(--fresh-line-strong) !important;
  border-radius: 12px !important;
  color: var(--fresh-text) !important;
}

.el-input__inner:focus,
.el-textarea__inner:focus {
  border-color: #f1a39a !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.18) !important;
}

.el-input__icon,
.el-select .el-input .el-select__caret {
  color: #8b97a8 !important;
}

.el-form {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.el-dialog {
  border-radius: 22px !important;
  overflow: hidden !important;
  border: 1px solid var(--fresh-line) !important;
  box-shadow: var(--fresh-shadow-l) !important;
}

.el-dialog__header {
  background: #fff6f4 !important;
  border-bottom: 1px solid var(--fresh-line) !important;
}

.el-dialog__title {
  color: var(--fresh-text) !important;
  font-weight: 800 !important;
}

.el-dialog__body {
  background: #ffffff !important;
}

.el-dialog__footer {
  background: #fffbfa !important;
  border-top: 1px solid var(--fresh-line) !important;
}

.banner-card {
  border-radius: 18px !important;
  border: 1px solid var(--fresh-line) !important;
  box-shadow: var(--fresh-shadow-s) !important;
}

.banner-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: var(--fresh-shadow-m) !important;
}

.banner-preview {
  background: #fbe8e4 !important;
}

.banner-sort-badge,
.banner-type-badge {
  border-radius: 999px !important;
  backdrop-filter: blur(8px);
}

.banner-sort-badge {
  background: rgba(170, 54, 40, 0.78) !important;
}

.banner-type-badge {
  background: rgba(231, 76, 60, 0.88) !important;
}

.empty-state {
  background:
    radial-gradient(circle at 10% 8%, rgba(235, 129, 116, 0.18) 0%, transparent 48%),
    #ffffff !important;
  border-style: solid !important;
}

.empty-state i {
  color: #b3867d !important;
}

.tag-list,
.icon-library,
.search-filter-bar,
.filter-bar,
.house-images-list,
.house-videos-list,
.icon-selector {
  background: #fff6f4 !important;
  border: 1px solid var(--fresh-line) !important;
  border-radius: 14px !important;
}

.tag-item,
.icon-item {
  border: 1px solid var(--fresh-line) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
}

.tag-item:hover,
.icon-item:hover {
  border-color: #e4a49b !important;
  box-shadow: 0 6px 14px rgba(124, 56, 45, 0.16) !important;
}

.qrcode-content img,
.el-table img,
.icon-preview {
  border-color: #efdbd6 !important;
}

.qrcode-content img:hover,
.el-table img:hover {
  box-shadow: 0 8px 18px rgba(133, 61, 49, 0.22) !important;
}

.el-tag {
  border-radius: 999px !important;
  border: none !important;
  font-weight: 700 !important;
}

.el-tag--success {
  background: #e8f8ef !important;
  color: #3f8b67 !important;
}

.el-tag--warning {
  background: #fff4e9 !important;
  color: #bf7a3f !important;
}

.el-tag--danger {
  background: #fdecec !important;
  color: #b35f5f !important;
}

.el-tag--info {
  background: #f7f1f0 !important;
  color: #8a6660 !important;
}

.el-pagination {
  border-radius: 14px !important;
  background: #ffffff !important;
  border: 1px solid var(--fresh-line) !important;
  box-shadow: var(--fresh-shadow-s) !important;
}

.el-pagination .number,
.el-pagination .btn-prev,
.el-pagination .btn-next {
  border-radius: 8px !important;
  color: var(--fresh-subtext) !important;
}

.el-pagination .number.active {
  background: var(--fresh-primary-soft) !important;
  color: var(--fresh-primary-deep) !important;
  border-color: #f3b6ad !important;
}

.el-message,
.el-notification,
.el-message-box,
.el-popover,
.el-select-dropdown {
  border-radius: 14px !important;
  border: 1px solid var(--fresh-line) !important;
  box-shadow: var(--fresh-shadow-m) !important;
}

/* 登录页风格重做 */
.login-container {
  background:
    radial-gradient(circle at 12% 12%, rgba(231, 76, 60, 0.24) 0%, transparent 42%),
    radial-gradient(circle at 88% 10%, rgba(202, 63, 48, 0.20) 0%, transparent 40%),
    linear-gradient(150deg, #fff1ee 0%, #fde5e1 55%, #fff7f5 100%) !important;
}

.login-box {
  border-radius: 24px !important;
  border: 1px solid var(--fresh-line) !important;
  box-shadow: var(--fresh-shadow-l) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(6px);
}

.login-box h2 {
  color: var(--fresh-text) !important;
  font-weight: 800 !important;
}

.login-form-wrap p {
  color: var(--fresh-muted) !important;
  font-weight: 600 !important;
}

.feishu-login-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.feishu-qr-dialog {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

.feishu-qr-code {
  width: 240px;
  height: 240px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
}

.feishu-qr-status {
  margin: 0;
  color: #475569;
  font-size: 13px;
  text-align: center;
}

/* 小屏可读性 */
@media (max-width: 900px) {
  .main-container > .el-aside {
    width: 196px !important;
  }

  .main-container > .el-container {
    margin-left: 196px !important;
  }

  .el-main {
    padding: 16px 14px 20px !important;
  }

  .page-header {
    border-radius: 16px !important;
    padding: 12px 14px !important;
  }
}

/* ==========================================================================
   SCRM Module Style Map (2026-03-03)
   Dashboard: Glass cards + dynamic chart
   Lists: Professional + micro interactions
   Forms/detail: Professional
   XHS works: Card + light motion
   Dialogs: Spring damping
   Filter/dropdown: Clear + easing
   ========================================================================== */
:root {
  --scrm-glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.84) 0%, rgba(255, 247, 245, 0.92) 100%);
  --scrm-glass-line: rgba(244, 184, 175, 0.56);
  --scrm-accent-red: #e74c3c;
  --scrm-accent-orange: #f59e0b;
  --scrm-accent-blue: #0ea5e9;
  --scrm-text-main: #1f2937;
  --scrm-text-sub: #64748b;
}

.crm-page {
  animation: scrmPageIn 0.32s ease-out;
}

@keyframes scrmPageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard */
.crm-page .stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--scrm-glass-line) !important;
  background: var(--scrm-glass-bg) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 28px rgba(180, 68, 54, 0.14) !important;
}

.crm-page .stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.42) 42%, transparent 64%);
  transform: translateX(-140%);
  transition: transform 0.8s ease;
}

.crm-page .stat-card:hover::before {
  transform: translateX(140%);
}

.crm-page .stat-card:hover {
  transform: translateY(-5px) scale(1.01) !important;
  box-shadow: 0 22px 34px rgba(180, 68, 54, 0.18) !important;
}

.scrm-home-analytics-row {
  margin-top: 14px !important;
}

.scrm-glass-card {
  height: 100%;
  border-radius: 18px;
  border: 1px solid var(--scrm-glass-line);
  background: var(--scrm-glass-bg);
  box-shadow: 0 12px 28px rgba(151, 62, 50, 0.12);
  backdrop-filter: blur(10px);
  padding: 16px 18px;
}

.scrm-card-head h4 {
  color: var(--scrm-text-main);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.scrm-card-head p {
  margin-top: 4px;
  color: var(--scrm-text-sub);
  font-size: 12px;
}

.scrm-line-chart-wrap {
  position: relative;
  height: 190px;
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 226, 220, 0.9);
  background: linear-gradient(180deg, rgba(255, 250, 249, 0.92) 0%, rgba(255, 255, 255, 0.8) 100%);
  overflow: hidden;
}

.scrm-line-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(231, 76, 60, 0.1) 1px, transparent 1px),
    linear-gradient(to top, rgba(231, 76, 60, 0.1) 1px, transparent 1px);
  background-size: 54px 38px;
  opacity: 0.55;
}

.scrm-line-chart-svg {
  position: absolute;
  inset: 12px 14px;
  width: calc(100% - 28px);
  height: calc(100% - 24px);
}

.scrm-trend-line {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 4 6;
  animation: scrmLineFlow 6s linear infinite;
}

.scrm-trend-area {
  opacity: 0.74;
  animation: scrmAreaPulse 2.8s ease-in-out infinite;
}

.scrm-trend-legend {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--scrm-text-sub);
  font-size: 12px;
}

.scrm-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 5px;
}

.scrm-dot-line { background: var(--scrm-accent-red); }
.scrm-dot-area { background: var(--scrm-accent-blue); }

@keyframes scrmLineFlow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -120; }
}

@keyframes scrmAreaPulse {
  0% { opacity: 0.54; }
  50% { opacity: 0.86; }
  100% { opacity: 0.54; }
}

.scrm-funnel-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scrm-funnel-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scrm-funnel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #334155;
  font-size: 12px;
}

.scrm-funnel-meta strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--scrm-text-main);
}

.scrm-funnel-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(248, 198, 188, 0.5);
  overflow: hidden;
}

.scrm-funnel-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background-size: 180% 100%;
  animation: scrmBarFlow 2.4s linear infinite;
  transition: width 0.4s ease;
}

.scrm-funnel-fill.is-customers { background-image: linear-gradient(90deg, #ef4444, #f97316); }
.scrm-funnel-fill.is-offers { background-image: linear-gradient(90deg, #f59e0b, #f97316); }
.scrm-funnel-fill.is-opps { background-image: linear-gradient(90deg, #22c55e, #16a34a); }
.scrm-funnel-fill.is-orders { background-image: linear-gradient(90deg, #3b82f6, #0ea5e9); }
.scrm-funnel-fill.is-suppliers { background-image: linear-gradient(90deg, #8b5cf6, #6366f1); }
.scrm-funnel-fill.is-unpaid { background-image: linear-gradient(90deg, #ef4444, #ec4899); }

@keyframes scrmBarFlow {
  from { background-position: 0 0; }
  to { background-position: 180% 0; }
}

/* Lists */
.crm-page .el-table {
  border-radius: 16px !important;
  border: 1px solid rgba(246, 198, 189, 0.7) !important;
  box-shadow: 0 8px 20px rgba(152, 54, 43, 0.1) !important;
}

.crm-page .el-table th {
  background: #fff4f1 !important;
  color: #7b2c21 !important;
  letter-spacing: 0.2px;
}

.crm-page .el-table__row > td {
  transition: background-color 0.22s ease, transform 0.22s ease;
}

.crm-page .el-table__row:hover > td {
  background: #fffaf8 !important;
}

.crm-page .scrm-op-btn,
.crm-page .el-table .el-button {
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.crm-page .scrm-op-btn:hover,
.crm-page .el-table .el-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(158, 61, 49, 0.18);
}

/* Forms / detail */
.crm-page .el-form {
  padding: 18px !important;
  border: 1px solid rgba(247, 205, 197, 0.74);
  border-radius: 16px !important;
  background: #fffdfc !important;
  box-shadow: 0 8px 18px rgba(141, 61, 48, 0.1);
}

.crm-page .el-form-item__label {
  color: #475569 !important;
  font-weight: 700 !important;
}

.scrm-opportunity-match-form {
  max-width: 1120px;
  margin: 0 auto;
}

.scrm-opportunity-match-form .el-row {
  margin-left: -6px !important;
  margin-right: -6px !important;
}

.scrm-opportunity-match-form .el-col {
  padding-left: 6px !important;
  padding-right: 6px !important;
}

.scrm-opportunity-match-form .el-form-item {
  margin-bottom: 16px;
}

.scrm-opportunity-match-form .el-autocomplete {
  width: 100%;
}

@media (max-width: 1200px) {
  .scrm-opportunity-match-form {
    max-width: none;
  }
}

.application-detail-dialog .detail-section {
  border: 1px solid rgba(245, 209, 202, 0.8);
  border-radius: 14px !important;
  box-shadow: 0 6px 14px rgba(143, 59, 47, 0.08) !important;
}

/* XHS works */
.xhs-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.xhs-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(246, 201, 194, 0.78);
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(153, 57, 46, 0.12);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.xhs-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px rgba(153, 57, 46, 0.18);
}

.xhs-cover {
  position: relative;
  height: 170px;
  background: linear-gradient(145deg, #ffe4de 0%, #fff4f1 100%);
  overflow: hidden;
}

.xhs-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.xhs-card:hover .xhs-cover img {
  transform: scale(1.04);
}

.xhs-cover-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #9ca3af;
  font-size: 12px;
}

.xhs-cover-placeholder i {
  font-size: 30px;
}

.xhs-status-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none !important;
  font-weight: 700 !important;
}

.xhs-card-body {
  padding: 12px 12px 10px;
}

.xhs-content {
  color: #1f2937;
  font-size: 13px;
  line-height: 1.5;
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.xhs-meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.xhs-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.xhs-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(239, 201, 194, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.xhs-id {
  color: #94a3b8;
  font-size: 11px;
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dialog spring damping */
.dialog-fade-enter-active {
  animation: scrmDialogSpringIn 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.2);
}

.dialog-fade-leave-active {
  animation: scrmDialogSpringOut 0.2s cubic-bezier(0.4, 0, 0.7, 1) forwards;
}

@keyframes scrmDialogSpringIn {
  0% { opacity: 0; transform: translate3d(0, -24px, 0) scale(0.92); }
  70% { opacity: 1; transform: translate3d(0, 6px, 0) scale(1.02); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes scrmDialogSpringOut {
  0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(0, -16px, 0) scale(0.96); }
}

/* Filters / dropdowns */
.scrm-filter-panel {
  border-radius: 14px !important;
  border: 1px solid rgba(244, 197, 188, 0.9) !important;
  background: linear-gradient(180deg, #fffaf9 0%, #fff5f3 100%) !important;
}

.scrm-filter-item .el-input__inner {
  transition: border-color 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease !important;
}

.scrm-filter-item .el-input__inner:focus {
  border-color: #f59f92 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14) !important;
  background-color: #ffffff !important;
}

.el-select-dropdown,
.el-dropdown-menu,
.el-date-picker,
.el-picker-panel {
  border-radius: 12px !important;
  border: 1px solid rgba(241, 197, 190, 0.95) !important;
  box-shadow: 0 14px 28px rgba(151, 65, 53, 0.16) !important;
  animation: scrmDropdownIn 0.2s cubic-bezier(0.2, 0.7, 0.1, 1);
}

.el-dropdown-menu__item,
.el-select-dropdown__item {
  transition: background-color 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
}

.el-dropdown-menu__item:hover,
.el-select-dropdown__item.hover,
.el-select-dropdown__item:hover {
  background: #fff1ee !important;
  color: #b9382a !important;
  padding-left: 24px;
}

@keyframes scrmDropdownIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1200px) {
  .scrm-home-analytics-row .el-col {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    margin-bottom: 12px;
  }
}

@media (max-width: 900px) {
  .xhs-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .xhs-card-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.xhs-work-card .xhs-metric-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  font-size: 12px;
  color: #475569;
}

.xhs-work-card .xhs-metric-row span {
  text-align: center;
  border: 1px solid rgba(246, 206, 199, 0.9);
  border-radius: 999px;
  padding: 3px 6px;
  background: #fff7f5;
}

.xhs-work-card .xhs-actions {
  align-items: center;
}

.xhs-work-card .xhs-actions a {
  font-size: 12px;
  color: #d84334;
  text-decoration: none;
}

.xhs-work-card .xhs-actions a:hover {
  text-decoration: underline;
}

.xhs-best {
  border-color: rgba(245, 158, 11, 0.44);
  box-shadow: 0 14px 24px rgba(176, 92, 13, 0.16);
}

/* 商机状态：进行中（蓝色） */
.crm-page .el-tag.scrm-opportunity-status-progress {
  color: #2f6dff;
  border-color: #b9d0ff;
  background: #edf3ff;
}

/* 自动刷新静默模式：仅隐藏 loading 遮罩，不影响数据请求 */
#app.auto-refresh-silent .el-loading-mask {
  display: none !important;
}
