/* 分析機能共通CSS */
.analytics-header {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .date-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .date-filter .date-range {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .date-filter .date-range span {
        flex-shrink: 0;
    }
}

.date-filter label {
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    margin-right: 0.5rem;
}

.date-filter input[type="date"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: white;
}

.date-filter input[type="date"]:focus {
    outline: none;
    border-color: #16a085;
    box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.1);
}

.date-filter .btn-filter {
    background: linear-gradient(135deg, #16a085, #1abc9c);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.date-filter .btn-filter:hover {
    background: linear-gradient(135deg, #138d75, #16a085);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(22, 160, 133, 0.3);
}

.date-filter .btn-filter:active {
    transform: translateY(0);
}

.date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-range span {
    color: #6b7280;
    font-weight: 500;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-style: italic;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 0.5rem;
    border: 2px dashed #d1d5db;
}

.date-filter select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

.date-filter select:focus {
    outline: none;
    border-color: #16a085;
    box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.1);
}

.category-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.category-table th,
.category-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.category-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.85rem;
}

.category-table td {
    font-size: 0.85rem;
}

.category-table tr:hover {
    background: #f9fafb;
}

.problem-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.problem-table th,
.problem-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.problem-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.problem-table tr:hover {
    background: #f9fafb;
}

.unrecorded-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.unrecorded-table th,
.unrecorded-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.unrecorded-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.unrecorded-table tr:hover {
    background: #f9fafb;
}

