/* 现代简洁项目管理系统样式 */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 - 简洁蓝色系 */
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    
    /* 辅助色 */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    /* 中性色 */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    background: white !important;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--gray-600) !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    margin: 0 0.25rem;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: var(--gray-100);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: var(--gray-100);
    font-weight: 600;
}

/* 主容器样式 */
.main-container {
    margin-top: 80px;
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

/* 卡片样式 */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.card-header h5 {
    color: var(--gray-900);
    margin: 0;
    font-weight: 600;
    font-size: 1.125rem;
}

.card-body {
    padding: 1.5rem;
}

/* 按钮样式 */
.btn {
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    color: white;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-info:hover {
    background-color: #0891b2;
    color: white;
}

.btn-outline-secondary {
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    background: white;
}

.btn-outline-secondary:hover {
    background-color: var(--gray-100);
    color: var(--gray-800);
    border-color: var(--gray-400);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* 表单样式 */
.form-control {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
    outline: none;
}

.form-select {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.input-group-text {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* 表格样式 */
.table {
    background: white;
}

.table thead th {
    background-color: var(--gray-50);
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    padding: 1.25rem 1rem;
    font-size: 0.875rem;
    text-align: center;
    letter-spacing: 0.025em;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
    text-align: center;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.02);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-title {
    color: var(--gray-900);
    font-weight: 600;
    font-size: 1.125rem;
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* 进度条样式 */
.progress {
    height: 0.5rem;
    border-radius: var(--radius);
    background: var(--gray-200);
    overflow: hidden;
}

.progress-bar {
    background: var(--primary-color);
    border-radius: var(--radius);
    transition: width 0.3s ease;
}

/* 徽章样式 */
.badge {
    border-radius: var(--radius);
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    font-size: 0.75rem;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

.bg-secondary {
    background-color: var(--gray-500) !important;
}

/* 警告框样式 */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border-left-color: var(--success-color);
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border-left-color: var(--danger-color);
}

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border-left-color: var(--warning-color);
}

.alert-info {
    background-color: #f0f9ff;
    color: #1e40af;
    border-left-color: var(--info-color);
}

/* 搜索和筛选区域 */
.search-section {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* 分页样式 */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.page-link {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    margin: 0 0.125rem;
    padding: 0.5rem 0.75rem;
    color: var(--gray-600);
    background: white;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.page-link:hover {
    background: var(--gray-100);
    color: var(--gray-800);
    border-color: var(--gray-400);
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 项目进度条样式 */
.project-progress {
    position: relative;
    height: 1.5rem;
    background: var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.progress-bar-custom {
    height: 100%;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    transition: all 0.3s ease;
}

.progress-low { 
    background: var(--danger-color);
}

.progress-medium { 
    background: var(--warning-color);
}

.progress-high { 
    background: var(--info-color);
}

.progress-complete { 
    background: var(--success-color);
}

/* 状态徽章 */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-planning {
    background: #fef3c7;
    color: #92400e;
}

.status-in-progress {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #d1fae5;
    color: #166534;
}

.status-delayed {
    background: #fee2e2;
    color: #991b1b;
}

/* 人员标签 */
.personnel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.personnel-tag {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--gray-200);
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

.btn-action {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: none;
    transition: all 0.2s ease;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* 数据表格增强 */
.table-container {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.table-container .table {
    margin-bottom: 0;
    border-radius: var(--radius-lg);
}

.table-container .table thead th:first-child {
    border-top-left-radius: var(--radius-lg);
}

.table-container .table thead th:last-child {
    border-top-right-radius: var(--radius-lg);
}

/* 表单区域 */
.form-section {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}

.form-section-title {
    color: var(--gray-900);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

/* 欢迎区域 */
.welcome-section {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.welcome-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    font-size: 1rem;
    color: var(--gray-600);
    margin-bottom: 0;
}

.quick-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.quick-action-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.875rem;
}

.quick-action-btn:hover {
    color: white;
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* 统计卡片 */
.stats-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.stats-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stats-card.primary {
    border-left: 4px solid var(--primary-color);
}

.stats-card.success {
    border-left: 4px solid var(--success-color);
}

.stats-card.warning {
    border-left: 4px solid var(--warning-color);
}

.stats-card.info {
    border-left: 4px solid var(--info-color);
}

.stats-icon {
    font-size: 2rem;
    color: var(--gray-400);
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: var(--gray-900);
}

.stats-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* 图表容器 */
.chart-container {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 活动列表 */
.activity-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.875rem;
}

.activity-icon.success {
    background: #d1fae5;
    color: var(--success-color);
}

.activity-icon.info {
    background: #dbeafe;
    color: var(--info-color);
}

.activity-icon.warning {
    background: #fef3c7;
    color: var(--warning-color);
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* 项目列表 */
.project-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    border-left: 4px solid var(--primary-color);
}

.project-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(0.25rem);
}

.project-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.progress-mini {
    width: 4rem;
    height: 0.5rem;
    background: var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.progress-mini-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: var(--radius);
    transition: width 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        margin-top: 70px;
        padding: 1rem 0;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        border-radius: var(--radius-lg);
    }
    
    .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .welcome-section {
        padding: 1.5rem;
    }
    
    .stats-card {
        padding: 1rem;
    }
}

/* 动画效果 */
.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 0.5rem;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* 文本工具类 */
.text-muted {
    color: var(--gray-500) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

/* 边框工具类 */
.border-primary {
    border-color: var(--primary-color) !important;
}

.border-success {
    border-color: var(--success-color) !important;
}

.border-warning {
    border-color: var(--warning-color) !important;
}

.border-danger {
    border-color: var(--danger-color) !important;
}

.border-info {
    border-color: var(--info-color) !important;
}