/* =========================================================
   WHATSAPP WEB PIXEL-PERFECT THEME & DESIGN SYSTEM
   ========================================================= */

:root {
    --bg-app: #111b21;
    --bg-sidebar: #111b21;
    --bg-header: #202c33;
    --bg-search: #202c33;
    --bg-search-input: #111b21;
    --bg-chat: #0b141a;
    --bg-footer: #202c33;
    --bg-panel: #233138;
    --bg-panel-hover: #182229;
    --bg-active: #182229;
    
    /* Message Bubble Colors */
    --bubble-outgoing: #005c4b;
    --bubble-incoming: #202c33;
    --bubble-outgoing-tail: #005c4b;
    --bubble-incoming-tail: #202c33;
    
    /* Text & Accents */
    --text-primary: #e9edef;
    --text-secondary: #8696a0;
    --text-muted: #667781;
    --brand-green: #00a884;
    --brand-green-hover: #02906f;
    --accent-blue-tick: #53bdeb;
    --badge-green: #00a884;
    
    /* Borders & Highlights */
    --border-color: rgba(134, 150, 160, 0.15);
    --hover-bg: #202c33;
    --active-chat-bg: #2a3942;
    --modal-overlay-bg: rgba(11, 20, 26, 0.85);
    --modal-card-bg: #222e35;
    
    --shadow-subtle: 0 1px 3px rgba(0,0,0,0.4);
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.light-theme {
    --bg-app: #f0f2f5;
    --bg-sidebar: #ffffff;
    --bg-header: #f0f2f5;
    --bg-search: #ffffff;
    --bg-search-input: #f0f2f5;
    --bg-chat: #efeae2;
    --bg-footer: #f0f2f5;
    --bg-panel: #ffffff;
    --bg-panel-hover: #f5f6f6;
    --bg-active: #ebebeb;
    
    --bubble-outgoing: #d9fdd3;
    --bubble-incoming: #ffffff;
    
    --text-primary: #111b21;
    --text-secondary: #667781;
    --text-muted: #8696a0;
    --border-color: #e9edef;
    --hover-bg: #f5f6f6;
    --active-chat-bg: #ebebeb;
    --modal-card-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: var(--bg-app);
    color: var(--text-primary);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(134, 150, 160, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(134, 150, 160, 0.5);
}

/* =========================================================
   MAIN APP CONTAINER
   ========================================================= */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    max-width: 100%;
    position: relative;
    background: var(--bg-app);
}

/* =========================================================
   LEFT SIDEBAR
   ========================================================= */
.sidebar {
    width: 32%;
    min-width: 340px;
    max-width: 460px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    z-index: 10;
}

/* Header */
.sidebar-header {
    height: 60px;
    padding: 10px 16px;
    background-color: var(--bg-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #6a7f8a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    overflow: hidden;
    user-select: none;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #e53935;
}

.status-dot.online {
    background-color: var(--brand-green);
    box-shadow: 0 0 8px var(--brand-green);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Search Section */
.search-section {
    padding: 8px 12px;
    background-color: var(--bg-search);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: var(--bg-search-input);
    border-radius: 8px;
    padding: 0 12px;
    height: 36px;
    position: relative;
}

.search-icon {
    color: var(--text-muted);
    margin-right: 12px;
    flex-shrink: 0;
}

.search-box input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.btn-clear-search {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
}

.chat-filters {
    display: flex;
    gap: 8px;
}

.filter-chip {
    padding: 4px 12px;
    border-radius: 16px;
    background: var(--bg-search-input);
    color: var(--text-secondary);
    border: 1px solid transparent;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip.active, .filter-chip:hover {
    background: var(--brand-green);
    color: #fff;
}

/* Chat List */
.chat-list {
    flex: 1;
    overflow-y: auto;
    background-color: var(--bg-sidebar);
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s ease;
    position: relative;
    user-select: none;
}

.chat-item:hover {
    background-color: var(--hover-bg);
}

.chat-item.active {
    background-color: var(--active-chat-bg);
}

.chat-item-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 14px;
    flex-shrink: 0;
}

.chat-item-content {
    flex: 1;
    min-width: 0;
}

.chat-item-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.chat-item-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 6px;
    flex-shrink: 0;
}

.chat-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-item-preview {
    font-size: 13.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.unread-badge {
    background-color: var(--badge-green);
    color: #111b21;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    text-align: center;
    margin-left: 6px;
}

.loading-chats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* =========================================================
   RIGHT MAIN CHAT AREA
   ========================================================= */
.chat-area {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-chat);
    overflow: hidden;
}

/* Welcome Placeholder */
.welcome-screen {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    background-color: var(--bg-header);
    border-bottom: 6px solid var(--brand-green);
}

.welcome-content {
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.welcome-content h2 {
    font-size: 32px;
    font-weight: 300;
    color: var(--text-primary);
}

.welcome-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
    text-align: left;
    background: rgba(255,255,255,0.03);
    padding: 16px;
    border-radius: 8px;
    width: 100%;
}

.feature-item {
    font-size: 13px;
    color: var(--text-primary);
}

.welcome-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 24px;
}

/* Active Chat Screen */
.active-chat-wrapper {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Chat Header */
.chat-header {
    height: 60px;
    min-width: 0;
    padding: 10px 16px;
    background-color: var(--bg-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    z-index: 5;
}

.chat-header-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    min-width: 0;
}

.chat-avatar {
    margin-right: 14px;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.contact-status {
    font-size: 12px;
    color: var(--text-secondary);
}
.contact-status.online {
    color: var(--brand-green);
}

/* Messages Container */
.messages-container {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 28px;
    position: relative;
    background-color: var(--bg-chat);
    /* Authentic WhatsApp Doodle Pattern */
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 0);
    background-size: 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
}

.messages-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: min-content;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    box-sizing: border-box;
}

/* Date Divider */
.date-divider {
    align-self: center;
    margin-left: auto;
    margin-right: auto;
    background-color: var(--bg-header);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    margin-top: 14px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-subtle);
    user-select: none;
}

