
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            margin: 0;
            padding: 20px;
            min-height: 100vh;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 15px;
            padding: 30px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
        }

        h1 {
            text-align: center;
            color: #2c3e50;
            font-size: 2.5em;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
        }

        .subtitle {
            text-align: center;
            color: #7f8c8d;
            font-size: 1.2em;
            margin-bottom: 30px;
            font-style: italic;
        }

        .upload-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 20px;
        }

        .upload-section {
            background: linear-gradient(145deg, #f8f9fa, #ffffff);
            border-radius: 12px;
            padding: 25px;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
            border-left: 5px solid #3498db;
            text-align: center;
        }

        .upload-section h3 {
            margin-top: 0;
            color: #2c3e50;
        }

        .baseline {
            border-left-color: #27ae60;
        }

        .comparison {
            border-left-color: #e74c3c;
        }

        .file-input {
            margin: 15px 0;
            padding: 10px;
            border: 2px dashed #3498db;
            border-radius: 8px;
            background: #ecf0f1;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .file-input:hover {
            border-color: #2980b9;
            background: #d5dbdb;
        }

        .file-input input[type="file"] {
            width: 100%;
            padding: 10px;
            font-size: 16px;
        }

        .column-selector {
            margin: 15px 0;
            text-align: left;
        }

        .column-selector select {
            width: 100%;
            padding: 10px;
            font-size: 16px;
            border: 1px solid #bdc3c7;
            border-radius: 4px;
        }

        .analyze-section {
            text-align: center;
            margin: 20px 0;
        }

        .analyze-btn {
            background: linear-gradient(145deg, #9b59b6, #8e44ad);
            color: white;
            border: none;
            padding: 15px 30px;
            font-size: 18px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            margin: 10px;
        }

        .analyze-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(155, 89, 182, 0.3);
        }

        .analyze-btn:disabled {
            background: #95a5a6;
            cursor: not-allowed;
            transform: none;
        }

        .results-section {
            display: none;
        }

        .comparison-grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 20px;
            margin-bottom: 30px;
        }

        .analysis-card {
            background: linear-gradient(145deg, #ffffff, #f8f9fa);
            border-radius: 12px;
            padding: 25px;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .analysis-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
        }

        .baseline-card {
            border-left: 5px solid #27ae60;
        }

        .comparison-card {
            border-left: 5px solid #e74c3c;
        }

        .difference-card {
            border-left: 5px solid #9b59b6;
        }

        .card-title {
            font-size: 1.4em;
            font-weight: bold;
            color: #2c3e50;
            margin-bottom: 15px;
            border-bottom: 2px solid #ecf0f1;
            padding-bottom: 8px;
            text-align: center;
        }

        .metric-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            border-bottom: 1px solid #ecf0f1;
        }

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

        .metric-label {
            font-weight: 600;
            color: #34495e;
            font-size: 0.9em;
        }

        .metric-value {
            font-weight: bold;
            padding: 4px 8px;
            border-radius: 6px;
            color: white;
            font-size: 0.9em;
        }

        .close { background-color: #27ae60; }
        .acceptable { background-color: #f39c12; }
        .marginal { background-color: #e67e22; }
        .nonconformity { background-color: #e74c3c; }
        .improved { background-color: #27ae60; }
        .deteriorated { background-color: #e74c3c; }
        .unchanged { background-color: #95a5a6; }

        .vector-analysis {
            background: linear-gradient(145deg, #f8f9fa, #ffffff);
            border-radius: 12px;
            padding: 25px;
            margin: 20px 0;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
            border-left: 5px solid #9b59b6;
        }

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

        .vector-item {
            background: white;
            padding: 15px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            transition: transform 0.2s ease;
        }

        .vector-item:hover {
            transform: scale(1.02);
        }

        .digit-header {
            text-align: center;
            font-size: 1.5em;
            font-weight: bold;
            color: #2c3e50;
            margin-bottom: 10px;
            border-bottom: 2px solid #ecf0f1;
            padding-bottom: 5px;
        }

        .change-row {
            display: flex;
            justify-content: space-between;
            margin: 5px 0;
            font-size: 0.9em;
        }

        .change-value {
            font-weight: bold;
        }

        .increase { color: #e74c3c; }
        .decrease { color: #27ae60; }
        .stable { color: #95a5a6; }
        .warning-list { margin: 8px 0; padding: 8px 8px 8px 24px; background: #fff8e1; border-left: 4px solid #f39c12; color: #5c4400; }

        .interpretation {
            background: linear-gradient(145deg, #ecf0f1, #ffffff);
            border-radius: 12px;
            padding: 25px;
            margin: 20px 0;
            border-left: 5px solid #34495e;
        }

        .interpretation h3 {
            color: #2c3e50;
            margin-bottom: 15px;
        }

        .interpretation p {
            line-height: 1.6;
            color: #34495e;
            margin-bottom: 10px;
        }

        .error {
            background: #e74c3c;
            color: white;
            padding: 15px;
            border-radius: 8px;
            margin: 10px 0;
        }

        .footer {
            text-align: center;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 2px solid #ecf0f1;
            color: #7f8c8d;
            font-style: italic;
        }

        /* Export Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 500px;
    max-width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-header {
    font-size: 1.5em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.export-option {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-option:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.2);
}

.export-option h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.export-option p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9em;
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 15px;
}

.modal-close:hover {
    color: #e74c3c;
}

#exportBtn:disabled {
    background: #95a5a6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.6;
}

#reportBtn:disabled {
    background: #95a5a6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.6;
}

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

            .vector-grid {
                grid-template-columns: 1fr;
            }
        }

* { box-sizing: border-box; }
#errorDiv { color: #a61919; margin: 1rem 0; white-space: pre-wrap; }
.table-scroll { overflow-x: auto; margin: 1rem 0; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { border: 1px solid #ccd2d8; padding: .6rem; text-align: left; overflow-wrap: anywhere; }
caption { text-align: left; font-weight: bold; padding: .5rem 0; }
.analysis-card { min-width: 0; overflow-wrap: anywhere; }
.setting { margin: 1rem 0; }
.status { overflow-wrap: anywhere; }
dialog.modal { width: min(560px, 94vw); height: auto; padding: 1.5rem; border: 0; border-radius: 12px; background: white; }
dialog.modal[open] { display: block; position: fixed; margin: auto; }
dialog.modal::backdrop { background: rgb(0 0 0 / .5); }
.export-option { display: block; width: 100%; text-align: left; font: inherit; }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #174fa3; outline-offset: 3px; }

.inline-style-1 { background: linear-gradient(145deg, #f8f9fa, #ffffff); border-radius: 12px; padding: 25px; margin-bottom: 20px; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); border-left: 5px solid #9b59b6; text-align: center; }

.inline-style-2 { margin-top: 0; color: #2c3e50; }

.inline-style-3 { display: inline-block; text-align: left; }

.inline-style-4 { display: block; margin-bottom: 8px; font-weight: 600; color: #34495e; }

.inline-style-5 { padding: 10px 15px; font-size: 16px; border: 2px solid #bdc3c7; border-radius: 8px; width: 200px; background: #fff; }

.inline-style-6 { font-size: 12px; color: #7f8c8d; margin-top: 5px; text-align: center; }

.inline-style-7 { background: linear-gradient(145deg, #27ae60, #219a52); }

.inline-style-8 { background: linear-gradient(145deg, #3498db, #2980b9); }

.inline-style-9 { color: #3498db; text-decoration: none; }
