/* IncidentFlow Enterprise CSS Stylesheet */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --body-bg: #f8fafc;
    --card-border: #e2e8f0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--body-bg);
    color: #334155;
    min-height: 100vh;
}

/* Sidebar Navigation */
#sidebar {
    width: 260px;
    min-height: 100vh;
    transition: all 0.25s ease-in-out;
}

#sidebar .nav-link {
    font-size: 0.92rem;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 8px;
    transition: background 0.15s ease-in-out, color 0.15s;
}

#sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff !important;
}

#sidebar .nav-link.active {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    font-weight: 600;
}

.brand-icon {
    width: 36px;
    height: 36px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    font-weight: 600;
    flex-shrink: 0;
}

.user-avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.x-small {
    font-size: 0.75rem;
}

.small-text {
    font-size: 0.70rem;
}

.search-bar-container {
    width: 380px;
}

/* Metric KPI Cards */
.metric-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid var(--card-border) !important;
    border-radius: 10px;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
}

.metric-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

/* Status Indicator Dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Priority Badges */
.badge-priority-critical {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-weight: 600;
}

.badge-priority-high {
    background-color: #ffedd5;
    color: #9a3412;
    border: 1px solid #fed7aa;
    font-weight: 600;
}

.badge-priority-medium {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    font-weight: 600;
}

.badge-priority-low {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-weight: 600;
}

/* Status Badges */
.badge-status-open {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    font-weight: 600;
}

.badge-status-in-progress {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
    font-weight: 600;
}

.badge-status-resolved {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    font-weight: 600;
}

.badge-status-closed {
    background-color: #f8fafc;
    color: #64748b;
    border: 1px solid #cbd5e1;
    font-weight: 600;
}

/* Activity Audit Timeline */
.activity-timeline {
    position: relative;
}

.activity-item {
    position: relative;
}

.activity-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 28px;
}

.activity-node {
    width: 22px;
    height: 22px;
    z-index: 2;
    background-color: var(--primary-color);
}

.activity-line {
    width: 2px;
    background-color: #e2e8f0;
    flex-grow: 1;
    margin-top: 4px;
    margin-bottom: -10px;
}

.activity-item:last-child .activity-line {
    display: none;
}

/* Table Enhancements */
.table th {
    font-weight: 600;
    letter-spacing: 0.02em;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.table td {
    vertical-align: middle;
    padding: 12px 14px;
}

.card {
    border-radius: 10px;
}

/* Mobile Sidebar Toggle */
@media (max-width: 991.98px) {
    #sidebar {
        margin-left: -260px;
        position: fixed;
        z-index: 1040;
        top: 0;
        bottom: 0;
    }
    #sidebar.toggled {
        margin-left: 0;
    }
    .search-bar-container {
        width: 100%;
    }
}