/* System Message Badge */
.system-msg-badge {
    align-self: center;
    margin-left: auto;
    margin-right: auto;
    background-color: rgba(17, 27, 33, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 400;
    padding: 5px 14px;
    border-radius: 7px;
    margin-top: 6px;
    margin-bottom: 6px;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 16px;
}

/* Message Bubble */
.message-bubble {
    max-width: 65%;
    min-width: 80px;
    padding: 6px 9px 8px 9px;
    border-radius: 8px;
    font-size: 14.2px;
    line-height: 19px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
    margin-bottom: 2px;
}

.message-bubble.has-image {
    padding: 4px 4px 6px 4px;
    max-width: 348px;
    width: fit-content;
}

.message-bubble.has-audio {
    padding: 6px 8px 6px 8px;
    max-width: 360px;
    min-width: 260px;
    width: fit-content;
}

.message-bubble.incoming {
    align-self: flex-start;
    margin-right: auto;
    margin-left: 0;
    background-color: var(--bubble-incoming);
    color: var(--text-primary);
    border-top-left-radius: 0;
}

.message-bubble.outgoing {
    align-self: flex-end;
    margin-left: auto;
    margin-right: 0;
    background-color: var(--bubble-outgoing);
    color: var(--text-primary);
    border-top-right-radius: 0;
}

.msg-sender {
    font-size: 12.5px;
    font-weight: 600;
    margin: 2px 4px 6px 4px;
    user-select: none;
    cursor: default;
    line-height: 15px;
    letter-spacing: 0.2px;
}

.msg-text {
    white-space: pre-wrap;
    user-select: text;
    padding: 0 2px;
}

.msg-text.msg-caption {
    padding: 4px 6px 2px 6px;
    font-size: 14px;
    line-height: 19px;
}

.msg-revoked-text {
    font-style: italic;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    user-select: none;
}

.msg-revoked-text svg {
    opacity: 0.65;
    flex-shrink: 0;
}

.msg-meta {
    float: right;
    margin-left: 8px;
    margin-top: 4px;
    padding-right: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    user-select: none;
}

.msg-status-icon {
    display: flex;
    align-items: center;
}

.msg-status-icon.read {
    color: var(--accent-blue-tick);
}

/* PDF Document Message Card */
.pdf-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.15);
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pdf-icon-box {
    width: 40px;
    height: 48px;
    background: #e53935;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pdf-info {
    flex: 1;
    min-width: 0;
}

