/* CPdd 自定义样式 */

/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

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

/* 联系人卡片样式 */
.contact-card {
    transition: transform 0.2s;
}

.contact-card:hover {
    transform: translateY(-2px);
}

/* 重要等级星星样式 */
.importance-stars {
    font-size: 0.8rem;
}

/* 标签样式 */
.tag-badge {
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* 头像样式 */
.avatar {
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* 星标样式 */
.starred {
    color: #ffc107;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 2rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* 提醒样式 */
.reminder-item {
    border-left: 4px solid #007bff;
    padding-left: 1rem;
}

.reminder-urgent {
    border-left-color: #dc3545;
}

.reminder-warning {
    border-left-color: #ffc107;
}

/* 批量操作样式 */
.batch-actions {
    background-color: #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* 统计图表样式 */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.875rem;
}

/* 分页样式 */
.pagination {
    margin-top: 1rem;
}

/* 表单样式 */
.form-section {
    background-color: #fff;
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
}

/* 操作按钮组 */
.action-buttons {
    position: sticky;
    bottom: 0;
    background-color: #fff;
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    margin-top: 2rem;
}

/* 移动端优化 */
@media (max-width: 576px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.125rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
}

/* 强制使用浅色模式 - 不受浏览器深浅模式影响 */
/* 确保所有元素都使用浅色模式样式 */
body {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

.card {
    background-color: #fff !important;
    color: #212529 !important;
}

.table {
    color: #212529 !important;
    background-color: #fff !important;
}

.table th {
    border-color: #dee2e6 !important;
    background-color: #f8f9fa !important;
}

.table td {
    border-color: #dee2e6 !important;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* 特殊状态样式 */
.contact-selected {
    background-color: rgba(0, 123, 255, 0.1);
}

.importance-1 { color: #6c757d; }
.importance-2 { color: #28a745; }
.importance-3 { color: #ffc107; }
.importance-4 { color: #fd7e14; }
.importance-5 { color: #dc3545; } 