/* CSA Assessment Comparison Tool Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: block;
}

/* Header Styles */
.app-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.app-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.app-header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.app-header .header-nav {
    margin-top: 20px;
}

.app-header .nav-link {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-weight: 500;
}

.app-header .nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Upload Section */
.upload-section {
    margin-bottom: 40px;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.upload-content .upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.upload-content p {
    color: #666;
    margin-bottom: 20px;
}

.upload-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.upload-btn:hover {
    background: #5a6fd8;
}

/* Uploaded Files */
.uploaded-files {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.uploaded-files h3 {
    margin-bottom: 20px;
    color: #333;
}

.files-list {
    margin-bottom: 20px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f9fa;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #333;
    display: block;
}

.file-details {
    color: #666;
    font-size: 0.9rem;
    display: block;
    margin-top: 4px;
}

.file-stats {
    color: #28a745;
    font-size: 0.85rem;
    display: block;
    margin-top: 2px;
}

.file-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 4px;
}

.file-status.success {
    background: #d4edda;
    color: #155724;
}

.file-status.error {
    background: #f8d7da;
    color: #721c24;
}

.file-item.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.error-message {
    color: #dc3545 !important;
}

.files-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #e9ecef;
}

.counter-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.counter-number {
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.counter-label {
    font-weight: 600;
    color: #333;
}

.clear-all-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.clear-all-btn:hover {
    background: #c82333;
}

.remove-file {
    background: #dc3545;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file:hover {
    background: #c82333;
}

.analyze-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.analyze-btn:hover {
    background: #218838;
}

/* Controls Section */
.controls-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.controls-header h2 {
    color: #333;
    font-size: 1.8rem;
}

.summary-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.controls-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group,
.search-group {
    display: flex;
    flex-direction: column;
}

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

.filter-group select,
.search-group input {
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.filter-group select:focus,
.search-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.results-header h2 {
    color: #333;
    font-size: 1.8rem;
}

.view-options {
    display: flex;
    gap: 10px;
}

.view-btn {
    padding: 8px 16px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.view-btn:hover,
.view-btn.active {
    background: #667eea;
    color: white;
}

/* Comparison Results */
.comparison-results {
    max-height: 800px;
    overflow-y: auto;
}

.comparison-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.comparison-item.has-disagreement {
    border-color: #ffc107;
    background: #fff9e6;
}

.comparison-item.non-unique {
    border-left: 4px solid #ffc107;
}

.comparison-item.unique {
    border-left: 4px solid #17a2b8;
}

.comparison-item.missing {
    border-left: 4px solid #dc3545;
    opacity: 0.8;
}

.function-header {
    background: #f8f9fa;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
}

.function-header h3 {
margin: 0;
color: #333;
font-size: 18px;
}

.function-description {
padding: 15px 20px;
background: #f8f9fa;
border-bottom: 1px solid #e9ecef;
color: #666;
font-style: italic;
line-height: 1.4;
}

.disagreement-badge {
    background: #ffc107;
    color: #856404;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #856404;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.responses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.response-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background: white;
}

.assessor-info {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.assessor-info strong {
    display: block;
    color: #333;
    font-size: 1.1rem;
}

.organization {
    color: #666;
    font-size: 0.9rem;
}

.support-status {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.support-status.yes {
    background: #d4edda;
    color: #155724;
}

.support-status.no {
    background: #f8d7da;
    color: #721c24;
}

.support-status.not-assessed {
    background: #e2e3e5;
    color: #383d41;
}

.detail-item {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.detail-item strong {
    color: #333;
}

.roadmap-info {
    background: #e7f3ff;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
}

.pain-points {
    background: #fff3cd;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Summary Table */
.summary-table-container {
    overflow-x: auto;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.summary-table th,
.summary-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.summary-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
}

.summary-table tr.has-disagreement {
    background: #fff9e6;
}

.function-name {
    font-weight: 600;
    max-width: 300px;
}

.status-cell {
    text-align: center;
    font-weight: 600;
    border-radius: 4px;
    padding: 8px;
}

.status-cell.yes {
    background: #d4edda;
    color: #155724;
}

.status-cell.no {
    background: #f8d7da;
    color: #721c24;
}

.status-cell.not-assessed {
    background: #e2e3e5;
    color: #383d41;
}

.status-cell small {
    display: block;
    font-weight: normal;
    margin-top: 4px;
    opacity: 0.8;
}

/* Matrix View */
.matrix-container {
    margin-top: 20px;
}

.matrix-container h3 {
    margin-bottom: 20px;
    color: #333;
}

.agreement-matrix {
    width: 100%;
    border-collapse: collapse;
}

.agreement-matrix th,
.agreement-matrix td {
    padding: 12px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.agreement-matrix th {
    background: #f8f9fa;
    font-weight: 600;
}

.agreement-cell {
    font-weight: 600;
}

.agreement-cell.high-agreement {
    background: #d4edda;
    color: #155724;
}

.agreement-cell.medium-agreement {
    background: #fff3cd;
    color: #856404;
}

.agreement-cell.low-agreement {
    background: #f8d7da;
    color: #721c24;
}

.diagonal {
    background: #e9ecef;
    color: #6c757d;
}

/* Export Section */
.export-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.export-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.export-btn:hover {
    background: #5a6268;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Status Messages */
.status-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1001;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.status-message.success {
    background: #28a745;
}

.status-message.error {
    background: #dc3545;
}

.status-message.warning {
    background: #ffc107;
    color: #856404;
}

.status-message.info {
    background: #17a2b8;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        padding: 10px;
    }
    
    .app-header h1 {
        font-size: 2rem;
    }
    
    .controls-panel {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-options {
        justify-content: center;
    }
    
    .responses-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-stats {
        justify-content: center;
    }
    
    .export-section {
        justify-content: center;
    }
    
    .controls-header {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-content h3 {
        font-size: 1.2rem;
    }
    
    .view-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}