.pdf-name {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-sub {
    font-size: 11px;
    color: var(--text-secondary);
}

.btn-download-pdf {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-download-pdf:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Image Message */
.msg-media-container {
    width: 100%;
    max-width: 340px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 3px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-preview {
    width: 100%;
    max-width: 340px;
    max-height: 400px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    cursor: pointer;
    background-color: #0b141a;
    transition: opacity 0.15s ease;
}

.img-preview:hover {
    opacity: 0.95;
}

/* Scroll Bottom Button */
.btn-scroll-bottom {
    position: absolute;
    bottom: 80px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-header);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.btn-scroll-bottom:hover {
    transform: scale(1.05);
    color: var(--text-primary);
}

/* Chat Footer / Input Bar */
.chat-footer {
    min-height: 62px;
    padding: 8px 16px;
    background-color: var(--bg-footer);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    border-top: 1px solid var(--border-color);
}

.footer-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.message-input-wrapper {
    flex: 1;
    background-color: var(--bg-search-input);
    border-radius: 8px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
}

.message-input-wrapper textarea {
    width: 100%;
    max-height: 100px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
    resize: none;
    line-height: 20px;
}

.btn-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--brand-green);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
}

.btn-send:hover {
    background-color: var(--brand-green-hover);
}

.btn-send:active {
    transform: scale(0.95);
}

/* Attachment Popup */
.attachment-popup {
    position: absolute;
    bottom: 70px;
    left: 20px;
    background-color: var(--modal-card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 20;
    border: 1px solid var(--border-color);
    animation: popupFade 0.15s ease-out;
}

@keyframes popupFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s;
    text-align: left;
    width: 100%;
}

.attachment-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.attachment-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-bg { background: #5f66cd; }
.photo-bg { background: #007bfc; }

/* =========================================================
   MODALS & OVERLAYS
   ========================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--modal-overlay-bg);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background-color: var(--modal-card-bg);
    width: 90%;
    max-width: 480px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 16px 20px;
    background-color: var(--bg-header);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.btn-close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-body label {
    font-size: 13px;
    font-weight: 500;
    color: var(--brand-green);
}

.modal-body input[type="text"], .modal-body textarea {
    width: 100%;
    background-color: var(--bg-search-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.modal-body input[type="text"]:focus, .modal-body textarea:focus {
    border-color: var(--brand-green);
}

.hint-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.modal-attachment-option {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.modal-footer {
    padding: 14px 20px;
    background-color: var(--bg-header);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border-color);
}

.btn-primary {
    background-color: var(--brand-green);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.btn-primary:hover {
    background-color: var(--brand-green-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* QR Code Overlay Card */
.qr-card {
    background-color: var(--modal-card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    padding: 36px;
    max-width: 780px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--brand-green);
    margin-bottom: 8px;
}

.qr-card-header h2 {
    font-size: 26px;
    font-weight: 300;
}

.qr-card-body {
    display: flex;
    gap: 40px;
    align-items: center;
}

.qr-instructions {
    flex: 1;
}

.qr-instructions ol {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.qr-instructions li strong {
    color: var(--text-primary);
}

.qr-image-wrapper {
    width: 260px;
    height: 260px;
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#qrCodeImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-loader {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #333;
    font-size: 12px;
}

/* Spinner */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 168, 132, 0.2);
    border-top-color: var(--brand-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Breakpoint */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        max-width: 100%;
    }
    .chat-area {
        display: none;
    }
    .qr-card-body {
        flex-direction: column;
    }
}


/* ======================================================== */
/* Contact Info Drawer & Avatar Enhancements */
/* ======================================================== */
.clickable-header {
    cursor: pointer;
    transition: background 0.15s ease;
    padding: 6px 10px;
    border-radius: 8px;
}
.clickable-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.contact-info-drawer {
    width: 380px;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.25s ease;
    animation: slideInRight 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.drawer-header {
    height: 60px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
}
.drawer-header h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drawer-profile-card {
    background: var(--bg-panel);
    border-radius: 12px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.drawer-avatar-wrapper {
    margin-bottom: 14px;
}
.drawer-avatar {
    width: 120px;
    height: 120px;
    font-size: 48px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.avatar-img-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.drawer-name {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.drawer-pushname {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.drawer-phone-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    background: var(--bg-header);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}
.drawer-phone {
    font-size: 14px;
    font-weight: 500;
    color: var(--brand-green);
    letter-spacing: 0.5px;
}

.btn-copy {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
    padding: 2px;
}
.btn-copy:hover {
    color: var(--text-primary);
}
.copy-tooltip {
    font-size: 11px;
    color: var(--text-secondary);
}

.drawer-section {
    background: var(--bg-panel);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.drawer-section-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--brand-green);
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}
.drawer-about-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
}

.drawer-action-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.drawer-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-header);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}
.drawer-action-btn:hover {
    background: var(--bg-active);
}
.drawer-action-btn.warning-action:hover {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}
.drawer-action-btn.danger-action {
    color: #ef4444;
}
.drawer-action-btn.danger-action:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}
.action-icon {
    font-size: 16px;
}

.security-section .security-badge {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.security-badge h4 {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.security-badge p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}


/* ======================================================== */
/* Live ACK Ticks & Read Receipts */
/* ======================================================== */
.msg-status-icon {
    display: inline-flex;
    align-items: center;
    color: #8696a0;
    transition: color 0.2s ease;
}
.msg-status-icon.read {
    color: #53bdeb !important;
}

/* ======================================================== */
/* Quoted Reply Previews & Message Context Menu */
/* ======================================================== */
.message-bubble {
    position: relative;
}
.message-bubble.menu-open {
    z-index: 150 !important;
}

.btn-msg-dropdown {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(11, 20, 26, 0.65);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    color: #8696a0;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-msg-dropdown:hover {
    background: rgba(11, 20, 26, 0.95);
    color: #e9edef;
}

.message-bubble:hover .btn-msg-dropdown,
.message-bubble.menu-open .btn-msg-dropdown {
    display: flex;
}

.msg-dropdown-menu {
    position: absolute;
    top: 28px;
    background-color: #233138 !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    min-width: 185px;
    overflow: hidden;
    padding: 6px 0;
    animation: fadeInDropdown 0.12s cubic-bezier(0.2, 0, 0, 1);
    user-select: none;
}

/* Outgoing bubbles (right-aligned): open inwards towards left */
.message-bubble.outgoing .msg-dropdown-menu {
    right: 4px;
    left: auto;
}

/* Incoming bubbles (left-aligned): open inwards towards right */
.message-bubble.incoming .msg-dropdown-menu {
    left: 4px;
    right: auto;
}

/* When near bottom of viewport, open upwards */
.message-bubble.menu-open-up .msg-dropdown-menu {
    top: auto;
    bottom: 28px;
}

body.light-theme .msg-dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.08);
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 18px;
    font-size: 14px;
    color: #d1d7db;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
    user-select: none;
    white-space: nowrap;
}

