/* Main Container */
.neutrals-messenger-container {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 1000px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header */
.nm-header {
    background: linear-gradient(135deg, #1b5b69c4 0%, #1b5b69 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nm-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nm-user-avatar img {
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.nm-user-details h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
}

.nm-user-status {
    font-size: 12px;
    opacity: 0.9;
}

.nm-user-status.online {
    color: #4ade80;
}

.nm-user-status.offline {
    color: #94a3b8;
}

.nm-header-actions {
    display: flex;
    gap: 10px;
}

.nm-bulk-message-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.nm-bulk-message-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.nm-bulk-message-btn i {
    font-size: 14px;
}

/* Main Content */
.nm-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.nm-sidebar {
    width: 350px;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

.nm-search-box {
    position: relative;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.nm-search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #d1d5db;
    border-radius: 24px;
    font-size: 14px;
    background: #fff;
}

.nm-search-box i {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* Filter Section */
.nm-filter-section {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.nm-filter-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.nm-filter-group {
    flex: 1;
}

.nm-filter-group label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    font-weight: 500;
}

.nm-filter-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.nm-clear-btn {
    width: 100%;
    padding: 8px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.nm-clear-btn:hover {
    background: #e2e8f0;
}

/* Users List */
.nm-users-list {
    flex: 1;
    /* overflow-y: auto; */
    padding: 0;
}

.nm-user-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
    gap: 12px;
    position: relative;
}

.nm-user-item:hover {
    background: #f8fafc;
}

.nm-user-item.active {
    background: #eff6ff;
    border-left: 3px solid #1b5b69;
}

.nm-user-avatar {
    position: relative;
    flex-shrink: 0;
}

.nm-user-avatar img {
    width: 48px;
    height: 48px;
}

.nm-user-status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
}

.nm-user-status-indicator.online {
    background: #10b981;
}

.nm-user-status-indicator.offline {
    background: #94a3b8;
}

.nm-user-details {
    flex: 1;
    min-width: 0;
}

.nm-user-info-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.nm-user-name {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nm-last-message-time {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.nm-user-info-bottom {
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.nm-user-designation {
    font-size: 12px;
    color: #1b5b69;
    font-weight: 500;
}

.nm-user-region, .nm-user-country {
    font-size: 11px;
    color: #64748b;
}

.nm-last-message {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nm-last-message i {
    margin-right: 4px;
    font-size: 11px;
}

.nm-unread-count {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chat Area */
.nm-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nm-chat-default {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    padding: 40px;
    text-align: center;
}

.nm-chat-default i {
    margin-bottom: 20px;
    color: #cbd5e1;
}

.nm-chat-default h3 {
    margin: 0 0 8px 0;
    color: #475569;
}

.nm-chat-default p {
    margin: 0;
    font-size: 14px;
}

/* Active Chat Header */
.nm-active-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.nm-chat-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nm-chat-user-details {
    display: flex;
    flex-direction: column;
}

.nm-chat-user-name {
    margin: 0 0 2px 0;
    font-size: 16px;
    color: #1e293b;
}

.nm-chat-user-designation {
    margin: 0 0 4px 0;
    font-size: 13px;
    color: #64748b;
}

.nm-chat-user-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.nm-chat-user-status.online {
    color: #10b981;
}

.nm-chat-user-status.offline {
    color: #94a3b8;
}

.nm-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.nm-chat-user-status.online .nm-status-dot {
    background: #10b981;
}

.nm-chat-user-status.offline .nm-status-dot {
    background: #94a3b8;
}

.nm-chat-actions {
    display: flex;
    gap: 8px;
}

.nm-chat-action-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: background 0.2s;
}

.nm-chat-action-btn:hover {
    background: #f1f5f9;
}

/* Chat Messages Container */
.nm-chat-messages-container {
    flex: 1;
    overflow-y: auto;
    background: #f0f2f5;
    padding: 20px;
}

.nm-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100%;
}

/* Date Separator */
.nm-date-separator {
    text-align: center;
    margin: 16px 0;
    position: relative;
}

.nm-date-separator:before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #e5e7eb;
    z-index: 1;
}

.nm-date-separator span {
    background: #f0f2f5;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: #94a3b8;
    position: relative;
    z-index: 2;
}

/* Messages */
.nm-message {
    max-width: 70%;
    display: flex;
    flex-direction: column;
}

.nm-message-sent {
    align-self: flex-end;
}

.nm-message-received {
    align-self: flex-start;
}

.nm-message-bubble {
    padding: 8px 12px;
    border-radius: 18px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nm-message-sent .nm-message-bubble {
    background: #d9fdd3;
    border-bottom-right-radius: 4px;
}

.nm-message-received .nm-message-bubble {
    background: #fff;
    border-bottom-left-radius: 4px;
}

.nm-message-text {
    font-size: 14px;
    line-height: 1.4;
    color: #1e293b;
    word-wrap: break-word;
    margin-bottom: 4px;
}

/* Attachment Styles */
.nm-attachment {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    margin-bottom: 8px;
}

.nm-attachment-icon {
    font-size: 24px;
    color: #3b82f6;
}

.nm-attachment-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nm-attachment-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
    margin-bottom: 2px;
}

.nm-attachment-name:hover {
    text-decoration: underline;
}

.nm-attachment-size {
    font-size: 12px;
    color: #64748b;
}

.nm-message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.nm-message-time {
    font-size: 11px;
    color: #94a3b8;
}

.nm-message-status {
    font-size: 12px;
    line-height: 1;
}

.nm-message-status.sending {
    color: #94a3b8;
}

.nm-message-status.delivered {
    color: #94a3b8;
}

.nm-message-status.read {
    color: #3b82f6;
}

.nm-message-status.error {
    color: #ef4444;
}

/* Chat Input */
.nm-chat-input {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.nm-input-container {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

/* Input Container - Main container */
.nm-input-container {
    flex:1;
    display: flex;
    align-items: center;
    background: #f0f2f5;
    border-radius: 0;
    padding: 8px;
    gap: 8px;
}

/* Left side - File & Emoji buttons */
.nm-input-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Middle - Text input area */
.nm-input-middle {
    flex: 1;
    display: flex;
    align-items: center;
}

.nm-input-middle textarea {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    max-height: 120px;
    min-height: 20px;
    padding: 8px 0;
    outline: none;
    font-family: inherit;
}

/* Right side - Send button */
.nm-input-right {
    flex-shrink: 0;
}

.nm-send-btn {
    background: #1b5b69;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 0;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.nm-send-btn:hover {
    background: #1b5b69a9;
}

/* Input action buttons */
.nm-input-action-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.nm-input-action-btn:hover {
    background: #e5e7eb;
}

/* File preview below input */
.nm-file-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 0;
    border: 1px solid #e5e7eb;
}

/* Remove old styles for nm-input-wrapper */
.nm-input-wrapper {
    display: none; /* Hide old wrapper */
}

/* Input action buttons (file, emoji) */
.nm-input-action-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
    order: 1; /* File button first */
}
.nm-input-action-btn.nm-emoji-btn {
    order: 3; /* Emoji button third */
}

.nm-input-action-btn:hover {
    background: #e5e7eb;
}

/* Message input */
#nm-message-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    max-height: 120px;
    min-height: 20px;
    padding: 8px 0;
    outline: none;
    font-family: inherit;
    order: 2; /* Text input in middle */
}

/* Send button */
.nm-send-btn {
    background: #1b5b69;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 0 !important; /* Remove border radius */
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
    order: 4; /* Send button last */
}

.nm-send-btn:hover {
    background: #1b5b69a9;
}

/* File Preview */
.nm-file-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.nm-file-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
}

.nm-file-preview-item:last-child {
    margin-bottom: 0;
}

.nm-file-preview-icon {
    font-size: 20px;
    color: #3b82f6;
}

.nm-file-preview-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nm-file-preview-name {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 2px;
}

.nm-file-preview-size {
    font-size: 11px;
    color: #64748b;
}

.nm-file-remove {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 18px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.nm-file-remove:hover {
    background: #fee2e2;
}

.nm-input-footer {
    margin-top: 8px;
    min-height: 20px;
}

.nm-typing-indicator {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}

/* Bulk Message Modal */
.nm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.nm-modal {
    background: white;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.nm-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #1b5b69;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nm-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nm-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.nm-modal-close:hover {
    background: #f1f5f9;
}

.nm-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.nm-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.nm-modal-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.nm-modal-cancel {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.nm-modal-cancel:hover {
    background: #e2e8f0;
}

.nm-modal-primary {
    background: #1b5b69;
    border-color: #1b5b69;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nm-modal-primary:hover {
    background: #1b5b69a9;
}

.nm-modal-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bulk Message Sections */
.nm-bulk-section {
    margin-bottom: 30px;
}

.nm-bulk-section:last-child {
    margin-bottom: 0;
}

.nm-bulk-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.nm-bulk-section-header h4 {
    margin: 0;
    font-size: 16px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nm-bulk-selection-actions {
    display: flex;
    gap: 8px;
}

.nm-bulk-action-btn {
    padding: 6px 12px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.nm-bulk-action-btn:hover {
    background: #e2e8f0;
}

/* Bulk Filters */
.nm-bulk-filters {
    margin-bottom: 20px;
}

.nm-bulk-filter-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.nm-bulk-filter-group {
    flex: 1;
}

.nm-bulk-filter-group label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    font-weight: 500;
}

.nm-bulk-filter-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

/* Bulk Users List */
.nm-bulk-users-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.nm-bulk-user-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    gap: 12px;
}

.nm-bulk-user-item:last-child {
    border-bottom: none;
}

.nm-bulk-user-item:hover {
    background: #f8fafc;
}

.nm-bulk-user-select {
    position: relative;
    cursor: pointer;
}

.nm-user-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.nm-checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    transition: all 0.2s;
}

.nm-user-checkbox:checked ~ .nm-checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.nm-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.nm-user-checkbox:checked ~ .nm-checkmark:after {
    display: block;
}

.nm-bulk-user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.nm-bulk-user-details {
    flex: 1;
}

.nm-bulk-user-name {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.nm-bulk-user-designation {
    display: block;
    font-size: 12px;
    color: #3b82f6;
    margin-bottom: 4px;
}

.nm-bulk-user-location {
    display: flex;
    gap: 8px;
}

.nm-bulk-user-region,
.nm-bulk-user-country {
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}

.nm-selected-count {
    margin-top: 16px;
    padding: 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0369a1;
}

.nm-selected-count i {
    font-size: 16px;
}

.nm-selected-count span {
    font-size: 14px;
    font-weight: 500;
}

/* Bulk Message Editor */
.nm-bulk-message-editor {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#nm-bulk-message-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

#nm-bulk-message-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.nm-bulk-file-upload {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nm-bulk-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    width: fit-content;
    transition: all 0.2s;
}

.nm-bulk-file-btn:hover {
    background: #e2e8f0;
}

.nm-bulk-file-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nm-bulk-file-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.nm-bulk-file-preview-icon {
    font-size: 18px;
    color: #3b82f6;
}

.nm-bulk-file-preview-name {
    flex: 1;
    font-size: 13px;
    color: #1e293b;
}

.nm-bulk-file-remove {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 16px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.nm-bulk-file-remove:hover {
    background: #fee2e2;
}

/* Bulk Preview */
.nm-bulk-preview {
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.nm-bulk-preview h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nm-bulk-preview-content {
    min-height: 60px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
}

.nm-preview-attachment {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    margin-bottom: 8px;
}

.nm-preview-attachment i {
    color: #3b82f6;
}

.nm-preview-text {
    margin-top: 8px;
    white-space: pre-wrap;
}

/* Notifications */
.nm-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    z-index: 1001;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.nm-notification-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.nm-notification-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.nm-notification-info {
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.nm-notification-message {
    flex: 1;
    font-size: 14px;
}

.nm-notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nm-notification-close:hover {
    opacity: 1;
}

/* Loading and Empty States */
.nm-loading,
.nm-no-users {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.nm-login-required {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    color: #475569;
    font-size: 16px;
}

/* Scrollbar Styling */
.nm-users-list::-webkit-scrollbar,
.nm-chat-messages-container::-webkit-scrollbar,
.nm-bulk-users-list::-webkit-scrollbar,
.nm-modal-content::-webkit-scrollbar {
    width: 6px;
}

.nm-users-list::-webkit-scrollbar-track,
.nm-chat-messages-container::-webkit-scrollbar-track,
.nm-bulk-users-list::-webkit-scrollbar-track,
.nm-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.nm-users-list::-webkit-scrollbar-thumb,
.nm-chat-messages-container::-webkit-scrollbar-thumb,
.nm-bulk-users-list::-webkit-scrollbar-thumb,
.nm-modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.nm-users-list::-webkit-scrollbar-thumb:hover,
.nm-chat-messages-container::-webkit-scrollbar-thumb:hover,
.nm-bulk-users-list::-webkit-scrollbar-thumb:hover,
.nm-modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nm-main-content {
        flex-direction: column;
    }
    .nm-input-container {
        display: block;
        /* align-items: flex-end; */
        gap: 12px;
    }
    .nm-chat-input {
        padding: 0px 0px;
        border-top: 1px solid #e5e7eb;
        background: #fff;
    }

    .nm-sidebar {
        width: 100%;
        height: 450px;
    }
    .nm-active-chat-header {
        border-bottom: 1px solid #e5e7eb;
        background: #0f3a3b;
        color:white;
    }
    .nm-chat-user-name{
        color:white !important;
    }
    .nm-chat-area {
        height: 400px;
    }
    
    .nm-filter-row,
    .nm-bulk-filter-row {
        flex-direction: column;
    }
    
    .nm-message {
        max-width: 85%;
    }
    
    .nm-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .nm-header-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .nm-bulk-message-btn span {
        display: none;
    }
    
    .nm-bulk-message-btn {
        padding: 8px;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
}

/* Enhanced Attachment Styles */
.nm-attachment {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.nm-attachment-icon {
    font-size: 28px;
    color: #3b82f6;
    min-width: 40px;
    text-align: center;
}

.nm-attachment-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nm-attachment-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    transition: color 0.2s;
    word-break: break-word;
}

.nm-attachment-name:hover {
    color: #2563eb;
    text-decoration: underline;
}

.nm-attachment-name i {
    font-size: 12px;
    color: #6b7280;
}

.nm-attachment-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 4px;
}

.nm-attachment-size {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 3px 8px;
    border-radius: 4px;
}

.nm-attachment-view {
    font-size: 12px;
    color: #3b82f6;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.nm-attachment-view:hover {
    color: #2563eb;
    text-decoration: underline;
}

.nm-attachment-view i {
    font-size: 10px;
}

.nm-attachment-text {
    padding: 10px;
    background: #f3f4f6;
    border-radius: 6px;
    border: 1px dashed #d1d5db;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.nm-attachment-text i {
    color: #6b7280;
    font-size: 14px;
}

.nm-attachment-text span {
    font-size: 13px;
    color: #4b5563;
}

/* Image preview for image files */
.nm-attachment-image-preview {
    max-width: 200px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
}

.nm-attachment-image-preview img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.3s;
}

.nm-attachment-image-preview img:hover {
    transform: scale(1.05);
}

/* File type specific icons */
.nm-file-type-image .nm-attachment-icon {
    color: #ef4444;
}

.nm-file-type-pdf .nm-attachment-icon {
    color: #dc2626;
}

.nm-file-type-document .nm-attachment-icon {
    color: #2563eb;
}

.nm-file-type-spreadsheet .nm-attachment-icon {
    color: #16a34a;
}

.nm-file-type-presentation .nm-attachment-icon {
    color: #ea580c;
}

.nm-file-type-archive .nm-attachment-icon {
    color: #7c3aed;
}

.nm-file-type-default .nm-attachment-icon {
    color: #6b7280;
}

/* Sidebar Tabs */
.nm-sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.nm-tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.nm-tab-btn:hover {
    background: #f8fafc;
    color: #475569;
}

.nm-tab-btn.active {
    color: #1b5b69;
    border-bottom-color: #1b5b69;
    background: #f0f9ff;
}

.nm-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.nm-tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Groups Header */
.nm-groups-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nm-create-group-btn {
    padding: 10px 16px;
    background: #1b5b69;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.nm-create-group-btn:hover {
    background: #1b5b69a9;
}

/* Group Items */
.nm-group-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
    gap: 12px;
    position: relative;
}

.nm-group-item:hover {
    background: #f8fafc;
}

.nm-group-item.active {
    background: #eff6ff;
    border-left: 3px solid #1b5b69;
}

.nm-group-avatar-default {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1b5b69 0%, #3b82f6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

/* Active Group Header */
.nm-active-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

/* Group Messages */
.nm-message-sender {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
}

.nm-sender-name {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

/* Group Info Modal */
.nm-wide-modal {
    max-width: 600px;
}

.nm-group-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nm-group-info-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.nm-group-info-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #1b5b69 0%, #3b82f6 100%);
}

.nm-group-info-details {
    flex: 1;
}

.nm-group-info-details h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #1e293b;
}

.nm-group-info-details p {
    margin: 0 0 8px 0;
    color: #64748b;
    font-size: 14px;
}

.nm-group-info-stats {
    display: flex;
    gap: 16px;
}

.nm-group-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nm-stat-number {
    font-size: 18px;
    font-weight: 600;
    color: #1b5b69;
}

.nm-stat-label {
    font-size: 12px;
    color: #64748b;
}

/* Group Members List */
.nm-group-members-section h5 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nm-group-members-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
}

.nm-group-member {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    gap: 12px;
}

.nm-group-member:last-child {
    border-bottom: none;
}

.nm-group-member:hover {
    background: #f8fafc;
}

.nm-group-member-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.nm-group-member-details {
    flex: 1;
}

.nm-group-member-details h5 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.nm-group-member-role {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.nm-group-member-role.admin {
    background: #dbeafe;
    color: #1e40af;
}

.nm-group-member-role.member {
    background: #f1f5f9;
    color: #475569;
}

.nm-group-member-status {
    font-size: 11px;
    color: #64748b;
}

.nm-group-member-status.online {
    color: #10b981;
}

.nm-group-member-actions {
    display: flex;
    gap: 8px;
}

.nm-group-action-btn {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.nm-group-action-btn:hover {
    background: #e2e8f0;
}

.nm-group-action-btn.nm-make-admin:hover {
    background: #dbeafe;
    color: #1e40af;
}

.nm-group-action-btn.nm-remove-member:hover {
    background: #fee2e2;
    color: #991b1b;
}

/* Add Members Section */
.nm-add-members-section {
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.nm-add-members-btn {
    width: 100%;
    padding: 10px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.nm-add-members-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

/* Form Styles */
.nm-form-group {
    margin-bottom: 20px;
}

.nm-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.nm-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.nm-form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.nm-members-selection {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 12px;
    min-height: 100px;
    background: #f9fafb;
}

.nm-selected-members {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 32px;
}

.nm-selected-member-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 4px;
    font-size: 13px;
    color: #0369a1;
}

.nm-selected-member-tag button {
    background: none;
    border: none;
    color: #0369a1;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nm-select-members-btn {
    padding: 8px 16px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.nm-select-members-btn:hover {
    background: #e2e8f0;
}

/* Members Selection Modal */
.nm-members-search {
    margin-bottom: 16px;
}

.nm-members-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.nm-member-select-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    gap: 12px;
}

.nm-member-select-item:last-child {
    border-bottom: none;
}

.nm-member-select-item:hover {
    background: #f8fafc;
}

.nm-member-select-checkbox {
    position: relative;
    cursor: pointer;
}

.nm-member-select-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.nm-member-checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    transition: all 0.2s;
}

.nm-member-select-checkbox input:checked ~ .nm-member-checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.nm-member-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.nm-member-select-checkbox input:checked ~ .nm-member-checkmark:after {
    display: block;
}

/* Message Read Status */
.nm-message-status.read {
    color: #3b82f6;
}

.nm-message-status.delivered {
    color: #94a3b8;
}

.nm-message-status.sent {
    color: #cbd5e1;
}

/* Danger Button */
.nm-modal-danger {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.nm-modal-danger:hover {
    background: #dc2626;
}

/* Selected Members Preview */
.nm-empty-selection {
    padding: 8px;
    color: #94a3b8;
    font-style: italic;
    text-align: center;
}

.nm-selected-member-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 16px;
    font-size: 13px;
    color: #0369a1;
    font-weight: 500;
}

.nm-selected-member-tag button {
    background: none;
    border: none;
    color: #0369a1;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.nm-selected-member-tag button:hover {
    background: rgba(2, 132, 199, 0.1);
}

/* Member Selection Item */
.nm-member-select-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    gap: 12px;
    transition: background 0.2s;
}

.nm-member-select-item:hover {
    background: #f8fafc;
}

.nm-member-select-item:last-child {
    border-bottom: none;
}

.nm-member-select-item .nm-user-details {
    flex: 1;
}

.nm-member-select-item .nm-user-name {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.nm-member-select-item .nm-user-designation {
    font-size: 12px;
    color: #64748b;
    display: block;
}

/* Members Search */
.nm-members-search {
    margin-bottom: 16px;
    position: relative;
}

.nm-members-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.nm-members-search:before {
    content: '\f002';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.nm-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.nm-input-error:focus {
    border-color: #dc2626 !important;
}

/* Notification Button */
.nm-notification-wrapper {
    position: relative;
}

.nm-notification-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nm-notification-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.nm-notification-btn.has-notifications {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.nm-notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1b5b69;
}

/* Notification Dropdown */
.nm-notification-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    width: 400px;
    max-height: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    border: 1px solid #e5e7eb;
}

.nm-notification-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border-radius: 8px 8px 0 0;
}

.nm-notification-header h4 {
    margin: 0;
    font-size: 16px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nm-mark-all-read {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.nm-mark-all-read:hover {
    background: #e0f2fe;
}

.nm-notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.nm-notification-item {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.nm-notification-item:hover {
    background: #f8fafc;
}

.nm-notification-item.unread {
    background: #f0f9ff;
}

.nm-notification-item:last-child {
    border-bottom: none;
}

.nm-notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0f2fe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0ea5e9;
}

.nm-notification-icon i {
    font-size: 16px;
}

.nm-notification-content {
    flex: 1;
    min-width: 0;
}

.nm-notification-title {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.nm-notification-message {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
}

.nm-notification-sender,
.nm-notification-group {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 2px;
}

.nm-notification-time {
    font-size: 11px;
    color: #94a3b8;
}

.nm-notification-dot {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
}

.nm-notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
    font-style: italic;
}

.nm-notification-footer {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 0 0 8px 8px;
}

.nm-view-all-notifications {
    display: block;
    text-align: center;
    color: #3b82f6;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.nm-view-all-notifications:hover {
    background: #e0f2fe;
    text-decoration: underline;
}

/* Scrollbar for notification list */
.nm-notification-list::-webkit-scrollbar {
    width: 6px;
}

.nm-notification-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.nm-notification-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.nm-notification-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Notification Button Animation */
.nm-notification-btn.new-notification {
    animation: notificationPulse 0.5s ease-in-out 3;
}

@keyframes notificationPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Notification Item Animation */
.nm-notification-item {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Notification Remove Animation */
.nm-notification-item.removing {
    animation: slideOutRight 0.3s ease;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(20px);
        opacity: 0;
    }
}

/* Notification Count */
.nm-notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1b5b69;
    animation: countBounce 0.5s ease;
}

@keyframes countBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Empty State */
.nm-notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    font-size: 14px;
}

/* Message Actions Styles - Only Forward Button */
.nm-message {
    position: relative;
}

.nm-message-actions {
    position: absolute;
    top: -30px;
    right: 10px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 5px;
    display: none;
    z-index: 100;
    min-width: 120px;
    border: 1px solid #e2e8f0;
}

.nm-message:hover .nm-message-actions {
    display: block;
}

.nm-message-sent .nm-message-actions {
    right: auto;
    left: 10px;
}

.nm-message-action-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: #4a5568;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    border-radius: 4px;
    transition: all 0.2s;
}

.nm-message-action-btn:hover {
    background-color: #f7fafc;
    color: #38a169;
}

.nm-message-action-btn i {
    width: 16px;
    text-align: center;
}

/* Forward Modal Styles */
.nm-forward-preview-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.nm-forward-preview-section h4 {
    margin-bottom: 10px;
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
}

.nm-forward-preview {
    max-height: 150px;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-bottom: 15px;
}

.nm-forward-preview-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.5;
    color: #2d3748;
}

.nm-forward-preview-attachment {
    margin-top: 10px;
    padding: 8px 12px;
    background: #edf2f7;
    border-radius: 6px;
    color: #4a5568;
    font-size: 13px;
}

.nm-forward-preview-attachment i {
    margin-right: 8px;
    color: #718096;
}

.nm-forward-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 15px;
}

.nm-forward-tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #718096;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.nm-forward-tab-btn.active {
    color: #4299e1;
    border-bottom-color: #4299e1;
}

.nm-forward-tab-btn:hover:not(.active) {
    color: #4a5568;
}

.nm-forward-tab-content {
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.nm-forward-tab-content.active {
    display: block;
}

.nm-forward-search {
    margin-bottom: 15px;
}

.nm-forward-search input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.nm-forward-search input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.nm-forward-recipients-list {
    margin-bottom: 15px;
}

.nm-forward-recipient-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background-color 0.2s;
}

.nm-forward-recipient-item:hover {
    background-color: #f8fafc;
}

.nm-forward-recipient-checkbox {
    position: relative;
    margin-right: 10px;
}

.nm-forward-recipient-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.nm-forward-recipient-checkmark {
    position: relative;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    transition: all 0.2s;
}

.nm-forward-recipient-checkbox-input:checked ~ .nm-forward-recipient-checkmark {
    background-color: #4299e1;
    border-color: #4299e1;
}

.nm-forward-recipient-checkbox-input:checked ~ .nm-forward-recipient-checkmark:after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.nm-forward-recipient-avatar {
    margin-right: 10px;
}

.nm-forward-recipient-details {
    flex: 1;
}

.nm-forward-recipient-name {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
}

.nm-forward-recipient-type {
    font-size: 12px;
    color: #718096;
}

.nm-forward-selected-count {
    padding: 10px 15px;
    background: #edf2f7;
    border-radius: 6px;
    font-size: 14px;
    color: #4a5568;
    display: flex;
    align-items: center;
}

.nm-forward-selected-count i {
    margin-right: 8px;
    color: #4299e1;
}

.nm-no-results, .nm-error {
    padding: 20px;
    text-align: center;
    color: #718096;
    font-style: italic;
}

.nm-error {
    color: #e53e3e;
}

/* Message actions improvements */
.nm-message-actions {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 5px;
    display: none;
    z-index: 100;
}

.nm-message:hover .nm-message-actions {
    display: block;
}

.nm-message-action-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    text-align: left;
    color: #4a5568;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.nm-message-action-btn:hover {
    background-color: #f7fafc;
    color: #2d3748;
}

.nm-message-action-btn i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* Copy message notification */
.nm-copy-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    background: #38a169;
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Emoji Picker Styles */
.nm-emoji-picker {
    position: absolute;
    width: 450px !important;
    height: 450px !important;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    left: 40% !important;
    top: 20% !important;
}

.nm-emoji-picker.visible {
    display: flex;
    animation: nm-emoji-picker-fade-in 0.2s ease;
}

@keyframes nm-emoji-picker-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nm-emoji-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.nm-emoji-category-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    flex: 1;
}

