/* B端房源管理页面专用样式 */
.stat-icon{
    color: blue;
}

/* 快速统计卡片 */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.stat-info small {
    font-size: 12px;
    color: var(--success-color);
    font-weight: 500;
}

/* 高级筛选区域 */
.advanced-filter-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.filter-content {
    display: none;
}

.filter-content.show {
    display: block;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.filter-group select,
.filter-group input {
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    background: var(--input-bg);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.filter-group select[multiple] {
    min-height: 80px;
}

.price-range,
.area-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-range input,
.area-range input {
    flex: 1;
    min-width: 0;
}

.tag-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag-selector label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.tag-selector input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.filter-actions {
    flex-direction: row;
    gap: 12px;
    margin-top: 8px;
}

.filter-actions .btn {
    flex: 1;
}

/* 工具栏 */
.property-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.result-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.result-count strong {
    color: var(--primary-color);
    font-weight: 600;
}

.view-switcher {
    display: flex;
    gap: 4px;
}

.btn-view {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.btn-view:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-view.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-options label {
    font-size: 14px;
    color: var(--text-secondary);
}

.sort-options select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--input-bg);
}

/* 房源列表 */
.property-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.property-list.list-view {
    grid-template-columns: 1fr;
}

/* 房源卡片 */
.property-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

.property-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.property-status-badge.active {
    background: var(--success-color);
}

.property-status-badge.inactive {
    background: var(--warning-color);
}

.property-status-badge.sold {
    background: var(--error-color);
}

.property-status-badge.pending {
    background: var(--info-color);
}

.property-actions-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
}

.property-card:hover .property-actions-overlay {
    opacity: 1;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 14px;
}

.btn-action:hover {
    background: white;
    transform: scale(1.1);
    color: var(--primary-color);
}

.image-indicator {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.property-content {
    padding: 20px;
}

.property-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.property-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.property-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.badge.grade-A {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.badge.grade-B {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
}

.badge.grade-C {
    background: linear-gradient(135deg, #95afc0, #535c68);
    color: white;
}

.badge.featured {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    color: white;
}

.badge.hot {
    background: linear-gradient(135deg, #ff6348, #ff4757);
    color: white;
}

.badge.internal {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
}

.badge.external {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
}

.property-details {
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.detail-row {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.detail-row .detail-item {
    margin-bottom: 0;
}

.detail-item i {
    color: var(--primary-color);
    width: 16px;
}

.property-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.property-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.meta-item i {
    color: var(--primary-color);
    width: 14px;
}

.property-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.property-tags .tag {
    padding: 4px 8px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.property-score {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

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

.score-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--warning-color), var(--error-color));
    transition: width 0.3s ease;
}

.score-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 40px;
    text-align: right;
}

.property-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.property-actions .btn {
    flex: 1;
    min-width: 0;
}

/* 列表视图样式 */
.property-list.list-view .property-card {
    display: flex;
    height: 180px;
}

.property-list.list-view .property-image {
    width: 240px;
    height: 100%;
    flex-shrink: 0;
}

.property-list.list-view .property-content {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.property-list.list-view .property-header {
    margin-bottom: 8px;
}

.property-list.list-view .property-details {
    display: flex;
    gap: 24px;
    margin-bottom: 8px;
}

.property-list.list-view .property-stats {
    grid-template-columns: repeat(6, 1fr);
    margin-bottom: 8px;
    padding: 8px 12px;
}

.property-list.list-view .property-tags {
    margin-bottom: 8px;
}

.property-list.list-view .property-score {
    margin-bottom: 8px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

.btn-page {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-weight: 500;
}

.btn-page:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-page.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-ellipsis {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 批量操作模态框 */
.batch-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.batch-action {
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.batch-action:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .property-toolbar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        justify-content: space-between;
    }
    
    .property-list {
        grid-template-columns: 1fr;
    }
    
    .property-list.list-view .property-card {
        flex-direction: column;
        height: auto;
    }
    
    .property-list.list-view .property-image {
        width: 100%;
        height: 200px;
    }
    
    .property-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .property-actions {
        flex-direction: column;
    }
    
    .batch-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .price-range,
    .area-range {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    
    .price-range span,
    .area-range span {
        text-align: center;
    }
    
    .property-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .property-tags {
        gap: 4px;
    }
    
    .property-tags .tag {
        font-size: 11px;
        padding: 3px 6px;
    }
}

/* 客户管理模块 */
.customer-module {
    margin-top: 24px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 20px;
}

.customer-module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.customer-module-header h2 {
    font-size: 20px;
    color: var(--text-primary);
}

.customer-module-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-module-actions .input {
    width: 280px;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
}

.customer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0 4px;
}

.customer-filters {
    display: flex;
    gap: 10px;
}

.customer-filters select {
    padding: 8px 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
}

.customer-view-switch {
    display: flex;
    gap: 8px;
}

.customer-list-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.customer-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 16px;
    transition: var(--transition);
}

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

.customer-card .header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.customer-card .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--border-color);
    object-fit: cover;
}

.customer-card .name {
    font-weight: 600;
    color: var(--text-primary);
}

.customer-card .phone {
    font-size: 13px;
    color: var(--text-secondary);
}

.customer-card .badges {
    display: flex;
    gap: 8px;
    margin: 8px 0;
}

.customer-card .badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    background: var(--chip-bg);
    color: var(--text-secondary);
}

.customer-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.customer-card .tag {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--chip-bg);
    font-size: 12px;
}

.customer-card .actions {
    display: flex;
    gap: 8px;
}

.customer-list-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.customer-list-table thead th {
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-color);
}

.customer-list-table tbody td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-color);
}

.customer-detail-modal .customer-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.customer-detail-modal .customer-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.customer-detail-modal .customer-profile img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.customer-detail-modal .badges {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.customer-detail-modal .customer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.assign-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.assign-form select,
.assign-form textarea {
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .stat-card {
        background: var(--card-bg-dark);
    }
    
    .advanced-filter-section {
        background: var(--card-bg-dark);
    }
    
    .property-toolbar {
        background: var(--card-bg-dark);
    }
    
    .property-card {
        background: var(--card-bg-dark);
    }
    
    .property-stats {
        background: var(--bg-secondary-dark);
    }
    
    .property-tags .tag {
        background: rgba(74, 108, 247, 0.2);
    }
    
    .btn-page {
        background: var(--card-bg-dark);
    }
    
    .batch-action {
        background: var(--card-bg-dark);
    }
}