body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
}

.navbar {
    background-color: #fff;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo img {
    height: 40px;
}

.navbar-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-info {
    text-align: right;
}

.profile-name {
    display: block;
    font-weight: bold;
    color: #555;
}

.profile-role {
    font-size: 0.8em;
    color: #888;
}

/* Corrected styling for the profile picture in the header */
.profile-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

.logout-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: #c82333;
}

.dashboard-main {
    display: flex;
}

.sidebar {
    width: 250px;
    background-color: #f0f3f2;
    height: calc(100vh - 60px); /* Adjust based on navbar height */
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-link {
    padding: 12px 15px;
    text-decoration: none;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover, .nav-link.active {
    background-color: #e2e6e5;
    color: #007bff;
}

.nav-link i {
    font-size: 1.2em;
}

.badge {
    background-color: #007bff;
    color: white;
    font-size: 0.7em;
    padding: 4px 8px;
    border-radius: 12px;
    margin-left: auto;
}

.quick-actions-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.quick-actions-title {
    color: #555;
    margin-bottom: 10px;
}

.quick-actions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-action-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.2s;
}

.quick-action-button:hover {
    background-color: #0056b3;
}

.main-content {
    flex-grow: 1;
    padding: 20px;
}

.dashboard-header {
    margin-bottom: 20px;
}

.dashboard-header h1 {
    color: #333;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.widget {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.widget-header h3 {
    margin: 0;
    color: #555;
}

.count-badge {
    background-color: #28a745;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
}

.unread-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.unread-conversation-link {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-radius: 8px;
    background-color: #f9f9f9;
    transition: background-color 0.2s;
}

.unread-conversation-link:hover {
    background-color: #f0f0f0;
}

.employee-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.employee-card {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Corrected styling for employee photos */
.employee-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.employee-info {
    display: flex;
    flex-direction: column;
}

.employee-name {
    font-weight: bold;
}

.employee-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.online {
    background-color: #28a745;
}

.offline {
    background-color: #6c757d;
}

/* --- New Modal CSS (from previous changes) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    position: relative;
    transform: translateY(-20px);
    animation: slideIn 0.3s ease-in-out forwards;
}

.modal-content h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 5px;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding-top: 10px;
}

.group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.group-item:last-child {
    border-bottom: none;
}

.hidden {
    display: none !important;
}

#members-list,
#employee-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

#members-list li,
#employee-list li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn {
    background-color: #007bff;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #0056b3;
}

.btn.delete-group-btn {
    background-color: #dc3545;
}

.btn.delete-group-btn:hover {
    background-color: #c82333;
}

      .notification-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background-color: #ef4444; /* red-500 */
            color: white;
            font-size: 0.75rem; /* text-xs */
            font-weight: bold;
            line-height: 1;
            padding: 0.25rem 0.5rem;
            border-radius: 9999px; /* full rounded */
            border: 2px solid white;
        }
        .online-indicator {
            position: absolute;
            bottom: 0;
            right: 0;
            width: 12px;
            height: 12px;
            background-color: #10B981; /* green-500 */
            border-radius: 50%;
            border: 2px solid white;
        }
        .message-alert {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background-color: #2D3748; /* gray-800 */
            color: white;
            padding: 1.5rem 2.5rem;
            border-radius: 0.5rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            z-index: 1000;
            font-size: 1.25rem; /* text-xl */
            font-weight: 600;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
            white-space: nowrap;
        }
        .message-alert.show {
            opacity: 1;
            visibility: visible;
        }
        .hidden { display: none; }