* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* SAP风格主题 */
:root {
    --sap-blue: #0070f2;
    --sap-dark-blue: #0854a0;
    --sap-gray: #6a6d70;
    --sap-light-gray: #f5f5f5;
    --sap-border: #d9d9d9;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--sap-blue), var(--sap-dark-blue));
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--sap-dark-blue);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--sap-border);
    border-radius: 4px;
    font-size: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: var(--sap-blue);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: var(--sap-dark-blue);
}

.header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--sap-dark-blue);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.container {
    display: flex;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 250px;
    background-color: white;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--sap-gray);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: var(--sap-light-gray);
    color: var(--sap-blue);
    border-right: 3px solid var(--sap-blue);
}

.main-content {
    flex: 1;
    padding: 2rem;
    background-color: var(--sap-light-gray);
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.5rem;
    background-color: var(--sap-light-gray);
    border-bottom: 1px solid var(--sap-border);
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--sap-border);
}

.table th {
    background-color: var(--sap-light-gray);
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--sap-blue);
}

.stat-label {
    color: var(--sap-gray);
    margin-top: 0.5rem;
}


/* 新增样式用于增强界面 */

/* 表格操作按钮组 */
.table-actions {
    display: flex;
    gap: 0.5rem;
}

/* 状态标签 */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-not-started {
    background-color: #e2e3e5;
    color: #383d41;
}

.status-in-progress {
    background-color: #fff3cd;
    color: #856404;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

/* 优先级指示器 */
.priority-high {
    color: #dc3545;
    font-weight: bold;
}

.priority-medium {
    color: #fd7e14;
}

.priority-low {
    color: #6c757d;
}

/* 图表容器 */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* 筛选器区域 */
.filter-section {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-row {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.filter-group {
    flex: 1;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--sap-border);
    border-radius: 4px;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .filter-row {
        flex-direction: column;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--sap-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 模态窗口样式 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* 徽章样式 */
.badge {
    background-color: var(--sap-blue);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 排序指示器 */
.sort-indicator {
    margin-left: 0.5rem;
    font-weight: bold;
}

/* 表单样式增强 */
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--sap-border);
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
}

.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--sap-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

/* 搜索高亮 */
.highlight {
    background-color: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

/* 模态窗口样式 */
.modal-backdrop {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

/* 按钮样式增强 */
.btn-warning {
    background-color: #ffc107;
    color: #212529;
    border: none;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
    border: none;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-success {
    background-color: #28a745;
    color: white;
    border: none;
}

.btn-success:hover {
    background-color: #218838;
}

/* 表格操作按钮组 */
.table-actions {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .table-actions {
        flex-direction: column;
    }
    
    .table-actions .btn {
        margin-bottom: 0.25rem;
    }
}

/* 联系人页面特定样式 */
.contact-primary {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
}

.contact-row:hover {
    background-color: #f8f9fa;
}

/* 模态窗口表单样式 */
.modal-content .form-group {
    margin-bottom: 1rem;
}

.modal-content label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--sap-gray);
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="tel"],
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--sap-border);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: var(--sap-blue);
    box-shadow: 0 0 0 2px rgba(0, 112, 242, 0.1);
}

/* 复选框样式 */
.modal-content input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* 响应式模态窗口 */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-content .card-body {
        padding: 1rem;
    }
}

/* 表格操作按钮组优化 */
.table-actions {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.table-actions .btn {
    white-space: nowrap;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--sap-gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}