/* --- Styles Moved from header.php --- */

.notification-badge {
    position: absolute;
    top: 2px;
    right: 0px;
    font-size: 0.6em;
    padding: 3px 6px;
    border-radius: 50%;
    background: red;
    color: white;
}
.dropdown-menu-scroll {
    max-height: 400px;
    overflow-y: auto;
    width: 350px;
}
.dropdown-item-wrap {
    white-space: normal;
    font-size: 0.9em;
}

/* Custom purple for Score badge */
.bg-purple {
    background-color: #6f42c1;
    color: white;
}

/* Activity Log Styles */
.activity-log-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}
.activity-log-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.activity-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.1rem;
}
.activity-content {
    flex-grow: 1;
}
.activity-header {
    font-weight: 600;
}
.activity-body {
    margin-top: 0.25rem;
}
.activity-body-message {
    background-color: #f8f9fa;
    border: 1px solid #eee;
    padding: 0.75rem;
    border-radius: 6px;
}
.activity-time {
    font-size: 0.85em;
    color: #6c757d;
}
.activity-body-pre-message {
    font-size: 0.9em;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.25rem;
}


/* ==============================================
    Role-Based Color Themes
==============================================
*/
.navbar.bg-dark { background-color: #212529 !important; }
.role-director-operational .navbar.bg-dark { background-color: #003366 !important; }
.role-auditor .navbar.bg-dark { background-color: #800000 !important; }
.role-consultant .navbar.bg-dark { background-color: #004d00 !important; }
.role-client .navbar.bg-dark { background-color: #4b0082 !important; }

/* ==============================================
    Dashboard Stat Card Styles
==============================================
*/
.stat-card {
    border-left: 5px solid #0d6efd;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    position: relative; /* Ensure positioning context for icon */
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
}
.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}
.stat-card .stat-label {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}
.stat-card .stat-icon {
    font-size: 3rem;
    color: rgba(0,0,0,0.05);
    position: absolute;
    right: 15px;
    bottom: 15px;
    line-height: 1; /* Fix alignment for BI */
}

.stat-card-danger { border-color: #dc3545; background: linear-gradient(to right, #fff, #fff0f0); }
.stat-card-danger .stat-value { color: #dc3545; }
.stat-card-danger .stat-icon { color: #f8d7da; }

.stat-card-warning { border-color: #ffc107; background: linear-gradient(to right, #fff, #fff9e6); }
.stat-card-warning .stat-value { color: #d39e00; }
.stat-card-warning .stat-icon { color: #fff3cd; }

.stat-card-success { border-color: #198754; background: linear-gradient(to right, #fff, #f0fff4); }
.stat-card-success .stat-value { color: #198754; }
.stat-card-success .stat-icon { color: #d1e7dd; }

.stat-card-info { border-color: #0dcaf0; background: linear-gradient(to right, #fff, #f0fcff); }
.stat-card-info .stat-value { color: #0dcaf0; }
.stat-card-info .stat-icon { color: #cff4fc; }

.stat-card-secondary { border-color: #6c757d; }
.stat-card-secondary .stat-value { color: #6c757d; }

/* ==============================================
    Dashboard Project List Styles
==============================================
*/
.project-my-turn {
    background-color: #e0f3ff !important;
    font-weight: 500;
}
.project-progress-bar { min-width: 150px; }

/* ==============================================
    Sidebar Styles
==============================================
*/
.sidebar {
    position: fixed;
    top: 56px; /* Height of navbar */
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: #f8f9fa;
}

@media (max-width: 767.98px) {
    .sidebar {
        top: 5rem;
    }
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Updated selector to target Bootstrap Icons instead of feather */
.sidebar .nav-link i {
    margin-right: 4px;
    color: #727272;
    font-size: 1.1em;
}

.sidebar .nav-link.active {
    color: #007bff;
    background-color: #e9ecef;
    border-right: 4px solid #007bff;
}

.sidebar .nav-link:hover i,
.sidebar .nav-link.active i {
    color: inherit;
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
}

.transition-icon { transition: transform 0.3s ease-in-out; }
.rotate-icon { transform: rotate(180deg); }

/* Action Page Styles */
.action-card {
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    transition: transform 0.2s;
}
.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.action-list-item {
    border-left: 4px solid transparent;
    margin-bottom: 0.5rem;
    border-radius: 4px !important;
}
.action-list-item:hover {
    background-color: #f8f9fa;
}
.action-list-item.urgent {
    border-left-color: #dc3545;
}
.action-list-item.warning {
    border-left-color: #ffc107;
}