/* ===== 前台首页样式 ===== */

/* 前台导航栏样式覆盖 */
.navbar-menu {
    flex: initial !important;
    justify-content: flex-start !important;
    gap: 2rem;
}

/* ===== 页面内容 ===== */
.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

/* ===== 统计卡片 ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border-left: 4px solid #3b82f6;
    transition: all 0.3s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
.stat-card:nth-child(2) { border-left-color: #10b981; }
.stat-card:nth-child(3) { border-left-color: #f59e0b; }
.stat-card:nth-child(4) { border-left-color: #ef4444; }
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-card:nth-child(1) .stat-icon { background: #eff6ff; color: #3b82f6; }
.stat-card:nth-child(2) .stat-icon { background: #ecfdf5; color: #10b981; }
.stat-card:nth-child(3) .stat-icon { background: #fffbeb; color: #f59e0b; }
.stat-card:nth-child(4) .stat-icon { background: #fef2f2; color: #ef4444; }
.stat-info { flex: 1; }
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}
.stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* ===== 公告栏 ===== */
.announcement-bar {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-left: 5px solid #3b82f6;
}
.announcement-content {
    display: flex;
    align-items: center;
    gap: 14px;
}
.announcement-icon {
    background: #3b82f6;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}
.announcement-text {
    font-size: 0.95rem;
    color: #1e40af;
}
.announcement-text strong { color: #1e3a8a; }
.announcement-date {
    background: rgba(255, 255, 255, 0.8);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #3b82f6;
}

/* ===== 任务卡片区域 ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.section-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title i { color: #3b82f6; }
.section-badge {
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== 任务卡片网格 ===== */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.task-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f3f7;
}
.task-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}
.card-header {
    padding: 1.2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
}
.task-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
    flex: 1;
    color: #1f2937;
}
.status-tag {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 20px;
    background: #e5e7eb;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.status-tag.complete { 
    background: linear-gradient(135deg, #d1fae5, #a7f3d0); 
    color: #065f46; 
}
.status-tag.late { 
    background: linear-gradient(135deg, #fef3c7, #fde68a); 
    color: #92400e; 
}
.status-tag.progress { 
    background: linear-gradient(135deg, #dbeafe, #bfdbfe); 
    color: #1e40af; 
}
.image-section {
    padding: 0 1rem;
    margin-top: -0.5rem;
}
.task-img {
    width: 100%;
    height: 140px;
    border-radius: 14px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}
.task-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.card-body {
    padding: 1rem;
}
.info-list {
    margin-bottom: 0.8rem;
}
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.75rem;
    padding: 0.35rem 0;
}
.info-item i {
    width: 1rem;
    height: 1rem;
    color: #60a5fa;
    background: #eff6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}
.info-item .user-icon { background: #dcfce7; color: #10b981; }
.info-item .calendar-icon { background: #fffbeb; color: #f59e0b; }
.task-desc-line {
    display: block;
    padding: 0.2rem 0;
    color: #4b5563;
}
.miss-zero { 
    background: #dcfce7; color: #065f46; 
    padding: 0.2rem 0.5rem; border-radius: 16px; 
    font-size: 0.62rem; font-weight: 600; 
    margin-left: auto;
}
.miss-late { 
    background: #fef3c7; color: #92400e; 
    padding: 0.2rem 0.5rem; border-radius: 16px; 
    font-size: 0.62rem; font-weight: 600; 
    margin-left: auto;
}
.miss-num-inline { 
    background: #fee2e2; color: #dc2626; 
    padding: 0.2rem 0.5rem; border-radius: 16px; 
    font-size: 0.62rem; font-weight: 600; 
    margin-left: auto;
}
.user-missing { color: #dc2626; font-weight: 600; }
.deadline-card {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.deadline-card i { color: #3b82f6; font-size: 0.75rem; }
.deadline-card .deadline-text { font-size: 0.7rem; color: #3b82f6; }
.deadline-card .deadline-time { font-weight: 700; color: #1e40af; }
.download-tool {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding-top: 0.8rem;
    border-top: 1px dashed #e5e7eb;
}
.download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: #065f46;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    min-height: 28px;
}
.download-link i {
    font-size: 0.68rem !important;
    flex-shrink: 0;
}
.download-link:hover { background: #d1fae5; transform: translateY(-1px); }
.download-link.backup-link {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.download-link.backup-link:hover { background: #fef3c7; }

/* ===== 统计表格区域 ===== */
.stats-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}
.stats-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.stats-title i { color: #3b82f6; }
.stats-table-wrapper { overflow-x: auto; }
.miss-count-zero { 
    background: #ecfdf5; color: #065f46;
    padding: 0.2rem 0.6rem; border-radius: 16px; 
    font-weight: 600;
}
.miss-count-num { 
    background: #fee2e2; color: #dc2626;
    padding: 0.2rem 0.6rem; border-radius: 16px; 
    font-weight: 700;
}
.miss-tasks-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.miss-task-tag {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
    padding: 0.2rem 0.5rem;
    border-radius: 16px;
    font-size: 0.68rem;
    font-weight: 500;
}

/* ===== 补交按钮和状态标签 ===== */
.submit-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 16px;
    font-size: 0.62rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-left: 6px;
    transition: all 0.2s;
    line-height: 1;
    min-height: 24px;
}
.submit-btn i {
    font-size: 0.62rem !important;
    flex-shrink: 0;
}
.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* ===== 审核理由图标 ===== */
.review-reason {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #6366f1;
    color: white;
    border-radius: 50%;
    font-size: 0.65rem;
    margin-left: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.review-reason:hover {
    transform: scale(1.1);
}
.review-reason i {
    font-size: 0.65rem;
}

.submit-work-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    display: block;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0.8rem auto 0;
    transition: all 0.2s;
    line-height: 1.2;
    text-align: center;
}
.submit-work-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* 状态标签样式 */
.miss-leave {
    background: #dbeafe; 
    color: #1e40af; 
    padding: 0.2rem 0.5rem; 
    border-radius: 16px; 
    font-size: 0.62rem; 
    font-weight: 600; 
    margin-left: auto;
}
.miss-pending {
    background: #fef3c7; 
    color: #92400e; 
    padding: 0.2rem 0.5rem; 
    border-radius: 16px; 
    font-size: 0.62rem; 
    font-weight: 600; 
    margin-left: auto;
}

/* ===== 弹窗样式 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.active {
    display: flex;
}
.modal-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    max-width: 90%;
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
}
.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

/* 补交弹窗样式 */
.submit-modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.modal-submit-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    padding: 0.7rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    flex: 1;
    min-height: 42px;
    box-sizing: border-box;
}
.modal-submit-btn i,
.modal-cancel-btn i {
    font-size: 0.85rem !important;
    flex-shrink: 0;
    line-height: 1;
}
.modal-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}
.modal-cancel-btn {
    background: #f3f4f6;
    border: none;
    color: #6b7280;
    padding: 0.7rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    min-height: 42px;
    box-sizing: border-box;
}
.modal-cancel-btn:hover {
    background: #e5e7eb;
}

/* 请假弹窗样式 */
.leave-modal-container {
    width: 90%;
    max-width: 420px;
}
.leave-form-group {
    margin-bottom: 1rem;
}
.leave-form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.leave-form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    resize: vertical;
    min-height: 100px;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
}
.leave-form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 提交作业弹窗样式 */
.work-submit-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}
.work-submit-table th,
.work-submit-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}
.work-submit-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}
.work-submit-table tr:hover {
    background: #f9fafb;
}

/* ===== 审核意见列 ===== */
.review-reason-cell {
    min-width: 150px;
    max-width: 200px;
}
.work-review-reason {
    color: #6366f1;
    font-size: 0.75rem;
}
.work-review-reason .reason-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.no-reason {
    color: #9ca3af;
    font-size: 0.75rem;
}
.work-actions {
    min-height: 60px;
}

/* ===== 上传进度条 ===== */
.upload-progress-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    min-width: 300px;
    max-width: 400px;
}
.upload-progress-text {
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.upload-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.upload-progress-percent {
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
    font-weight: 500;
}

.work-actions {
    display: flex;
    gap: 6px;
}
.work-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
    line-height: 1;
    min-height: 28px;
}
.work-btn i {
    font-size: 0.75rem !important;
    flex-shrink: 0;
}
.work-leave-btn {
    background: #fffbeb;
    color: #92400e;
}
.work-leave-btn:hover {
    background: #fef3c7;
}
.work-upload-btn {
    background: #eff6ff;
    color: #1e40af;
}
.work-upload-btn:hover {
    background: #dbeafe;
}

/* 提交作业弹窗状态样式 */
.work-status-submitted {
    background: #ecfdf5;
    color: #065f46;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}
.work-status-late {
    background: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}
.work-status-missing {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}
.work-status-pending {
    background: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}
.work-status-leave {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ===== 底部 ===== */
.footer {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* ===== 网盘弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: 0.2s;
}
.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}
.modal-container {
    background: white;
    border-radius: 24px;
    max-width: 360px;
    width: 90%;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
.modal-container i {
    font-size: 2.5rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}
.modal-container h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
}
.extract-code {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e40af;
    margin: 1rem 0;
}
.modal-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    color: white;
    padding: 0.7rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
}
.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}
.close-modal-btn {
    background: #f3f4f6;
    color: #6b7280;
    margin-left: 0.5rem;
}
.close-modal-btn:hover {
    background: #e5e7eb;
    box-shadow: none;
}

/* ===== 响应式 ===== */
@media (max-width: 1400px) {
    .tasks-grid { grid-template-columns: repeat(3, 1fr); }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
    .tasks-grid { grid-template-columns: repeat(2, 1fr); }
    .navbar-menu { display: none; }
}
@media (max-width: 780px) {
    body { padding-bottom: 2rem; }
    .navbar { padding: 0 1rem; }
    .dashboard { padding: 1.5rem 1rem; }
    .tasks-grid { grid-template-columns: 1fr; gap: 1.2rem; }
    .stats-row { grid-template-columns: 1fr; }
    .announcement-bar { flex-direction: column; align-items: flex-start; }
    .stat-card { padding: 1rem; }
    .stats-section { padding: 1rem; }
}

