* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* サイドバーのスタイルを完全に保護（style.cssの設定を維持） */
.sidebar,
.sidebar * {
    letter-spacing: normal !important;
    word-spacing: normal !important;
    text-align: left !important;
}

.sidebar-link {
    letter-spacing: normal !important;
    word-spacing: normal !important;
    text-align: left !important;
    gap: 12px !important;
}

.sidebar-link span {
    letter-spacing: normal !important;
    word-spacing: normal !important;
    white-space: nowrap !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

header h1 {
    margin-bottom: 15px;
}

/* サイドバーのスタイルを保護 */
.sidebar,
.sidebar * {
    letter-spacing: normal !important;
    word-spacing: normal !important;
}

/* ページ内のナビゲーション（header内のnav）のみに適用 */
header nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

header nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

header nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

header nav a.active {
    background: #3498db;
}

/* 統計セクション */
.stats-section {
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #2c3e50;
}

.stat-pending .stat-value {
    color: #e74c3c;
}

.stat-resolved .stat-value {
    color: #27ae60;
}

.stat-ignored .stat-value {
    color: #95a5a6;
}

/* フィルタセクション */
.filter-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label.filter-label {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.checkbox-group {
    min-width: 200px;
}

.checkbox-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9em;
    user-select: none;
}

.checkbox-label:hover {
    color: #3498db;
}

.filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3498db;
}

.checkbox-label span {
    flex: 1;
}

.form-select,
.form-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 一括操作セクション */
.bulk-actions-section {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bulk-actions-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.bulk-actions-buttons {
    display: flex;
    gap: 10px;
    flex: 1;
}

.selected-count {
    font-weight: bold;
    color: #3498db;
}

/* エラー一覧セクション */
.errors-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-info {
    color: #666;
    font-size: 0.9em;
}

.errors-list {
    min-height: 200px;
}

.error-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    background: #fafafa;
    transition: all 0.3s;
}

.error-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.error-item.pending {
    border-left: 4px solid #e74c3c;
}

.error-item.resolved {
    border-left: 4px solid #27ae60;
    opacity: 0.7;
}

.error-item.ignored {
    border-left: 4px solid #95a5a6;
    opacity: 0.6;
}

.error-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.error-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.error-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.error-title {
    font-weight: bold;
    font-size: 1.1em;
}

.error-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.badge-type {
    background: #3498db;
    color: white;
}

.badge-status-pending {
    background: #e74c3c;
    color: white;
}

.badge-status-resolved {
    background: #27ae60;
    color: white;
}

.badge-status-ignored {
    background: #95a5a6;
    color: white;
}

.error-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.error-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
    font-size: 0.9em;
}

.error-detail-item {
    display: flex;
    flex-direction: column;
}

.error-detail-label {
    color: #666;
    font-size: 0.85em;
    margin-bottom: 3px;
}

.error-detail-value {
    font-weight: 500;
    word-break: break-word;
}

.error-note {
    margin-top: 10px;
    padding: 10px;
    background: #fff;
    border-left: 3px solid #3498db;
    border-radius: 4px;
    font-size: 0.9em;
}

.error-note-label {
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
}

/* ボタン */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #229954;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #e67e22;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-info {
    padding: 8px 12px;
    color: #666;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* トースト */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #333;
    color: white;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 2000;
    display: none;
}

.toast.show {
    display: block;
    animation: slideIn 0.3s;
}

.toast.success {
    background: #27ae60;
}

.toast.error {
    background: #e74c3c;
}

.toast.warning {
    background: #f39c12;
}

.toast.info {
    background: #3498db;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1em;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .bulk-actions-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .error-header {
        flex-direction: column;
    }
    
    .error-details {
        grid-template-columns: 1fr;
    }
}

