.executive-dashboard {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    background: #f8f9fa;
    min-height: calc(100vh - 64px);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #0A66C3 0%, #1976D2 100%);
    padding: 2rem;
    border-radius: 16px;
    color: white;
    box-shadow: 0 4px 12px rgba(10, 102, 195, 0.15);
}

.header-content h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.subtitle {
    margin: 0.5rem 0 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-welcome {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
}

.search-container {
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #0A66C3;
    z-index: 2;
    transition: color 0.3s ease;
}

.search-input {
    width: 100%;
    padding: 0.5rem 1.25rem 0.5rem 3.5rem !important;
    border: 2px solid rgba(10, 102, 195, 0.15);
    border-radius: 16px !important;
    font-size: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfd 100%);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 
        0 4px 16px rgba(10, 102, 195, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.04);
    font-weight: 500;
    color: #1a1a1a;
}

.search-input::placeholder {
    color: #7b8794;
    font-weight: 400;
}

.search-input:focus {
    border-color: #0A66C3;
    outline: none;
    box-shadow: 
        0 0 0 4px rgba(10, 102, 195, 0.12),
        0 8px 24px rgba(10, 102, 195, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.search-input:focus ~ .search-icon {
    color: #1976D2;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
}

.filter-tab:hover {
    border-color: #0A66C3;
    color: #0A66C3;
}

.filter-tab.active {
    background: #0A66C3;
    border-color: #0A66C3;
    color: white;
}

.popular-tab.active {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-color: #ff6b35;
}

/* Nano Apps Grid */
.nano-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.nano-app-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.nano-app-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #0A66C3;
}

.nano-app-card.coming-soon {
    opacity: 0.7;
    background: #f8f9fa;
}

.popular-badge {
    position: absolute;
    top: -8px;
    right: 1rem;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge {
    position: absolute;
    top: -8px;
    right: 1rem;
    background: #6c757d;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.app-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.app-content {
    margin-bottom: 1.5rem;
}

.app-description {
    margin: 0 0 1rem;
    color: #666;
    line-height: 1.5;
    font-size: 0.9rem;
}

.app-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.app-category {
    background: #e3f2fd;
    color: #0A66C3;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.app-time {
    color: #666;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.app-input {
    margin-bottom: 1rem;
}

.input-label {
    color: #666;
    font-size: 0.8rem;
    font-style: italic;
}

.app-actions {
    margin-top: auto;
}

.launch-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #0A66C3, #1976D2);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.launch-btn:hover:not(.disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 102, 195, 0.3);
}

.launch-btn.disabled {
    background: #e9ecef;
    color: #666;
    cursor: not-allowed;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.no-results h3 {
    margin: 0 0 0.5rem;
    color: #333;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0A66C3;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #666;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Modal Styles */
.nano-app-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 1200px;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.close-modal:hover {
    background: #f8f9fa;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    margin: 0 0 1.5rem;
    color: #666;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.url-input, .text-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    margin-bottom: 0.75rem;
}

.url-input:focus, .text-input:focus {
    border-color: #0A66C3;
    outline: none;
}

.text-input {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.add-more-btn {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    width: 100%;
}

.add-more-btn:hover {
    border-color: #0A66C3;
    color: #0A66C3;
    background: #e3f2fd;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.cancel-btn, .analyze-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #dee2e6;
}

.cancel-btn:hover {
    background: #e9ecef;
}

.analyze-btn {
    background: linear-gradient(135deg, #0A66C3, #1976D2);
    color: white;
}

.analyze-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 102, 195, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .executive-dashboard {
        padding: 1rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .nano-apps-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .quick-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* Minimal Executive Dashboard Styles */

.dashboard-header-minimal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(10, 102, 195, 0.08);
    margin-bottom: 24px;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.workspace-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
}

.context-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #6b7280;
}

.stat-item {
    font-weight: 500;
}

.stat-divider {
    color: #d1d5db;
}

.header-right {
    display: flex;
    align-items: center;
}

.search-container-inline {
    position: relative;
    width: 280px;
}

.search-input-inline {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fafbfc;
    transition: all 0.2s ease;
}

.search-input-inline:focus {
    outline: none;
    border-color: #0A66C3;
    background: white;
    box-shadow: 0 0 0 3px rgba(10, 102, 195, 0.1);
}

.search-icon-inline {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #9ca3af;
}

.filter-tabs-minimal {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    padding: 4px;
    background: #f8fafc;
    border-radius: 8px;
    width: fit-content;
}

.filter-tab-minimal {
    padding: 6px 12px;
    border: none;
    background: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab-minimal:hover {
    color: #374151;
    background: #e5e7eb;
}

.filter-tab-minimal.active {
    background: #0A66C3;
    color: white;
    box-shadow: 0 2px 4px rgba(10, 102, 195, 0.2);
}

.popular-tab-minimal.active {
    background: #f59e0b;
}

.tools-grid-minimal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

.tool-card-minimal {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tool-card-minimal:hover {
    border-color: #0A66C3;
    box-shadow: 0 4px 12px rgba(10, 102, 195, 0.1);
    transform: translateY(-1px);
}

.tool-card-minimal.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.tool-header-minimal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.tool-icon-and-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.tool-icon-minimal {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(10, 102, 195, 0.1) 0%, rgba(25, 118, 210, 0.05) 100%);
    border-radius: 8px;
    border: 1px solid rgba(10, 102, 195, 0.1);
    flex-shrink: 0;
}

.tool-meta-minimal {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.tool-title-minimal {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
}

.tool-category-minimal {
    background: #f3f4f6;
    color: #374151;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.tool-time-minimal {
    color: #6b7280;
    font-weight: 500;
}

.popular-badge-minimal {
    color: #f59e0b;
}

.tool-content-minimal {
    margin-bottom: 0px;
    flex: 1;
}

.tool-description-minimal {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0 0 8px 0;
}

.tool-input-minimal {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
}

.tool-author-minimal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.author-content-minimal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar-minimal {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
}

.author-avatar-minimal:hover {
    border-color: #0A66C3;
    transform: scale(1.05);
}

.author-fallback-minimal {
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-initials-minimal {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0A66C3 0%, #1976D2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
}

.author-initials-minimal:hover {
    border-color: #0A66C3;
    transform: scale(1.05);
}

.author-avatar-link-minimal {
    display: inline-block;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.author-avatar-link-minimal:hover {
    transform: scale(1.05);
}

.author-avatar-link-minimal:focus {
    outline: 2px solid rgba(10, 102, 195, 0.3);
    outline-offset: 2px;
}

.author-label {
    color: #6b7280;
    font-weight: 500;
}

.author-name {
    color: #0A66C3;
    font-weight: 600;
}

.author-link-minimal {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #0A66C3;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 0.125rem 0.25rem;
    margin: -0.125rem -0.25rem;
}

.author-link-minimal:hover {
    color: #0950a3;
    background: rgba(10, 102, 195, 0.1);
    transform: translateY(-1px);
}

.author-link-minimal:focus {
    outline: 2px solid rgba(10, 102, 195, 0.3);
    outline-offset: 2px;
}

.external-link-icon {
    color: #0A66C3;
    transition: all 0.2s ease;
}

.author-link-minimal:hover .external-link-icon {
    color: #0950a3;
    transform: translate(1px, -1px);
}

.tool-tags-minimal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0.75rem 0;
}

.tool-tag-minimal {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
}

.tool-tag-minimal:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tool-actions-minimal {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.launch-btn-minimal {
    background: #0A66C3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.launch-btn-minimal:hover:not(.disabled) {
    background: #0950a3;
    transform: translateY(-1px);
}

.launch-btn-minimal.disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.no-results-minimal {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
}

.no-results-icon-minimal {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.no-results-minimal h3 {
    color: #374151;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.no-results-minimal p {
    color: #6b7280;
    margin: 0;
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dashboard-header-minimal {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .header-left {
        text-align: center;
    }
    
    .context-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .search-container-inline {
        width: 100%;
    }
    
    .filter-tabs-minimal {
        width: 100%;
        justify-content: center;
    }
    
    .tools-grid-minimal {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .tool-card-minimal {
        padding: 14px;
    }
}

/* Document Input Helper Text */
.input-help {
    margin-top: 8px;
}

.input-help small {
    color: #64748b;
    font-size: 12px;
}

/* Analysis Overlay */
.analysis-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.analysis-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
    max-width: 1200px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
}

.analysis-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    z-index: 1;
}

.analysis-header h2 {
    margin: 0;
    color: #1e293b;
    font-size: 24px;
    font-weight: 700;
}

.close-analysis {
    background: none;
    border: none;
    font-size: 32px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.close-analysis:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.document-info {
    padding: 24px 32px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfd;
}

.document-info h3 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
}

.document-info p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.analysis-content {
    padding: 32px;
}

.analysis-status {
    margin-bottom: 32px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f4f8, #e2e8f0);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #0A66C3;
    font-weight: 500;
}

.status-indicator .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #0A66C3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.analysis-preview {
    margin-bottom: 32px;
}

.analysis-preview h4 {
    margin: 0 0 16px 0;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
}

.document-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.6;
    color: #475569;
}

/* Enhanced Content Preview Styles */
.markdown-preview {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.markdown-preview .preview-h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.markdown-preview .preview-h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 16px 0 8px 0;
}

.markdown-preview .preview-h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin: 12px 0 6px 0;
}

.markdown-preview strong {
    font-weight: 600;
    color: #1e293b;
}

.markdown-preview em {
    font-style: italic;
    color: #4b5563;
}

.markdown-preview .preview-inline-code {
    background: #f1f5f9;
    color: #be185d;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    border: 1px solid #e2e8f0;
}

.markdown-preview .preview-code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    margin: 8px 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
}

.markdown-preview .preview-code-block code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
}

.markdown-preview .preview-list {
    margin: 8px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.markdown-preview .preview-numbered-list {
    margin: 8px 0;
    padding-left: 20px;
    list-style-type: decimal;
}

.markdown-preview .preview-list-item,
.markdown-preview .preview-numbered-item {
    margin: 4px 0;
    line-height: 1.5;
}

.markdown-preview .preview-link {
    color: #0A66C3;
    text-decoration: underline;
    font-weight: 500;
}

.markdown-preview .preview-link:hover {
    color: #1976D2;
}

/* HTML Preview Styles */
.html-preview {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.html-preview h1, .html-preview h2, .html-preview h3,
.html-preview h4, .html-preview h5, .html-preview h6 {
    color: #1e293b;
    font-weight: 600;
    margin: 12px 0 8px 0;
}

.html-preview h1 {
    font-size: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.html-preview h2 {
    font-size: 1.25rem;
}

.html-preview h3 {
    font-size: 1.1rem;
}

.html-preview p {
    margin: 8px 0;
}

.html-preview ul, .html-preview ol {
    margin: 8px 0;
    padding-left: 20px;
}

.html-preview li {
    margin: 4px 0;
}

.html-preview a {
    color: #0A66C3;
    text-decoration: underline;
}

.html-preview a:hover {
    color: #1976D2;
}

.html-preview code {
    background: #f1f5f9;
    color: #be185d;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
}

.html-preview pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    margin: 8px 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
}

.html-preview pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Plain Text Preview Styles */
.plain-text-preview {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    color: #475569;
    white-space: pre-wrap;
}

/* Content Type Indicator */
.content-type-indicator {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 8px;
    border: 1px solid #e2e8f0;
}

.content-type-indicator.markdown {
    background: #f0f9ff;
    color: #0369a1;
    border-color: #bae6fd;
}

.content-type-indicator.html {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.content-type-indicator.plain {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #d1d5db;
}

/* Analysis Interface Styles */
.analysis-placeholder {
    margin-bottom: 32px;
}

.analysis-placeholder p {
    margin: 0 0 16px 0;
    color: #475569;
    line-height: 1.6;
}

.mock-analysis {
    background: #fafbfd;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.mock-analysis h5 {
    margin: 0 0 16px 0;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

.mock-analysis ol {
    margin: 0;
    padding-left: 20px;
    color: #475569;
}

.mock-analysis li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.mock-analysis strong {
    color: #1e293b;
    font-weight: 600;
}

.analysis-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-primary {
    background: linear-gradient(135deg, #0A66C3, #1976D2);
    color: white;
    box-shadow: 0 4px 16px rgba(10, 102, 195, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 102, 195, 0.35);
}

/* Responsive Design for Analysis Interface */
@media (max-width: 768px) {
    .analysis-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .analysis-container {
        max-height: 95vh;
    }
    
    .analysis-header {
        padding: 16px 20px;
    }
    
    .analysis-header h2 {
        font-size: 20px;
    }
    
    .document-info {
        padding: 16px 20px;
    }
    
    .analysis-content {
        padding: 20px;
    }
    
    .analysis-actions {
        flex-direction: column-reverse;
    }
    
    .btn {
        width: 100%;
    }
    
    .document-preview {
        font-size: 12px;
    }
}

/* Loading states for buttons */
.analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Centered Header with Search */
.dashboard-header-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    width: 100%;
}

.search-container-centered {
    position: relative;
    max-width: 500px;
    width: 100%;
}

.search-input-centered {
    width: 100%;
    padding: 0.75rem 1.25rem 0.75rem 3.5rem;
    border: 2px solid rgba(10, 102, 195, 0.15);
    border-radius: 16px;
    font-size: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfd 100%);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 
        0 4px 16px rgba(10, 102, 195, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.04);
    font-weight: 500;
    color: #1a1a1a;
    outline: none;
}

.search-input-centered::placeholder {
    color: #7b8794;
    font-weight: 400;
}

.search-input-centered:focus {
    border-color: #0A66C3;
    box-shadow: 
        0 0 0 4px rgba(10, 102, 195, 0.12),
        0 8px 24px rgba(10, 102, 195, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.search-icon-centered {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #0A66C3;
    transition: color 0.3s ease;
    pointer-events: none;
}

.search-input-centered:focus ~ .search-icon-centered {
    color: #1976D2;
}

/* Mobile responsive for centered search */
@media (max-width: 768px) {
    .dashboard-header-centered {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .search-container-centered {
        max-width: 100%;
    }
    
    .search-input-centered {
        padding: 0.625rem 1rem 0.625rem 3rem;
        font-size: 0.9rem;
    }
    
    .search-icon-centered {
        left: 1rem;
        width: 18px;
        height: 18px;
    }
}

/* 5 Whys Analysis Results Styling */
.analysis-results-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    padding: 1rem;
    /* Removed overflow-y: auto to prevent double scrollbars */
}

/* Specific fix for five-whys overlay to prevent double scrollbars */
.five-whys-results-overlay {
    overflow: hidden !important;
}

.analysis-results-container {
    width: 100%;
    max-width: 1400px;
    max-height: 95vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: auto;
    display: flex;
    flex-direction: column;
}

/* Header Section */
.analysis-results-header {
    background: linear-gradient(135deg, #0A66C3 0%, #1976D2 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.header-left h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.document-meta {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.document-title {
    font-size: 1rem;
    opacity: 0.9;
}

.confidence-badge {
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.export-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.export-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.close-results {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.close-results:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* Tab Navigation */
.analysis-results-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.analysis-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 2rem;
    flex-shrink: 0;
}

.analysis-tab {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.analysis-tab:hover {
    color: #0A66C3;
    background: rgba(10, 102, 195, 0.05);
}

.analysis-tab.active {
    color: #0A66C3;
    border-bottom-color: #0A66C3;
}

/* Tab Content */
.analysis-tab-content {
    flex: 1;
    overflow-y: auto;
    background: #f8fafc;
}

.tab-panel {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Overview Panel */
.overview-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.overview-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.overview-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.overview-card h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

.problem-card {
    border-left: 4px solid #ef4444;
}

.solution-card {
    border-left: 4px solid #10b981;
}

.completeness-card {
    border-left: 4px solid #0A66C3;
}

.gap-card {
    border-left: 4px solid #f59e0b;
}

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.type-badge.root-issue {
    background: #fee2e2;
    color: #dc2626;
}

.focus-level {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.level-number {
    background: #0A66C3;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
}

.level-name {
    font-weight: 600;
    color: #374151;
}

.completeness-meter {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meter-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 6px;
    transition: width 1s ease;
}

.meter-label {
    font-weight: 600;
    color: #374151;
    text-align: center;
}

.gap-summary {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

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

.gap-count {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.gap-item.unaddressed .gap-count {
    color: #ef4444;
}

.gap-item.addressed .gap-count {
    color: #10b981;
}

.gap-label {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.overview-summary {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.overview-summary h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
}

/* 5 Whys Panel */
.five-whys-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.problem-statement-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    border-left: 4px solid #0A66C3;
}

.problem-statement-card h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
}

.problem-statement {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #374151;
}

.five-whys-table-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.five-whys-table-container h3 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
}

.five-whys-table {
    display: flex;
    flex-direction: column;
}

.table-header {
    display: grid;
    grid-template-columns: 150px 1fr 2fr 150px;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: #374151;
}


.table-row:hover {
    background: #f8fafc;
}

.level-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.level-number {
    background: #0A66C3;
    color: white;
    padding: 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.level-1 .level-number { background: #ef4444; }
.level-2 .level-number { background: #f59e0b; }
.level-3 .level-number { background: #0A66C3; }
.level-4 .level-number { background: #8b5cf6; }
.level-5 .level-number { background: #10b981; }

.level-depth {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.question-text {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.answer-content {
    margin-bottom: 1rem;
}

.characteristics {
    background: #f8fafc;
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid #0A66C3;
    font-size: 0.9rem;
}

.category-badge {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.category-badge.operational { background: #fee2e2; color: #dc2626; }
.category-badge.process { background: #fef3c7; color: #d97706; }
.category-badge.organizational { background: #dbeafe; color: #2563eb; }
.category-badge.strategic { background: #ede9fe; color: #7c3aed; }
.category-badge.fundamental { background: #d1fae5; color: #059669; }

.root-cause-card {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
}

.root-cause-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.root-cause-content {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Solutions Panel */
.solutions-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.solution-focus-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    border-left: 4px solid #10b981;
}

.solution-focus-card h3 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
}

.focus-level-large {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.level-number-large {
    background: #10b981;
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
}

.level-name-large {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
}

.focus-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #64748b;
}

.identified-solutions h3 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.solution-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.solution-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.solution-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.solution-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

.effectiveness-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.effectiveness-badge.high { background: #d1fae5; color: #059669; }
.effectiveness-badge.medium { background: #fef3c7; color: #d97706; }
.effectiveness-badge.low { background: #fee2e2; color: #dc2626; }

.solution-description {
    margin-bottom: 1rem;
    color: #64748b;
    line-height: 1.6;
}

.solution-mapping {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.addresses-label {
    font-size: 0.85rem;
    color: #64748b;
}

.why-level-badge {
    background: #0A66C3;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.gap-analysis-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.gap-analysis-section h3 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
}

.gap-analysis-content {
    margin-bottom: 2rem;
}

.levels-status {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.level-status {
    flex: 1;
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.level-status.addressed {
    background: #d1fae5;
    border: 2px solid #10b981;
}

.level-status.unaddressed {
    background: #fee2e2;
    border: 2px solid #ef4444;
}

.level-status.partial {
    background: #fef3c7;
    border: 2px solid #f59e0b;
}

.level-indicator-small {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.status-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 500;
}

/* Insights Panel */
.insights-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.assessment-card, .risk-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.assessment-card {
    border-left: 4px solid #0A66C3;
}

.risk-card {
    border-left: 4px solid #ef4444;
}

.assessment-card h3, .risk-card h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

.recommendations-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.recommendations-section h3 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
}

.recommendations-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.rec-tab {
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.rec-tab:hover {
    color: #0A66C3;
}

.rec-tab.active {
    color: #0A66C3;
    border-bottom-color: #0A66C3;
}

.recommendations-content {
    position: relative;
}

.rec-panel {
    display: none;
}

.rec-panel.active {
    display: block;
}

.recommendation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommendation-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 12px;
    border-left: 4px solid;
    background: #f8fafc;
}

.recommendation-item.immediate {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.recommendation-item.long-term {
    border-left-color: #0A66C3;
    background: #f0f9ff;
}

.recommendation-item.prevention {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.action-items-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.action-items-section h3 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
}

.action-items-table {
    display: flex;
    flex-direction: column;
}

.action-header {
    display: grid;
    grid-template-columns: 100px 150px 2fr 200px 100px;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: #374151;
}

.action-row {
    display: grid;
    grid-template-columns: 100px 150px 2fr 200px 100px;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: start;
}

.priority-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.priority-badge.high { background: #fee2e2; color: #dc2626; }
.priority-badge.medium { background: #fef3c7; color: #d97706; }
.priority-badge.low { background: #f3f4f6; color: #6b7280; }

.timeframe-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

/* Visual Panel */
.visuals-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.diagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.diagram-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.diagram-card h3 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

.diagram-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
}

.mermaid {
    width: 100%;
    text-align: center;
}

.mermaid-error {
    color: #ef4444;
    text-align: center;
    padding: 2rem;
}

.mermaid-error details {
    margin-top: 1rem;
    text-align: left;
    background: #fee2e2;
    padding: 1rem;
    border-radius: 8px;
}

.mermaid-error pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .diagram-grid {
        grid-template-columns: 1fr;
    }
    
    
    .action-header, .action-row {
        grid-template-columns: 80px 120px 2fr 150px 80px;
    }
}

@media (max-width: 768px) {
    .analysis-results-overlay {
        padding: 0.5rem;
    }
    
    .analysis-results-container {
        max-height: 100vh;
        border-radius: 12px;
    }
    
    .analysis-results-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-actions {
        order: -1;
        justify-content: flex-end;
        width: 100%;
    }
    
    .analysis-tabs {
        flex-wrap: wrap;
        padding: 0 1rem;
    }
    
    .analysis-tab {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
    }
    
    .tab-panel {
        padding: 1rem;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    
    .action-header {
        display: none;
    }
    
    .action-row {
        grid-template-columns: 1fr;
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .solutions-grid {
        grid-template-columns: 1fr;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .levels-status {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .diagram-card {
        padding: 1rem;
    }
    
    .diagram-container {
        min-height: 250px;
    }
} 