/* Admin UI Styling */
:root {
    --bs-primary-rgb: 37, 99, 235;
    --app-bg: #f8fafc;
    --card-border: #e2e8f0;
}

body {
    background-color: var(--app-bg);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.admin-top-navbar {
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-top: 10px;
    padding-bottom: 10px;
}
.admin-top-navbar .nav-link {
    color: #94a3b8;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 6px 14px !important;
    border-radius: 20px;
    transition: all 0.15s ease;
}
.admin-top-navbar .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}
.admin-top-navbar .nav-link.active {
    color: #ffffff !important;
    background: rgba(0, 168, 132, 0.22) !important;
    border: 1px solid rgba(0, 168, 132, 0.45);
    font-weight: 600;
}

.card {
    border: 1px solid var(--card-border);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.stat-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

/* Modern 2026 Executive Dashboard Styling */
.dash-greeting-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2);
}
.dash-greeting-card::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 168, 132, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.dash-hero-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 22px;
    position: relative;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.dash-hero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.1);
    border-color: #cbd5e1;
}

.dash-icon-box {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    flex-shrink: 0;
}
.dash-icon-box.revenue {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #15803d;
}
.dash-icon-box.profit {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4338ca;
}
.dash-icon-box.cost {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #b91c1c;
}
.dash-icon-box.orders {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
}

.dash-preset-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.dash-preset-pill:hover,
.dash-preset-pill.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.dash-chart-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 24px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.quick-action-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.15s ease;
}
.quick-action-link:hover {
    background: #ffffff;
    border-color: #00a884;
    color: #075e54;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 168, 132, 0.12);
}

.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    background-color: #f8fafc;
}

/* Split-View Messaging Desk Layout */
.ticket-desk-container {
    display: flex;
    height: calc(100vh - 105px);
    background: #fff;
    border-radius: 12px;
    border: 1px solid #d1d7db;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(11, 20, 26, 0.06);
}

/* WhatsApp Web-Style Messaging Desk */
.ticket-sidebar {
    width: 360px;
    min-width: 320px;
    max-width: 380px;
    border-right: 1px solid #d1d7db;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    height: 100%;
}

.ticket-list {
    overflow-y: auto;
    flex: 1;
}

.ticket-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}
.ticket-item:hover {
    background-color: #f5f6f6;
}
.ticket-item.active {
    background-color: #f0f2f5;
    border-left: 4px solid #00a884;
}

.wa-sidebar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #dfe5e7;
    color: #54656f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.ticket-item.active .wa-sidebar-avatar {
    background: #00a884;
    color: #ffffff;
}

.ticket-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #efeae2;
    min-width: 0;
    height: 100%;
}

.wa-banners-strip {
    background: #ffffff;
    border-bottom: 1px solid #d1d7db;
    max-height: 180px;
    overflow-y: auto;
}

