/* ============================================
   WONE GLOBAL MESSENGER - FULL CSS
   ============================================ */
.member-tab-btn{
    background: white !important;
    color: #ffa934 !important;
    border: 1px solid black !important;
}
.upload-image-btn{
    border: #ffa934 !important;
    color: white !important;
}
.forward-message-option{
    color: #ffffff !important;
    background: #ffa934!important;
}
.btn-forward{
    color: #ffffff !important;
    background: #ffa934!important; 
    border: #ffffff !important;
}
/* ============ STEP 9: ADD THESE CSS STYLES ============ */

/* 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;
}

/* Top Horizontal Bar */
.wone-top-bar {
    background: #2c3e50;
    color: white;
    padding: 12px 20px;
    border-bottom: 1px solid #1a252f;
    margin-bottom: 20px;
    border-radius: 0px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* max-width: 1200px; */
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 15px;
}

.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mini-avatar {
    padding:10px;
    background-color: white;
    width: 70px;
    height: 70px !important;
    border-radius: 50% !important;
    object-fit: contain;
    border: 2px solid #ffa934;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mini-avatar-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
    border: 2px solid #ffa934;
    background: #ffa934;
}

.user-mini-info {
    display: flex;
    flex-direction: column;
}

.mini-name {
    font-weight: 600;
    font-size: 14px;
}

.mini-role {
    font-size: 12px;
    color: #bdc3c7;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-actions .logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 20px;
    border-radius: 0px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}

.top-bar-actions .logout-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

/* Bulk Message Button */
.bulk-message-btn {
    background: #ffa934;
    color: white;
    border: none;
    padding: 5px 20px;
    border-radius: 0px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.bulk-message-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

/* Main Messenger Wrapper */
.wone-messenger-wrapper {
    display: flex;
    height: 120vh;
    max-height: 700px;
    border: 1px solid #ddd;
    border-radius: 0px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    background: white;
    margin: 0 auto;
    max-width: 1200px;
}

.wone-sidebar {
    width: 30%;
    min-width: 300px;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
}

.wone-chat-area {
    width: 90%;
    display: flex;
    flex-direction: column;
}

.wone-tabs {
    display: flex;
    background: #ffa934;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.15);
    border-bottom-color: #fff;
    color: white;
}

.tab-content {
    display: none;
    padding: 20px;
    height: calc(100% - 53px);
    overflow-y: auto;
    flex: 1;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #ffa934;
    font-weight: 600;
}

/* Groups Header */
.groups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #ffa934;
}

.groups-header h3 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
    border-bottom: none;
    padding: 0;
}

.btn-create-group-inline {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 0px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.btn-create-group-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

/* Users List */
.users-list {
    margin-top: 10px;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 0px;
    margin-bottom: 10px;
    background: white;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.user-item:hover {
    background: #e3f2fd;
    border-color: #bbdefb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-item.active {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
    border-color: #ffa934;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    font-weight: bold;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.user-avatar .profile-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-info h4 {
    margin: 0 0 6px 0;
    font-size: 15px;
    color: #2c3e50;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: #7f8c8d;
    background: #f1f2f6;
    padding: 4px 10px;
    border-radius: 0px;
    display: inline-block;
    font-weight: 500;
}

.user-status {
    display: block;
    font-size: 11px;
    margin-top: 4px;
}

.user-status.online {
    color: #146536;
}

.user-status.offline {
    color: #95a5a6;
}

.online-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: #2ecc71;
    border: 2px solid white;
    border-radius: 50%;
    z-index: 1;
}

.offline-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: #95a5a6;
    border: 2px solid white;
    border-radius: 50%;
    z-index: 1;
}

/* Administrator styling */
.admin-role {
    border-left: 4px solid #e74c3c;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.05) 0%, rgba(231, 76, 60, 0.1) 100%);
}

.user-avatar .admin-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    z-index: 2;
}

.admin-indicator {
    font-size: 11px;
    color: #e74c3c;
    font-weight: 600;
    margin-left: 5px;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-style: italic;
}

.no-users {
    text-align: center;
    padding: 50px 20px;
    color: #95a5a6;
    font-style: italic;
}

/* Groups List */
.groups-list {
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.group-item {
    padding: 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 0px;
    margin-bottom: 10px;
    background: white;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.group-item:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.group-item.active {
    background: linear-gradient(135deg, #e8f4fc 0%, #d4eafc 100%);
    border-left: 4px solid #ffa934;
    border-color: #90caf9;
}

.group-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    position: relative;
    flex-shrink: 0;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.group-avatar .group-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding-left:10px;

}

.group-admin-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #FF9800;
    color: white;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 0px;
    font-weight: bold;
    border: 2px solid white;
}

.group-info {
    flex: 1;
    min-width: 0;
}

.group-info h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
    font-weight: 600;
}

.group-members {
    font-size: 13px;
    color: #666;
    display: block;
    margin-bottom: 6px;
}

.group-desc {
    font-size: 13px;
    color: #777;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.unread-badge {
    background: #ffa934;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 0px;
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.no-groups {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.create-group-prompt {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0px;
    border: 2px dashed #dee2e6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.create-group-prompt h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 18px;
}

.create-group-prompt p {
    margin: 0 0 20px 0;
    color: #6c757d;
    line-height: 1.5;
}

.groups-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.groups-empty-state .empty-icon {
    font-size: 48px;
    color: #adb5bd;
    margin-bottom: 20px;
}

.groups-empty-state h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 18px;
}

.groups-empty-state p {
    margin: 0 0 25px 0;
    color: #6c757d;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Chat Header with Profile Image */
.chat-header {
    padding: 20px 25px;
    background: #1a3344;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chat-with-profile {
    display: flex;
    align-items: center;
    gap: 18px;
}

.chat-profile-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    /* border: 3px solid rgba(255, 255, 255, 0.3); */
    flex-shrink: 0;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.chat-profile-img {
    padding: 5px;
    width: 70px;
    height: 70px !important;
    object-fit: contain;
}

.chat-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 24px;
    color: white;
}

.chat-with-info {
    flex: 1;
}

.chat-with-info h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

#chat-with-role {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4px;
    display: block;
}

.online-status {
    color: #2ecc71 !important;
}

.offline-status {
    color: #95a5a6 !important;
}

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8f9fa 0%, #f1f3f5 100%);
    display: flex;
    flex-direction: column;
}

.no-chat-selected {
    text-align: center;
    padding: 80px 20px;
    color: #95a5a6;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.no-chat-selected p {
    font-size: 16px;
    max-width: 350px;
    margin: 0 auto;
    line-height: 1.6;
    color: #6c757d;
}

.no-chat-selected svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    color: #dee2e6;
}

.no-messages {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
    font-style: italic;
}

/* Message Styles */
.date-separator {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: #7f8c8d;
    font-size: 13px;
}

.date-separator:before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
    z-index: 1;
}

.date-separator span {
    background: #f8f9fa;
    padding: 8px 20px;
    position: relative;
    z-index: 2;
    display: inline-block;
    font-weight: 500;
    border-radius: 0px;
    border: 1px solid #dee2e6;
}

.message {
    margin-bottom: 20px;
    display: flex;
    max-width: 75%;
}

.message-sent {
    align-self: flex-end;
}

.message-received {
    align-self: flex-start;
}

.message-content {
    padding: 14px 18px;
    border-radius: 0px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-sent .message-content {
    background: #ffa934;
    color: white;
    border-bottom-right-radius: 5px;
}

.message-received .message-content {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 5px;
}

.message-text {
    line-height: 1.5;
    margin-bottom: 6px;
    font-size: 14.5px;
}

.message-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 11px;
    margin-top: 5px;
}

.message-time {
    opacity: 0.8;
}

.message-received .message-time {
    color: #95a5a6;
}

.message-status {
    margin-left: 8px;
    font-size: 12px;
    opacity: 0.9;
}

/* Group Messages */
.group-message {
    display: flex;
    gap: 12px;
}

.message-sender-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-sender-avatar .sender-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-sender-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

/* Chat Input Area */
.chat-input-area {
    padding: 20px 25px;
    border-top: 1px solid #dee2e6;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.message-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

#message-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 0px;
    resize: none;
    font-family: inherit;
    font-size: 14.5px;
    transition: all 0.3s;
    min-height: 56px;
    max-height: 120px;
    background: #f8fafc;
    line-height: 1.5;
}

#message-input:focus {
    outline: none;
    border-color: #ffa934;
    background: white;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.message-input-header {
    margin-bottom: 12px;
}

/* File Attachment Styles */
.file-attachment-area {
    background: #f8f9fa;
    border-radius: 0px;
    padding: 15px;
    margin-bottom: 12px;
    border: 2px dashed #dee2e6;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.attached-file-preview {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffa934;
}

.file-info {
    flex: 1;
}

.file-name {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 14px;
}

.file-size {
    display: block;
    font-size: 12px;
    color: #666;
}

.remove-attachment-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.3s;
    flex-shrink: 0;
}

.remove-attachment-btn:hover {
    background: #c82333;
    transform: rotate(90deg);
}

.message-input-container {
    position: relative;
    flex: 1;
}

.drag-over .message-input-container {
    background: #e3f2fd;
    border-color: #ffa934;
}

.message-input-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.attach-file-btn {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 10px;
    border-radius: 0px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.attach-file-btn:hover {
    background: #f0f0f0;
    color: #ffa934;
    transform: rotate(15deg);
}

#send-message-btn {
    padding: 12px;
    background: #ffa934;
    color: white;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    transition: all 0.3s;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

#send-message-btn svg {
    width: 20px;
    height: 20px;
}

/* टूलटिप के लिए */
#send-message-btn {
    position: relative;
}

#send-message-btn::after {
    content: 'Send Message';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 6px 12px;
    border-radius: 0px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    margin-bottom: 8px;
    z-index: 1000;
}

#send-message-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

#send-message-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