.nm-emoji-category-tabs::-webkit-scrollbar {
    height: 4px;
}

.nm-emoji-tab {
    background: none;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    color: #64748b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
}

.nm-emoji-tab:hover {
    background: #e2e8f0;
    color: #475569;
}

.nm-emoji-tab.active {
    background: #3b82f6;
    color: white;
}

.nm-emoji-picker-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    margin-left: 8px;
    border-radius: 4px;
}

.nm-emoji-picker-close:hover {
    background: #e2e8f0;
    color: #475569;
}

.nm-emoji-picker-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    position: relative;
}

.nm-emoji-search {
    margin-bottom: 12px;
}

.nm-emoji-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.nm-emoji-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.nm-emoji-category-content {
    display: none;
}

.nm-emoji-category-content.active {
    display: block;
}

.nm-emoji-category-title {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-top: 8px;
}

.nm-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.nm-emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
    user-select: none;
}

.nm-emoji-item:hover {
    background: #e2e8f0;
    transform: scale(1.1);
}

.nm-emoji-empty {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    padding: 20px;
    font-size: 14px;
}

.nm-emoji-picker-footer {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.nm-emoji-preview-text {
    font-size: 12px;
    color: #64748b;
}

/* Emoji button in chat input */
.nm-emoji-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #64748b;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.nm-emoji-btn:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Message Actions Menu */
.nm-message-actions-menu {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    z-index: 1000;
    min-width: 180px;
    overflow: hidden;
}

.nm-message-actions-list {
    display: flex;
    flex-direction: column;
}

.nm-message-action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    transition: all 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.nm-message-action-item:last-child {
    border-bottom: none;
}

.nm-message-action-item:hover {
    background: #f8fafc;
    color: #3b82f6;
}

.nm-message-action-item i {
    width: 16px;
    font-size: 14px;
}

.nm-message-action-item.nm-message-delete-btn:hover {
    color: #ef4444;
}

/* Copy Notification */
.nm-copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10001;
    font-size: 14px;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Image Upload Styles */
.nm-image-upload-container {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s;
}

.nm-image-upload-container:hover {
    border-color: #3b82f6;
}

.nm-image-preview {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
}

.nm-image-preview:hover {
    border-color: #3b82f6;
}

.nm-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
}

