﻿/* ============================================
   WhatsApp Business - Global Styles
   ============================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #e9edef;
    height: 100vh;
    overflow: hidden;
}

/* WhatsApp Container */
.whatsapp-container {
    display: flex;
    height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Sidebar Styles */
.sidebar {
    width: 420px;
    background: #111b21;
    border-right: 1px solid #2a3942;
    display: flex;
    flex-direction: column;
}

.sidebar.narrow {
    width: 80px;
    align-items: center;
    padding: 20px 0;
}

.sidebar-header {
    background: #202c33;
    padding: 20px;
    border-bottom: 1px solid #2a3942;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header-left {
    display: flex;
    align-items: center;
}

.app-logo {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 175.216 175.552"><defs><linearGradient id="a" x1=".5" x2=".5" y2="1"><stop offset="0" stop-color="%2320b038"/><stop offset="1" stop-color="%2360d66a"/></linearGradient></defs><path fill="url(%23a)" d="M87.184 25.227c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.312-6.179 22.559 23.146-6.069 2.235 1.324a60.743 60.743 0 0 0 31.172 8.551h.027c33.723 0 61.159-27.426 61.171-61.132a60.85 60.85 0 0 0-17.876-43.286A60.662 60.662 0 0 0 87.184 25.227z"/><path fill="%23fff" d="M68.772 55.603c-1.378-3.061-2.828-3.123-4.137-3.176l-3.524-.043a6.743 6.743 0 0 0-4.887 2.297c-1.684 1.849-6.426 6.276-6.426 15.3s6.572 17.745 7.486 18.966 12.978 20.429 31.405 28.011c15.344 6.299 18.443 5.046 21.777 4.729s10.886-4.449 12.421-8.743 1.534-7.983 1.073-8.743-1.685-1.23-3.525-2.15-10.885-5.367-12.563-5.981-2.91-.919-4.137.921-4.746 5.979-5.819 7.206-2.144 1.381-3.984.462-7.76-2.861-14.784-9.124c-5.465-4.873-9.154-10.891-10.228-12.73s-.114-2.835.808-3.751c.825-.824 1.838-2.147 2.759-3.22s1.224-1.84 1.836-3.065.307-2.301-.153-3.22-4.032-10.011-5.666-13.647"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

.sidebar-header h1 {
    color: #e9edef;
    font-size: 22px;
    font-weight: 500;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 10px;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #aebac1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-size: 20px;
    line-height: 1;
}

.header-btn:hover {
    background: #2a3942;
}

.icon-new-chat::before { 
    content: '\271A';
    display: block;
}

.icon-settings::before { 
    content: '\2699';
    display: block;
}

/* Search Container */
.search-container {
    padding: 10px 15px;
    background: #111b21;
}

.search-box {
    background: #202c33;
    border-radius: 10px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: #00a884;
    background: #1a2730;
}

.search-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%238696a0"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #e9edef;
    font-size: 15px;
    width: 100%;
}

.search-input::placeholder {
    color: #8696a0;
}

/* Conversations List */
.conversations-list {
    flex: 1;
    overflow-y: auto;
    background: #111b21;
}

.conversation-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    border-bottom: 1px solid #1a2730;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.conversation-item:hover {
    background: #202c33;
}

.conversation-item.active {
    background: #2a3942;
}

/* Avatar Styles */
.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a884 0%, #00d9a8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    margin-right: 16px;
    box-shadow: 0 2px 8px rgba(0,168,132,0.3);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.avatar.small {
    width: 48px;
    height: 48px;
    font-size: 20px;
}

.avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>');
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.3;
}

/* Conversation Info */
.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.contact-name {
    font-weight: 500;
    font-size: 17px;
    color: #e9edef;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time {
    font-size: 13px;
    color: #8696a0;
    flex-shrink: 0;
    margin-left: 10px;
}

.last-message {
    font-size: 14px;
    color: #8696a0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.message-count-badge {
    background: #00a884;
    color: white;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
    padding: 0 6px;
}

/* Back Button */
.back-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a884 0%, #00d9a8 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    transition: all 0.3s;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,168,132,0.4);
    position: relative;
}