.dropdown-item .dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8696a0;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.dropdown-item:hover {
    background-color: #182229;
    color: #e9edef;
}

.dropdown-item:hover .dropdown-icon {
    color: #e9edef;
}

body.light-theme .dropdown-item {
    color: #3b4a54;
}

body.light-theme .dropdown-item .dropdown-icon {
    color: #667781;
}

body.light-theme .dropdown-item:hover {
    background-color: #f5f6f6;
    color: #111b21;
}

body.light-theme .dropdown-item:hover .dropdown-icon {
    color: #111b21;
}

.dropdown-item.item-delete-everyone,
.dropdown-item.item-delete-me {
    color: #ea4335 !important;
}

.dropdown-item.item-delete-everyone .dropdown-icon,
.dropdown-item.item-delete-me .dropdown-icon {
    color: #ea4335 !important;
}

.dropdown-item.item-delete-everyone:hover,
.dropdown-item.item-delete-me:hover {
    background-color: rgba(234, 67, 53, 0.12) !important;
    color: #ff6b6b !important;
}

.quoted-bubble-preview {
    background: rgba(0,0,0,0.15);
    border-left: 3px solid var(--brand-green);
    border-radius: 4px;
    padding: 4px 8px;
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
}
.quoted-sender {
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-green);
}
.quoted-body {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reply-preview-bar {
    display: flex;
    align-items: center;
    background: var(--bg-panel);
    border-left: 4px solid var(--brand-green);
    border-top: 1px solid var(--border-color);
    padding: 8px 14px;
    gap: 10px;
}
.reply-preview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.reply-sender {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-green);
}
.reply-text {
    font-size: 12px;
    color: var(--text-muted);
}
.btn-close-reply {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
}