.nm-image-placeholder i {
    font-size: 32px;
    margin-bottom: 8px;
}

.nm-image-placeholder span {
    font-size: 12px;
    text-align: center;
    padding: 0 10px;
}

.nm-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nm-image-upload-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
}

.nm-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nm-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.nm-btn-secondary:hover {
    background: #e2e8f0;
}

.nm-btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.nm-btn-danger:hover {
    background: #fecaca;
}

.nm-btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.nm-image-upload-info {
    font-size: 11px;
    color: #94a3b8;
}

/* Group Info Avatar */
.nm-group-info-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.nm-group-avatar-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.nm-group-avatar-overlay:hover {
    background: #2563eb;
    transform: scale(1.1);
}

/* Groups List Avatar */
.nm-group-avatar-default {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: white;
}

/* FORCE EMOJI FONT (VERY IMPORTANT FOR FLAGS) */
.emoji-item,
.emoji-category-tab {
    font-family:
        "Apple Color Emoji",
        "Segoe UI Emoji",
        "Segoe UI Symbol",
        "Noto Color Emoji",
        sans-serif;
}

/* Progress section styling */
#forward-progress,
#bulk-message-progress {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: #f8f9fa;
    border-radius: 0px;
    padding: 25px;
    margin-top: 20px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Bar Styles */