#send-message-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* File Attachment in Messages */
.file-attachment {
    background: #f5f5f5;
    border-radius: 0px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.file-attachment:hover {
    border-color: #ffa934;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.file-attachment.image-attachment {
    padding: 0;
    overflow: hidden;
}

.file-preview {
    cursor: pointer;
    overflow: hidden;
    border-radius: 0px;
    transition: all 0.3s;
}

.file-preview:hover {
    opacity: 0.9;
}

.file-image-preview {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    display: block;
    background: #f8f9fa;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
}

.image-attachment .file-info {
    border-top: 1px solid #e0e0e0;
    background: white;
}

.file-icon-large {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e3f2fd;
    border-radius: 0px;
    color: #1976d2;
    flex-shrink: 0;
}

.file-icon-small {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    display: block;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    font-size: 14px;
}

.file-size {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.file-type {
    display: block;
    font-size: 12px;
    color: #888;
}

.file-download-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1976d2;
    color: white;
    border-radius: 0px;
    text-decoration: none;
    transition: all 0.3s;
    flex-shrink: 0;
}

.file-download-btn:hover {
    background: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

/* Chat Header Actions */
.chat-header-actions {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.group-action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 18px;
    border-radius: 0px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    transition: all 0.3s;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.group-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.group-admin-menu {
    display: flex;
    gap: 12px;
    margin-left: 12px;
}

.error {
    color: #e74c3c;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    border-radius: 0px;
    margin: 10px;
    border: 1px solid #f5c6cb;
}

/* ============================================
   MODAL REDESIGN - FULLY RESPONSIVE
   ============================================ */

/* Modal Base Styles */
.wone-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        background: rgba(0, 0, 0, 0);
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(5px);
    }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 0px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-wide {
    max-width: 1000px;
}

.modal-header {
    padding: 28px 32px;
    background: #ffa934;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 14px;
    letter-spacing: -0.5px;
}

.modal-header h3 svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
    padding: 0;
    font-weight: 300;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Form Styles */
#create-group-form,
#update-group-form,
#bulk-message-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #2c3e50;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 0px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s;
    background: white;
    box-sizing: border-box;
    color: #2c3e50;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffa934;
    box-shadow: 0 0 0 5px rgba(52, 152, 219, 0.15);
    transform: translateY(-1px);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* Image Upload Styles */
.image-upload-container {
    margin-top: 12px;
}

.image-preview {
    width: 180px;
    height: 180px;
    border: 3px dashed #cbd5e0;
    border-radius: 0px;
    overflow: hidden;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.image-preview:hover {
    border-color: #ffa934;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(52, 152, 219, 0.2);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.image-preview:hover img {
    transform: scale(1.05);
}

.image-placeholder {
    text-align: center;
    color: #94a3b8;
    padding: 24px;
}

.image-placeholder svg {
    margin-bottom: 14px;
    display: block;
    margin: 0 auto 14px;
    stroke-width: 1.5;
    opacity: 0.7;
}

.image-placeholder span {
    display: block;
    font-size: 15px;
    margin-top: 10px;
    font-weight: 500;
}

.upload-image-btn {
    background: #ffa934;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 0px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.25);
    letter-spacing: 0.5px;
}

.upload-image-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(52, 152, 219, 0.35);
}

.upload-image-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Members Selection Container */
.members-selection-container {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 30px;
    min-height: 550px;
    background: white;
    border-radius: 0px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08);
}

.members-list-side {
    display: flex;
    flex-direction: column;
    border-right: 2px solid #e2e8f0;
}

.selected-members-side {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.members-list-header,
.selected-members-header {
    padding: 24px 28px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-bottom: 2px solid #e2e8f0;
}

.members-list-header h4,
.selected-members-header h4 {
    margin: 0 0 18px 0;
    font-size: 18px;
    color: #2c3e50;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.3px;
}

.selected-members-count {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Tabs Styling */
.tabs-container {
    margin: 18px 0;
}

.member-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 0px;
    padding: 6px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.member-tab-btn {
    flex: 1;
    padding: 14px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    border-radius: 0px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.member-tab-btn svg {
    width: 18px;
    height: 18px;
    transition: all 0.3s;
}

.member-tab-btn.active {
    transform: translateY(-1px);
    color: #ffa934 !important;
    border: #ffa934 !important;
    background: #ffffff !important;
}

.member-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: #ffa934;
    border-radius: 0px;
}

.member-tab-content {
    display: none;
    flex: 1;
    flex-direction: column;
}

.member-tab-content.active {
    display: flex;
}

/* Search Box */
.search-box {
    padding: 20px 24px;
    background: white;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 0px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f8fafc;
    color: #2c3e50;
    font-weight: 500;
}

.search-box input:focus {
    outline: none;
    border-color: #ffa934;
    background: white;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
}

.search-box input::placeholder {
    color: #94a3b8;
}

/* Members List Container */
.members-list-container {
    flex: 1;
    overflow-y: auto;
    background: white;
}

.members-list {
    padding: 0;
}

/* Member Item */
.member-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    position: relative;
    overflow: hidden;
}

.member-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: all 0.3s;
}

.member-item:hover {
    background: linear-gradient(90deg, #f8fafc 0%, white 100%);
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.member-item:hover::before {
    background: #ffa934;
}

.member-item.selected {
    background: linear-gradient(90deg, #e3f2fd 0%, #f0f9ff 100%);
    border-left: 4px solid #ffa934;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.15);
}

.member-checkbox {
    display: flex;
    align-items: center;
    z-index: 1;
}

.member-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border-radius: 0px;
    cursor: pointer;
    accent-color: #ffa934;
    transition: all 0.3s;
}

.member-checkbox input[type="checkbox"]:checked {
    transform: scale(1.1);
}

.member-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.online-badge-small,
.offline-badge-small {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border: 3px solid white;
    border-radius: 50%;
    z-index: 2;
}

.online-badge-small {
    background-color: #10b981;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.offline-badge-small {
    background-color: #94a3b8;
}

.member-info {
    flex: 1;
    min-width: 0;
    z-index: 1;
}

.member-info h5 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.3px;
}

.member-role {
    font-size: 13px;
    color: #64748b;
    background: #f1f5f9;
    padding: 5px 12px;
    border-radius: 0px;
    display: inline-block;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

.member-status {
    font-size: 12px;
    margin-top: 6px;
    display: block;
    font-weight: 500;
}

.member-status.online {
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 4px;
}

.member-status.offline {
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.member-status.online::before,
.member-status.offline::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.member-status.online::before {
    background: #10b981;
}

.member-status.offline::before {
    background: #94a3b8;
}

/* Selected Members List */
.selected-members-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.selected-members-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.selected-member-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: white;
    border-radius: 0px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.selected-member-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ffa934;
    transition: all 0.3s;
}

.selected-member-item:hover {
    border-color: #ffa934;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.selected-member-item:hover::before {
    width: 6px;
    background: #2980b9;
}

.selected-member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    position: relative;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.selected-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-admin-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.selected-member-info {
    flex: 1;
    min-width: 0;
    z-index: 1;
}

.selected-member-name {
    font-weight: 700;
    font-size: 15px;
    color: #2c3e50;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.selected-member-type {
    font-size: 13px;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 0px;
    display: inline-block;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

.admin-indicator-small {
    font-size: 12px;
    color: #f59e0b;
    font-weight: 600;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 0px;
    border: 1px solid #fcd34d;
}

.remove-member-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 10px;
    border-radius: 0px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    z-index: 1;
    background: white;
    border: 1px solid #fecaca;
}

.remove-member-btn:hover {
    background: #fee2e2;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.empty-selected-members {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-style: italic;
    font-size: 15px;
    background: white;
    border-radius: 0px;
    border: 2px dashed #cbd5e0;
}

.empty-selected-members svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
    padding-top: 28px;
    border-top: 2px solid #e2e8f0;
}

.btn-cancel,
.btn-create,
.btn-send-bulk,
.btn-update,
.btn-add-members {
    padding: 16px 32px;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 140px;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-cancel {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%)!important;
    color: #475569!important;
    border: 2px solid #cbd5e1!important;
}

.btn-cancel:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%)!important;
    transform: translateY(-3px)!important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15)!important;
    color: #334155!important;
}

.btn-create,
.btn-send-bulk,
.btn-update,
.btn-add-members {
    background: #ffa934!important;
    color: white!important;
    box-shadow: 0 6px 25px rgba(52, 152, 219, 0.3)!important;
    border: 2px solid #2980b9!important;
}

.btn-create:hover:not(:disabled),
.btn-send-bulk:hover:not(:disabled),
.btn-update:hover:not(:disabled),
.btn-add-members:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9 0%, #1c6ea4 100%);
}

.btn-create:disabled,
.btn-send-bulk:disabled,
.btn-update:disabled,
.btn-add-members:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: #94a3b8;
}

/* Bulk Message Progress */
.bulk-message-progress {
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.progress-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.3px;
}

#progress-status {
    color: #64748b;
    font-size: 15px;
    font-weight: 600;
    background: white;
    padding: 8px 16px;
    border-radius: 0px;
    border: 2px solid #e2e8f0;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
}

.progress-bar {
    flex: 1;
    height: 16px;
    background: #e2e8f0;
    border-radius: 0px;
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 50%, #10b981 100%);
    border-radius: 0px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background-size: 200% 100%;
    animation: progressShimmer 2s infinite linear;
}

@keyframes progressShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 30px 30px;
    animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
    0% { background-position: 0 0; }
    100% { background-position: 30px 0; }
}

#progress-percentage {
    font-weight: 800;
    color: #2c3e50;
    min-width: 55px;
    font-size: 22px;
    text-align: center;
    background: white;
    padding: 10px;
    border-radius: 0px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 0px;
    border: 2px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #ffa934;
    transition: all 0.3s;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    border-color: #ffa934;
}

.stat-item:hover::before {
    height: 6px;
    background: #2980b9;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 10px;
    font-weight: 600;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #2c3e50;
    line-height: 1;
}

.stat-value.success {
    color: #10b981;
    text-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.stat-value.failed {
    color: #ef4444;
    text-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

/* Bulk Result Messages */
.bulk-result-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 50%, #d1fae5 100%);
    border: 3px solid #10b981;
    border-radius: 0px;
    padding: 28px;
    color: #065f46;
    animation: successPulse 2s infinite;
    background-size: 200% 100%;
}

@keyframes successPulse {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}

.bulk-result-success h5 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 16px 0;
    color: #065f46;
    font-size: 18px;
    font-weight: 700;
}

.bulk-result-failed {
    margin-top: 20px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 50%, #fee2e2 100%);
    border: 3px solid #ef4444;
    border-radius: 0px;
    padding: 28px;
    color: #7f1d1d;
    animation: errorPulse 3s infinite;
    background-size: 200% 100%;
}