/* ======================================================== */
/* Authentic WhatsApp Web Voice Recording Bar */
/* ======================================================== */
.recording-bar {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    background-color: #202c33;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 4px 6px 4px 12px;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    animation: fadeInRec 0.15s ease-out;
}

body.light-theme .recording-bar {
    background-color: #ffffff;
    border: 1px solid #e9edef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

@keyframes fadeInRec {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.rec-left-space {
    flex: 0 0 4px;
}

.btn-rec-action {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.btn-rec-action:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

body.light-theme .btn-rec-action:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

.btn-cancel-rec:hover {
    color: #ea4335 !important;
}

.btn-pause-rec {
    color: #ea4335;
}

.btn-pause-rec:hover {
    color: #ea4335;
    background-color: rgba(234, 67, 53, 0.1);
}

.rec-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.rec-dot {
    width: 10px;
    height: 10px;
    background-color: #ea4335;
    border-radius: 50%;
    animation: pulseDot 1s infinite ease-in-out;
    flex-shrink: 0;
}

.rec-dot.paused {
    animation: none;
    opacity: 0.4;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.5; }
}

.rec-timer {
    font-size: 14.5px;
    font-weight: 500;
    font-family: monospace, system-ui, sans-serif;
    color: var(--text-primary);
    min-width: 36px;
    user-select: none;
}

.rec-waveform-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5px;
    height: 24px;
    overflow: hidden;
}

.rec-bar {
    width: 3px;
    height: 6px;
    background-color: #8696a0;
    border-radius: 2px;
    transition: height 0.08s ease;
    min-height: 3px;
    max-height: 22px;
}

body.light-theme .rec-bar {
    background-color: #54656f;
}

.btn-send-rec {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--brand-green);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, transform 0.1s ease;
    flex-shrink: 0;
}

.btn-send-rec:hover {
    background-color: var(--brand-green-hover);
    transform: scale(1.05);
}

.btn-send-rec:active {
    transform: scale(0.95);
}

