/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Banner样式 */
.banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 200px 200px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 200px 200px;
    }
}

.banner-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.banner-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.banner-notification {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    animation: slideIn 0.5s ease-out;
    max-width: 600px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

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

.notification-text {
    font-size: 1rem;
    font-weight: 500;
}

/* 操作按钮区域 */
.action-bar {
    padding: 1.5rem 2rem;
    background-color: white;
    border-bottom: 1px solid #e8e8e8;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #d9d9d9;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #e8e8e8;
    border-color: #bfbfbf;
}

.btn-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

/* 商机列表区域 */
.business-list {
    flex: 1;
    padding: 2rem;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.list-header h2 {
    font-size: 1.8rem;
    color: #333;
}

.filter-options {
    display: flex;
    gap: 1rem;
}

.filter-select {
    padding: 0.6rem 1rem;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 0.95rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: #667eea;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* 统计栏样式 */
.statistics-section {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.statistic-item {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.statistic-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.statistic-item.status:first-of-type {
    background-color: #e6f7ff;
    color: #1890ff;
}

.statistic-item.status:last-of-type {
    background-color: #f6ffed;
    color: #52c41a;
}

.statistic-item.category:first-of-type {
    background-color: #fff7e6;
    color: #fa8c16;
}

.statistic-item.category:nth-of-type(2) {
    background-color: #f6ffed;
    color: #52c41a;
}

.statistic-item.category:last-of-type {
    background-color: #fff1f0;
    color: #ff4d4f;
}

.statistic-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.statistic-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

/* 商机卡片容器 */
.business-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* 商机卡片样式 */
.business-card {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
    position: relative;
}

.business-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.business-card.completed {
    opacity: 0.6;
    text-decoration: line-through;
    background-color: #f5f5f5;
}

.business-card.priority-must {
    border-left-color: #ff4d4f;
    color: #ff4d4f;
}

.business-card.priority-reference {
    border-left-color: #1890ff;
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.checkbox-wrapper {
    position: relative;
    top: 0.2rem;
}

.business-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
    transition: transform 0.2s ease;
}

.business-checkbox:hover {
    transform: scale(1.1);
}

.card-content {
    flex: 1;
}

.card-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background-color: #f0f5ff;
    color: #667eea;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    /* 限制显示3行内容 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #888;
}

.meta-label {
    font-weight: 600;
}

.priority-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.priority-badge.must {
    background-color: #fff1f0;
    color: #ff4d4f;
    font-weight: bold;
}

.priority-badge.reference {
    background-color: #e6f7ff;
    color: #1890ff;
}

.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.in-progress {
    background-color: #e6f7ff;
    color: #1890ff;
    font-weight: 600;
}

.status-badge.completed {
    background-color: #f6ffed;
    color: #52c41a;
}

.card-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-weight: 500;
}

.btn-update {
    background-color: #1890ff;
    color: white;
}

.btn-update:hover {
    background-color: #40a9ff;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    font-size: 1.4rem;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

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

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.form-control[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

select.form-control {
    cursor: pointer;
}

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

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

/* 确认弹窗样式 */
.confirm-modal {
    max-width: 400px;
}

.confirm-message {
    font-size: 1.1rem;
    color: #333;
    text-align: center;
    padding: 1rem 0;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.empty-state-subtext {
    font-size: 0.95rem;
    color: #bbb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .banner-title {
        font-size: 1.8rem;
    }

    .business-cards {
        grid-template-columns: 1fr;
    }

    .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .filter-options {
        flex-direction: column;
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .modal {
        width: 95%;
        margin: 1rem;
    }

    .card-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .banner {
        padding: 1.5rem;
    }

    .banner-title {
        font-size: 1.5rem;
    }

    .banner-notification {
        font-size: 0.9rem;
    }

    .action-bar {
        padding: 1rem;
    }

    .business-list {
        padding: 1rem;
    }

    .business-card {
        padding: 1rem;
    }
}
