/* 客户详情页面样式 */

/* 全局背景色 */
body {
    background-color: #f8f9fa;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.375rem;
}

.breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #007bff;
}

.breadcrumb-item.active {
    color: #495057;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #adb5bd;
}

/* 信息项样式 */
.info-item {
    padding: 0.5rem 0;
}

.info-item label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: block;
}

.info-item div {
    color: #212529;
}

/* 卡片优化 */
.card {
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    background-color: #fff;
    font-weight: 600;
}

/* 表格样式优化 */
.table thead th {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    vertical-align: middle;
    padding: 1rem 0.75rem;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* 统计卡片样式 */
.stats-card {
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
}

/* Badge 样式优化 */
.badge {
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    font-size: 0.875rem;
}

/* 空状态图标 */
.empty-state {
    padding: 3rem 0;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
}

.empty-state p {
    color: #6c757d;
    margin-top: 1rem;
}

/* 加载状态 */
.loading-state {
    padding: 2rem 0;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .info-item {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
}

/* 返回按钮样式 */
.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* 编辑按钮样式 */
.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    background-color: #007bff;
    color: #fff;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 卡片间距 */
.card + .card {
    margin-top: 1.5rem;
}

/* 数字高亮 */
.text-primary {
    color: #007bff !important;
}

.text-success {
    color: #28a745 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #17a2b8 !important;
}

/* 阴影效果 */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* 边框优化 */
.border-0 {
    border: 0 !important;
}

.border-bottom {
    border-bottom: 1px solid #e9ecef !important;
}

/* 标题图标间距 */
.card-header i {
    margin-right: 0.5rem;
}

/* 表格去除外边框 */
.card-body.p-0 .table {
    margin-bottom: 0;
}

.table-responsive {
    border: none;
}

/* 模态框优化 */
.modal-content {
    border-radius: 0.5rem;
}

.modal-header {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.modal-footer {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* 表单输入框优化 */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 按钮优化 */
.btn {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

/* 卡片圆角 */
.card {
    border-radius: 0.5rem;
}

/* 统计卡片动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease;
}

/* 内容区域间距 */
.content-container {
    padding: 1.5rem;
}

/* 小屏幕优化 */
@media (max-width: 576px) {
    .breadcrumb {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Timeline 样式 */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-badge {
    position: absolute;
    left: -23px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.timeline-content {
    padding-left: 15px;
}

/* 客户推荐树样式 */
.customer-tree {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.tree-node {
    margin-bottom: 10px;
}

.node-card {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.node-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
    transform: translateY(-2px);
}

.node-card.level-0 {
    border-color: #007bff;
    border-width: 3px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.node-card.level-1 {
    border-color: #17a2b8;
}

.node-card.level-2 {
    border-color: #28a745;
}

.node-card.level-3 {
    border-color: #ffc107;
}

.node-card.level-4 {
    border-color: #6c757d;
}

.customer-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.children-nodes {
    position: relative;
}

.children-nodes::before {
    content: '';
    position: absolute;
    left: 45px;
    top: 0;
    bottom: 20px;
    width: 2px;
    background: #dee2e6;
}

.tree-root:last-child .children-nodes::before {
    display: none;
}

/* 客户树响应式设计 */
@media (max-width: 768px) {
    .node-content {
        margin-left: 0 !important;
    }
    
    .customer-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .children-nodes::before {
        left: 15px;
    }
}