.no-data {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* グラフページスタイル */
.graphs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.graphs-container {
    /* Gridレイアウトを削除 */
}

/* ①検索数分析は全幅 */
.graphs-container > .graph-section:first-child {
    width: 100%;
}

.graph-section {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    padding: 1rem;
    margin-bottom: 2rem;
}

.graph-section h3 {
    margin-bottom: 0.75rem;
    color: #1f2937;
    font-size: 1rem;
}

/* 横並びレイアウト */
.graph-row {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.graph-row > .graph-section {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.graph-item {
    flex: 2;
    min-height: 200px;
}

.stats-table {
    flex: 1;
    min-width: 250px;
}

.stats-table h4 {
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.9rem;
}

.stats-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.stats-table th,
.stats-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.stats-table th {
    background: #f9fafb;
    font-weight: 600;
}

canvas {
    max-width: 100%;
    height: 250px;
}

/* 検索数分析グラフは高さを大きく */
#chatSearchChart,
#botSearchChart {
    height: 300px !important;
}

/* 日別・月別グラフは少し小さく */
#chatDailyChart,
#chatMonthlyChart,
#botDailyChart,
#botMonthlyChart {
    height: 200px !important;
}

@media (max-width: 768px) {
    .graphs-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .graphs-container {
        grid-template-columns: 1fr;
    }
    
    .graph-row {
        flex-direction: column;
    }
    
    .graph-item,
    .stats-table {
        flex: none;
    }
}

/* 分析専用レイアウト */
/* 分析機能共通スタイル */
.analytics-content {
    padding: 1rem;
    background: #f8fafc;
    min-height: 100vh;
}

.analytics-layout {
    width: 100%;
    height: 100%;
    padding: 0;
    background: #f8f9fa;
}

.analytics-content {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 0;
    padding: 1.5rem;
    box-shadow: none;
    overflow-y: auto;
}

/* テーブル縦線区切り */
.usage-table-compact table td,
.feedback-table-compact table td {
    border-right: 1px solid #e5e7eb;
}

.usage-table-compact table td:last-child,
.feedback-table-compact table td:last-child {
    border-right: none;
}

/* 日付カラムの幅調整 */
.usage-table-compact table .date-cell,
.feedback-table-compact table .date-cell {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}

/* 分析画面のスタイル */
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.analytics-header h2 {
    margin: 0;
    color: #1f2937;
    cursor: help;
    position: relative;
}

.analytics-header h2:hover {
    color: #3b82f6;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 0.5rem;
    border: 1px solid #bfdbfe;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}

@media (max-width: 768px) {
    .date-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .date-filter .date-range {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
}

.date-filter label {
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.date-filter input[type="date"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: white;
    min-width: 140px;
}

.date-filter input[type="date"]:focus {
    outline: none;
    border-color: #16a085;
    box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.1);
}

.date-filter .btn-filter {
    background: linear-gradient(135deg, #16a085, #1abc9c);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 80px;
}

.date-filter .btn-filter:hover {
    background: linear-gradient(135deg, #138d75, #16a085);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(22, 160, 133, 0.3);
}

.date-filter .btn-filter:active {
    transform: translateY(0);
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6b7280;
    font-size: 0.875rem;
}

.usage-table, .feedback-table {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.feedback-table-improved,
.usage-table-improved {
    overflow-x: auto;
}

.feedback-table-improved table,
.usage-table-improved table,
.usage-table table, .feedback-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

/* フィードバック・利用履歴テーブルの列幅 */
.col-app { width: 90px; }
.col-type { width: 110px; }
.col-id { width: 50px; }
.col-category { width: 120px; }
.col-question { width: 150px; }
.col-answer { width: 250px; }
.col-reason { width: 100px; }
.col-content { width: 150px; }
.col-date { width: 110px; }

.usage-table th, .feedback-table th {
    background: #f9fafb;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.usage-table th:hover, .feedback-table th:hover {
    background: #f3f4f6;
}

.usage-table td, .feedback-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: break-word;
}

.usage-table tr:hover, .feedback-table tr:hover {
    background: #f9fafb;
}

.app-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

.app-badge.app-chat {
    background: #3b82f6;
}

.app-badge.app-bot {
    background: #10b981;
}

.question-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feedback-text {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.stats-section {
    margin-bottom: 2rem;
}

.stats-section h3 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.app-stats {
    display: flex;
    gap: 1rem;
}

.faq-ranking {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.ranking-item:last-child {
    border-bottom: none;
}

.rank {
    width: 2rem;
    height: 2rem;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
}

.faq-info {
    flex: 1;
}

.faq-question {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.faq-id {
    font-size: 0.75rem;
    color: #6b7280;
}

.access-count {
    font-weight: bold;
    color: #3b82f6;
}

.daily-chart {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    padding: 1rem;
}

.daily-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.date {
    width: 100px;
    font-size: 0.875rem;
    color: #374151;
}

.daily-bars {
    flex: 1;
    display: flex;
    height: 1.5rem;
    margin: 0 1rem;
    border-radius: 0.25rem;
    overflow: hidden;
}

.bar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
}

.chat-bar {
    background: #3b82f6;
}

.bot-bar {
    background: #10b981;
}

.total {
    width: 50px;
    text-align: right;
    font-weight: 500;
    color: #374151;
}

.feedback-section {
    margin-top: 2rem;
}

.btn-detail {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.btn-detail:hover {
    background: #2563eb;
}

.record-detail {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
}

.record-detail h3 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.detail-content {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    margin-bottom: 0.75rem;
    align-items: flex-start;
}

.detail-row label {
    width: 120px;
    font-weight: 500;
    color: #374151;
    flex-shrink: 0;
}

.detail-row span {
    color: #1f2937;
    word-break: break-all;
}

.detail-actions {
    text-align: right;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
}

.answer-cell {
    max-width: 300px;
    overflow: hidden;
    word-break: break-word;
    white-space: normal;
}

.stats-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-card-right {
    background: white;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.stat-number-right {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-label-right {
    color: #6b7280;
    font-size: 0.75rem;
}

.feedback-table-compact {
    background: white;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 1rem;
}

.feedback-table-compact h4 {
    margin: 0;
    padding: 0.75rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.feedback-table-compact table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.feedback-table-compact th {
    background: #f9fafb;
    padding: 0.5rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.75rem;
}

.feedback-table-compact td {
    padding: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.75rem;
}

.feedback-table-compact tr:hover {
    background: #f9fafb;
}

.reason-cell {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-summary-compact {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card-small {
    background: white;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    text-align: center;
    min-width: 80px;
}

.stat-number-small {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-label-small {
    color: #6b7280;
    font-size: 0.75rem;
}

.usage-table-compact {
    background: white;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.usage-table-compact table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.usage-table-compact th {
    background: #f9fafb;
    padding: 0.5rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.75rem;
}

.usage-table-compact td {
    padding: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.75rem;
}

.usage-table-compact tr:hover {
    background: #f9fafb;
}

.date-cell {
    width: 80px;
    white-space: nowrap;
}

.id-cell {
    width: 40px;
    text-align: center;
}

.content-cell {
    max-width: 200px;
    overflow: hidden;
    word-break: break-word;
    white-space: normal;
}

.path-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.question-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reason-cell {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.type-badge-small {
    display: inline-block;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 500;
    color: white;
    min-width: 30px;
    text-align: center;
}

.type-badge-small.type-faq {
    background: #3b82f6;
}

.type-badge-small.type-category {
    background: #f59e0b;
}

.type-badge-small.type-resolved {
    background: #10b981;
    color: white;
}

.type-badge-small.type-not-resolved {
    background: #ef4444;
    color: white;
}

.type-badge-small.type-form {
    background: #f59e0b;
    color: white;
}

.app-badge-small {
    display: inline-block;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 500;
    color: white;
    min-width: 20px;
    text-align: center;
}

.app-badge-small.app-chat {
    background: #3b82f6;
}

.app-badge-small.app-bot {
    background: #10b981;
}

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

.type-badge.type-faq {
    background: #3b82f6;
}

.type-badge.type-category {
    background: #f59e0b;
}

.date-filter select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: white;
    min-width: 120px;
    cursor: pointer;
}

.date-filter select:focus {
    outline: none;
    border-color: #16a085;
    box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.1);
}

.stats-summary-horizontal {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stat-card-compact {
    background: white;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.stat-number-compact {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-label-compact {
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1.2;
}

.faq-ranking-sidebar {
    background: white;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    padding: 1rem;
    margin-top: 1rem;
}

.faq-ranking-sidebar h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.ranking-item-small {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 0.25rem;
}

.rank-small {
    width: 1.5rem;
    height: 1.5rem;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.faq-info-small {
    flex: 1;
    min-width: 0;
}

.faq-question-small {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.75rem;
    margin-bottom: 0.125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.faq-count-small {
    font-size: 0.625rem;
    color: #6b7280;
}

.daily-chart-sidebar {
    background: white;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    padding: 1rem;
    margin-top: 1rem;
}

.daily-chart-sidebar h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.daily-item-small {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.date-small {
    width: 60px;
    font-size: 0.75rem;
    color: #374151;
}

.daily-bars-small {
    flex: 1;
    display: flex;
    height: 1rem;
    margin: 0 0.5rem;
    border-radius: 0.25rem;
    overflow: hidden;
}

.bar-small {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.625rem;
    font-weight: 500;
}

.total-small {
    width: 30px;
    text-align: right;
    font-weight: 500;
    color: #374151;
    font-size: 0.75rem;
}

.placeholder {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    font-style: italic;
    background: #f9fafb;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

/* 統計ダッシュボード（SVG版） */
.top-bar{display:flex;align-items:center;gap:16px;margin-bottom:16px;flex-wrap:wrap;background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;padding:12px 16px}
.period{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.period input[type=date]{padding:4px 8px;border:1.5px solid #e2e8f0;border-radius:6px;font-size:11px}
.pbtn{padding:5px 12px;border:1.5px solid #e2e8f0;border-radius:7px;background:#fff;font-size:11px;font-weight:600;color:#64748b;cursor:pointer}
.pbtn:hover{border-color:#94a3b8}
.pbtn.on{background:#6366f1;color:#fff;border-color:#6366f1}
.pbtn.csv{background:#6b7280;color:#fff;border-color:#6b7280}
.period-label{font-size:11px;color:#475569;font-weight:600;background:#f1f5f9;padding:4px 10px;border-radius:6px}
.cc{background:#fff;border-radius:14px;padding:16px 18px;border:1px solid #e2e8f0;margin-bottom:14px}
.cc-title{font-size:13px;font-weight:700;color:#334155;margin-bottom:12px;display:flex;align-items:center;gap:6px;background:linear-gradient(90deg,#f1f5f9,transparent);border-left:4px solid #6366f1;padding:8px 10px;border-radius:0 6px 6px 0}
.cc-title svg{flex-shrink:0}
.cg{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}
.cg .cc{margin-bottom:0}
.a1-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.a1-item{text-align:center;padding:10px 8px;background:#f8fafc;border-radius:10px}
.a1-val{font-size:24px;font-weight:800;color:#0f172a;line-height:1.1}
.a1-label{font-size:10px;color:#94a3b8;font-weight:600;margin-top:2px}
.a1-detail{margin-top:12px;display:flex;gap:16px;flex-wrap:wrap}
.a1-detail-item{display:flex;align-items:center;gap:4px;font-size:10px;color:#64748b}
.a1-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}
.sca{position:relative;height:160px;margin-bottom:4px}
.sca svg{width:100%;height:100%}
.clabels{display:flex;justify-content:space-between;font-size:8px;color:#94a3b8;padding:0 2px}
.plist{display:flex;flex-direction:column;gap:8px}
.prow{display:flex;align-items:center;gap:8px}
.plabel{width:40%;flex-shrink:0;font-size:10px;font-weight:600;color:#475569;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pbar{flex:1;height:20px;background:#f1f5f9;border-radius:5px;overflow:hidden}
.pfill{height:100%;border-radius:5px}
.pval{font-size:10px;font-weight:700;color:#334155;width:45px;text-align:right;flex-shrink:0}
.nodata{color:#94a3b8;font-size:10px;padding:12px;text-align:center}
.kt2{width:100%;border-collapse:separate;border-spacing:0;font-size:11px}
.kt2 thead th{background:#f8fafc;padding:8px 10px;text-align:left;font-weight:600;color:#64748b;border-bottom:2px solid #e2e8f0}
.kt2 tbody tr{transition:background .1s}
.kt2 tbody tr:hover{background:#fefce8}
.kt2 tbody td{padding:8px 10px;border-bottom:1px solid #f1f5f9}
.kt2-rank{width:36px;text-align:center;color:#94a3b8;font-weight:700}
.kt2-count{width:56px;text-align:center}
.kt2-badge{display:inline-block;background:#ef4444;color:#fff;font-size:10px;font-weight:700;padding:2px 8px;border-radius:10px;min-width:24px;text-align:center}
@media(max-width:900px){.a1-grid{grid-template-columns:1fr 1fr}.cg{grid-template-columns:1fr}}


/* フィードバック詳細パネル */
.feedback-detail-overlay{position:fixed!important;top:0!important;left:0!important;right:0!important;bottom:0!important;background:rgba(0,0,0,0.4)!important;z-index:9999!important;display:flex!important;justify-content:center!important;align-items:center!important}
.feedback-detail-panel{background:#fff;border-radius:16px;width:520px;box-shadow:0 20px 60px rgba(0,0,0,0.12);overflow:hidden;display:flex;flex-direction:column;max-height:85vh}
.panel-header{padding:14px 20px;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}
.fb-type-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:12px;font-size:12px;font-weight:600}
.fb-type-badge.type-resolved{background:#d1fae5;color:#065f46}
.fb-type-badge.type-not-resolved,.fb-type-badge.type-not-resolved-detail{background:#fee2e2;color:#991b1b}
.panel-close{background:none;border:none;font-size:20px;color:#9ca3af;cursor:pointer;line-height:1;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px}
.panel-close:hover{background:#f3f4f6;color:#374151}
.panel-body{padding:20px;overflow-y:auto;flex:1}
.faq-cat{font-size:12px;color:#9ca3af;margin-bottom:4px}
.faq-q-row{display:flex;align-items:baseline;gap:10px}
.faq-q{font-size:15px;font-weight:600;color:#1f2937;line-height:1.5}
.faq-id{font-size:12px;color:#9ca3af;flex-shrink:0}
.faq-actions{display:flex;gap:8px;margin-top:10px}
.faq-action-btn{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;cursor:pointer;font-size:12px;color:#6b7280;transition:all 0.15s}
.faq-action-btn:hover{background:#f3f4f6;color:#374151;border-color:#d1d5db}
.faq-action-btn svg{width:14px;height:14px}
.divider{height:1px;background:#f3f4f6;margin:16px 0}
.section-title{font-size:12px;font-weight:600;color:#9ca3af;margin-bottom:12px;letter-spacing:0.3px}
.info-list{display:flex;flex-direction:column;gap:12px}
.info-item{display:flex;align-items:flex-start;gap:10px}
.info-icon{width:18px;height:18px;color:#9ca3af;flex-shrink:0;margin-top:1px}
.info-sub{font-size:11px;color:#9ca3af;margin-bottom:1px}
.info-val{font-size:13px;color:#374151;line-height:1.5}
.info-item.reason .info-val{font-size:14px;line-height:1.6}
.status-row{display:flex;align-items:center;gap:8px;margin-top:2px}
.status-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}
.status-select{padding:5px 10px;border:1px solid #e5e7eb;border-radius:6px;font-size:13px;color:#374151;background:#fff}
.status-select:focus{outline:none;border-color:#10b981}
.memo-label{font-size:11px;color:#9ca3af;margin-top:14px;margin-bottom:6px}
.memo-area{width:100%;min-height:72px;padding:10px 12px;border:1px solid #e5e7eb;border-radius:8px;font-size:13px;color:#374151;font-family:inherit;resize:vertical;line-height:1.6}
.memo-area:focus{outline:none;border-color:#10b981}
.memo-area::placeholder{color:#d1d5db}
.responded{font-size:11px;color:#9ca3af;margin-top:6px}
.panel-footer{padding:12px 20px;border-top:1px solid #e5e7eb;display:flex;justify-content:flex-end;flex-shrink:0}
.btn-save{padding:8px 24px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none;background:#10b981;color:#fff;transition:all 0.15s}
.btn-save:hover{background:#059669}
.preview-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.4);z-index:400;display:flex;justify-content:center;align-items:center}
.preview-modal{background:#fff;border-radius:16px;width:600px;max-height:80vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,0.2);animation:popIn 0.15s ease}
@keyframes popIn{from{transform:scale(0.97);opacity:0}to{transform:scale(1);opacity:1}}
.preview-header{padding:14px 20px;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;justify-content:space-between}
.preview-header-title{font-size:14px;font-weight:600;color:#374151}
.preview-close{background:none;border:none;font-size:20px;color:#9ca3af;cursor:pointer;padding:4px 8px;border-radius:6px}
.preview-close:hover{background:#f3f4f6;color:#374151}
.preview-body{padding:24px}
.preview-q-row{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.preview-icon{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;flex-shrink:0;color:#fff}
.preview-icon.q{background:#10b981}
.preview-icon.a{background:#3b82f6}
.preview-q-text{font-size:15px;font-weight:600;color:#1f2937}
.preview-a-row{display:flex;align-items:flex-start;gap:10px}
.preview-a-text{font-size:14px;color:#374151;line-height:1.8;padding-top:3px}
