/* 利用履歴専用CSS */

/* テーブルコンテナ */
.table-container {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

/* テーブル */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.data-table th:hover {
    background: #f3f4f6;
}

.sort-icon {
    font-size: 14px;
    font-weight: bold;
    color: #9ca3af;
    margin-left: 4px;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

/* バッジ */
.app-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.app-chat {
    background: #fce7f3;
    color: #be185d;
}

.app-bot {
    background: #ccfbf1;
    color: #0f766e;
}

.type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.type-faq {
    background: #dbeafe;
    color: #1e40af;
}

.type-category {
    background: #d1fae5;
    color: #065f46;
}

/* サマリー */
.usage-summary {
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 14px;
}

/* 詳細モーダル */
.usage-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.usage-detail-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.detail-row {
    display: flex;
    margin-bottom: 16px;
    gap: 16px;
}

.detail-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 13px;
    min-width: 120px;
    flex-shrink: 0;
}

.detail-value {
    color: #1f2937;
    font-size: 13px;
    flex: 1;
    word-break: break-word;
}