.back-btn::before {
    content: '\2190';
    font-size: 28px;
    font-weight: bold;
    color: white;
    display: block;
}

.back-btn:hover {
    background: linear-gradient(135deg, #00d9a8 0%, #00a884 100%);
    transform: scale(1.05);
}

/* Chat Container */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0b141a;
}

.chat-header {
    background: linear-gradient(135deg, #202c33 0%, #1a2730 100%);
    padding: 15px 25px;
    border-bottom: 1px solid #2a3942;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.contact-info h3 {
    font-size: 18px;
    font-weight: 500;
    color: #e9edef;
    margin-bottom: 2px;
}

.contact-info p {
    font-size: 13px;
    color: #8696a0;
}

/* Messages Area */
.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect fill="%23182229" width="100" height="100"/><circle fill="%23111b21" cx="25" cy="25" r="2" opacity="0.2"/><circle fill="%23111b21" cx="75" cy="75" r="2" opacity="0.2"/></svg>');
    background-color: #0a1014;
}

.message {
    display: flex;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.outgoing {
    justify-content: flex-end;
}

.message.incoming {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 65%;
    padding: 10px 14px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.message-bubble:hover {
    transform: scale(1.02);
}

.message.outgoing .message-bubble {
    background: linear-gradient(135deg, #005c4b 0%, #00a884 100%);
    border-bottom-right-radius: 2px;
}

.message.incoming .message-bubble {
    background: linear-gradient(135deg, #202c33 0%, #2a3942 100%);
    border-bottom-left-radius: 2px;
}

.message-text {
    font-size: 15px;
    line-height: 1.5;
    color: #e9edef;
    word-wrap: break-word;
    margin-bottom: 6px;
    white-space: pre-wrap;
}

.message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 4px;
}

.message-time {
    font-size: 12px;
    color: rgba(233, 237, 239, 0.6);
}

.message.outgoing .message-time {
    color: rgba(233, 237, 239, 0.7);
}

.message-status {
    font-size: 16px;
    color: rgba(233, 237, 239, 0.7);
}

/* Chat Footer */
.chat-footer {
    background: #202c33;
    padding: 15px 25px;
    border-top: 1px solid #2a3942;
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-container {
    flex: 1;
    background: #2a3942;
    border-radius: 25px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.input-container:focus-within {
    border-color: #00a884;
    background: #1a2730;
}

.message-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #e9edef;
    font-size: 15px;
}

.message-input::placeholder {
    color: #8696a0;
}

.message-input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.send-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a5155 0%, #374045 100%);
    border: none;
    color: #8696a0;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: all 0.3s;
    opacity: 0.5;
    position: relative;
}

.send-btn::before {
    content: '\25B6';
    font-size: 18px;
    color: #8696a0;
    margin-left: 2px;
    display: block;
}

.send-btn.active {
    background: linear-gradient(135deg, #00a884 0%, #00d9a8 100%);
    cursor: pointer;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0,168,132,0.4);
}

.send-btn.active::before {
    color: white;
}

.send-btn.active:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,168,132,0.5);
}

/* Coming Soon Badge */
.coming-soon-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6f00 0%, #ff9800 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.4);
    z-index: 1000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #8696a0;
    padding: 40px;
    text-align: center;
}

