
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    background-color: #f4f7f6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode */
body.dark-mode {
    background-color: #0b0e11 !important;
    color: #e9ecef !important;
}

body.dark-mode .card {
    background-color: #161b22 !important;
    border: 1px solid #30363d !important;
    color: #e9ecef !important;
}

body.dark-mode .card-header {
    background-color: #21262d !important;
    border-bottom: 1px solid #30363d !important;
    color: #58a6ff !important;
}

body.dark-mode .bg-light, 
body.dark-mode .bg-light-subtle,
body.dark-mode pre {
    background-color: #0d1117 !important;
    color: #c9d1d9 !important;
    border: 1px solid #30363d !important;
}

body.dark-mode .list-group-item {
    background-color: #161b22 !important;
    color: #e9ecef !important;
    border-color: #30363d !important;
}

body.dark-mode .navbar {
    background-color: #161b22 !important;
    border-bottom: 1px solid #30363d !important;
}

body.dark-mode .text-muted {
    color: #8b949e !important;
}

body.dark-mode .table {
    color: #e9ecef !important;
}

body.dark-mode .table th, body.dark-mode .table td {
    border-color: #30363d !important;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

.card {
    border-radius: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 20px;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0,0,0,.05);
    padding: 1.25rem;
    font-weight: 600;
}

.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
}

/* Status Badge Styles */
.bg-success-subtle { background-color: #d1e7dd !important; color: #0f5132 !important; }
.bg-info-subtle { background-color: #cff4fc !important; color: #055160 !important; }
.bg-warning-subtle { background-color: #fff3cd !important; color: #664d03 !important; }
.bg-danger-subtle { background-color: #f8d7da !important; color: #842029 !important; }
.bg-primary-subtle { background-color: #cfe2ff !important; color: #084298 !important; }

/* Custom Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.spin {
    animation: spin 2s linear infinite;
    display: inline-block;
}

/* Dashboard Specific */
.stat-card .icon-shape {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

/* Analysis UI */
#upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}
#upload-zone:hover {
    border-color: var(--primary-color);
    background: #f8fbff;
}

/* Entity Styles */
.timeline-item {
    position: relative;
    padding-left: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #dee2e6;
}

.timeline-item:last-child::before {
    display: none;
}

/* Network Visualization */
#network-graph {
    background-color: #fafafa;
}

/* Risk Score Badges */
.badge.bg-critical { background-color: #dc3545 !important; }
.badge.bg-high { background-color: #ffc107 !important; color: #000 !important; }
.badge.bg-medium { background-color: #17a2b8 !important; }
.badge.bg-low { background-color: #28a745 !important; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    #network-graph {
        height: 400px !important;
    }
}