.audio-voice-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 4px;
    min-width: 250px;
    max-width: 320px;
    user-select: none;
}
.btn-audio-play {
    background: #00a884;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background 0.18s, transform 0.12s;
    box-shadow: 0 2px 8px rgba(0, 168, 132, 0.3);
}
.btn-audio-play:hover {
    background: #02906f;
    transform: scale(1.06);
}
.btn-audio-play:active {
    transform: scale(0.95);
}
/* Audio body: waveform + progress + meta */
.audio-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    cursor: pointer;
    padding: 2px 0;
}
/* Waveform bars */
.audio-waveform-bars {
    display: flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 30px;
    pointer-events: none;
}
.wv-bar {
    display: inline-block;
    width: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.42);
    min-height: 3px;
    transition: background 0.1s, opacity 0.1s;
}
.message-bubble.incoming .wv-bar {
    background: rgba(255, 255, 255, 0.45);
}
.message-bubble.outgoing .wv-bar {
    background: rgba(255, 255, 255, 0.55);
}
.audio-body:hover .wv-bar {
    opacity: 0.85;
}
/* Progress track below waveform */
.audio-progress-track {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}
.audio-progress {
    height: 100%;
    width: 0%;
    background: #00a884;
    border-radius: 2px;
    transition: width 0.1s linear;
}
/* Time meta row */
.audio-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.02em;
}
.audio-current-time,
.audio-duration {
    font-variant-numeric: tabular-nums;
}
.audio-mic-tag {
    font-size: 17px;
    flex-shrink: 0;
    line-height: 1;
    opacity: 0.85;
}
/* Old legacy class — kept for backward compat */
.audio-waveform-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    overflow: hidden;
}

/* ======================================================== */
/* Emoji Picker Tray (WhatsApp Web Pixel-Perfect Design) */
/* ======================================================== */
.emoji-picker-tray {
    position: absolute;
    bottom: 68px;
    left: 16px;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 340px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    z-index: 100;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: emojiTrayFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes emojiTrayFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.emoji-tray-header {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    background: var(--bg-header);
}

.emoji-search-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-search-input);
    border-radius: 8px;
    padding: 6px 10px;
    gap: 8px;
    border: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.emoji-search-wrapper:focus-within {
    border-color: var(--brand-green);
}

.emoji-search-wrapper svg {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.emoji-search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 13.5px;
    font-family: inherit;
}

.emoji-search-input::placeholder {
    color: var(--text-muted);
}

.emoji-categories-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 3px 6px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    gap: 2px;
}

.emoji-cat-tab {
    background: transparent;
    border: none;
    font-size: 16px;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    opacity: 0.65;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
}

.emoji-cat-tab:hover {
    background: var(--hover-bg);
    opacity: 0.95;
}

.emoji-cat-tab.active {
    background: var(--bg-active);
    opacity: 1;
    border-bottom: 2px solid var(--brand-green);
    border-radius: 6px 6px 2px 2px;
}

.emoji-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 6px 8px 12px;
    scroll-behavior: smooth;
}

.emoji-category-section {
    margin-bottom: 10px;
}

.emoji-category-title {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 6px 4px;
    user-select: none;
    position: sticky;
    top: -6px;
    background: var(--bg-panel);
    z-index: 2;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
}

.emoji-btn {
    background: transparent;
    border: none;
    width: 38px;
    height: 38px;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.12s ease, transform 0.1s ease;
    user-select: none;
    padding: 0;
    margin: 0;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
}

.emoji-btn:hover {
    background: var(--bg-active);
    transform: scale(1.2);
    z-index: 3;
}

.emoji-btn:active {
    transform: scale(0.92);
}

.emoji-no-results {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 40px 10px;
}

/* ======================================================== */
/* Lightbox & Info Modals */
/* ======================================================== */
.lightbox-overlay {
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.btn-close-lightbox {
    position: absolute;
    top: 20px;
    right: 25px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
}
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}
.info-lbl { font-size: 13px; color: var(--text-secondary); }
.info-val { font-size: 13.5px; font-weight: 500; color: var(--text-primary); }
.read-val { color: #53bdeb; }

/* ======================================================== */
/* User-Friendly Global Toast & Confirm Dialog Styles */
/* ======================================================== */
.app-global-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    background: #111b21;
    color: #e9edef;
    padding: 12px 22px;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0,0,0,0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 540px;
    width: max-content;
    max-width: calc(100vw - 40px);
    line-height: 1.4;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    user-select: none;
}

