* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3B82F6;
    --primary-hover: #2563EB;
    --success-color: #10B981;
    --success-hover: #059669;
    --secondary-color: #6B7280;
    --secondary-hover: #4B5563;
    --danger-color: #EF4444;
    --danger-hover: #DC2626;
    --background: #F9FAFB;
    --card-background: #FFFFFF;
    --border-color: #E5E7EB;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

/* Header */
header {
    padding: 16px 24px;
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.5px;
}

/* Sticky Tabs */
.sticky-tabs {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0;
    padding: 0 24px;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--background-secondary);
    border-bottom-color: var(--border-color);
}

.tab-btn.active {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom-color: #fd8c73;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Top Controls for Mapping Tab */
.top-controls-mapping {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.controls-container-mapping {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.control-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.control-btn:hover {
    background: var(--background);
    color: var(--primary-color);
}

/* Section Actions (aligned right) */
.section-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0;
}

.action-btn {
    padding: 5px 16px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: all 0.2s;
    box-shadow: none;
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

/* Import/Export Section */
.import-export-section {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 16px;
}

/* Three Column Layout */
.three-column-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.four-column-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.column-card {
    display: flex;
    flex-direction: column;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.column-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.column-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.select-sm {
    min-width: 120px;
    font-size: 12px;
}

/* Entity Table */
.entity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.entity-table th,
.entity-table td {
    padding: 8px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    height: 41px;
}

.entity-table th {
    background: var(--background-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
}

.entity-table tbody tr:hover {
    background: var(--background-secondary);\n}\n\n.entity-table th.row-number-col,\n.entity-table td.row-number-col {
    width: 48px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 400;
    padding: 8px 8px;
}

.entity-table td:last-child {
    white-space: nowrap;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    gap: 16px;
    border-top: 1px solid var(--border-color);
    background: var(--background);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 2px;
}

.pagination-btn {
    padding: 5px 10px;
    min-width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    font-weight: 400;
    border-radius: var(--border-radius);
    margin: 0 2px;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    background: var(--background-secondary);
    border-color: var(--border-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 500;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--background);
    color: var(--text-tertiary);
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 0;
}

.pagination-ellipsis {
    padding: 5px 8px;
    color: var(--text-secondary);
    font-size: 14px;
    height: 32px;
    display: flex;
    align-items: center;
}

/* Responsive for Columns */
@media (max-width: 1400px) {
    .four-column-layout {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .three-column-layout {
        grid-template-columns: 1fr;
    }
    
    .four-column-layout {
        grid-template-columns: 1fr;
    }
}

/* Card */
.card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.compact-card {
    padding: 16px;
    margin-bottom: 16px;
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* File Input */
.file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.file-input {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.file-label:hover {
    background: var(--primary-hover);
}

.file-name {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.import-status {
    margin-top: 12px;
    font-size: 0.875rem;
}

.import-status .loading {
    color: var(--text-secondary);
}

.import-status .success {
    color: var(--success-color);
    font-weight: 500;
}

/* Form Controls */
.form-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.input, .select {
    padding: 5px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--background);
    color: var(--text-primary);
    outline: none;
}

.input {
    flex: 1;
    min-width: 200px;
    height: 32px;
    padding: 4px 12px;
}

.input:focus, .select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.12);
}

.select {
    min-width: 150px;
}

.select[multiple] {
    min-height: 120px;
}

.input-with-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-checkbox .input {
    flex: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 5px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: var(--text-primary);
    box-shadow: none;
}

.btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: #0860ca;
    border-color: #0860ca;
}

.btn-success {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-success:hover {
    background: #0860ca;
    border-color: #0860ca;
}

.btn-secondary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: #0860ca;
    border-color: #0860ca;
}

.btn-sm {
    padding: 3px 12px;
    font-size: 12px;
}

.btn-icon {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    font-size: 14px;
    border-radius: var(--border-radius);
    transition: all 0.2s;
    color: var(--text-secondary);
}

.btn-icon:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

/* Mapping Table */
.mapping-controls {
    margin-bottom: 20px;
}

.table-container {
    overflow: visible;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.column-card .table-container {
    /* Auto height based on content - no scroll */
    overflow: visible;
}

.mapping-table, .data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.mapping-table th,
.mapping-table td,
.data-table th,
.data-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.mapping-table th,
.data-table th {
    background: var(--background);
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.mapping-table tbody tr:hover,
.data-table tbody tr:hover {
    background: var(--background);
}

.empty-row {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}

.clickable-summary {
    cursor: pointer;
    color: var(--primary-color);
    text-decoration: underline;
}

.clickable-summary:hover {
    color: var(--primary-hover);
}

.row-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    align-items: start;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row strong {
    color: var(--text-primary);
    font-weight: 600;
    padding-top: 2px;
}

.mapping-table td:last-child {
    display: flex;
    gap: 4px;
}

/* Filters */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.filters-header h2 {
    margin: 0;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.btn-text:hover {
    color: #0550ae;
    text-decoration: underline;
}

.advanced-filters {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    font-size: 12px;
    color: var(--text-primary);
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.filter-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Data Summary */
.data-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--background);
    border-radius: var(--border-radius);
    flex-wrap: wrap;
    justify-content: center;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    text-align: center;
    min-width: 100px;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Data Table Specific */
.data-table td.number {
    text-align: right;
    font-weight: 500;
}

.issue-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.issue-link:hover {
    text-decoration: underline;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Report Section */
.report-controls {
    margin-bottom: 16px;
}

.report-controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 16px;
}

.report-controls-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.report-controls-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: flex-start;
    align-items: flex-end;
}

.visual-controls-row {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: flex-end;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.control-group label {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    font-size: 12px;
}

.control-group select {
    flex: 1;
    min-width: 120px;
    max-width: 180px;
}

.report-type-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-type-selector label {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    font-size: 12px;
    min-width: 80px;
}

.report-type-selector select {
    flex: 1;
    min-width: 150px;
    max-width: 250px;
}

.report-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 20px;
}

.chart-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.chart-controls label {
    font-weight: 500;
    font-size: 0.8rem;
}

.chart-controls .select {
    min-width: 130px;
}

.rotation-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
}

.rotation-label {
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.rotation-slider {
    width: 120px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.rotation-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.rotation-slider::-webkit-slider-thumb:hover {
    background: #0550ae;
    transform: scale(1.1);
}

.rotation-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.rotation-slider::-moz-range-thumb:hover {
    background: #0550ae;
    transform: scale(1.1);
}

.font-size-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.font-size-display {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 24px;
    text-align: center;
}

.chart-wrapper {
    position: relative;
    height: 600px;
    margin-bottom: 24px;
}

.chart-wrapper canvas {
    max-height: 100%;
}

/* Chart Legend */
.chart-legend {
    margin-top: 24px;
}

.chart-legend h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    flex-shrink: 0;
}

.legend-label {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

.legend-value {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Export Section */
.export-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.export-header h2 {
    margin: 0;
}

.export-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .input {
        width: 100%;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .data-summary {
        flex-direction: column;
    }
    
    .chart-wrapper {
        height: 400px;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .export-controls {
        flex-direction: column;
    }
    
    .export-controls .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Scrollbar Styling */
.table-container::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 6px;
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 6px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Loading Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--background);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--background);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-body .form-group {
    margin-bottom: 16px;
}

.modal-body .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.modal-body .form-group input,
.modal-body .form-group select {
    width: 100%;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* Management Controls */
.management-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-search {
    margin-bottom: 16px;
}

.filter-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-row .input {
    flex: 1;
    min-width: 200px;
}

/* Entity List */
.entity-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.entity-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    transition: all 0.2s;
    cursor: pointer;
}

.entity-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.entity-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.entity-card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    flex: 1;
}

.entity-card-actions {
    display: flex;
    gap: 4px;
}

.entity-card-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.entity-card-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--primary-color);
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1rem;
    margin-bottom: 8px;
}

.empty-state-subtext {
    font-size: 0.875rem;
}

/* Report data list styles */
.data-list-section {
    margin-top: 32px;
    padding: 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.data-list-section h3 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.report-data-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-data-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: move;
    transition: all 0.2s ease;
}

.report-data-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.report-data-item.drag-over {
    border-color: var(--primary-color);
    border-style: dashed;
    background: rgba(9, 105, 218, 0.05);
}

.report-data-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.report-data-item-content .color-picker {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.report-data-item-content .color-picker:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.report-data-item-number {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 24px;
}

.report-data-item-label {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.report-data-item-value {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.report-data-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-data-item.hidden-item {
    opacity: 0.5;
    background: var(--background-secondary);
}

.report-data-item.hidden-item .report-data-item-label {
    text-decoration: line-through;
    color: var(--text-tertiary);
}

.visibility-toggle {
    padding: 4px;
    font-size: 1rem;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: transform 0.2s ease;
}

.visibility-toggle:hover {
    transform: scale(1.2);
}

.report-data-item-drag {
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: grab;
    padding: 0 4px;
    user-select: none;
}

.report-data-item-drag:active {
    cursor: grabbing;
}

/* Validation Modal Styles */
.validation-tab-content {
    margin-top: 15px;
}

#validation-modal .modal-content {
    display: flex;
    flex-direction: column;
}

#validation-modal .modal-body {
    flex: 1;
    overflow-y: auto;
}

#validation-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

#validation-tabs .tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

#validation-tabs .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

#validation-tabs .tab-btn:hover {
    color: var(--primary-hover);
}

#skipped-rows-container table,
#valid-rows-preview table {
    width: 100%;
    margin-top: 10px;
}

#skipped-rows-container td,
#valid-rows-preview td {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}
