/* 成果存档系统 - 全局样式 */
/* 与建研院电子签章系统风格一致 */

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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.header {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 30px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 15px 15px;
    margin-bottom: 30px;
}

.header h1 {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
}

/* 导航 */
.nav {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    margin: 0 auto 30px;
    max-width: 1000px;
}

.nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid transparent;
}

.nav a:hover {
    color: #4facfe;
    border-color: #4facfe;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 卡片 */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-in-out;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: #4facfe;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.card-title {
    font-size: 24px;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 3px solid #4facfe;
    padding-bottom: 15px;
    font-weight: 600;
}

/* 表单 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #4a5568;
    font-size: 15px;
}

.form-group label .required {
    color: #ff6b6b;
    margin-left: 3px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* 按钮 */
.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-sm {
    padding: 10px 18px;
    font-size: 13px;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 12px;
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

/* 状态标签 */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.badge-warning {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.badge-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* 消息提示 */
.alert {
    padding: 18px 22px;
    border-radius: 12px;
    margin-bottom: 25px;
    animation: fadeIn 0.5s ease-in-out;
}

.alert-success {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #22543d;
    border: 2px solid #68d391;
}

.alert-error {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #742a2a;
    border: 2px solid #fc8181;
}

.alert-info {
    background: linear-gradient(135deg, #bee3f8 0%, #90cdf4 100%);
    color: #2a4365;
    border: 2px solid #63b3ed;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 35px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-in-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 3px solid #e0e0e0;
}

.modal-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    font-size: 32px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    line-height: 1;
}

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

/* 上传区域 */
.upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 50px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #4facfe;
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.1);
}

.upload-area.dragover {
    border-color: #4facfe;
    background: #e8f4ff;
}

.upload-icon {
    font-size: 56px;
    color: #4facfe;
    margin-bottom: 20px;
}

.upload-text {
    color: #333;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 500;
}

.upload-hint {
    color: #999;
    font-size: 13px;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box .form-control {
    flex: 1;
}

/* 文件列表 */
.file-list {
    list-style: none;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
    gap: 15px;
}

.file-item:hover {
    background: #f8f9fa;
}

.file-item:last-child {
    border-bottom: none;
}

.file-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: #333;
    word-break: break-all;
}

.file-meta {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: rgba(255,255,255,0.8);
}

.breadcrumb a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 项目卡片网格 */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    display: block;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #4facfe;
}

.project-card .project-no {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.project-card .project-name {
    font-size: 16px;
    margin-bottom: 8px;
}

.project-card .project-unit {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.project-card .project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

/* 统计卡片 */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #4facfe;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #4facfe;
}

.stat-label {
    font-size: 14px;
    color: #999;
    margin-top: 10px;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar select,
.filter-bar input {
    width: auto;
    min-width: 150px;
}

/* 页脚 */
.footer {
    margin-top: 50px;
    padding: 25px;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

/* 标签页 */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    color: #999;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 16px;
}

/* 响应式 */
@media (max-width: 768px) {
    .container { padding: 15px; }
    .card { padding: 25px; border-radius: 12px; }
    .nav ul { flex-direction: column; gap: 12px; padding: 10px; }
    .table { font-size: 13px; }
    .table th, .table td { padding: 12px 10px; }
    .project-grid { grid-template-columns: 1fr; }
    .search-box { flex-direction: column; }
    .filter-bar { flex-direction: column; }
    .filter-bar select, .filter-bar input { width: 100%; }
    .file-actions { flex-direction: column; }
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4facfe;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    animation: spin 1s linear infinite;
    margin: 0 auto 18px;
}

/* Logo */
.logo-container {
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

.logo-container img {
    width: 180px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}
