/* ダッシュボードスタイル */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h2 {
    font-size: 2rem;
    color: #333;
    font-weight: 700;
}

/* サマリーカード */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

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

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: var(--brand-grad);
}

.card-content h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.25rem;
}

.card-change {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
}

.card-change.positive {
    background-color: #e8f5e8;
    color: #2e7d32;
}

.card-change.negative {
    background-color: #ffebee;
    color: #c62828;
}

/* チャートセクション */
.chart-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.chart-container h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.chart-container canvas {
    max-height: 300px;
}

/* テーブルセクション */
.table-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

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

.table-header h3 {
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

/* AI分析セクション */
.ai-insights-section {
    margin-top: 2rem;
}

.ai-insights-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.ai-insights-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.ai-insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--brand-grad);
    color: white;
}

.ai-insights-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-insights-title i {
    font-size: 1.3rem;
}

.ai-insights-title h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.ai-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.ai-insights-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* インサイトアイテム */
.insight-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid;
    transition: all 0.2s ease;
}

.insight-item:hover {
    transform: translateX(4px);
}

.insight-success {
    background: #f0fdf4;
    border-color: #22c55e;
}

.insight-warning {
    background: #fffbeb;
    border-color: #f59e0b;
}

.insight-info {
    background: #eff6ff;
    border-color: #3b82f6;
}

.insight-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.insight-success .insight-icon {
    background: #dcfce7;
    color: #16a34a;
}

.insight-warning .insight-icon {
    background: #fef3c7;
    color: #d97706;
}

.insight-info .insight-icon {
    background: #dbeafe;
    color: #2563eb;
}

.insight-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.35rem;
}

.insight-content p {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* アクションアイテム */
.action-item {
    padding: 1rem;
    border-radius: 12px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.action-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
}

.action-priority-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.priority-high {
    background: #fee2e2;
    color: #dc2626;
}

.priority-medium {
    background: #fef3c7;
    color: #d97706;
}

.priority-low {
    background: #dbeafe;
    color: #2563eb;
}

.action-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    background: var(--brand-grad);
    color: white;
}

.action-text h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.35rem;
}

.action-text p {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .chart-section {
        grid-template-columns: 1fr;
    }
    
    .table-actions {
        flex-direction: column;
    }
    
    .export-btn {
        margin-left: 0;
        margin-bottom: 0.5rem;
    }

    .ai-insights-container {
        grid-template-columns: 1fr;
    }
}