/* Column Optimization Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.form-shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    padding: 30px;
}

.form-box {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #007acc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.1);
}

.button {
    display: inline-block;
    padding: 12px 24px;
    background: #007acc;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.button:hover {
    background: #005a9e;
}

.button.Prev {
    background: #6c757d;
}

.button.Prev:hover {
    background: #545b62;
}

.canvas-container {
    margin-top: 20px;
    text-align: center;
}

canvas {
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
}

.note {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.hid {
    display: none;
}

.dis-e {
    pointer-events: none;
    opacity: 0.4;
}

/* Results Display Styles */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #007acc;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #007acc;
}

.error {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
}

.info {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #0c5460;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    margin: 20px 0;
}

.results-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.card-title {
    background: linear-gradient(135deg, #007acc, #005a9e);
    color: white;
    margin: 0;
    padding: 20px;
    font-size: 24px;
    text-align: center;
    font-weight: 600;
}

.card-content {
    padding: 30px;
}

.result-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #007acc;
}

.result-section h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-item.total {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    font-weight: 600;
}

.result-item .label {
    font-weight: 500;
    color: #495057;
}

.result-item.total .label {
    color: white;
}

.result-item .value {
    font-weight: 600;
    color: #007acc;
    font-size: 16px;
}

.result-item.total .value {
    color: white;
}

.status-badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    text-align: center;
    margin-top: 20px;
    width: 100%;
}

.status-badge.success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.status-badge.warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #212529;
}

.solutions-table {
    overflow-x: auto;
    margin-top: 20px;
}

.solutions-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.solutions-table th {
    background: linear-gradient(135deg, #007acc, #005a9e);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.solutions-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

.solutions-table tr:hover {
    background: #f8f9fa;
}

.solutions-table tr.best-solution {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    font-weight: 600;
}

.solutions-table tr.best-solution td {
    color: #155724;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 10px;
    }
    
    .form-box {
        padding: 15px;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .result-section {
        padding: 15px;
    }
    
    .solutions-table {
        font-size: 14px;
    }
    
    .solutions-table th,
    .solutions-table td {
        padding: 10px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error Messages */
.message {
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form Validation */
.form-group.error input,
.form-group.error select {
    border-color: #dc3545;
}

.form-group.error .error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* Excel Result Cards */
.excel-result-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid #e9ecef;
}

.excel-result-card .result-section {
    margin-bottom: 20px;
}

.excel-result-card .result-section:last-child {
    margin-bottom: 0;
}

/* Enhanced table styles for Excel results */
.solutions-table table th:nth-child(1),
.solutions-table table th:nth-child(2),
.solutions-table table th:nth-child(3) {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.solutions-table table th:nth-child(4),
.solutions-table table th:nth-child(5) {
    background: linear-gradient(135deg, #007acc, #005a9e);
}

.solutions-table table th:nth-child(6),
.solutions-table table th:nth-child(7) {
    background: linear-gradient(135deg, #6f42c1, #5a2d91);
}

/* Excel data highlighting */
.excel-data-highlight {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.excel-data-highlight .label {
    font-weight: 600;
    color: #856404;
}

.excel-data-highlight .value {
    color: #856404;
    font-weight: 600;
}

/* File upload success indicator */
.file-upload-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 1px solid #28a745;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    color: #155724;
}

.file-upload-success::before {
    content: "📁 ";
    font-size: 18px;
}

/* Excel processing status */
.processing-status {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #007acc;
    margin: 20px 0;
}

.processing-status .spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007acc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Excel summary cards */
.excel-summary {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 1px solid #2196f3;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.excel-summary h4 {
    color: #1565c0;
    margin-bottom: 15px;
}

.excel-summary .summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.summary-stat {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e3f2fd;
}

.summary-stat .number {
    font-size: 24px;
    font-weight: 700;
    color: #1565c0;
    display: block;
}

.summary-stat .label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

