* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.1em;
}

.section {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.hidden {
    display: none;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f8f9fa;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.upload-icon {
    font-size: 3em;
}

.upload-hint {
    color: #666;
    font-size: 0.9em;
}

.file-info {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 5px;
    color: #1976d2;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
}

.mapping-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.mapping-item {
    display: flex;
    flex-direction: column;
}

.mapping-item label {
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.results-box {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.results-box h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #667eea;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

tr:hover {
    background: #f5f5f5;
}

.abc-class {
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.abc-a {
    background: #4caf50;
    color: white;
}

.abc-b {
    background: #ff9800;
    color: white;
}

.abc-c {
    background: #f44336;
    color: white;
}

#abc-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.abc-summary-item {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.abc-summary-item h4 {
    margin-bottom: 10px;
    font-size: 1.2em;
}

.abc-summary-item p {
    margin: 5px 0;
    color: #666;
}

#pareto-chart {
    max-height: 500px;
}

.summary-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.summary-stat-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.summary-stat-item h4 {
    color: #667eea;
    font-size: 0.9em;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-stat-item p {
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.filter-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 5px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-filter:hover {
    background: #f0f0f0;
}

.btn-filter.active {
    background: #667eea;
    color: white;
}

#filtered-table-container {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}
