/* Modern Reports Page Styling */

/* Dependencies Table */
.dependencies-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 1rem 0;
}

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

.dependencies-table thead th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

/* Sortable Headers */
.dependencies-table thead th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.2s ease;
}

.dependencies-table thead th.sortable:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.dependencies-table thead th.sortable:active {
    transform: translateY(0);
}

.sort-icon {
    font-size: 0.8rem;
    margin-left: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.dependencies-table thead th.sortable:hover .sort-icon {
    opacity: 1;
}

.dependencies-table tbody tr {
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.2s ease;
}

.dependencies-table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.001);
}

.dependencies-table tbody tr:last-child {
    border-bottom: none;
}

.dependencies-table tbody td {
    padding: 1rem;
    vertical-align: top;
    border: none;
    font-size: 0.9rem;
}

/* Version Badges */
.version-badge {
    background: #e3f2fd;
    color: #1565c0;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', monospace;
}

.version-badge.outdated {
    background: #fff3e0;
    color: #ef6c00;
}

/* Dependency Type Badge */
.dependency-type {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dependency-type:not(.dev) {
    background: #e8f5e8;
    color: #2e7d32;
}

.dependency-type.dev {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Vulnerability Count */
.vuln-count {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 2rem;
    text-align: center;
    display: inline-block;
}

.vuln-count:not(.safe) {
    background: #ffebee;
    color: #c62828;
}

.vuln-count.safe {
    background: #e8f5e8;
    color: #2e7d32;
}

/* Vulnerability Links */
.vulnerability-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.vulnerability-link {
    padding: 0.25rem 0.5rem;
    background: #e3f2fd;
    color: #1565c0;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.vulnerability-link:hover {
    background: #1565c0;
    color: white;
    text-decoration: none;
}

/* Search and Filter Controls */
.reports-controls {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.reports-controls input[type="text"] {
    flex: 1;
    min-width: 300px;
    padding: 0.75rem 1rem;
    border: 2px solid #f1f3f4;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.reports-controls input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.reports-controls select {
    padding: 0.75rem 1rem;
    border: 2px solid #f1f3f4;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.reports-controls label {
    font-weight: 500;
    color: #333;
    margin-right: 0.5rem;
}

/* Pagination */
.pagination-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-buttons button {
    padding: 0.5rem 1rem;
    border: 2px solid #f1f3f4;
    background: white;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-buttons button:not(:disabled):hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.pagination-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-buttons span {
    margin: 0 1rem;
    font-weight: 600;
    color: #333;
}

/* Package Name Styling */
.dependencies-table tbody td:first-child strong {
    color: #1565c0;
    font-weight: 600;
    font-size: 1rem;
}

.dependencies-table tbody td:first-child small {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 0.25rem;
    display: block;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dependencies-table {
        font-size: 0.85rem;
    }
    
    .dependencies-table thead th,
    .dependencies-table tbody td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 768px) {
    .reports-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reports-controls input[type="text"] {
        min-width: auto;
    }
    
    .pagination-container {
        flex-direction: column;
        text-align: center;
    }
    
    .pagination-buttons {
        justify-content: center;
    }
    
    /* Hide less important columns on mobile */
    .dependencies-table th:nth-child(6),
    .dependencies-table td:nth-child(6),
    .dependencies-table th:nth-child(8),
    .dependencies-table td:nth-child(8) {
        display: none;
    }
}

/* Loading State */
.table-loading {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-style: italic;
}

/* Empty State */
.table-empty {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.table-empty .material-icons {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Reports Header */
.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.reports-header h1 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #333;
}

.reports-actions {
    display: flex;
    gap: 0.5rem;
}

/* Download Buttons */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    text-decoration: none;
    color: white;
}