﻿/* ========== 项目管理页面专用样式 ========== */
.project-page {
    min-height: calc(100vh - var(--header-height) - var(--safe-top) - var(--footer-total-height));
}

/* ========== 欢迎信息区域 ========== */
.welcome-section {
    background: linear-gradient(180deg, var(--lighter-blue) 0%, var(--bg-primary) 100%);
    border-radius: 0 0 24px 24px;
    margin: -12px -12px 20px;
    padding: 24px 16px 16px;
    position: relative;
    overflow: hidden;
}

    .welcome-section::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(0, 170, 255, 0.05) 0%, transparent 70%);
        animation: pulse-glow 4s ease-in-out infinite;
    }

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.welcome-motto {
    font-size: 14px;
    font-weight: 700;
    color: #0088ee;
    text-align: center;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #008833 0%, #00aa88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 136, 238, 0.2);
}

.welcome-main-content {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 20px;
}

.welcome-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.welcome-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    max-width: 320px;
    margin: 0 auto;
}

.service-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-top: 12px;
}

.service-card {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 8px 4px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .service-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 0.1px;
        height: 100%;
        background: linear-gradient(180deg, var(--tech-blue) 0%, var(--discovery-blue) 100%);
    }

    .service-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .service-card:active {
        transform: translateY(0);
        box-shadow: var(--shadow-sm);
    }

.service-icon {
    width: 30px;
    height: 30px;
    background: var(--lighter-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    font-size: 17px;
    color: var(--tech-blue);
}

.service-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.service-desc {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* ========== 数据卡片区域 ========== */
.stats-section {
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    background: linear-gradient(135deg, var(--tech-blue) 0%, var(--accent-cyan) 100%);
    border-radius: 18px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.3);
    position: relative;
    overflow: hidden;
    border: none;
    /*background: var(--bg-primary);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;*/
}

    .stat-card::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
        animation: shimmer 3s ease-in-out infinite;
    }

@keyframes shimmer {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    50% {
        transform: translate(-50%, -50%) rotate(180deg);
    }
}
    .stat-card::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--tech-blue) 0%, var(--discovery-blue) 100%);
    }

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: white;
    margin-bottom: 6px;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
    /* font-size: 28px;
    font-weight: 700;
    color: var(--tech-blue);
    margin-bottom: 4px;
    line-height: 1;*/
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    position: relative;
    z-index: 2;
    /*font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;*/
}

/* ========== 属性筛选器区域 ========== */
.filters-section {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.filter-group {
    margin-bottom: 16px;
}

    .filter-group:last-child {
        margin-bottom: 0;
    }

.filter-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

    .filter-title::before {
        content: '';
        width: 3px;
        height: 16px;
        background: var(--tech-blue);
        border-radius: 2px;
        margin-right: 8px;
    }

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-option {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .filter-option:hover {
        background: var(--light-blue);
        border-color: var(--tech-blue);
    }

    .filter-option:active {
        transform: scale(0.95);
    }

    .filter-option.active {
        background: var(--tech-blue);
        color: white;
        border-color: var(--tech-blue);
    }

/* ========== 项目列表区域 ========== */
.projects-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .section-title::before {
        content: '';
        width: 3px;
        height: 16px;
        background: var(--tech-blue);
        border-radius: 2px;
        margin-right: 8px;
    }

.total-count {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: normal;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 12px;
}

.project-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    break-inside: avoid;
    page-break-inside: avoid;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

    .project-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .project-card:active {
        transform: translateY(0);
        box-shadow: var(--shadow-sm);
    }

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.project-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    flex: 1;
    margin-right: 8px;
}

.project-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.project-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

    .project-description:hover::after {
        content: attr(data-full-text);
        position: absolute;
        top: 0;
        left: 0;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 12px;
        box-shadow: var(--shadow-lg);
        z-index: 10;
        width: 280px;
        max-width: calc(100vw - 40px);
        white-space: normal;
        word-wrap: break-word;
    }

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.project-budget {
    font-weight: 600;
    color: var(--danger);
    font-size: 14px;
}

.project-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag {
    background: var(--light-blue);
    color: var(--tech-blue);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    border: 1px solid rgba(0, 102, 204, 0.2);
}

    .tag.domain {
        background: var(--lighter-blue);
        color: var(--dark-blue);
    }

.project-status {
    background: var(--light-blue);
    color: var(--tech-blue);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    align-self: flex-start;
}

    .project-status.connected {
        background: #e8f5e8;
        color: var(--success);
    }

.consult-btn {
    background: linear-gradient(135deg, var(--tech-blue) 0%, var(--discovery-blue) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    margin-top: auto;
}

    .consult-btn:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

    .consult-btn:active {
        transform: translateY(0);
    }

/* ========== 分页器样式 ========== */
.pagination-container {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    text-align: center;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
}

    .pagination-btn:hover:not(:disabled) {
        background: var(--light-blue);
        border-color: var(--tech-blue);
    }

    .pagination-btn:active:not(:disabled) {
        transform: scale(0.95);
    }

    .pagination-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .pagination-btn.active {
        background: var(--tech-blue);
        color: white;
        border-color: var(--tech-blue);
    }

.pagination-prev,
.pagination-next {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--tech-blue);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .pagination-prev:hover:not(:disabled),
    .pagination-next:hover:not(:disabled) {
        background: var(--light-blue);
        border-color: var(--tech-blue);
    }

.pagination-ellipsis {
    padding: 8px 4px;
    color: var(--text-muted);
}

/* ========== 响应式适配 ========== */
@media (max-width: 360px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .service-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 441px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== 加载状态 ========== */
.loading-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.loading-animation {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--tech-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 48px;
    color: var(--border-color);
    margin-bottom: 16px;
}

.empty-text {
    font-size: 14px;
    margin-bottom: 8px;
}

.empty-subtext {
    font-size: 12px;
    color: var(--text-muted);
}