@keyframes errorPulse {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}

.bulk-result-failed p {
    margin: 0 0 16px 0;
    font-weight: 700;
    font-size: 16px;
}

.bulk-result-failed ul {
    margin: 0;
    padding-left: 24px;
}

.bulk-result-failed li {
    margin-bottom: 8px;
    font-size: 14.5px;
    line-height: 1.5;
}

/* Group Info Styling */
.group-header-info {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 36px;
    padding-bottom: 30px;
    border-bottom: 3px solid #e2e8f0;
    position: relative;
}

.group-header-info::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: #ffa934;
    border-radius: 0px;
}

.group-header-avatar {
    width: 100px;
    height: 100px;
    border-radius: 0px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 42px;
    font-weight: 800;
    flex-shrink: 0;
    border: 5px solid white;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    position: relative;
}

.group-header-avatar::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: linear-gradient(45deg, #ffa934, #2ecc71, #e74c3c, #f39c12);
    z-index: -1;
    border-radius: 25px;
    opacity: 0.5;
    filter: blur(20px);
}

.group-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder-large {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 800;
}

.group-header-details h4 {
    margin: 0 0 14px 0;
    font-size: 28px;
    font-weight: 800;
    color: #2c3e50;
    letter-spacing: -0.8px;
}

.group-desc-full {
    margin: 0 0 18px 0;
    color: #64748b;
    font-size: 16px;
    line-height: 1.7;
    max-width: 600px;
}

.group-meta {
    display: flex;
    gap: 24px;
    font-size: 15px;
    color: #94a3b8;
    flex-wrap: wrap;
}

.group-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 8px 16px;
    border-radius: 0px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
}

.group-meta span svg {
    width: 16px;
    height: 16px;
}

/* Group Members Full List */
.group-member-full-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 22px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0px;
    margin-bottom: 12px;
    background: white;
    border: 2px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.group-member-full-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ffa934;
    transition: all 0.3s;
}

