/* 案内文 */
.welcome-message {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 600px;
}

.welcome-message p {
    margin: 0;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* コンパクトダッシュボード */
.modern-dashboard {
    width: 100%;
    margin: 0;
    padding: 0.5rem;
    background: #f8fafc;
    height: calc(100vh - 120px);
    overflow: visible;
}

/* ハイライトタイトル */
.highlighted-title {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-left: 5px solid #16a085;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    min-width: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.3px;
}

.highlighted-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #16a085 0%, #1abc9c 100%);
    border-radius: 2px;
}

/* 分析ボタンコンテナ */
.analytics-buttons {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* お気に入りFAQ管理モーダル */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-body {
    padding: 1.5rem;
}

.popular-faq-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: white;
}

.faq-order-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 60px;
}

.order-number {
    font-weight: bold;
    color: #4a5568;
    font-size: 0.9rem;
}

.btn-small {
    background: #e2e8f0;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    min-width: 30px;
}

.btn-small:hover:not(:disabled) {
    background: #cbd5e0;
}

.btn-small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.faq-content {
    flex: 1;
}

.faq-question {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.faq-meta {
    font-size: 0.85rem;
    color: #718096;
}

/* 分析カード */
.analytics-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    width: 220px;
    height: 140px;
    flex-shrink: 0;
    cursor: pointer;
}

.analytics-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: #16a085;
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%) !important;
}

.analytics-card .card-icon {
    width: 72px;
    height: 72px;
    background: transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.analytics-card:hover .card-icon {
    transform: scale(1.1);
}

.analytics-card .card-icon svg {
    width: 48px;
    height: 48px;
    transition: all 0.3s ease;
}

/* アイコン別の色設定 */
.analytics-card[onclick*="analysis"] .card-icon svg {
    color: #3b82f6; /* 青 */
}

.analytics-card[onclick*="feedback"] .card-icon svg {
    color: #10b981; /* 緑 */
}

.analytics-card[onclick*="faq"] .card-icon svg {
    color: #f59e0b; /* オレンジ */
}

.analytics-card[onclick*="popular"] .card-icon svg {
    color: #eab308; /* 黄色 */
}

.analytics-card[onclick*="config"] .card-icon svg {
    color: #6b7280; /* グレー */
}

.analytics-card[onclick*="stats"] .card-icon svg {
    color: #8b5cf6; /* 紫 */
}

.analytics-card[onclick*="dictionary"] .card-icon svg {
    color: #8b5cf6; /* 紫 */
}

.analytics-card[onclick*="images"] .card-icon svg {
    color: #ec4899; /* ピンク */
}
}

.analytics-card[onclick*="dictionary"] .card-icon svg {
    color: #8b5cf6; /* 紫 */
}

.analytics-card[onclick*="images"] .card-icon svg {
    color: #ec4899; /* ピンク */
}


.analytics-card .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    line-height: 1.3;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.5px;
}

/* ヒーローセクション */
.dashboard-hero {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    margin: 0 0 0.5rem 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 500;
}

/* 統計概要 */
.stats-overview {
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.stat-item {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

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

.stat-item.chat-theme {
    border-left: 3px solid #3b82f6;
}

.stat-item.bot-theme {
    border-left: 3px solid #10b981;
}

.stat-icon {
    font-size: 1.2rem;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f1f5f9;
}

.chat-theme .stat-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.bot-theme .stat-icon {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.chat-theme .stat-number {
    color: #2563eb;
}

.bot-theme .stat-number {
    color: #059669;
}

.stat-label {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 500;
}

/* クイックアクション */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem 1rem 1rem;
}

.action-section {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.title-icon {
    font-size: 1rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
}

.action-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.action-card:hover {
    background: white;
    border-color: #16a085;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(22, 160, 133, 0.15);
}

.card-icon {
    font-size: 1.2rem;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: transparent;
}

.action-card:hover .card-icon {
    transform: scale(1.1);
}

.card-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.85rem;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.3px;
}

.card-desc {
    font-size: 0.7rem;
    color: #64748b;
    margin: 0;
}

/* アプリタブ */
.app-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.app-tab {
    border-radius: 6px;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
}

.chat-tab {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #3b82f6;
}

.bot-tab {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #10b981;
}

.tab-title {
    text-align: center;
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.25rem;
    border-radius: 4px;
}

.chat-tab .tab-title {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.1);
}

.bot-tab .tab-title {
    color: #047857;
    background: rgba(16, 185, 129, 0.1);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .app-tabs {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