.empty-state-icon {
    width: 180px;
    height: 180px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 175.216 175.552"><defs><linearGradient id="a" x1=".5" x2=".5" y2="1"><stop offset="0" stop-color="%2320b038" stop-opacity="0.3"/><stop offset="1" stop-color="%2360d66a" stop-opacity="0.3"/></linearGradient></defs><path fill="url(%23a)" d="M87.184 25.227c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.312-6.179 22.559 23.146-6.069 2.235 1.324a60.743 60.743 0 0 0 31.172 8.551h.027c33.723 0 61.159-27.426 61.171-61.132a60.85 60.85 0 0 0-17.876-43.286A60.662 60.662 0 0 0 87.184 25.227z"/><path fill="%238696a0" d="M68.772 55.603c-1.378-3.061-2.828-3.123-4.137-3.176l-3.524-.043a6.743 6.743 0 0 0-4.887 2.297c-1.684 1.849-6.426 6.276-6.426 15.3s6.572 17.745 7.486 18.966 12.978 20.429 31.405 28.011c15.344 6.299 18.443 5.046 21.777 4.729s10.886-4.449 12.421-8.743 1.534-7.983 1.073-8.743-1.685-1.23-3.525-2.15-10.885-5.367-12.563-5.981-2.91-.919-4.137.921-4.746 5.979-5.819 7.206-2.144 1.381-3.984.462-7.76-2.861-14.784-9.124c-5.465-4.873-9.154-10.891-10.228-12.73s-.114-2.835.808-3.751c.825-.824 1.838-2.147 2.759-3.22s1.224-1.84 1.836-3.065.307-2.301-.153-3.22-4.032-10.011-5.666-13.647"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 30px;
}

.empty-state.small .empty-state-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 12px;
    color: #e9edef;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.6;
    color: #8696a0;
}

/* Welcome Screen */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a1014 0%, #1a2730 100%);
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect fill="%23182229" width="100" height="100"/><circle fill="%23111b21" cx="25" cy="25" r="2" opacity="0.3"/><circle fill="%23111b21" cx="75" cy="75" r="2" opacity="0.3"/></svg>');
    opacity: 0.3;
}

.welcome-screen {
    position: relative;
    z-index: 1;
    text-align: center;
}

.welcome-icon {
    width: 250px;
    height: 250px;
    margin: 0 auto 40px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 175.216 175.552"><defs><linearGradient id="a" x1=".5" x2=".5" y2="1"><stop offset="0" stop-color="%2320b038" stop-opacity="0.2"/><stop offset="1" stop-color="%2360d66a" stop-opacity="0.2"/></linearGradient></defs><path fill="url(%23a)" d="M87.184 25.227c-33.733 0-61.166 27.423-61.178 61.13a60.98 60.98 0 0 0 9.349 32.535l1.455 2.312-6.179 22.559 23.146-6.069 2.235 1.324a60.743 60.743 0 0 0 31.172 8.551h.027c33.723 0 61.159-27.426 61.171-61.132a60.85 60.85 0 0 0-17.876-43.286A60.662 60.662 0 0 0 87.184 25.227z"/><path fill="%238696a0" d="M68.772 55.603c-1.378-3.061-2.828-3.123-4.137-3.176l-3.524-.043a6.743 6.743 0 0 0-4.887 2.297c-1.684 1.849-6.426 6.276-6.426 15.3s6.572 17.745 7.486 18.966 12.978 20.429 31.405 28.011c15.344 6.299 18.443 5.046 21.777 4.729s10.886-4.449 12.421-8.743 1.534-7.983 1.073-8.743-1.685-1.23-3.525-2.15-10.885-5.367-12.563-5.981-2.91-.919-4.137.921-4.746 5.979-5.819 7.206-2.144 1.381-3.984.462-7.76-2.861-14.784-9.124c-5.465-4.873-9.154-10.891-10.228-12.73s-.114-2.835.808-3.751c.825-.824 1.838-2.147 2.759-3.22s1.224-1.84 1.836-3.065.307-2.301-.153-3.22-4.032-10.011-5.666-13.647"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.welcome-screen h2 {
    font-size: 36px;
    font-weight: 300;
    margin-bottom: 20px;
    color: #e9edef;
}

.welcome-screen p {
    font-size: 15px;
    line-height: 1.8;
    color: #8696a0;
    max-width: 500px;
    margin: 0 auto;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #374045;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a5155;
}

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1999;
    animation: fadeIn 0.3s ease;
}

/* Modal Dialog */
.modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #202c33;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

.modal-dialog.settings-modal {
    max-width: 600px;
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid #2a3942;
    background: linear-gradient(135deg, #2a3942 0%, #202c33 100%);
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 500;
    color: #e9edef;
    margin: 0;
}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #8696a0;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #374045;
    color: #e9edef;
    transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
    padding: 28px;
    max-height: calc(90vh - 180px);
    overflow-y: auto;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #e9edef;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: #111b21;
    border: 2px solid #2a3942;
    border-radius: 10px;
    color: #e9edef;
    font-size: 15px;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #00a884;
    background: #0a1014;
}