/* WhatsApp Classic Wallpaper Pattern (Pure CSS Doodle Effect) */
.ticket-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 28px;
    background-color: #efeae2;
    background-image: 
        radial-gradient(#d5cdbf 0.75px, transparent 0.75px), 
        radial-gradient(#d5cdbf 0.75px, #efeae2 0.75px);
    background-size: 28px 28px;
    background-position: 0 0, 14px 14px;
}

/* WhatsApp Web Bottom Reply Bar */
.ticket-reply-area {
    padding: 10px 16px;
    border-top: 1px solid #d1d7db;
    background: #f0f2f5;
}

/* Chat Messages (WhatsApp Bubbles) */
.chat-bubble-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.chat-bubble {
    max-width: 70%;
    padding: 8px 12px 6px 12px;
    border-radius: 7.5px;
    font-size: 0.92rem;
    line-height: 1.42;
    position: relative;
    word-break: break-word;
    box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

/* Customer / User Message (Left White Bubble) */
.chat-bubble.sender-user {
    align-self: flex-start;
    background: #ffffff;
    color: #111b21;
    border-top-left-radius: 0;
    border: none;
}

/* Automated Bot Message (Left Subtle Cream Bubble) */
.chat-bubble.sender-bot {
    align-self: flex-start;
    background: #f7f9fa;
    color: #111b21;
    border-top-left-radius: 0;
    border: 1px solid #e9edef;
}

/* Staff Operator Message (Right WhatsApp Green Bubble) */
.chat-bubble.sender-admin {
    align-self: flex-end;
    background: #d9fdd3;
    color: #111b21;
    border-top-right-radius: 0;
    border: none;
}

.chat-receipt-thumb {
    max-width: 240px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: opacity 0.2s;
}
.chat-receipt-thumb:hover {
    opacity: 0.88;
}

/* WhatsApp Message Three-Dots Trigger & Menu */
.msg-menu-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    background: transparent !important;
    color: #667781 !important;
    transition: all 0.15s ease;
    padding: 0;
}
.msg-menu-btn:hover,
.msg-menu-btn:focus {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #111b21 !important;
}

.msg-menu-btn i {
    font-size: 0.95rem !important;
}

.msg-dropdown-menu {
    min-width: 170px;
    padding: 6px;
    border-radius: 8px;
    background: #ffffff !important;
    border: 1px solid #e9edef !important;
    box-shadow: 0 4px 16px rgba(11, 20, 26, 0.18) !important;
}
.msg-dropdown-menu .dropdown-item {
    color: #111b21 !important;
    font-size: 0.85rem !important;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s ease;
}
.msg-dropdown-menu .dropdown-item i {
    font-size: 0.95rem !important;
    color: #54656f !important;
}
.msg-dropdown-menu .dropdown-item:hover {
    background: #f0f2f5 !important;
    color: #111b21 !important;
}
.msg-dropdown-menu .dropdown-item.item-delete {
    color: #ea0038 !important;
}
.msg-dropdown-menu .dropdown-item.item-delete i {
    color: #ea0038 !important;
}
.msg-dropdown-menu .dropdown-item.item-delete:hover {
    background: #ffebe8 !important;
    color: #ea0038 !important;
}

/* WhatsApp Document & File Card */
.chat-doc-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 5px;
    margin-bottom: 5px;
    max-width: 360px;
}
.chat-bubble.sender-user .chat-doc-card,
.chat-bubble.sender-bot .chat-doc-card {
    background: #f0f2f5;
    border-color: #e9edef;
}
.chat-doc-icon {
    font-size: 1.7rem;
    line-height: 1;
}
.chat-doc-info {
    flex: 1;
    min-width: 0;
}
.chat-doc-name {
    font-weight: 600;
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #111b21;
}
.chat-doc-meta {
    font-size: 0.72rem;
    color: #667781;
}

/* WhatsApp Floating Action Chips & Input Pill */
.wa-quick-btn {
    border-radius: 18px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 12px;
    border: 1px solid #c1c7c9;
    background: #ffffff;
    color: #111b21;
    transition: all 0.15s ease;
}
.wa-quick-btn:hover {
    background: #e7ffdb;
    border-color: #00a884;
    color: #075e54;
}

.wa-input-pill {
    background: #ffffff !important;
    border-radius: 24px !important;
    border: 1px solid #e9edef !important;
    padding: 10px 18px !important;
    font-size: 0.93rem !important;
    color: #111b21 !important;
    resize: none;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}
.wa-input-pill:focus {
    border-color: #00a884 !important;
    box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.2) !important;
}

.wa-btn-clip, .wa-btn-camera {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #54656f;
    transition: all 0.15s ease;
    cursor: pointer;
}
.wa-btn-clip:hover, .wa-btn-camera:hover {
    background: #e9edef;
    color: #111b21;
}

.wa-btn-send {
    width: auto !important;
    min-width: 95px !important;
    height: 44px !important;
    padding: 0 20px !important;
    border-radius: 22px !important;
    background: #00a884 !important;
    border: none !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.15s ease !important;
}
.wa-btn-send:hover {
    background: #008069 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(0, 168, 132, 0.3) !important;
}
.wa-btn-send:active {
    transform: translateY(0) !important;
}
.wa-btn-send i {
    font-size: 1rem !important;
    line-height: 1 !important;
    margin: 0 !important;
    display: inline-flex !important;
}
.wa-btn-send span {
    line-height: 1 !important;
    display: inline-block !important;
}

.wa-chat-header {
    background: #f0f2f5;
    border-bottom: 1px solid #d1d7db;
    padding: 10px 18px;
}

/* Selected Attachment Preview in Reply Box */
.attachment-preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    margin-bottom: 8px;
}

