/* CVEium Dashboard - Custom Styles */

/* CSS Variables */
:root {
    --color-critical: #dc2626;
    --color-high: #ea580c;
    --color-medium: #ca8a04;
    --color-low: #16a34a;
    --color-none: #6b7280;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Severity Badges */
.badge-critical {
    background-color: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

.badge-high {
    background-color: rgba(234, 88, 12, 0.15);
    color: #ea580c;
}

.badge-medium {
    background-color: rgba(202, 138, 4, 0.15);
    color: #ca8a04;
}

.badge-low {
    background-color: rgba(22, 163, 74, 0.15);
    color: #16a34a;
}

.badge-none {
    background-color: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

/* Status Badges */
.badge-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge-error {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Toast Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-enter {
    animation: slideIn 0.3s ease-out forwards;
}

.toast-exit {
    animation: slideOut 0.3s ease-in forwards;
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.data-table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.data-table tbody tr:hover {
    background-color: rgba(148, 163, 184, 0.05);
}

.data-table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.dark .card {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.1);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-primary {
    background-color: #1a56db;
    color: white;
}

.btn-primary:hover {
    background-color: #1648b8;
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #334155;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

.dark .btn-secondary {
    background-color: #334155;
    color: #e2e8f0;
}

.dark .btn-secondary:hover {
    background-color: #475569;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Input Styles */
.input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus {
    outline: none;
    border-color: #1a56db;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.dark .input {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

.dark .input:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Stat Card */
.stat-card {
    padding: 1.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.stat-change {
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
}

.pagination-btn:hover:not(:disabled) {
    background: #f1f5f9;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: #1a56db;
    border-color: #1a56db;
    color: white;
}

.dark .pagination-btn {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

.dark .pagination-btn:hover:not(:disabled) {
    background: #475569;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    max-width: 32rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.dark .modal-content {
    background: #1e293b;
}

/* Sidebar */
.sidebar {
    width: 16rem;
    background: #0f172a;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.15s;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.sidebar-link.active {
    background: rgba(6, 182, 212, 0.1);
    color: #22d3ee;
    border-right: 3px solid #22d3ee;
}

.sidebar-section {
    padding: 0.75rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

/* Main Content */
.main-content {
    margin-left: 16rem;
    min-height: 100vh;
}

.page-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.page-content {
    padding: 2rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 50;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}