.form-input::placeholder {
    color: #8696a0;
}

.form-hint {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #8696a0;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid #2a3942;
    background: #1a2730;
    justify-content: flex-end;
}

.btn-primary,
.btn-secondary {
    padding: 12px 28px;
    border-radius: 25px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #00a884 0%, #00d9a8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 168, 132, 0.5);
}

.btn-secondary {
    background: #2a3942;
    color: #e9edef;
}

.btn-secondary:hover {
    background: #374045;
}

/* Settings Sections */
.settings-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #2a3942;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-section h3 {
    font-size: 16px;
    font-weight: 500;
    color: #00a884;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Setting Item */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(42, 57, 66, 0.5);
}

.setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-info {
    flex: 1;
}

.setting-info strong {
    display: block;
    font-size: 15px;
    color: #e9edef;
    margin-bottom: 4px;
}

.setting-info small {
    font-size: 13px;
    color: #8696a0;
    line-height: 1.4;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #374045;
    border-radius: 28px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: #00a884;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-card {
    background: #111b21;
    border: 1px solid #2a3942;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 168, 132, 0.2);
    border-color: #00a884;
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    color: #00a884;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: #8696a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* About Info */
.about-info {
    background: #111b21;
    border: 1px solid #2a3942;
    border-radius: 12px;
    padding: 20px;
}

.about-info p {
    margin-bottom: 8px;
    color: #e9edef;
    font-size: 14px;
}

.about-info p:last-child {
    margin-bottom: 0;
}

.text-muted {
    color: #8696a0 !important;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #00a884;
    color: white;
    padding: 14px 24px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    z-index: 3000;
    font-size: 15px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.notification-success {
    background: linear-gradient(135deg, #00a884 0%, #00d9a8 100%);
}

.notification-error {
    background: linear-gradient(135deg, #ff6f00 0%, #ff9800 100%);
}

.notification-info {
    background: linear-gradient(135deg, #0088cc 0%, #00b4ff 100%);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.9);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* New Message Animation */
.message.new-message {
    animation: messageSlideIn 0.4s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Smart Poll - New Message Animation */
.message.new-message-animated {
    animation: messageBounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes messageBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(50px);
    }
    50% {
        transform: scale(1.05) translateY(-10px);
    }
    70% {
        transform: scale(0.95) translateY(5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Smart Poll - Notification */
.floating-notification-poll {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #00d9a8 0%, #00a884 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 216, 168, 0.5);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

.floating-notification-poll .notification-icon {
    font-size: 24px;
}

.floating-notification-poll .notification-text {
    font-size: 15px;
}

/* Message with data-message-id attribute */
.message[data-message-id] {
    transition: all 0.3s ease;
}

/* Highlight new message briefly */
.message.new-message-animated .message-bubble {
    box-shadow: 0 4px 20px rgba(0, 168, 132, 0.6);
    animation: glow 1s ease-in-out;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 168, 132, 0.6);
    }
}

/* Compact Mode */
body.compact-mode {
    font-size: 13px;
}

body.compact-mode .conversation-item {
    padding: 12px 16px;
}

body.compact-mode .avatar {
    width: 45px;
    height: 45px;
    font-size: 18px;
}

body.compact-mode .contact-name {
    font-size: 15px;
}

body.compact-mode .last-message {
    font-size: 13px;
}

body.compact-mode .message-bubble {
    padding: 8px 12px;
}

body.compact-mode .message-text {
    font-size: 14px;
}

/* Polling Status Indicator */
.polling-status-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 168, 132, 0.1);
    border: 2px solid #00a884;
    border-radius: 25px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #e9edef;
    z-index: 2500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease;
    transition: opacity 0.3s ease;
}

.polling-status-indicator .status-icon {
    font-size: 16px;
    animation: pulse 2s infinite;
}

.polling-status-indicator .status-text {
    white-space: nowrap;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}
