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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

.calculator-section {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 1024px) {
    .calculator-section {
        grid-template-columns: 1fr;
    }
}

.input-panel {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.input-panel h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: #555;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group small {
    display: block;
    color: #888;
    font-size: 0.85rem;
    margin-top: 5px;
}

.calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

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

.results-panel {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    min-height: 400px;
}

.summary-section {
    margin-bottom: 30px;
}

.summary-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

.summary-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-item .label {
    color: #666;
    font-weight: 500;
}

.summary-item .value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.table-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.search-input,
.sort-select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-input {
    flex: 1;
}

.search-input:focus,
.sort-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

thead th {
    padding: 15px;
    text-align: left;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: #f8f9fa;
}

tbody td {
    padding: 15px;
    color: #333;
    font-size: 0.95rem;
}

tbody tr:first-child td:first-child {
    font-weight: 600;
}

.highlight-row {
    background: #e8f5e9 !important;
}

.highlight-row-high {
    background: #ffebee !important;
}

@media (max-width: 768px) {
    .controls {
        flex-direction: column;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    thead th,
    tbody td {
        padding: 10px 8px;
    }
}