/* 财务管理页面样式 */

/* 财务概览卡片 */
.overview-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.overview-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

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

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 24px;
}

.card-icon.income {
    background: linear-gradient(135deg, #e6f7ff, #cceeff);
    color: #1890ff;
}

.card-icon.expense {
    background: linear-gradient(135deg, #fff2e6, #ffd9b3);
    color: #fa8c16;
}

.card-icon.profit {
    background: linear-gradient(135deg, #f6ffed, #d9f7be);
    color: #52c41a;
}

.card-icon.receivable {
    background: linear-gradient(135deg, #f0f5ff, #d6e4ff);
    color: #2f54eb;
}

.card-info h3 {
    margin: 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.card-info .amount {
    margin: 8px 0 4px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.card-info .trend {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    padding: 2px 8px;
}

.trend.up {
    background-color: rgba(82, 196, 26, 0.1);
    color: #52c41a;
}

.trend.down {
    background-color: rgba(245, 34, 45, 0.1);
    color: #f5222d;
}

.trend.neutral {
    background-color: rgba(0, 0, 0, 0.05);
    color: #666;
}

/* 财务区域 */
.finance-section {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

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

.section-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.section-header h2:before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: #1890ff;
    margin-right: 8px;
    border-radius: 2px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9f9f9;
    border-radius: 6px;
    padding: 4px 12px;
}

.date-input {
    padding: 8px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.date-input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
}

/* 收入图表 */
.income-chart {
    height: 400px;
    margin-bottom: 24px;
    background-color: #fafafa;
    border-radius: 8px;
    padding: 16px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-height: 300px;
    display: block;
    overflow: hidden;
}

.income-chart:before {
    content: '收入趋势图';
    position: absolute;
    top: 8px;
    left: 16px;
    font-size: 14px;
    color: #666;
}

/* 图表加载状态 */
.chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 10;
    font-size: 16px;
    color: #1890ff;
}

.chart-loading i {
    animation: spin 1.2s infinite linear;
    margin-right: 8px;
    font-size: 24px;
}

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

/* 测试图表 */
#testChart {
    border: 2px solid #1890ff;
    margin: 20px 0;
    border-radius: 8px;
    height: 300px;
}

/* 期间选择器样式 */
.chart-controls {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.period-selector {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.period-selector:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.period-selector.active {
    background-color: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

/* 导出数据按钮 */
.export-button {
    margin-left: auto;
    padding: 6px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.export-button:hover {
    border-color: #52c41a;
    color: #52c41a;
}

.export-button i {
    font-size: 16px;
}

/* 收入表格 */
.income-table {
    overflow-x: auto;
}

.income-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
}

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

.income-table th {
    background: #f5f5f5;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.income-table tbody tr:hover {
    background: #f9f9f9;
}

.income-table td {
    font-size: 14px;
}

/* 支出分类卡片 */
.expense-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.category-card {
    background: #fafafa;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.category-card:hover {
    background: #f5f5f5;
    border-color: #e6e6e6;
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #e6f7ff;
    color: #1890ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 22px;
    flex-shrink: 0;
}

.category-info h3 {
    margin: 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.category-info .amount {
    margin: 6px 0 0 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* 支出表格 */
.expense-table {
    overflow-x: auto;
    margin-top: 20px;
}

.expense-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
}

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

.expense-table th {
    background: #f5f5f5;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.expense-table tbody tr:hover {
    background: #f9f9f9;
}

/* 对账管理 */
.reconciliation-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.tab {
    padding: 10px 24px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    color: #666;
}

.tab:hover {
    color: #1890ff;
}

.tab.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
    font-weight: 500;
}

.reconciliation-content {
    min-height: 200px;
    background: #fafafa;
    border-radius: 8px;
    padding: 16px;
}

/* 报表管理 */
.report-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.report-item {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.report-item:hover {
    background: #f9f9f9;
    border-color: #e6e6e6;
}

.report-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f0f5ff;
    color: #2f54eb;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 24px;
    flex-shrink: 0;
}

.report-info {
    flex-grow: 1;
}

.report-info h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.report-info p {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: #999;
}

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

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn:hover {
    background: #f5f5f5;
    color: #333;
}

.btn.primary {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

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

.btn.small {
    padding: 4px 12px;
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .overview-cards,
    .expense-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .report-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .overview-cards,
    .expense-categories {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .date-range {
        width: 100%;
        justify-content: space-between;
    }
    
    .period-selector-container {
        width: 100%;
    }
    
    .period-selector {
        flex: 1;
        text-align: center;
    }
    
    .income-chart {
        height: 300px;
    }
}

/* 对账管理 - 添加样式 */
.reconciliation-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.summary-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #f0f0f0;
}

.summary-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.summary-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.warning-text {
    color: #fa8c16;
    font-weight: 600;
}

.reconciliation-table {
    margin-top: 16px;
}

.reconciliation-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
}

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

.reconciliation-table th {
    background: #f5f5f5;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.reconciliation-table tbody tr:hover {
    background: #f9f9f9;
}

.highlight-row {
    background-color: rgba(250, 140, 22, 0.05);
}

/* 响应式设计补充 */
@media (max-width: 1200px) {
    .reconciliation-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .reconciliation-summary {
        grid-template-columns: 1fr;
    }
}

/* 收入统计卡片容器 */
.card-container {
    margin-bottom: 24px;
}

.income-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.income-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* 卡片头部样式 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.card-header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #1890ff, #40a9ff);
    border-radius: 3px 3px 0 0;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
}

.card-header h3:before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: #1890ff;
    margin-right: 8px;
    border-radius: 2px;
}

.tools {
    display: flex;
    gap: 8px;
}

.tool-button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    background: #fff;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-button:hover {
    background: #f0f7ff;
    color: #1890ff;
    border-color: #d6e4ff;
}

.tool-button i {
    font-size: 18px;
}

/* 日期范围选择器 */
.date-range-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background-color: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.date-range-container .date-input {
    width: 160px;
    height: 36px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.date-range-container .date-input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
    outline: none;
}

.date-range-container span {
    color: #666;
    font-size: 14px;
}

/* 图表控制区域 */
.chart-controls {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 12px;
}

.period-selector {
    height: 36px;
    padding: 0 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.period-selector:hover {
    border-color: #1890ff;
    color: #1890ff;
    background-color: #f0f7ff;
}

.period-selector.active {
    background-color: #1890ff;
    color: #fff;
    border-color: #1890ff;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.25);
}

.export-button {
    margin-left: auto;
    height: 36px;
    padding: 0 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.export-button:hover {
    border-color: #52c41a;
    color: #52c41a;
    background-color: #f6ffed;
}

.export-button i {
    font-size: 16px;
}

/* 收入图表 */
.income-chart {
    height: 360px;
    padding: 20px 16px;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    transition: all 0.2s ease;
}

.chart-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

/* 收入表格容器 */
.income-table-container {
    padding: 16px 24px 24px;
    background-color: #fff;
    max-height: 400px;
    overflow-y: auto;
}

.income-table-container table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.income-table-container th {
    background: #f5f5f5;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.income-table-container tbody tr {
    transition: all 0.2s ease;
}

.income-table-container tbody tr:hover {
    background: #f0f7ff;
}

.income-table-container tbody tr:last-child td {
    border-bottom: none;
}

.income-table-container td {
    font-size: 14px;
    color: #555;
}

/* 状态标签 */
.status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

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

.status.pending {
    background-color: #fffbe6;
    color: #faad14;
}

.status.failed {
    background-color: #fff1f0;
    color: #f5222d;
}

@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    
    .tools {
        align-self: flex-end;
    }
    
    .date-range-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    
    .date-range-container .date-input {
        width: 100%;
    }
    
    .chart-controls {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }
    
    .export-button {
        margin-left: 0;
        justify-content: center;
    }
    
    .income-chart {
        height: 300px;
        padding: 16px 8px;
    }
    
    .income-table-container {
        padding: 8px 16px 16px;
    }
} 