.group-member-full-item:hover {
    background: linear-gradient(90deg, #f8fafc 0%, white 100%);
    transform: translateX(8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: #ffa934;
}

.group-member-full-item:hover::before {
    width: 6px;
    background: #2980b9;
}

.group-member-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
    border: 4px solid white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.group-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-badge-small,
.creator-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    color: white;
    font-size: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.admin-badge-small {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.creator-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.group-member-info h5 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.creator-label,
.admin-label {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 0px;
    letter-spacing: 0.3px;
    border: 2px solid transparent;
}

.creator-label {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-color: #10b981;
}

.admin-label {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-color: #f59e0b;
}

.member-type {
    font-size: 15px;
    color: #64748b;
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.member-joined {
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.member-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap;
    z-index: 1;
}

.btn-member-action {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 0px;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-member-action::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-member-action:hover::before {
    width: 300px;
    height: 300px;
}

.btn-member-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-make-admin {
    background: #ffa934;
    color: white;
    border: 2px solid #1d4ed8;
}

.btn-remove-admin {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: 2px solid #dc2626;
}

.btn-remove-member {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: 2px solid #d97706;
}

.btn-leave-group {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: 2px solid #4b5563;
}

/* Group History */
.group-history-container {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.history-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0px;
    margin-bottom: 12px;
    background: white;
    border: 2px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.history-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ffa934;
    transition: all 0.3s;
}

.history-item:hover {
    background: linear-gradient(90deg, #f8fafc 0%, white 100%);
    transform: translateX(8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: #ffa934;
}

.history-item:hover::before {
    width: 6px;
    background: #2980b9;
}

.history-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #64748b;
    border: 2px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.history-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.history-content {
    flex: 1;
    z-index: 1;
}

.history-message {
    font-size: 16px;
    margin-bottom: 8px;
    color: #2c3e50;
    line-height: 1.6;
    font-weight: 500;
}

.history-meta {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #94a3b8;
    flex-wrap: wrap;
    gap: 12px;
}

.history-time {
    margin-right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

/* Date Separator */
.date-separator {
    text-align: center;
    margin: 28px 0;
    position: relative;
}

.date-separator:before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    z-index: 1;
}

.date-separator span {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 10px 24px;
    position: relative;
    z-index: 2;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border-radius: 0px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Loading States */
.loading {
    text-align: center;
    padding: 80px 20px;
    color: #64748b;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    font-weight: 500;
}

.loading::after {
    content: '';
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #ffa934;
    border-radius: 50%;
    animation: loadingSpin 1.2s linear infinite;
}

@keyframes loadingSpin {
    to {
        transform: rotate(360deg);
    }
}

.no-notifications,
.no-history {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
    font-size: 16px;
    font-style: italic;
}

.no-notifications svg,
.no-history svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    stroke-width: 1.5;
    color: #cbd5e0;
    opacity: 0.5;
}

/* Select All Container */
.select-all-container {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.select-all-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #475569;
    cursor: pointer;
    padding: 12px 20px;
    background: white;
    border-radius: 0px;
    border: 2px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    user-select: none;
}

.select-all-checkbox:hover {
    border-color: #ffa934;
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.15);
}

.select-all-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #ffa934;
    transition: all 0.3s;
}

.select-all-checkbox input[type="checkbox"]:checked {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Scrollbar Styling */
.wone-sidebar::-webkit-scrollbar,
.tab-content::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.members-list-container::-webkit-scrollbar,
.selected-members-list-container::-webkit-scrollbar,
.group-history-container::-webkit-scrollbar {
    width: 10px;
}

.wone-sidebar::-webkit-scrollbar-track,
.tab-content::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.members-list-container::-webkit-scrollbar-track,
.selected-members-list-container::-webkit-scrollbar-track,
.group-history-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 0px;
}

.wone-sidebar::-webkit-scrollbar-thumb,
.tab-content::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.members-list-container::-webkit-scrollbar-thumb,
.selected-members-list-container::-webkit-scrollbar-thumb,
.group-history-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 0px;
    border: 2px solid #f1f5f9;
}

.wone-sidebar::-webkit-scrollbar-thumb:hover,
.tab-content::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.members-list-container::-webkit-scrollbar-thumb:hover,
.selected-members-list-container::-webkit-scrollbar-thumb:hover,
.group-history-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Notification Styles */
.notification-container {
    position: relative;
    display: inline-block;
}

.notification-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    color: white;
    transition: all 0.3s;
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.notification-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2px solid #2c3e50;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
    animation: notificationPulse 2s infinite;
}

@keyframes notificationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 380px;
    background: white;
    border-radius: 0px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    display: none;
    margin-top: 12px;
    border: 2px solid #e2e8f0;
    overflow: hidden;
    animation: dropdownSlide 0.3s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-dropdown.show {
    display: block;
}

.notification-header {
    padding: 20px 24px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffa934;
    color: white;
}

.notification-header h4 {
    margin: 0;
    font-size: 18px;
    color: white;
    font-weight: 700;
}

.mark-all-read {
    background: rgba(255, 255, 255, 0.2)!important;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 0px;
    font-weight: 600;
    transition: all 0.3s;
}

.mark-all-read:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
    background: #f8fafc;
}

.notification-item {
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.notification-item:hover {
    background: #f0f9ff;
    transform: translateX(4px);
}

.notification-item.unread {
    background: linear-gradient(90deg, #e3f2fd 0%, #f0f9ff 100%);
    border-left: 4px solid #ffa934;
}

.notification-item.unread:hover {
    background: linear-gradient(90deg, #d4eafc 0%, #e3f2fd 100%);
}

.notification-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 16px;
    flex-shrink: 0;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 14.5px;
    line-height: 1.4;
}

.notification-preview {
    color: #666;
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
}

.notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.notification-action-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 0px;
    border: none;
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #e2e8f0;
}

.notification-action-btn.accept {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border-color: #27ae60;
}

.notification-action-btn.reject {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-color: #c0392b;
}

.notification-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-footer {
    padding: 16px 24px;
    text-align: center;
    border-top: 2px solid #e2e8f0;
    background: white;
}

.notification-footer a {
    color: #ffa934;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.notification-footer a:hover {
    color: #2980b9;
    text-decoration: underline;
    transform: translateX(4px);
}

/* Image Preview Modal */
.image-preview-container {
    text-align: center;
    max-height: 70vh;
    overflow: auto;
}

.preview-full-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 0px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.image-actions {
    text-align: center;
    margin-top: 24px;
}

.btn-download-image {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 0px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.3);
}

.btn-download-image:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(25, 118, 210, 0.4);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large Desktop */
@media (min-width: 1400px) {
    .wone-messenger-wrapper {
        max-width: 1400px;
        height: 120vh;
    }
    
    .modal-content {
        max-width: 1200px;
    }
    
    .modal-wide {
        max-width: 1300px;
    }
    
    .members-selection-container {
        grid-template-columns: 1fr 400px;
        min-height: 600px;
    }
    
    .notification-dropdown {
        width: 420px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .wone-messenger-wrapper {
        max-width: 100%;
        margin: 0 20px;
    }
    
    .modal-content {
        max-width: 95%;
    }
}

/* Tablet Landscape */
@media (max-width: 1024px) {
    .wone-messenger-wrapper {
        flex-direction: column;
        height: 120vh;
        margin: 0 15px;
    }
    
    .wone-sidebar {
        width: 100%;
        min-width: auto;
        height: 90%;
    }
    
    .wone-chat-area {
        width: 100%;
        height: 90%;
    }
    
    .wone-modal {
        padding: 15px;
    }
    
    .modal-content {
        max-height: 85vh;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .members-selection-container {
        grid-template-columns: 1fr;
        min-height: 500px;
    }
    
    .selected-members-side {
        border-top: 2px solid #e2e8f0;
        border-left: none;
    }
    
    .message {
        max-width: 85%;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .notification-dropdown {
        width: 350px;
        right: -50%;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    .wone-modal {
        padding: 10px;
    }
    .message-input-wrapper {
        display: block !important;
        gap: 0 !important;
    }
    
    .modal-header {
        padding: 20px 24px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .modal-header h3 {
        font-size: 20px;
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-body {
        padding: 24px;
    }
    
    .group-header-info {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    
    .group-header-avatar {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .group-header-details h4 {
        font-size: 24px;
    }
    
    .group-member-full-item {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 24px;
    }
    
    .member-actions {
        justify-content: center;
        width: 100%;
        margin-top: 20px;
    }
    
    .history-item {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 24px;
    }
    
    .progress-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .notification-dropdown {
        width: 300px;
        right: -100%;
    }
    
    .top-bar-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Mobile Landscape */
@media (max-width: 640px) {
    .form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-cancel,
    .btn-create,
    .btn-send-bulk,
    .btn-update,
    .btn-add-members {
        width: 100%;
        min-width: auto;
    }
    
    .progress-stats {
        grid-template-columns: 1fr;
    }
    
    .select-all-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .member-tabs {
        flex-direction: column;
        gap: 6px;
        padding: 8px;
    }
    
    .member-tab-btn {
        padding: 16px;
        width: 100%;
    }
    
    .modal-header {
        padding: 18px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .notification-dropdown {
        width: calc(100vw - 40px);
        right: 10px;
        left: 10px;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .wone-top-bar {
        padding: 10px 15px;
        border-radius: 0px;
    }
    
    .wone-messenger-wrapper {
        height: 120vh;
        margin: 0 10px;
        border-radius: 0px;
    }
    
    .wone-modal {
        padding: 5px;
    }
    
    .modal-content {
        border-radius: 0px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .image-preview {
        width: 150px;
        height: 150px;
        margin: 0 auto 20px;
    }
    
    .upload-image-btn {
        width: 100%;
        justify-content: center;
    }
    
    .group-header-details h4 {
        font-size: 20px;
    }
    
    .group-meta {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .btn-member-action {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }
    
    .member-avatar {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .member-info h5 {
        font-size: 14.5px;
    }
    
    .selected-member-item {
        padding: 14px;
    }
    
    .selected-member-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .chat-header {
        padding: 16px 20px;
    }
    
    .chat-with-profile {
        /* flex-direction: column; */
        text-align: center;
        gap: 12px;
    }
    
    .chat-profile-image {
        width: 7%;
        height: 70px;
    }
    
    .chat-with-info h3 {
        font-size: 18px;
    }
    
    .chat-header-actions {
        justify-content: center;
    }
    
    .group-action-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .chat-messages {
        padding: 16px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .message-content {
        padding: 12px 16px;
    }
    
    .chat-input-area {
        padding: 16px;
    }
    
    #message-input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .notification-btn {
        width: 40px;
        height: 40px;
    }
    
    .notification-badge {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .modal-header h3 {
        font-size: 18px;
    }
    
    .form-group input[type="text"],
    .form-group textarea {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .upload-image-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .member-item {
        padding: 16px;
        gap: 12px;
    }
    
    .member-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .selected-member-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .chat-with-info h3 {
        font-size: 16px;
    }
    
    .chat-header-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .group-admin-menu {
        flex-direction: column;
        margin-left: 0;
        gap: 8px;
    }
}

/* Print Styles */
@media print {
    .wone-modal {
        position: static;
        display: block !important;
        background: white;
        padding: 0;
    }
    
    .modal-overlay {
        display: none;
    }
    
    .modal-content {
        box-shadow: none;
        border: 2px solid #ddd;
        max-height: none;
        max-width: none;
        border-radius: 0;
    }
    
    .modal-header {
        background: white !important;
        color: black !important;
        border-bottom: 3px solid #000;
    }
    
    .modal-close,
    .notification-btn,
    .bulk-message-btn,
    .btn-cancel,
    .btn-create,
    .btn-send-bulk,
    .btn-update,
    .btn-add-members,
    .attach-file-btn,
    .remove-attachment-btn,
    .file-download-btn,
    .btn-member-action,
    .group-action-btn,
    .mark-all-read,
    .notification-action-btn,
    .remove-member-btn,
    .upload-image-btn {
        display: none !important;
    }
    
    .chat-input-area,
    .notification-dropdown,
    .chat-header-actions {
        display: none !important;
    }
    
    .wone-top-bar .logout-btn,
    .top-bar-actions .bulk-message-btn {
        display: none !important;
    }
    
    .wone-messenger-wrapper {
        box-shadow: none;
        border: 2px solid #ddd;
    }
    
    .tab-btn {
        color: black !important;
        background: #f0f0f0 !important;
        border-bottom: 2px solid #000 !important;
    }
    
    .member-item:hover,
    .selected-member-item:hover,
    .group-member-full-item:hover,
    .history-item:hover,
    .user-item:hover,
    .group-item:hover {
        transform: none !important;
        box-shadow: none !important;
        background: #f8f8f8 !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .modal-content {
        border: 4px solid #000;
    }
    
    .form-group input[type="text"],
    .form-group textarea {
        border: 3px solid #000;
    }
    
    .member-item.selected,
    .group-item.active,
    .notification-item.unread {
        border: 3px solid #000;
        background: #eee !important;
    }
    
    .progress-fill {
        background: #000 !important;
    }
    
    .btn-create,
    .btn-send-bulk,
    .btn-update,
    .btn-add-members {
        background: #000 !important;
        color: #fff !important;
        border: 3px solid #000 !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .wone-modal,
    .modal-content,
    .member-item,
    .selected-member-item,
    .group-member-full-item,
    .history-item,
    .btn-member-action,
    .progress-fill,
    .upload-image-btn,
    .btn-cancel,
    .btn-create,
    .btn-send-bulk,
    .btn-update,
    .btn-add-members,
    .select-all-checkbox,
    .modal-close,
    .image-preview,
    .stat-item,
    .user-item,
    .group-item,
    .notification-item,
    .file-attachment,
    .message,
    .notification-dropdown,
    .tab-btn,
    .bulk-message-btn,
    .logout-btn,
    .group-action-btn,
    #send-message-btn,
    .attach-file-btn,
    .remove-attachment-btn,
    .file-download-btn,
    .remove-member-btn,
    .notification-btn,
    .mark-all-read,
    .notification-action-btn,
    .btn-create-group-inline {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
    
    .progress-fill::after,
    .progress-fill,
    .bulk-result-success,
    .bulk-result-failed {
        animation: none !important;
    }
    
    .progress-fill::after {
        display: none;
    }
    
    .notification-badge {
        animation: none;
    }
}

/* Dark Mode Support */

@media (prefers-color-scheme: dark) {
    /* Reset all text to white first */
    .region-filter-select{
        color:#1a3344 !important;
    }
    .wone-messenger-wrapper *:not(.member-role):not(.message-time):not(.notification-time):not(.notification-preview):not(.group-desc):not(.user-role):not(.mini-role):not(#chat-with-role):not(.selected-members-count):not(.stat-label):not(.member-joined):not(.history-meta):not(.btn-cancel) {
        color: #ffffff ;
    }
    
    .back-to-site-btn{
        background-color: #ffa934 !important;
    }
    #chat-messages-container{
        background-color: white !important;
        color:#1a3344 !important;
    }
      .no-chat-selected{
     background: white !important;
     color: #005a87 !important;
   }
    .no-chat-selected p{
        color: #ffa934 !important;
    }
    /* Background for main containers */
    .wone-messenger-wrapper,
    .chat-messages,
    .wone-sidebar,
    .modal-content,
    .members-selection-container,
    .members-list-side,
    .selected-members-side,
    .tab-content,
    .users-list,
    .groups-list,
    .group-history-container,
    .members-list-container,
    .selected-members-list-container,
    .notification-dropdown,
    .notification-list {
        background: #1a3344;
    }
    
    /* Background for items */
    .member-item,
    .selected-member-item,
    .group-member-full-item,
    .history-item,
    .stat-item,
    .user-item,
    .group-item,
    .notification-item,
    .image-preview,
    .file-attachment,
    .attached-file-preview,
    .message-received .message-content,
    .empty-selected-members,
    .no-chat-selected,
    .no-messages,
    .no-users,
    .no-groups,
    .groups-empty-state,
    .create-group-prompt,
    .no-notifications,
    .no-history,
    .image-placeholder,
    .search-box input,
    #message-input,
    .message-input-container {
        background: #1a3344 ;
        border-color: #b0b9c5b3 !important;
    }
    
    /* Headers and top bars */
    .wone-top-bar {
        background: #1a3344 ;
        border-color: #1a3344 !important;
    }
    
    .modal-header {
        background: #ffa934;
        color: #ffffff !important;
    }
    
    .wone-tabs {
        background: #ffa934;
    }
    
    /* Input fields */
    .form-group label {
        color: #e2e8f0 !important;
    }
    
    .form-group input[type="text"],
    .form-group textarea,
    .search-box input,
    #message-input {
        background: #1a3344 !important;
        border-color: #334155 !important;
        color: #ffffff !important;
    }
    
    .form-group input[type="text"]:focus,
    .form-group textarea:focus,
    .search-box input:focus,
    #message-input:focus {
        border-color: #ffa934!important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
        /* background: #ffa934 !important; */
    }
    .group-avatar{
        background-color: white !important;
    }
    /* Tabs */
    .member-tabs {
        background: #1a3344 !important;
    }
    
    .member-tab-btn {
        color: #cbd5e1 !important;
    }
    
    .member-tab-btn.active {
        background: #ffa934!important;
        color: #ffffff !important;
    }
    
    /* List headers */
    .members-list-header,
    .selected-members-header,
    .notification-header {
        background: #1a3344 !important;
        border-color: #334155 !important;
        color: #ffffff !important;
    }
    
    .members-list-header h4,
    .selected-members-header h4,
    .notification-header h4 {
        color: #ffffff !important;
    }
    
    /* Hover states */
    .member-item:hover,
    .selected-member-item:hover,
    .group-member-full-item:hover,
    .history-item:hover,
    .user-item:hover,
    .group-item:hover,
    .notification-item:hover {
        background: #d3bb99 !important;
        border-color: #d3bb99!important;
    }
    
    /* Active/Selected states */
    .member-item.selected,
    .group-item.active,
    .user-item.active {
        background: #d3bb99!important;
        color: #ffffff !important;
    }
    
    /* Text colors - Specific elements */
    .member-info h5,
    .selected-member-name,
    .group-member-info h5,
    .history-message,
    .notification-title,
    .file-name,
    .chat-with-info h3,
    .tab-content h3,
    .groups-header h3,
    .group-header-details h4,
    .message-text,
    .message-sender-name,
    .mini-name,
    .modal-header h3,
    .progress-header h4 {
        color: #ffffff !important;
    }
    
    /* Secondary text - Lighter gray */
    .member-role,
    .selected-member-type,
    .member-type,
    .message-time,
    .notification-time,
    .notification-preview,
    .group-desc-full,
    .group-desc,
    .group-members,
    .user-role,
    .mini-role,
    #chat-with-role,
    .selected-members-count,
    #progress-status,
    .stat-label,
    .member-joined,
    .history-meta {
        color: #94a3b8 !important;
    }
    
    /* Badges and tags */
    .member-role,
    .selected-member-type,
    .admin-indicator-small,
    .creator-label,
    .admin-label {
        background: #334155 !important;
        color: #e2e8f0 !important;
        border-color: #475569 !important;
    }
    
    /* Buttons - Primary */
    .btn-create,
    .btn-send-bulk,
    .btn-update,
    .btn-add-members,
    .bulk-message-btn,
    .btn-create-group-inline,
    #send-message-btn,
    .upload-image-btn,
    .btn-download-image,
    .btn-member-action,
    .group-action-btn,
    .notification-action-btn.accept,
    .mark-all-read {
        background: #ffa934!important;
        color: #ffffff !important;
        border-color: #2563eb !important;
    }
    
    .btn-cancel {
        background: #64748b !important;
        color: #ffffff !important;
        border-color: #475569 !important;
    }
    
    .logout-btn {
        background: #ef4444 !important;
        color: #ffffff !important;
        border-color: #dc2626 !important;
    }
    
    .notification-action-btn.reject,
    .btn-remove-admin,
    .btn-remove-member {
        background: #ef4444 !important;
        color: #ffffff !important;
        border-color: #dc2626 !important;
    }
    
    .btn-leave-group {
        background: #6b7280 !important;
        color: #ffffff !important;
        border-color: #4b5563 !important;
    }
    
    .btn-make-admin {
        background: #8b5cf6 !important;
        color: #ffffff !important;
        border-color: #7c3aed !important;
    }
    
    /* Empty states */
    .empty-selected-members,
    .no-chat-selected p,
    .no-messages,
    .no-users,
    .no-groups p,
    .groups-empty-state p,
    .create-group-prompt p,
    .no-notifications,
    .no-history {
        color: #94a3b8 !important;
    }
    
    /* Message bubbles */
    .message-sent .message-content {
        background: #ffa934!important;
        color: #ffffff !important;
    }
    
    .message-received .message-content {
        background: #ffa934 !important;
        color: #ffffff !important;
        border-color: #475569 !important;
    }
    
    /* Progress bars */
    .progress-fill {
        background: #10b981 !important;
    }
    
    .progress-bar {
        background: #475569 !important;
    }
    
    #progress-percentage,
    .stat-value {
        background: #334155 !important;
        color: #ffffff !important;
        border-color: #475569 !important;
    }
    
    /* Status indicators */
    .online-status,
    .member-status.online {
        color: #10b981 !important;
    }
    
    .offline-status,
    .member-status.offline {
        color: #94a3b8 !important;
    }
    
    .online-badge,
    .online-badge-small {
        background: #10b981 !important;
        color: #ffffff !important;
    }
    
    .offline-badge,
    .offline-badge-small {
        background: #94a3b8 !important;
        color: #ffffff !important;
    }
    
    /* Notification badge */
    .notification-badge {
        background: #ef4444 !important;
        color: #ffffff !important;
    }
    
    /* File attachments */
    .file-icon-large {
        background: #475569 !important;
        color: #60a5fa !important;
    }
    
    .file-download-btn {
        background: #ffa934!important;
        color: #ffffff !important;
    }
    
    .remove-attachment-btn {
        background: #ef4444 !important;
        color: #ffffff !important;
    }
    
    .remove-member-btn {
        background: #475569 !important;
        color: #ffffff !important;
        border-color: #64748b !important;
    }
    
    /* Attach file button */
    .attach-file-btn {
        color: #94a3b8 !important;
        background: transparent !important;
    }
    
    .attach-file-btn:hover {
        background: #334155 !important;
        color: #ffa934!important;
    }
    
    /* Checkboxes */
    .select-all-checkbox {
        background: #334155 !important;
        color: #e2e8f0 !important;
        border-color: #475569 !important;
    }
    
    .select-all-checkbox input[type="checkbox"] {
        accent-color: #ffa934!important;
    }
    
    /* Date separators */
    .date-separator span {
        background: #1a3344 !important;
        color: #94a3b8 !important;
        border-color: #475569 !important;
    }
    
    .date-separator:before {
        background: #475569 !important;
    }
    
    /* Scrollbars for dark mode */
    ::-webkit-scrollbar-track {
        background: #1a3344 !important;
    }
    
    ::-webkit-scrollbar-thumb {
        background: #475569 !important;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: #64748b !important;
    }
    
    /* Specific element overrides */
    .wone-top-bar,
    .wone-top-bar * {
        color: #ffffff !important;
    }
    
    .notification-btn {
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    .notification-btn:hover {
        background: rgba(255, 255, 255, 0.2) !important;
    }
    
    /* Ensure all text inside dark mode elements is white */
    .member-item,
    .user-item,
    .group-item,
    .notification-item {
        color: #ffffff !important;
    }
    
    .member-item *,
    .user-item *,
    .group-item *,
    .notification-item * {
        color: #ffffff !important;
        
    }
    .practice-area-tag{
         background-color: #ffa934 !important;
    }
  
    
    /* Exception for secondary text */
    .member-item .member-role,
    .user-item .user-role,
    .group-item .group-desc,
    .notification-item .notification-time {
        color: #94a3b8 !important;
    }
}

/* RTL Support */
[dir="rtl"] .user-avatar,
[dir="rtl"] .member-avatar,
[dir="rtl"] .selected-member-avatar,
[dir="rtl"] .group-member-avatar,
[dir="rtl"] .notification-avatar,
[dir="rtl"] .chat-profile-image,
[dir="rtl"] .message-sender-avatar,
[dir="rtl"] .group-avatar,
[dir="rtl"] .group-header-avatar,
[dir="rtl"] .history-icon,
[dir="rtl"] .file-icon,
[dir="rtl"] .file-icon-large,
[dir="rtl"] .file-icon-small,
[dir="rtl"] .mini-avatar,
[dir="rtl"] .mini-avatar-placeholder {
    margin-right: 0;
    margin-left: 14px;
}

[dir="rtl"] .user-item.selected,
[dir="rtl"] .member-item.selected,
[dir="rtl"] .selected-member-item::before,
[dir="rtl"] .group-member-full-item::before,
[dir="rtl"] .history-item::before,
[dir="rtl"] .member-item::before {
    border-left: none;
    border-right: 4px solid #ffa934;
    right: 0;
    left: auto;
}

[dir="rtl"] .notification-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .online-badge,
[dir="rtl"] .offline-badge,
[dir="rtl"] .online-badge-small,
[dir="rtl"] .offline-badge-small,
[dir="rtl"] .admin-badge,
[dir="rtl"] .selected-admin-badge,
[dir="rtl"] .admin-badge-small,
[dir="rtl"] .creator-badge,
[dir="rtl"] .group-admin-badge {
    right: auto;
    left: 2px;
}

[dir="rtl"] .message-sent {
    align-self: flex-start;
}

[dir="rtl"] .message-received {
    align-self: flex-end;
}

[dir="rtl"] .message-sent .message-content {
    border-bottom-right-radius: 18px;
    border-bottom-left-radius: 5px;
}

[dir="rtl"] .message-received .message-content {
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 5px;
}

[dir="rtl"] .form-actions {
    justify-content: flex-start;
}

[dir="rtl"] .top-bar-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .chat-with-profile {
    flex-direction: row-reverse;
}

[dir="rtl"] .group-header-info {
    flex-direction: row-reverse;
}

[dir="rtl"] .group-member-full-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .history-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .notification-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .attached-file-preview {
    flex-direction: row-reverse;
}

[dir="rtl"] .file-info {
    flex-direction: row-reverse;
}

[dir="rtl"] .selected-member-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .member-item {
    flex-direction: row-reverse;
}
/* Forward Message Modal Styles */
.forward-message-header {
    background: #f8f9fa;
    border-radius: 0px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.message-preview-section {
    background: white;
    border-radius: 0px;
    padding: 15px;
    border: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.original-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.original-sender-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.original-sender-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.original-message-content {
    flex: 1;
}

.original-sender-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 14px;
}

.original-message-text {
    color: #34495e;
    line-height: 1.4;
    font-size: 14px;
}

.original-message-time {
    color: #95a5a6;
    font-size: 12px;
    margin-top: 4px;
}

.original-message-time .forwarded-label {
    color: #ffa934;
    font-weight: 500;
}

.file-attachment-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 0px;
    border-left: 3px solid #ffa934;
}

.forward-comment {
    font-style: italic;
    color: #7f8c8d;
    padding: 10px;
    background: #f8f9fa;
    border-left: 3px solid #f39c12;
    margin-top: 10px;
}

/* Message context menu */
.message-context-menu {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 150px;
    display: none;
}

.message-context-menu.show {
    display: block;
}

.message-context-menu button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    color: #333;
    font-size: 14px;
}

.message-context-menu button:hover {
    background-color: #f5f5f5;
}

.message-context-menu .menu-divider {
    height: 1px;
    background-color: #eee;
    margin: 4px 0;
}

.message .message-meta {
    position: relative;
}

.message-more-btn {
    background: none;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    padding: 2px 4px;
    margin-left: 8px;
    border-radius: 0px;
    opacity: 0;
    transition: opacity 0.2s;
}

.message:hover .message-more-btn {
    opacity: 1;
}

.message-more-btn:hover {
    background-color: #f5f5f5;
    color: #7f8c8d;
}

/* Forward progress */
.forward-progress {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0px;
}

.forward-result {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 0px;
    border: 1px solid #e9ecef;
}

.forward-result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.forward-result-header.success {
    color: #27ae60;
}

.forward-result-header.error {
    color: #e74c3c;
}

.forward-result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.forward-stat-box {
    text-align: center;
    padding: 10px;
    border-radius: 0px;
    background: #f8f9fa;
}

.forward-stat-box.success {
    background: #eafaf1;
    color: #27ae60;
}

.forward-stat-box.failed {
    background: #fdedec;
    color: #e74c3c;
}

.forward-stat-box.total {
    background: #ebf5fb;
    color: #ffa934;
}

.forward-stat-number {
    font-size: 24px;
    font-weight: bold;
    display: block;
}

.forward-stat-label {
    font-size: 12px;
    color: #7f8c8d;
}

/* Selected recipient tags */
.selected-recipient-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.selected-recipient-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #ebf5fb;
    border: 1px solid #ffa934;
    border-radius: 0px;
    font-size: 12px;
    color: #2980b9;
}

.selected-recipient-tag img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.remove-tag-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Message forward indicator */
.message-forwarded {
    position: relative;
    border-left: 3px solid #ffa934;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.05) 0%, rgba(52, 152, 219, 0) 100%);
}

.message-forwarded .forward-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #ffa934;
    margin-left: 8px;
    font-style: italic;
}

.forward-indicator svg {
    width: 12px;
    height: 12px;
}

.message-forwarded .forwarded-from {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 4px;
    padding-left: 8px;
    border-left: 2px solid #ffa934;
}



/* Emoji Picker Button in Message Input */
.message-input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.emoji-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    padding: 8px;
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.emoji-toggle-btn:hover {
    color: #007bff;
    background: #f0f0f0;
}

/* Emoji in Messages */
.message-text {
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message-text .emoji {
    font-size: 18px;
    vertical-align: middle;
    margin: 0 1px;
}

/* Ensure emojis display correctly in all browsers */
.message-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

/* Message links */
.message-link {
    color: #007bff;
    text-decoration: none;
    word-break: break-all;
}

.message-link:hover {
    text-decoration: underline;
}
/* 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);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tab-header .search-box {
        width: 100%;
    }
}
/* 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; /* Important for text truncation */
}

/* 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;
}
/* Add these styles to your existing CSS */

.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;
}

/* Bulk message member item improvements */
.member-item .member-info {
    padding: 8px 10px;
    flex: 1;
}

.member-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3px;
}

.member-header h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.member-header .member-role {
    font-size: 11px;
    color: #666;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 0px;
    margin-left: 8px;
}
.clear-bulk-filter-btn{
    color: #ffffff !important;
    background: #ffa934!important;
    border: 1px solid !important;
}
/* ============================================
   MOBILE OPTIMIZATION IMPROVEMENTS
   ============================================ */

/* Mobile View Improvements */
@media (max-width: 768px) {
    /* Improve overall layout */
    .wone-messenger-wrapper {
        margin: 0 10px;
        height: calc(100vh - 120px);
        max-height: none;
        border-radius: 0px;
    }
    
    /* Sidebar optimization */
    .wone-sidebar {
        height: 90%;
        min-height: 300px;
    }
    
    .wone-tabs {
        position: sticky;
        top: 0;
        z-index: 100;
        background: #ffa934;
    }
    
    .tab-btn {
        padding: 14px 12px;
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
    }
    
    /* Chat area optimization */
    .wone-chat-area {
        height: 90%;
        position: relative;
    }
    
    /* Chat header improvements */
    .chat-header {
        padding: 15px 20px;
        position: sticky;
        top: 0;
        z-index: 90;
        background: #ffa934;
    }
    
    .chat-with-profile {
        gap: 12px;
        align-items: flex-start;
    }
    
    .chat-profile-image {
        width: 70px;
        height: 70px;
        margin-top: 4px;
    }
    
    .chat-with-info h3 {
        font-size: 16px;
        line-height: 1.3;
        margin-bottom: 4px;
    }
    
    #chat-with-role {
        font-size: 12px;
    }
    
    .practice-areas-badge {
        font-size: 10px;
        padding: 1px 6px;
    }
    
    /* Messages area */
    .chat-messages {
        padding: 15px;
        height: calc(100% - 150px);
    }
    
    .message {
        max-width: 85%;
        margin-bottom: 15px;
    }
    
    .message-content {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .message-text {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .message-meta {
        font-size: 10px;
    }
    
    /* Input area improvements */
    .chat-input-area {
        padding: 15px;
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 2px solid #e9ecef;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
    #message-input {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 50px;
        max-height: 100px;
    }
    
    .message-input-actions {
        gap: 8px;
    }
    
    .attach-file-btn,
    #send-message-btn {
        width: 40px;
        height: 40px;
        padding: 10px;
    }
    
    /* Top bar mobile optimization */
    .wone-top-bar {
        padding: 12px 15px;
        margin: 10px 10px 15px 10px;
        border-radius: 0px;
    }
    
    .top-bar-content {
        gap: 12px;
    }
    
    .user-profile-mini {
        gap: 10px;
    }
    
    .mini-avatar,
    .mini-avatar-placeholder {
        font-size: 16px;
    }
    
    .mini-name {
        font-size: 13px;
    }
    
    .mini-role {
        font-size: 11px;
    }
    
    .top-bar-actions {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }
    
    .bulk-message-btn,
    .logout-btn {
        padding: 8px 12px;
        font-size: 12px;
        font-weight: 600;
        flex: 1;
        min-width: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
    }
    
    .bulk-message-btn svg,
    .notification-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .logout-btn {
        max-width: 100px;
    }
    
    /* Notification improvements */
    .notification-container {
        position: static;
    }
    
    .notification-btn {
        width: 40px;
        height: 40px;
    }
    
    .notification-badge {
        top: -2px;
        right: -2px;
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
    
    .notification-dropdown {
        position: fixed;
        top: 80px;
        left: 50%;
        transform: translateX(-50%);
        width: 90vw;
        max-width: 400px;
        margin: 0;
    }
    
    /* User list improvements */
    .user-item {
        padding: 12px 14px;
        margin-bottom: 8px;
    }
    
    .user-avatar {
        width: 60px;
        height: 60px;
        font-size: 18px;
        margin-right: 12px;
    }
    
    .user-info h4 {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .user-role {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .user-practice-areas {
        font-size: 11px;
        margin-top: 3px;
    }
    
    /* Group list improvements */
    .group-item {
        padding: 12px 14px;
        margin-bottom: 8px;
    }
    
    .group-avatar {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .group-info h4 {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .group-members {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .group-desc {
        font-size: 12px;
        -webkit-line-clamp: 1;
    }
    
    /* Modal improvements for mobile */
    .wone-modal {
        padding: 10px;
    }
    
    .modal-content {
        border-radius: 0px;
        max-height: 85vh;
        margin: 10px auto;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 20px;
        overflow-y: auto;
        max-height: calc(85vh - 80px);
    }
    
    /* Members selection grid */
    .members-selection-container {
        grid-template-columns: 1fr;
        min-height: 400px;
    }
    
    .selected-members-side {
        border-top: 2px solid #e2e8f0;
        border-left: none;
        max-height: 200px;
    }
    
    /* Practice areas in bulk modal */
    .bulk-practice-areas {
        flex-wrap: wrap;
        gap: 3px;
    }
    
    .bulk-practice-tag {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    /* Member items in modals */
    .member-item {
        padding: 14px 16px;
        gap: 12px;
    }
    
    .member-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .member-info h5 {
        font-size: 14px;
    }
    
    .member-role {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    /* Selected members */
    .selected-member-item {
        padding: 12px;
        gap: 10px;
    }
    
    .selected-member-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .selected-member-name {
        font-size: 13px;
    }
    
    .selected-member-type {
        font-size: 11px;
        padding: 2px 8px;
    }
    
    /* Form actions */
    .form-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .btn-cancel,
    .btn-create,
    .btn-send-bulk,
    .btn-forward {
        width: 100%;
        padding: 14px;
        font-size: 15px;
        min-width: auto;
    }
    
    /* Progress bars */
    .progress-bar-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .progress-bar {
        height: 12px;
    }
    
    #progress-percentage {
        font-size: 20px;
        padding: 8px 12px;
    }
    
    .progress-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    /* Chat header actions */
    .chat-header-actions {
        margin-top: 10px;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .group-action-btn {
        padding: 8px 12px;
        font-size: 12px;
        flex: 1;
        min-width: 0;
        justify-content: center;
    }
    
    .group-admin-menu {
        margin-left: 0;
        width: 100%;
        gap: 8px;
    }
    
    /* Date separators */
    .date-separator {
        margin: 20px 0;
    }
    
    .date-separator span {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    /* No chat selected message */
    .no-chat-selected {
        padding: 40px 20px;
    }
    
    .no-chat-selected p {
        font-size: 14px;
        max-width: 300px;
    }
    
    /* Search boxes */
    .search-box input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    /* Tab content improvements */
    .tab-content {
        padding: 15px;
        height: calc(100% - 100px);
    }
    
    .tab-header {
        margin-bottom: 15px;
        padding: 0;
    }
    
    .tab-header h3 {
        font-size: 16px;
    }
    
    /* Clear filter button */
    .clear-bulk-filter-btn {
        padding: 8px 12px;
        font-size: 12px;
        margin-top: 10px;
        width: 100%;
    }
}

/* Small Mobile Phones */
@media (max-width: 480px) {
    .wone-messenger-wrapper {
        margin: 0 8px;
        height: calc(100vh - 100px);
    }
    
    .wone-top-bar {
        margin: 8px 8px 12px 8px;
        padding: 10px 12px;
    }
    
    .tab-btn {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .chat-header {
        padding: 12px 15px;
    }
    
    .chat-profile-image {
        width: 70px;
        height: 70px;
    }
    
    .chat-with-info h3 {
        font-size: 15px;
    }
    
    .chat-messages {
        padding: 12px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .chat-input-area {
        padding: 12px;
    }
    
    #message-input {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 45px;
    }
    
    .attach-file-btn,
    #send-message-btn {
        width: 36px;
        height: 36px;
        padding: 8px;
    }
    
    .mini-avatar,
    .mini-avatar-placeholder {
        font-size: 14px;
    }
    
    .mini-name {
        font-size: 12px;
    }
    
    .bulk-message-btn,
    .logout-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .user-item {
        padding: 10px 12px;
    }
    
    .user-avatar {
        width: 60px;
        height: 60px;
        margin-right: 10px;
    }
    
    .user-info h4 {
        font-size: 13px;
    }
    
    .group-item {
        padding: 10px 12px;
    }
    
    .group-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .modal-content {
        margin: 5px auto;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
        max-height: calc(90vh - 70px);
    }
    
    .notification-dropdown {
        width: 95vw;
        max-width: none;
    }
    
    .practice-areas-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .clear-bulk-filter-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Extra Small Mobile Phones */
@media (max-width: 360px) {
    .wone-messenger-wrapper {
        margin: 0 5px;
    }
    
    .wone-top-bar {
        margin: 5px 5px 10px 5px;
    }
    
    .tab-btn {
        padding: 10px 6px;
        font-size: 11px;
    }
    
    .chat-header {
        padding: 10px 12px;
    }
    
    .chat-profile-image {
        width: 70px;
        height: 70px;
    }
    
    .chat-with-info h3 {
        font-size: 14px;
    }
    
    #chat-with-role {
        font-size: 11px;
    }
    
    .bulk-message-btn,
    .logout-btn {
        font-size: 10px;
        padding: 5px 8px;
    }
    
    .notification-btn {
        width: 36px;
        height: 36px;
    }
    
    .user-item,
    .group-item {
        padding: 8px 10px;
    }
    
    .modal-content {
        margin: 2px auto;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-body {
        padding: 12px;
    }
    
    .btn-cancel,
    .btn-create,
    .btn-send-bulk,
    .btn-forward {
        padding: 12px;
        font-size: 14px;
    }
}

/* Landscape Mode for Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .wone-messenger-wrapper {
        height: calc(100vh - 80px);
    }
    
    .wone-sidebar {
        height: 90%;
        min-height: 250px;
    }
    
    .wone-chat-area {
        height: 90%;
    }
    
    .chat-messages {
        padding: 10px;
        height: calc(100% - 140px);
    }
    
    .chat-header {
        padding: 10px 15px;
    }
    
    .chat-input-area {
        padding: 10px 15px;
    }
    
    .no-chat-selected {
        padding: 20px;
    }
    
    .date-separator {
        margin: 15px 0;
    }
    
    .message {
        margin-bottom: 10px;
    }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .wone-messenger-wrapper {
        height: calc(100vh - 140px);
    }
    
    .chat-messages {
        -webkit-overflow-scrolling: touch;
    }
    
    #message-input {
        font-size: 16px; /* Prevents zoom on focus in iOS */
    }
    
    .modal-body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* Improve touch targets for mobile */
@media (max-width: 768px) {
    .tab-btn,
    .user-item,
    .group-item,
    .member-item,
    .selected-member-item,
    .notification-item,
    .message-more-btn,
    .attach-file-btn,
    #send-message-btn,
    .emoji-toggle-btn,
    .group-action-btn,
    .bulk-message-btn,
    .logout-btn,
    .notification-btn,
    .remove-member-btn,
    .remove-attachment-btn,
    .mark-all-read,
    .modal-close,
    .btn-cancel,
    .btn-create,
    .btn-send-bulk,
    .btn-forward,
    .clear-bulk-filter-btn {
        min-height: 44px; /* Apple recommended minimum touch target size */
        min-width: 44px;
    }
    
    .member-checkbox input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }
    
    /* Ensure text inputs are easily tappable */
    input[type="text"],
    textarea,
    #message-input {
        font-size: 16px; /* Prevents iOS zoom */
        line-height: 1.5;
        padding: 12px 16px;
    }
}

/* Improve scroll performance */
.wone-sidebar,
.chat-messages,
.modal-body,
.members-list-container,
.selected-members-list-container,
.notification-list,
.group-history-container {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* overscroll-behavior: contain; */
}

/* Prevent horizontal scroll on mobile */
@media (max-width: 768px) {
    body,
    .wone-messenger-wrapper,
    .modal-content,
    .members-selection-container {
        overflow-x: hidden;
        max-width: 100vw;
    }
}

/* Loading animation optimization for mobile */
@media (max-width: 768px) {
    .loading::after {
        width: 32px;
        height: 32px;
        border-width: 3px;
    }
    
    .loading {
        padding: 40px 20px;
        font-size: 14px;
    }
}

/* Practice areas mobile optimization */
@media (max-width: 768px) {
    .user-practice-areas {
        font-size: 10px;
    }
    
    .bulk-practice-tag {
        font-size: 8px;
        padding: 1px 3px;
    }
    
    .selected-practice-tag {
        font-size: 8px;
        padding: 0 3px;
    }
    
    .practice-areas-badge svg {
        width: 8px;
        height: 8px;
    }
}

/* ============================================
   BULK MESSAGE MODAL - MOBILE OPTIMIZATION
   ============================================ */
/* ============================================
   BULK MESSAGE MODAL - MOBILE OPTIMIZATION
   ============================================ */

@media (max-width: 768px) {
  /* Bulk Message Modal Container */
  #bulk-message-modal .modal-content {
    max-width: 100vw !important;
    margin: 0 !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    height: 100vh !important;
  }

  /* Modal Header */
  #bulk-message-modal .modal-header {
    padding: 20px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: #ffa934 !important;
  }

  #bulk-message-modal .modal-header h3 {
    font-size: 18px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  /* Modal Body */
  #bulk-message-modal .modal-body {
    padding: 20px !important;
    height: calc(100vh - 140px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Bulk Message Form */
  #bulk-message-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    height: 100% !important;
  }

  /* Message Input Section */
  #bulk-message-text {
    min-height: 150px !important;
    max-height: 200px !important;
    font-size: 16px !important;
    padding: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
    .bulk-filter-row{
        display:block;
    }
  /* Recipients Selection Section */
  .select-all-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 15px !important;
    width: 100% !important;
  }

  .select-all-checkbox {
    width: 100% !important;
    justify-content: space-between !important;
    padding: 12px 15px !important;
    margin-bottom: 10px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 0px !important;
    background: white !important;
  }

  /* Search Box */
  .search-box {
    width: 100% !important;
    padding: 0 !important;
    margin-bottom: 15px !important;
  }

  .search-box input {
    width: 100% !important;
    padding: 14px !important;
    font-size: 16px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 0px !important;
    box-sizing: border-box !important;
  }

  /* Members Tabs */
  .tabs-container {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .member-tabs {
    display: flex !important;
    min-width: 300px !important;
    padding: 5px !important;
    background: #f1f5f9 !important;
    border-radius: 0px !important;
  }

  .member-tab-btn {
    padding: 12px 15px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    flex: 1 !important;
    min-width: 120px !important;
  }

  /* Members List Container */
  .members-selection-container {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    min-height: 300px !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
  }

  .members-list-side,
  .selected-members-side {
    width: 100% !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 0px !important;
    overflow: hidden !important;
  }

  .members-list-side {
    margin-bottom: 20px !important;
  }

  .selected-members-side {
    border-top: 2px solid #e2e8f0 !important;
    max-height: 250px !important;
  }

  /* Members List Header */
  .members-list-header,
  .selected-members-header {
    padding: 15px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: white !important;
  }

  .members-list-header h4,
  .selected-members-header h4 {
    font-size: 16px !important;
    margin: 0 !important;
  }

  /* Members List */
  .members-list-container,
  .selected-members-list-container {
    max-height: 250px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .members-list,
  .selected-members-list {
    padding: 10px !important;
  }

  /* Member Item */
  .member-item {
    padding: 12px 15px !important;
    margin-bottom: 8px !important;
    border-radius: 0px !important;
    border: 1px solid #e2e8f0 !important;
    background: white !important;
    flex-direction: row !important;
    align-items: center !important;
  }

  .member-checkbox {
    min-width: 24px !important;
  }

  .member-checkbox input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
  }

  .member-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    font-size: 16px !important;
  }

  .member-info {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 0 10px !important;
  }

  .member-info h5 {
    font-size: 14px !important;
    margin: 0 0 4px 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .member-role {
    font-size: 11px !important;
    padding: 3px 8px !important;
    display: inline-block !important;
  }

  /* Practice Areas on Mobile */
  .bulk-practice-areas {
    margin-top: 4px !important;
    gap: 3px !important;
  }

  .bulk-practice-tag {
    font-size: 9px !important;
    padding: 2px 5px !important;
  }

  .bulk-practice-more {
    font-size: 8px !important;
    padding: 2px 4px !important;
  }

  /* Selected Member Item */
  .selected-member-item {
    padding: 12px !important;
    margin-bottom: 8px !important;
    flex-direction: row !important;
    align-items: center !important;
  }

  .selected-member-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 14px !important;
  }

  .selected-member-info {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 0 10px !important;
  }

  .selected-member-name {
    font-size: 13px !important;
    margin: 0 0 4px 0 !important;
  }

  .selected-member-type {
    font-size: 11px !important;
    padding: 2px 8px !important;
  }

  .remove-member-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }

  /* Empty State */
  .empty-selected-members {
    padding: 30px 20px !important;
    text-align: center !important;
  }

  /* Form Actions */
  .form-actions {
    /* position: fixed !important; */
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    padding: 15px 20px !important;
    border-top: 2px solid #e2e8f0 !important;
    margin: 0 !important;
    z-index: 1000 !important;
    display: flex !important;
    gap: 10px !important;
  }

  .btn-cancel,
  .btn-send-bulk {
    flex: 1 !important;
    padding: 16px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    min-height: 52px !important;
    border-radius: 0px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .btn-cancel {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 2px solid #cbd5e1 !important;
  }

  .btn-send-bulk {
    background: #ffa934 !important;
    color: white !important;
    border: 2px solid #ffa934 !important;
  }

  /* Progress Section */
  #bulk-message-progress {
    padding: 20px !important;
    margin: 20px 0 !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 0px !important;
  }

  .progress-header {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }

  .progress-header h4 {
    font-size: 16px !important;
  }

  #progress-status {
    font-size: 14px !important;
    padding: 8px 12px !important;
    align-self: flex-start !important;
  }

  .progress-bar-container {
    flex-direction: column !important;
    gap: 15px !important;
    align-items: stretch !important;
  }

  .progress-bar {
    height: 12px !important;
    width: 100% !important;
  }

  #progress-percentage {
    font-size: 20px !important;
    padding: 10px !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .progress-stats {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }

  .stat-item {
    padding: 12px !important;
    text-align: center !important;
  }

  .stat-label {
    font-size: 12px !important;
  }

  .stat-value {
    font-size: 24px !important;
  }

  /* Result Messages */
  .bulk-result-success,
  .bulk-result-failed {
    padding: 20px !important;
    margin: 20px 0 !important;
  }

  .bulk-result-success h5,
  .bulk-result-failed h5 {
    font-size: 16px !important;
  }

  /* File Attachment Area */
  .file-attachment-area {
    margin: 15px 0 !important;
    padding: 15px !important;
  }

  .attached-file-preview {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .file-icon {
    width: 36px !important;
    height: 36px !important;
  }

  .file-info {
    flex: 1 !important;
    width: 100% !important;
  }

  .remove-attachment-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
  }

  /* Clear Filter Button */
  .clear-bulk-filter-btn {
    width: 100% !important;
    padding: 12px !important;
    font-size: 14px !important;
    margin-top: 10px !important;
    border-radius: 0px !important;
  }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
  #bulk-message-modal .modal-header {
    padding: 15px !important;
  }

  #bulk-message-modal .modal-header h3 {
    font-size: 16px !important;
  }

  #bulk-message-modal .modal-body {
    padding: 15px !important;
    height: calc(100vh - 130px) !important;
  }

  .member-tab-btn {
    padding: 10px 12px !important;
    font-size: 13px !important;
    min-width: 100px !important;
  }

  .member-item {
    padding: 10px 12px !important;
  }

  .member-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 14px !important;
  }

  .member-info h5 {
    font-size: 13px !important;
  }

  .selected-member-item {
    padding: 10px !important;
  }

  .selected-member-avatar {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }

  .form-actions {
    padding: 12px 15px !important;
  }

  .btn-cancel,
  .btn-send-bulk {
    padding: 14px !important;
    font-size: 15px !important;
    min-height: 48px !important;
  }

  .progress-stats {
    grid-template-columns: 1fr !important;
  }

  .stat-item {
    padding: 10px !important;
  }
}

/* Very Small Mobile Devices */
@media (max-width: 360px) {
  #bulk-message-modal .modal-body {
    padding: 12px !important;
  }

  .member-tab-btn {
    padding: 8px 10px !important;
    font-size: 12px !important;
    min-width: 90px !important;
  }

  .member-checkbox input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
  }

  .member-avatar {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    font-size: 12px !important;
  }

  .member-info {
    padding: 0 8px !important;
  }

  .bulk-practice-tag {
    font-size: 8px !important;
    padding: 1px 3px !important;
  }

  .form-actions {
    padding: 10px 12px !important;
    flex-direction: column !important;
  }

  .btn-cancel,
  .btn-send-bulk {
    width: 100% !important;
  }
}

/* Landscape Mode Optimization */
@media (max-width: 768px) and (orientation: landscape) {
  #bulk-message-modal .modal-body {
    height: calc(100vh - 100px) !important;
  }

  .members-selection-container {
    max-height: 250px !important;
  }

  .selected-members-side {
    max-height: 150px !important;
  }

  .form-actions {
    padding: 10px 20px !important;
  }

  .btn-cancel,
  .btn-send-bulk {
    min-height: 44px !important;
    padding: 12px !important;
  }
}

/* iOS Safari Specific Fixes */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 768px) {
    #bulk-message-modal .modal-body {
      height: calc(100vh - 180px) !important;
    }
    
    #bulk-message-text {
      font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    .search-box input {
      font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    .form-actions {
      padding-bottom: env(safe-area-inset-bottom) !important;
    }
  }
}

/* Dark Mode Support for Mobile */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
  /* Bulk Message Modal */
  #bulk-message-modal .modal-content {
    background: #1a3344 !important;
    color: #ffffff !important;
  }
  .no-chat-selected{
     background: white !important;
     color: #005a87 !important;
   }

  #bulk-message-modal .modal-header {
    background: #ffa934;
    color: #ffffff !important;
  }
  #chat-messages-container{
    background-color: white !important;
    color:#1a3344 !important;
    }

  #bulk-message-modal .modal-header h3 {
    color: #ffffff !important;
  }

  /* All text inside modal should be white */
  #bulk-message-modal * {
    color: #ffffff !important;
  }

  /* Form elements */
  #bulk-message-modal .form-group label {
    color: #e2e8f0 !important;
  }

  #bulk-message-modal .select-all-checkbox,
  #bulk-message-modal .member-item,
  #bulk-message-modal .selected-member-item,
  #bulk-message-modal .members-list-side,
  #bulk-message-modal .selected-members-side,
  #bulk-message-modal .members-list-header,
  #bulk-message-modal .selected-members-header,
  #bulk-message-modal #bulk-message-progress,
  #bulk-message-modal .form-actions {
    background: #1a3344 !important;
    border-color: #b0b9c5b3 !important;
  }

  /* Headers text */
  #bulk-message-modal .members-list-header h4,
  #bulk-message-modal .selected-members-header h4 {
    color: #ffffff !important;
  }

  /* Search and input fields */
  #bulk-message-modal .search-box input,
  #bulk-message-modal #bulk-message-text {
    background: #1a3344 !important;
    border-color: #334155 !important;
    color: #ffffff !important;
  }

  #bulk-message-modal .search-box input::placeholder,
  #bulk-message-modal #bulk-message-text::placeholder {
    color: #94a3b8 !important;
  }

  /* Buttons */
  #bulk-message-modal .btn-cancel {
    background: #64748b !important;
    color: #ffffff !important;
    border-color: #475569 !important;
  }

  #bulk-message-modal .btn-send-bulk {
    background: #ffa934!important;
    color: #ffffff !important;
    border-color: #2563eb !important;
  }

  /* Tabs */
  #bulk-message-modal .member-tabs {
    background: #1a3344 !important;
  }

  #bulk-message-modal .member-tab-btn {
    color: #cbd5e1 !important;
  }

  #bulk-message-modal .member-tab-btn.active {
    background: #ffa934!important;
    color: #ffffff !important;
  }

  /* Member items text */
  #bulk-message-modal .member-info h5,
  #bulk-message-modal .selected-member-name {
    color: #ffffff !important;
  }

  #bulk-message-modal .member-role,
  #bulk-message-modal .selected-member-type {
    color: #94a3b8 !important;
    background: #334155 !important;
    border-color: #475569 !important;
  }

  /* Selected members count */
  #bulk-message-modal .selected-members-count {
    color: #94a3b8 !important;
  }

  /* Empty states */
  #bulk-message-modal .empty-selected-members {
    color: #94a3b8 !important;
  }

  /* Hover states */
  #bulk-message-modal .member-item:hover,
  #bulk-message-modal .selected-member-item:hover {
    background: #ffa934 !important;
    border-color: #ffa934!important;
  }

  /* Selected state */
  #bulk-message-modal .member-item.selected {
    background: #ffa934!important;
  }

  #bulk-message-modal .member-item.selected .member-info h5,
  #bulk-message-modal .member-item.selected .member-role {
    color: #ffffff !important;
  }

  /* Progress bar */
  #bulk-message-modal .progress-fill {
    background: #10b981 !important;
  }

  #bulk-message-modal .progress-bar {
    background: #475569 !important;
  }

  #bulk-message-modal #progress-percentage {
    background: #334155 !important;
    color: #ffffff !important;
    border-color: #475569 !important;
  }

  #bulk-message-modal #progress-status {
    color: #94a3b8 !important;
  }

  /* Also apply to other modals */
  #forward-message-modal .modal-content,
  #create-group-modal .modal-content,
  #update-group-modal .modal-content,
  #add-members-modal .modal-content {
    background: #1a3344 !important;
    color: #ffffff !important;
  }

  #forward-message-modal .modal-header,
  #create-group-modal .modal-header,
  #update-group-modal .modal-header,
  #add-members-modal .modal-header {
    background: #ffa934;
    color: #ffffff !important;
  }

  /* Main messenger mobile dark mode */
  .wone-messenger-wrapper {
    background: #1a3344 !important;
  }

  .wone-top-bar {
    background: #1a3344 !important;
    border-color: #1a3344 !important;
  }

  .wone-top-bar * {
    color: #ffffff !important;
  }

  .wone-sidebar {
    background: #1a3344 !important;
    border-color: #b0b9c5b3 !important;
  }

  .wone-tabs {
    background: #ffa934;
  }

  .tab-btn {
    color: #ffffff !important;
  }

  .tab-btn.active {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
  }

  .chat-messages {
    background: #1a3344 !important;
  }

  .no-chat-selected p {
    color: #94a3b8 !important;
  }

  .message-sent .message-content {
    background: #ffa934!important;
    color: #ffffff !important;
  }

  .message-received .message-content {
    background: #ffa934 !important;
    color: #ffffff !important;
    border-color: #475569 !important;
  }

  .message-received .message-time {
    color: #94a3b8 !important;
  }

  .chat-input-area {
    background: #1a3344 !important;
    border-color: #b0b9c5b3 !important;
  }

  #message-input {
    background: #1a3344 !important;
    border-color: #334155 !important;
    color: #ffffff !important;
  }

  #message-input::placeholder {
    color: #94a3b8 !important;
  }

  /* User items in sidebar */
  .user-item,
  .group-item {
    background: #1a3344 !important;
    border-color: #b0b9c5b3 !important;
    color: #ffffff !important;
  }

  .user-item .user-info h4,
  .group-item .group-info h4 {
    color: #ffffff !important;
  }

  .user-item .user-role,
  .group-item .group-members {
    color: #94a3b8 !important;
  }

  .user-item:hover,
  .group-item:hover {
    background: #ffa934 !important;
  }

  .user-item.active,
  .group-item.active {
    background: #ffa934!important;
  }

  .user-item.active .user-info h4,
  .user-item.active .user-role,
  .group-item.active .group-info h4,
  .group-item.active .group-members {
    color: #ffffff !important;
  }

  /* Notification dropdown */
  .notification-dropdown {
    background: #1a3344 !important;
    border-color: #b0b9c5b3 !important;
  }

  .notification-header {
    background: #1a3344 !important;
    border-color: #334155 !important;
  }

  .notification-header h4 {
    color: #ffffff !important;
  }

  .notification-item {
    background: #1a3344 !important;
    border-color: #b0b9c5b3 !important;
    color: #ffffff !important;
  }

  .notification-title {
    color: #ffffff !important;
  }

  .notification-time,
  .notification-preview {
    color: #94a3b8 !important;
  }

  /* Back to Site button for mobile */
  .back-to-site-btn {
    background: #334155 !important;
    color: #ffffff !important;
    border-color: #475569 !important;
  }

  .back-to-site-btn:hover {
    background: #475569 !important;
    color: #ffffff !important;
  }

  /* Bulk message button */
  .bulk-message-btn {
    background: #ffa934!important;
    color: #ffffff !important;
    border-color: #2563eb !important;
  }

  /* Logout button */
  .logout-btn {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
  }
}
/* 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);
}