* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* 导航栏 */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    list-style: none;
    display: flex;
}

.nav-menu li {
    margin-left: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background-color: #34495e;
}

/* 主要内容区 */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #219a52;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

/* 表单模态框 */
.form-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.form-container {
    background-color: white;
    padding: 30px;
    border-radius: 5px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
}

.required {
    color: #e74c3c;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.data-table tr:hover {
    background-color: #f5f5f5;
}

/* 提示消息 */
.alert {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 3px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 文本对齐 */
.text-center {
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
    }
    
    .nav-menu {
        margin-top: 10px;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .form-container {
        width: 90%;
        margin: 20px;
    }
}
/* 登录页面样式 */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.login-title {
    text-align: center;
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
}

.login-subtitle {
    text-align: center;
    color: #666;
    font-size: 18px;
    margin-bottom: 30px;
    font-weight: normal;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.login-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.login-info p {
    margin: 5px 0;
}

/* 导航栏右侧用户信息 */
.nav-left {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 角色标签 */
.badge {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.badge-admin {
    background-color: #e74c3c;
    color: white;
}

.badge-user {
    background-color: #3498db;
    color: white;
}

/* 表格中的角色标签 */
.data-table .badge {
    display: inline-block;
}

/* 文字颜色 */
.text-muted {
    color: #999;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-left {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-right {
        width: 100%;
        justify-content: center;
    }
    
    .login-box {
        padding: 30px 20px;
    }
}

/* 附件相关样式 */
.attachment-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    background-color: #f8f9fa;
    border-radius: 3px;
}

.attachment-name {
    font-weight: 500;
    color: #2c3e50;
    word-break: break-all;
}

.attachment-size {
    color: #7f8c8d;
    font-size: 0.85em;
}

.attachment-actions {
    display: flex;
    gap: 5px;
    margin-top: 3px;
}

.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

/* 文件上传提示 */
.text-muted {
    color: #95a5a6;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
}

/* 图标样式 */
[class^="icon-"]:before {
    font-weight: bold;
    margin-right: 2px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .attachment-info {
        flex-direction: column;
    }
    
    .attachment-actions,
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-sm {
        width: 100%;
        justify-content: center;
    }
}

/* 附件数量链接样式 */
.attachment-count-link {
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.2s;
}

.attachment-count-link:hover {
    transform: scale(1.1);
}

.attachment-badge {
    display: inline-block;
    min-width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: #e0e0e0;
    border-radius: 15px;
    padding: 0 8px;
    font-weight: bold;
    color: #666;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.attachment-badge.has-attachment {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
}

/* 附件管理弹窗样式增强 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

.modal-header h3 {
    color: #2c3e50;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.upload-area {
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 2px dashed #3498db;
}

.upload-area .form-group {
    margin-bottom: 15px;
}

.upload-area label {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
}

.upload-area input[type="file"] {
    width: 100%;
    padding: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.upload-area .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.attachment-list {
    margin-top: 25px;
}

.attachment-list h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.attachment-items {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: white;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.attachment-item:last-child {
    border-bottom: none;
}

.attachment-item:hover {
    background-color: #f5f6fa;
}

.attachment-info {
    flex: 1;
    margin-right: 15px;
}

.attachment-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    word-break: break-all;
}

.attachment-meta {
    font-size: 0.85em;
    color: #7f8c8d;
    display: flex;
    gap: 15px;
}

.attachment-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* 按钮样式增强 */
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

/* 加载和空状态样式 */
.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-style: italic;
}

.loading:after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.empty-message {
    text-align: center;
    padding: 50px;
    color: #95a5a6;
    font-style: italic;
    background: #f8f9fa;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    margin: 10px 0;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #9b59b6);
    transition: width 0.3s;
    border-radius: 2px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .attachment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .attachment-info {
        margin-right: 0;
        width: 100%;
    }
    
    .attachment-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .attachment-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* 业绩统计页面样式 */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    color: white;
}

.status-badge.booked {
    background-color: #f39c12;
}

.status-badge.completed {
    background-color: #27ae60;
}

.status-badge.pending {
    background-color: #95a5a6;
}

.text-right {
    text-align: right;
}

.performance-positive {
    color: #27ae60;
    font-weight: 500;
}

.performance-negative {
    color: #e74c3c;
    font-weight: 500;
}

/* 表格悬浮效果 */
.performance-table tbody tr:hover,
.order-table tbody tr:hover {
    background-color: #f5f6fa;
    cursor: pointer;
}

/* 统计卡片动画 */
.stat-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* 月份选择器样式 */
.month-input {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.month-input:focus {
    outline: none;
    border-color: #3498db;
}

/* 加载动画 */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* 表格排序指示器 */
.sort-indicator {
    margin-left: 5px;
    font-size: 10px;
}

.sort-asc::after {
    content: "↑";
}

.sort-desc::after {
    content: "↓";
}

.btn-sm {
    height: 27px;
    line-height: 27px;
}