.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 10px;
}

.tab-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.tab-header .search-box {
    width: 250px;
}

.tab-header .search-box input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 0px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.tab-header .search-box input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* Practice Areas Styles */
.user-practice-areas {
    font-size: 12px;
    color: #ffa934;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.user-practice-areas svg {
    flex-shrink: 0;
    stroke: #ffa934;
}

.user-info {
    min-width: 0;
}

/* Chat header practice areas */
.chat-with-info h3 {
    margin-bottom: 4px;
}

#chat-with-role {
    font-size: 13px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.practice-areas-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 0px;
    font-size: 11px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.practice-areas-badge svg {
    width: 10px;
    height: 10px;
    stroke-width: 2.5;
}

/* Group chat header */
.group-practice-areas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

/* Search functionality for practice areas */
.tab-header .search-box input {
    padding-left: 35px;
}

.search-box {
    position: relative;
}

.search-box:before {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    font-size: 14px;
    z-index: 1;
}

/* Bulk practice areas styles */
.bulk-practice-areas {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.bulk-practice-tag {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 0px;
    font-size: 10px;
    font-weight: 500;
    border: 1px solid #bbdefb;
    white-space: nowrap;
}

.bulk-practice-more {
    background: #757575;
    color: white;
    padding: 2px 5px;
    border-radius: 0px;
    font-size: 9px;
    font-weight: 600;
}

.selected-practice-areas {
    display: flex;
    gap: 3px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.selected-practice-tag {
    display: inline-block;
    background: #f3e5f5;
    color: #7b1fa2;
    padding: 1px 5px;
    border-radius: 0px;
    font-size: 9px;
    border: 1px solid #e1bee7;
}

.selected-practice-more {
    background: #9e9e9e;
    color: white;
    padding: 1px 4px;
    border-radius: 0px;
    font-size: 8px;
}

/* WhatsApp-style time formatting CSS */
.user-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.user-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.last-message-time {
    font-size: 11px;
    color: #666;
    margin-left: 8px;
    white-space: nowrap;
}

.last-message-preview {
    font-size: 13px;
    color: #666;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.group-info .last-message-time {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 11px;
    color: #666;
}

.group-info .last-message-preview {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 60px;
}

/* Chat messages time formatting */
.message-time {
    font-size: 11px;
    color: #999;
    margin-left: 8px;
}

.message-sent .message-time {
    color: rgba(255, 255, 255, 0.7);
}

/* Loading Skeleton */
.loading-skeleton {
    padding: 10px;
}

.user-item-skeleton {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    animation: skeleton-loading 1.5s infinite ease-in-out;
}

.skeleton-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    margin-right: 12px;
}

.skeleton-info {
    flex: 1;
}

.skeleton-name {
    width: 60%;
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-details {
    width: 40%;
    height: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Load More Button */
.load-more-container {
    text-align: center;
    padding: 20px;
}

.load-more-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.load-more-btn:hover {
    background: #005a87;
}

.loading-more {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

/* Online/Offline status with last seen */
.user-status.offline {
    color: #95a5a6;
    font-size: 12px;
    font-style: italic;
}

.user-status.online {
    color: #2ecc71;
    font-weight: 500;
}

/* Optimize images */
.profile-img, .group-img, .sender-img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Click prevention */
.user-item.clicked {
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nm-main-content {
        flex-direction: column;
    }
    
    .nm-sidebar {
        width: 100%;
        height: 450px;
    }
    
    .nm-chat-area {
        height: 400px;
    }
    
    .nm-filter-row,
    .nm-bulk-filter-row {
        flex-direction: column;
    }
    
    .nm-message {
        max-width: 85%;
    }
    
    .nm-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .nm-header-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .nm-bulk-message-btn span {
        display: none;
    }
    
    .nm-bulk-message-btn {
        padding: 8px;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    
    .user-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .last-message-time {
        margin-left: 0;
        margin-top: 4px;
    }
    
    .group-info .last-message-time {
        position: static;
        margin-top: 4px;
    }
    
    .group-info .last-message-preview {
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    .nm-chat-messages-container {
        padding: 15px;
    }
    
    .nm-message {
        max-width: 90%;
    }
    
    .nm-message-bubble {
        padding: 10px 14px;
    }
    
    .nm-message-text {
        font-size: 13px;
    }
    
    .nm-user-name {
        font-size: 13px;
    }
    
    .nm-user-designation {
        font-size: 11px;
    }
    
    .nm-last-message {
        font-size: 12px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .neutrals-messenger-container {
        background: #1a3344;
        color: #ffffff;
    }
    
    .nm-header {
        background: linear-gradient(135deg, #1b5b69c4 0%, #1b5b69 100%);
    }
    
    .nm-sidebar,
    .nm-chat-area,
    .nm-chat-messages-container,
    .nm-modal-content {
        background: #1a3344;
        color: #ffffff;
    }
    
    .nm-user-item,
    .nm-group-item,
    .nm-bulk-user-item,
    .nm-member-select-item {
        background: #2c3e50;
        border-color: #34495e;
        color: #ffffff;
    }
    
    .nm-user-item:hover,
    .nm-group-item:hover,
    .nm-bulk-user-item:hover,
    .nm-member-select-item:hover {
        background: #34495e;
    }
    
    .nm-user-item.active,
    .nm-group-item.active {
        background: #1b5b69;
        border-color: #1b5b69;
    }
    
    .nm-user-name,
    .nm-bulk-user-name,
    .nm-chat-user-name,
    .nm-group-info-details h4 {
        color: #ffffff;
    }
    
    .nm-user-designation,
    .nm-user-region,
    .nm-user-country,
    .nm-last-message,
    .nm-chat-user-designation,
    .nm-bulk-user-designation,
    .nm-bulk-user-region,
    .nm-bulk-user-country {
        color: #bdc3c7;
    }
    
    .nm-message-received .nm-message-bubble {
        background: #2c3e50;
        color: #ffffff;
    }
    
    .nm-message-sent .nm-message-bubble {
        background: #1b5b69;
        color: #ffffff;
    }
    
    .nm-message-text,
    .nm-attachment-name {
        color: #ffffff;
    }
    
    .nm-message-time,
    .nm-last-message-time,
    .nm-chat-user-status {
        color: #95a5a6;
    }
    
    .nm-input-wrapper,
    .nm-search-box input,
    .nm-filter-select,
    .nm-bulk-filter-select,
    #nm-message-input,
    #nm-bulk-message-input {
        background: #2c3e50;
        border-color: #34495e;
        color: #ffffff;
    }
    
    .nm-modal {
        background: #2c3e50;
        color: #ffffff;
    }
    
    .nm-modal-header {
        background: #1b5b69;
    }
    
    .nm-modal-cancel {
        background: #34495e;
        color: #ffffff;
        border-color: #4a6278;
    }
    
    .nm-modal-primary {
        background: #1b5b69;
        color: #ffffff;
    }
    
    .practice-areas-badge {
        background: #1b5b69;
        color: #ffffff;
    }
}

/* Additional mobile optimizations for touch devices */
@media (max-width: 768px) {
    .nm-user-item,
    .nm-group-item,
    .nm-bulk-user-item,
    .nm-member-select-item,
    .nm-chat-action-btn,
    .nm-input-action-btn,
    .nm-send-btn,
    .nm-modal-btn,
    .nm-bulk-action-btn,
    .nm-group-action-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nm-message-action-btn {
        padding: 12px 16px;
    }
    
    .nm-checkmark,
    .nm-member-checkmark {
        width: 24px;
        height: 24px;
    }
    
    .nm-checkmark:after,
    .nm-member-checkmark:after {
        left: 8px;
        top: 4px;
    }
}

/* Ensure proper spacing on very small screens */
@media (max-width: 360px) {
    .nm-user-avatar img,
    .nm-bulk-user-avatar img,
    .nm-group-avatar-default {
        width: 40px;
        height: 40px;
    }
    
    .nm-user-details,
    .nm-bulk-user-details,
    .nm-group-member-details {
        font-size: 12px;
    }
    
    .nm-user-name,
    .nm-bulk-user-name {
        font-size: 13px;
    }
    
    .nm-last-message,
    .nm-user-designation,
    .nm-bulk-user-designation {
        font-size: 11px;
    }
}

/* Print styles */
@media print {
    .nm-header-actions,
    .nm-chat-actions,
    .nm-input-container,
    .nm-notification-wrapper,
    .nm-message-actions,
    .nm-emoji-btn,
    .nm-attach-file-btn {
        display: none !important;
    }
    
    .neutrals-messenger-container {
        box-shadow: none;
        height: auto;
    }
    
    .nm-chat-messages-container {
        max-height: none;
        overflow: visible;
    }
}