.app-global-toast.toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.app-global-toast .toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-global-toast .toast-text {
    flex: 1;
    word-break: break-word;
}

/* Success Toast */
.app-global-toast.toast-success {
    background: #0c231c;
    border-color: rgba(0, 168, 132, 0.4);
    color: #a7f3d0;
}
.app-global-toast.toast-success .toast-icon {
    color: #34d399;
}

/* Error Toast */
.app-global-toast.toast-error,
.app-global-toast.toast-danger {
    background: #251214;
    border-color: rgba(239, 68, 68, 0.4);
    color: #fecaca;
}
.app-global-toast.toast-error .toast-icon,
.app-global-toast.toast-danger .toast-icon {
    color: #f87171;
}

/* Warning Toast */
.app-global-toast.toast-warning {
    background: #251c0c;
    border-color: rgba(245, 158, 11, 0.4);
    color: #fef08a;
}
.app-global-toast.toast-warning .toast-icon {
    color: #fbbf24;
}

/* Info Toast */
.app-global-toast.toast-info {
    background: #111b21;
    border-color: rgba(83, 189, 235, 0.35);
    color: #e9edef;
}
.app-global-toast.toast-info .toast-icon {
    color: #53bdeb;
}

/* Light Theme Toast Support */
body.light-theme .app-global-toast {
    background: #ffffff;
    color: #111b21;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18), 0 1px 4px rgba(0,0,0,0.08);
    border: 1px solid rgba(0, 0, 0, 0.1);
}
body.light-theme .app-global-toast.toast-success {
    background: #ecfdf5;
    border-color: rgba(16, 185, 129, 0.3);
    color: #065f46;
}
body.light-theme .app-global-toast.toast-error,
body.light-theme .app-global-toast.toast-danger {
    background: #fef2f2;
    border-color: rgba(239, 68, 68, 0.3);
    color: #991b1b;
}
body.light-theme .app-global-toast.toast-warning {
    background: #fffbeb;
    border-color: rgba(245, 158, 11, 0.3);
    color: #92400e;
}
body.light-theme .app-global-toast.toast-info {
    background: #f0f9ff;
    border-color: rgba(2, 132, 199, 0.3);
    color: #075985;
}

/* Confirm Dialog Modal Button Styles */
.btn-danger-modal {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}
.btn-danger-modal:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

/* ======================================================== */
/* Official WhatsApp Web Splash Loading Screen */
/* ======================================================== */
.splash-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-app);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    pointer-events: all;
}

.splash-loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 480px;
    padding: 24px;
}

.splash-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--text-muted);
    opacity: 0.7;
}

.splash-wa-icon {
    width: 50px;
    height: 50px;
}

.splash-title {
    font-size: 17px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 22px;
    letter-spacing: -0.1px;
}

.splash-progress-track {
    width: 320px;
    max-width: 82vw;
    height: 3px;
    background-color: rgba(134, 150, 160, 0.22);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    margin-bottom: 28px;
}

.splash-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: var(--brand-green);
    border-radius: 2px;
    transition: width 0.35s ease-out;
}

.splash-progress-bar.indeterminate {
    width: 40%;
    animation: splashIndeterminateAnim 1.6s infinite cubic-bezier(0.65, 0.815, 0.735, 0.395);
}

@keyframes splashIndeterminateAnim {
    0% {
        left: -40%;
        width: 30%;
    }
    50% {
        left: 25%;
        width: 60%;
    }
    100% {
        left: 100%;
        width: 40%;
    }
}

.splash-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.2px;
    user-select: none;
}

.splash-lock-icon {
    color: var(--text-muted);
}