/* Badges */
.badge-unpaid { background-color: #f59e0b; color: #fff; }
.badge-verifying { background-color: #6366f1; color: #fff; }
.badge-paid { background-color: #10b981; color: #fff; }
.badge-rejected { background-color: #ef4444; color: #fff; }

.badge-pending { background-color: #94a3b8; color: #fff; }
.badge-in_progress { background-color: #3b82f6; color: #fff; }
.badge-completed { background-color: #059669; color: #fff; }
.badge-cancelled { background-color: #64748b; color: #fff; }

/* =========================================================
   UNIVERSAL MOBILE & DEVICE RESPONSIVENESS
   Ensures seamless experience across Smartphones, Tablets, and Desktops
   ========================================================= */

/* Top Navigation Bar on Tablets & Phones (< 992px) */
@media (max-width: 991.98px) {
    .admin-top-navbar .navbar-collapse {
        background: #0f172a;
        padding: 16px 14px;
        border-radius: 12px;
        margin-top: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }
    .admin-top-navbar .nav-link {
        padding: 9px 14px !important;
        margin-bottom: 4px;
        font-size: 0.92rem;
    }
}

/* WhatsApp-Style Messaging Desk for Tablets & Mobile (< 992px) */
@media (max-width: 991.98px) {
    .ticket-desk-container {
        height: calc(100dvh - 72px) !important;
        min-height: 480px;
        position: relative;
        overflow: hidden;
        border-radius: 8px;
        flex-direction: column;
    }

    /* By default on mobile: Show full-width ticket sidebar list */
    .ticket-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        border-right: none;
        display: flex !important;
    }

    /* By default on mobile: Hide the chat pane until a ticket is selected */
    .ticket-main {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        background: #efeae2;
        display: none !important;
        flex: 1 1 auto !important;
    }

    /* When mobile-show-chat is applied: Switch to full-width active chat */
    .ticket-desk-container.mobile-show-chat .ticket-sidebar {
        display: none !important;
    }

    .ticket-desk-container.mobile-show-chat .ticket-main {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
    }

    /* Chat header styling on mobile */
    .wa-chat-header {
        padding: 8px 12px;
        flex-shrink: 0;
    }

    .mobile-back-btn {
        width: 36px !important;
        height: 36px !important;
        color: #111b21 !important;
        background: transparent !important;
        border: none !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
    }

    /* Chat Body & Bubbles on Mobile */
    .ticket-chat-body {
        padding: 12px 10px;
    }

    .chat-bubble {
        max-width: 88%;
        font-size: 0.88rem;
        padding: 7px 10px 5px 10px;
    }

    /* Reply area controls on mobile */
    .ticket-reply-area {
        padding: 8px 8px;
    }

    .wa-quick-btn {
        font-size: 0.74rem;
        padding: 3px 9px;
    }

    .ticket-item {
        cursor: pointer !important;
        user-select: none;
        -webkit-tap-highlight-color: rgba(0, 168, 132, 0.2);
        touch-action: manipulation;
    }

    .wa-btn-send {
        width: auto !important;
        min-width: 90px !important;
        height: 42px !important;
        padding: 0 18px !important;
        border-radius: 24px !important;
        font-size: 0.92rem !important;
        overflow: visible !important;
    }

    .wa-input-pill {
        padding: 8px 12px !important;
        font-size: 0.88rem !important;
    }

    .wa-btn-clip, .wa-btn-camera {
        width: 38px;
        height: 38px;
    }
}

/* Extra Small Mobile Screens (< 576px) */
@media (max-width: 575.98px) {
    .container-fluid {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .ticket-desk-container {
        height: calc(100dvh - 90px);
        border-radius: 8px;
    }

    .chat-bubble {
        max-width: 93%;
    }

    .chat-doc-card {
        max-width: 100%;
        padding: 6px 8px;
        gap: 8px;
    }

    .chat-receipt-thumb {
        max-width: 170px;
    }

    .dash-greeting-card {
        padding: 16px 14px;
        border-radius: 12px;
    }

    .dash-greeting-card h2 {
        font-size: 1.25rem;
    }

    .dash-hero-card {
        padding: 14px;
        border-radius: 12px;
    }

    .dash-icon-box {
        width: 40px;
        height: 40px;
        font-size: 1.15rem;
    }

    .dash-preset-pill {
        font-size: 0.74rem;
        padding: 3px 8px;
    }

    /* Clean Responsive Table spacing */
    .table th, .table td {
        padding: 8px 8px;
        font-size: 0.82rem;
    }
}

/* ==========================================================================
   Admin Navigation Sidebar Layout & Components
   ========================================================================== */
.admin-layout-wrapper {
    display: flex;
    min-height: calc(100vh - 58px);
    width: 100%;
    position: relative;
}

.admin-sidebar {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    background: #0f172a;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    position: sticky;
    top: 58px;
    height: calc(100vh - 58px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Enable smooth transitions only after DOM is ready */
body.sidebar-ready .admin-sidebar {
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-sidebar::-webkit-scrollbar {
    width: 5px;
}
.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.admin-content-area {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--app-bg);
}

/* Desktop Sidebar Toggle: Instant non-flickering closed state */
@media (min-width: 992px) {
    html.sidebar-collapsed .admin-sidebar,
    body.sidebar-collapsed .admin-sidebar {
        margin-left: -250px !important;
    }
}

/* Mobile Sidebar Offcanvas */
@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        min-width: 280px;
        max-width: 280px;
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
        z-index: 1050;
    }
    body.sidebar-mobile-open .admin-sidebar {
        transform: translateX(0);
    }
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(2px);
    z-index: 1045;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
body.sidebar-mobile-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Navigation Items */
.sidebar-nav-heading {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 16px 20px 6px;
}

.sidebar-nav-list {
    list-style: none;
    padding: 0 10px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-radius: 10px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s ease;
    position: relative;
}

.sidebar-nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-nav-link.active {
    color: #ffffff !important;
    background: rgba(0, 168, 132, 0.2) !important;
    border: 1px solid rgba(0, 168, 132, 0.45);
    font-weight: 600;
}

.sidebar-nav-link i {
    font-size: 1.15rem;
    line-height: 1;
    color: #94a3b8;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.sidebar-nav-link:hover i {
    color: #ffffff;
}

.sidebar-nav-link.active i {
    color: #00a884 !important;
}

.sidebar-footer-card {
    margin: auto 12px 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.btn-sidebar-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.btn-sidebar-toggle:hover {
    background: rgba(0, 168, 132, 0.16);
    color: #00a884;
    border-color: rgba(0, 168, 132, 0.45);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 168, 132, 0.2);
}
.btn-sidebar-toggle:active {
    transform: translateY(0);
}
.sidebar-modern-svg {
    transition: transform 0.2s ease;
}
.btn-sidebar-toggle:hover .sidebar-modern-svg {
    transform: scale(1.08);
}

/* WhatsApp-Style Unread Chat & Pulse Animations */
.ticket-item.ticket-has-unread {
    background-color: #f0fdf4 !important;
    border-left: 4px solid #ef4444 !important;
}
.ticket-item.ticket-has-unread:hover {
    background-color: #e2fbe8 !important;
}
.ticket-item.ticket-item-pulse {
    animation: ticketPulse 2.2s ease-in-out;
}
@keyframes ticketPulse {
    0% { background-color: #fef08a !important; transform: scale(1.01); }
    40% { background-color: #fef9c3 !important; }
    100% { }
}
.order-row-unread {
    background-color: #fffbeb !important;
    border-left: 3px solid #f59e0b !important;
}
.order-row-pulse {
    animation: orderRowPulse 2.2s ease-in-out;
}
@keyframes orderRowPulse {
    0% { background-color: #fef08a !important; }
    50% { background-color: #fef9c3 !important; }
    100% { }
}

/* WhatsApp-Style Typing Bubble & 3 Bouncing Dots */
.wa-typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #ffffff;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(11, 20, 26, 0.12);
    border: 1px solid #e9edef;
    margin: 6px 0;
    max-width: fit-content;
    animation: waFadeIn 0.25s ease-in-out;
}
.wa-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 14px;
}
.wa-typing-dot {
    width: 6.5px;
    height: 6.5px;
    border-radius: 50%;
    background-color: #00a884;
    display: inline-block;
    animation: waDotBounce 1.4s infinite ease-in-out both;
}
.wa-typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}
.wa-typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}
.wa-typing-dot:nth-child(3) {
    animation-delay: 0s;
}
@keyframes waDotBounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.35;
    }
    40% {
        transform: translateY(-5px);
        opacity: 1;
    }
}
@keyframes waFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
