/* 凡乐优品内部管理站点 - 样式表 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    background: #2d5a87;
    color: white;
    padding: 0 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 80px;
}

.nav-brand {
    font-size: 19px;
    font-weight: bold;
    position: absolute;
    left: 40px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.1);
}

.nav-user {
    position: absolute;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

.nav-admin-link {
    color: #ffd700;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.3s;
    font-weight: 500;
}

.nav-admin-link:hover {
    background: rgba(255,215,0,0.2);
    color: #ffec8b;
}

.nav-divider {
    color: rgba(255,255,255,0.5);
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
    min-height: calc(100vh - 100px);
}

/* 消息提示 */
.messages {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.page-header h1 {
    font-size: 23px;
    color: #333;
}

.project-meta {
    color: #666;
    font-size: 13px;
    margin-top: 5px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #2d5a87;
    color: white;
}

.btn-primary:hover {
    background: #1e3d5c;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 10px;
    min-width: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
    height: 26px;
    font-family: inherit;
    margin: 0;
}

.btn-sm:hover {
    text-decoration: none;
}


.btn-block {
    width: 100%;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    color: #2d5a87;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #666;
    margin-bottom: 30px;
}

.login-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
    color: #999;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2d5a87;
    outline: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-section h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #2d5a87;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.required {
    color: #e74c3c;
}

/* 统计卡片 */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 35px;
    font-weight: bold;
    color: #2d5a87;
}

.stat-label {
    color: #666;
    margin-top: 5px;
}

/* 数据表格 */
.data-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

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

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.status-进行中 {
    background: #fff3cd;
    color: #856404;
}

.status-已完成 {
    background: #d4edda;
    color: #155724;
}

.status-待开始 {
    background: #e2e3e5;
    color: #383d41;
}

.status-已暂停 {
    background: #f8d7da;
    color: #721c24;
}

/* 角色标签 */
.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.role-super_admin {
    background: #6f42c1;
    color: white;
}

.role-admin {
    background: #d4edda;
    color: #155724;
}

.role-manager {
    background: #cce5ff;
    color: #004085;
}

.role-gm {
    background: #f8d7da;
    color: #721c24;
}

.role-trade {
    background: #fff3cd;
    color: #856404;
}

.role-follow {
    background: #e2e3e5;
    color: #383d41;
}

.role-user {
    background: #e2e3e5;
    color: #383d41;
}

/* 项目详情 */
.detail-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    color: #2d5a87;
}

.header-actions {
    display: flex;
    gap: 8px;
}

/* 进度表格 */
.progress-table {
    width: 100%;
}

.progress-table th,
.progress-table td {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}

.progress-table th {
    background: #f8f9fa;
    font-weight: 600;
}

/* 沟通记录 */
.comm-list {
    max-height: 500px;
    overflow-y: auto;
}

.comm-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafbfc;
    border-radius: 4px;
    margin-bottom: 15px;
}

.comm-header {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.comm-date {
    font-weight: bold;
    color: #2d5a87;
}

.comm-method {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.comm-participants {
    color: #666;
}

.comm-creator {
    color: #999;
    margin-left: auto;
}

.comm-content {
    background: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.comm-content p {
    margin-top: 5px;
    color: #333;
}

.comm-followup {
    background: #fff8e1;
    padding: 10px 15px;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

.comm-followup p {
    margin-top: 5px;
    color: #666;
}

/* 文件表格 */
.file-table {
    width: 100%;
}

.file-table th,
.file-table td {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.file-type {
    background: #e0e0e0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.modal-close:hover {
    color: #333;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #2d5a87;
}

/* 筛选栏 */
.filter-bar {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-form {
    display: flex;
    gap: 10px;
}

.filter-form input,
.filter-form select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filter-form input[type="text"] {
    flex: 1;
}

/* 文本样式 */
.text-center {
    text-align: center;
}

.text-muted {
    color: #999;
}

.mt-20 {
    margin-top: 20px;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 11px;
    background: white;
    margin-top: 40px;
}

/* 响应式 */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
        gap: 10px;
    }
    
    .nav-brand {
        position: static;
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .nav-user {
        width: 100%;
        justify-content: center !important;
        margin-top: 5px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stat-cards {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .data-table {
        font-size: 11px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
    
    .comm-header {
        flex-direction: column;
        gap: 5px;
    }
    
    .comm-creator {
        margin-left: 0;
    }
}

/* 隐藏滚动条但保留功能 */
.comm-list::-webkit-scrollbar {
    width: 6px;
}

.comm-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.comm-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}