

/* ===== extracted from original index.html ===== */

/* Styles existants conservés */
        * { font-family: 'Inter', sans-serif; margin: 0; padding: 0; box-sizing: border-box; }
        
        body {
            background: #ffffff;
            color: #000000;
            overflow-x: hidden;
            font-size: 0.9rem;
        }

        .page {
            display: none;
        }

        .page.active {
            display: block;
        }

        /* Boutons personnalisés */
        .btn-primary {
            background: #000000;
            color: #ffffff;
            transition: all 0.2s ease;
            font-size: 0.85rem;
        }
        .btn-primary:hover {
            background: #333333;
        }

        .btn-outline {
            border: 1px solid #000000;
            color: #000000;
            background: transparent;
            transition: all 0.2s ease;
            font-size: 0.85rem;
        }
        .btn-outline:hover {
            background: #000000;
            color: #ffffff;
        }

        /* Bouton rose pour Add Product */
        .btn-pink {
            background: linear-gradient(145deg, #ff69b4, #ff1493);
            color: white;
            font-weight: 600;
            border: none;
            box-shadow: 0 4px 12px rgba(255, 20, 147, 0.3);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            font-size: 0.85rem;
        }
        .btn-pink:hover {
            background: linear-gradient(145deg, #ff85c0, #ff1ca5);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(255, 20, 147, 0.5);
        }

        /* Bouton rose pour Select All et Product Management */
        .btn-rose {
            background: transparent;
            color: #ec4899;
            border: 1px solid #ec4899;
            transition: all 0.3s ease;
            font-size: 0.85rem;
        }
        .btn-rose:hover, .btn-rose.active {
            background: #ec4899;
            color: white;
            border-color: #ec4899;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
        }

        /* Bouton violet pour Distribution Center */
        .btn-violet {
            background: transparent;
            color: #8b5cf6;
            border: 1px solid #8b5cf6;
            transition: all 0.3s ease;
            font-size: 0.85rem;
        }
        .btn-violet:hover, .btn-violet.active {
            background: #8b5cf6;
            color: white;
            border-color: #8b5cf6;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
        }

        /* Bouton doré pour VIP */
        .btn-gold {
            background: linear-gradient(145deg, #daba05, #b67600);
            color: #000000;
            font-weight: 600;
            border: none;
            box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            font-size: 0.85rem;
        }
        .btn-gold:hover {
            background: linear-gradient(145deg, #FFE55C, #FFB347);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(255, 215, 0, 0.6);
        }

        /* Bouton Pickup (vert) */
        .btn-pickup {
            background: linear-gradient(145deg, #4CAF50, #45a049);
            color: white;
            font-weight: 600;
            border: none;
            box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
            transition: all 0.3s ease;
            font-size: 0.85rem;
        }
        .btn-pickup:hover {
            background: linear-gradient(145deg, #66bb6a, #4caf50);
            transform: translateY(-2px);
        }

        .btn-pickup-all {
            background: #2196F3;
            color: white;
            font-weight: 600;
            border: none;
            box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
            transition: all 0.3s ease;
            font-size: 0.85rem;
        }
        .btn-pickup-all:hover {
            background: #1976D2;
            transform: translateY(-2px);
        }

        .card {
            background: #ffffff;
            border: 1px solid #e5e7eb;
            transition: all 0.3s ease;
            border-radius: 16px;
        }
        .card:hover {
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        }

        .nav-item {
            transition: all 0.2s ease;
            position: relative;
        }
        .nav-item.active {
            color: #ad039f;
        }
        .nav-item:not(.active) {
            color: #1d252b;
        }

        /* Badge pour le panier */
        .cart-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: #ef4444;
            color: white;
            border-radius: 50%;
            width: 16px;
            height: 16px;
            font-size: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }

        /* Badge pour les messages sur le bouton Contact Buyer */
        .contact-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: #ef4444;
            color: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            font-size: 11px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            border: 2px solid white;
            z-index: 5;
        }

        /* Badge Messenger */
        .messenger-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: #ef4444;
            color: white;
            border-radius: 50%;
            width: 18px;
            height: 18px;
            font-size: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            border: 2px solid white;
        }

        .input-field {
            border: 1px solid #e5e7eb;
            transition: all 0.2s ease;
            border-radius: 12px;
            font-size: 0.85rem;
        }
        .input-field:focus {
            border-color: #000000;
            outline: none;
        }

        .modal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }
        .modal.active {
            display: flex;
        }

        .toast {
            position: fixed;
            top: 80px;
            right: 20px;
            background: #000000;
            color: #ffffff;
            padding: 12px 24px;
            border-radius: 8px;
            transform: translateX(200%);
            transition: transform 0.3s ease;
            z-index: 2000;
            font-size: 0.85rem;
        }
        .toast.show {
            transform: translateX(0);
        }

        /* Styles pour les produits */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 8px;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur tablette */
        gap: 12px;
        padding: 4px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur mobile */
        gap: 10px;
        padding: 4px;
    }
}

.product-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    background: transparent;
    box-shadow: none;
    border: none;
}

.product-image-container {
    width: 100%;
    height: 240px; /* Hauteur par défaut */
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .product-image-container {
        height: 180px; /* Réduit sur tablette */
    }
}

@media (max-width: 480px) {
    .product-image-container {
        height: 150px; /* Réduit sur mobile */
    }
}

        .product-image {
            width: auto;
            height: auto;
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            transition: transform 0.3s ease;
            display: block;
        }

        .product-item:hover .product-image {
            transform: scale(1.05);
        }

        .product-info-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 30px 16px 16px;
            background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
            color: white;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.3s ease;
            pointer-events: none;
        }

        .product-item:hover .product-info-overlay {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        .product-name {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 8px;
            color: white;
            text-shadow: 0 2px 4px rgba(0,0,0,0.5);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .product-price {
            font-size: 1.3rem;
            font-weight: 700;
            color: #FFD700;
            text-shadow: 0 2px 4px rgba(0,0,0,0.5);
            display: inline-block;
            margin-right: 12px;
        }

        .product-stock {
            font-size: 0.8rem;
            color: white;
            background: rgba(0,0,0,0.5);
            padding: 4px 10px;
            border-radius: 20px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            border: 1px solid rgba(255,255,255,0.2);
        }

        .product-category-badge {
            position: absolute;
            top: 16px;
            left: 16px;
            background: rgba(0,0,0,0.6);
            color: white;
            padding: 6px 12px;
            border-radius: 30px;
            font-size: 0.75rem;
            font-weight: 500;
            backdrop-filter: blur(4px);
            border: 1px solid rgba(255,255,255,0.2);
            z-index: 2;
        }

        .product-actions {
            display: flex;
            gap: 10px;
            margin-top: 15px;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.3s ease 0.1s;
        }

        .product-item:hover .product-actions {
            opacity: 1;
            transform: translateY(0);
        }

        .btn-edit-simple {
            flex: 1;
            background: rgba(255,255,255,0.9);
            color: #000;
            padding: 10px;
            border-radius: 12px;
            font-size: 0.8rem;
            font-weight: 600;
            border: none;
            backdrop-filter: blur(4px);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: all 0.2s ease;
            cursor: pointer;
        }

        .btn-delete-simple {
            flex: 1;
            background: rgba(220, 38, 38, 0.9);
            color: white;
            padding: 10px;
            border-radius: 12px;
            font-size: 0.8rem;
            font-weight: 600;
            border: none;
            backdrop-filter: blur(4px);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: all 0.2s ease;
            cursor: pointer;
        }

        .btn-contact-simple {
            flex: 1;
            background: rgba(59, 130, 246, 0.9);
            color: white;
            padding: 10px;
            border-radius: 12px;
            font-size: 0.8rem;
            font-weight: 600;
            border: none;
            backdrop-filter: blur(4px);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: all 0.2s ease;
            cursor: pointer;
            position: relative;
        }
        .btn-contact-simple:hover {
            background: rgba(37, 99, 235, 0.9);
        }

        /* Styles pour les commandes */
        .order-card {
            background: white;
            border-radius: 16px;
            border: 1px solid #e5e7eb;
            overflow: hidden;
            transition: all 0.3s ease;
            margin-bottom: 20px;
        }
        .order-card:hover {
            box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        }

        .order-header {
            background: linear-gradient(145deg, #f8f9fa, #e9ecef);
            padding: 15px 20px;
            border-bottom: 1px solid #dee2e6;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }

        .order-id {
            font-family: monospace;
            font-size: 0.9rem;
            font-weight: 600;
            color: #495057;
        }

        .order-checkbox {
            width: 20px;
            height: 20px;
            cursor: pointer;
            accent-color: #ec4899;
            transition: all 0.2s ease;
        }
        .order-checkbox:hover {
            transform: scale(1.1);
        }

        .order-content {
            display: flex;
            padding: 20px;
            gap: 20px;
            flex-wrap: wrap;
        }

        .order-image {
            width: 120px;
            height: 120px;
            border-radius: 12px;
            overflow: hidden;
            flex-shrink: 0;
        }

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

        .order-details {
            flex: 1;
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        @media (max-width: 640px) {
            .order-content {
                flex-direction: column;
            }
            .order-image {
                width: 100%;
                height: 200px;
            }
            .order-details {
                grid-template-columns: 1fr;
            }
        }

        .detail-item {
            display: flex;
            flex-direction: column;
        }
        .detail-label {
            font-size: 0.7rem;
            color: #6c757d;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .detail-value {
            font-size: 0.85rem;
            font-weight: 500;
            color: #212529;
            margin-top: 2px;
        }

        .order-footer {
            padding: 15px 20px;
            background: #f8f9fa;
            border-top: 1px solid #dee2e6;
            display: flex;
            justify-content: flex-end;
            gap: 15px;
            flex-wrap: wrap;
        }

        .badge {
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.7rem;
            font-weight: 500;
            display: inline-block;
        }
        .badge-pending { background: #f59e0b; color: white; }
        .badge-waiting-payment { background: #f97316; color: white; }
        .badge-waiting-pickup { background: #f59e0b; color: white; }
        .badge-waiting-shipment { background: #3b82f6; color: white; }
        .badge-shipped { background: #8b5cf6; color: white; }
        .badge-received { background: #10b981; color: white; }
        .badge-completed { background: #059669; color: white; }
        .badge-canceled { background: #ef4444; color: white; }
        .badge-in-transit { background: #3b82f6; color: white; }
        .badge-delivered { background: #10b981; color: white; }

        /* Numeric keypad styles */
        .numeric-keypad {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin: 15px 0;
        }
        
        .keypad-btn {
            background: #f3f4f6;
            border: none;
            padding: 15px;
            font-size: 1.2rem;
            font-weight: 600;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .keypad-btn:hover {
            background: #e5e7eb;
        }
        .keypad-btn:active {
            background: #d1d5db;
        }
        
        .keypad-delete {
            background: #fee2e2;
            color: #ef4444;
        }
        .keypad-delete:hover {
            background: #fecaca;
        }
        
        .keypad-confirm {
            background: #000;
            color: white;
            grid-column: span 3;
            padding: 15px;
            font-size: 1.1rem;
        }
        
        .password-display {
            background: #f9fafb;
            border: 2px solid #e5e7eb;
            border-radius: 12px;
            padding: 15px;
            font-size: 1.3rem;
            letter-spacing: 8px;
            text-align: center;
            font-family: monospace;
            margin: 15px 0;
        }

        /* Upload area */
        .upload-area {
            border: 2px dashed #d1d5db;
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            background: #fafafa;
        }
        .upload-area:hover {
            border-color: #000;
            background: #f5f5f5;
        }
        .upload-preview {
            max-width: 100%;
            max-height: 150px;
            border-radius: 8px;
            object-fit: cover;
        }

        /* Promo Modal */
        .promo-modal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(241, 36, 156, 0.137);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(5px);
            padding: 1rem;
        }
        .promo-modal.active {
            display: flex;
        }

        .promo-content {
            background: white;
            border-radius: 24px;
            width: 90%;
            max-width: 600px;
            max-height: 90vh;
            overflow-y: auto;
            animation: slideUp 0.5s ease;
            display: flex;
            flex-direction: column;
        }

        .promo-header {
            background: linear-gradient(145deg, #e644d0, #1a1a1a);
            color: white;
            padding: 20px;
            border-radius: 24px 24px 0 0;
            text-align: center;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .promo-body {
            padding: 25px;
            flex: 1;
            overflow-y: auto;
        }

        .promo-footer {
            padding: 20px;
            border-top: 1px solid #e5e7eb;
            background: white;
            border-radius: 0 0 24px 24px;
            position: sticky;
            bottom: 0;
            z-index: 10;
        }

        .btn-confirm {
            width: 100%;
            background: linear-gradient(145deg, #ff69b4, #ff1493);
            color: white;
            border: none;
            padding: 15px;
            border-radius: 40px;
            font-size: 1.1rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
        }
        .btn-confirm:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(255, 20, 147, 0.4);
        }

        @keyframes slideUp {
            from { opacity: 0; transform: translateY(50px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Network options */
        .network-option {
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            padding: 15px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .network-option:hover {
            border-color: #000;
            background: #f9fafb;
        }
        .network-option.selected {
            border-color: #000;
            background: #f3f4f6;
        }

        .network-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }

        /* Stat cards */
        .stat-card {
            background: linear-gradient(145deg, #ffffff, #f9fafb);
            border-radius: 12px;
            padding: 15px;
            border-left: 4px solid #000;
        }

        /* Chart styles */
        .chart-container {
            position: relative;
            height: 300px;
            width: 100%;
        }

        h1 { font-size: 1.3rem; }
        h2 { font-size: 1.15rem; }
        h3 { font-size: 1.05rem; }
        p, span, div { font-size: 0.85rem; }
        .text-2xl { font-size: 1.3rem !important; }
        .text-3xl { font-size: 1.5rem !important; }
        .text-xl { font-size: 1.1rem !important; }
        .text-lg { font-size: 1rem !important; }
        .text-sm { font-size: 0.8rem !important; }
        .text-xs { font-size: 0.7rem !important; }

        /* ============ NAVIGATION FLOTTANTE PLEINE LARGEUR ============ */
        .floating-nav {
            position: fixed;
            bottom: 16px;
            left: 16px;
            right: 16px;
            background: white;
            border-radius: 24px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
            z-index: 100;
            padding: 6px 16px;
            display: flex;
            align-items: center;
            justify-content: space-around;
            border: 1px solid rgba(0,0,0,0.05);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            max-width: 480px;
            margin: 0 auto;
            left: 50%;
            transform: translateX(-50%);
            width: calc(100% - 32px);
        }

        @media (min-width: 769px) {
            .floating-nav {
                max-width: 500px;
                width: calc(100% - 32px);
            }
        }

        @media (max-width: 480px) {
            .floating-nav {
                width: calc(100% - 24px);
                left: 50%;
                right: auto;
                transform: translateX(-50%);
                padding: 6px 12px;
            }
            
            .floating-nav .nav-item span {
                font-size: 0.65rem;
            }
            .floating-nav .nav-item i {
                font-size: 1.1rem;
            }
        }

        @media (max-width: 360px) {
            .floating-nav .nav-item span {
                font-size: 0.6rem;
            }
            .floating-nav .nav-item i {
                font-size: 1rem;
            }
        }

        .notification-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: #ef4444;
            color: white;
            border-radius: 50%;
            width: 18px;
            height: 18px;
            font-size: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }

        .notification-panel {
            position: absolute;
            top: 50px;
            right: 0;
            width: 320px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.1);
            display: none;
            z-index: 100;
            max-height: 400px;
            overflow-y: auto;
        }

        .notification-panel.show {
            display: block;
        }

        .notification-item {
            padding: 12px;
            border-bottom: 1px solid #e5e7eb;
            cursor: pointer;
            transition: background 0.2s;
            position: relative;
            overflow: hidden;
        }

        .notification-item:hover {
            background: #f9fafb;
        }

        .notification-item.unread {
            background: #eff6ff;
        }

        /* Styles pour le swipe à supprimer */
        .notification-item.swipe-left {
            transform: translateX(-50px);
            opacity: 0.5;
            transition: transform 0.2s ease, opacity 0.2s ease;
        }

        .notification-item.deleting {
            transform: translateX(-100%);
            opacity: 0;
            transition: transform 0.3s ease, opacity 0.3s ease;
        }

        .delete-overlay {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            width: 60px;
            background: #ef4444;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 0 12px 12px 0;
            transform: translateX(100%);
            transition: transform 0.3s ease;
            z-index: 5;
        }

        .notification-item:hover .delete-overlay {
            transform: translateX(0);
        }

        /* Styles pour le modal de messagerie */
        .message-modal {
            max-width: 500px;
            width: 100%;
            max-height: 80vh;
            display: flex;
            flex-direction: column;
        }

        .message-list {
            flex: 1;
            overflow-y: auto;
            min-height: 300px;
        }

        .message-bubble {
            background: #f3f4f6;
            border-radius: 16px;
            padding: 12px;
            margin-bottom: 10px;
            position: relative;
        }

        .message-bubble.admin {
            background: #3b82f6;
            color: white;
            margin-left: 20px;
        }

        .message-bubble.seller {
            background: #e5e7eb;
            margin-right: 20px;
        }

        .message-bubble img {
            max-width: 200px;
            max-height: 200px;
            border-radius: 8px;
            margin-top: 8px;
            cursor: pointer;
        }

        .message-time {
            font-size: 0.65rem;
            color: #9ca3af;
            margin-top: 4px;
        }

        .message-bubble.admin .message-time {
            color: #bfdbfe;
        }

        .reply-input {
            border-top: 1px solid #e5e7eb;
            padding: 15px;
            background: white;
        }

        .message-input-container {
            display: flex;
            align-items: center;
            gap: 8px;
            background: #f3f4f6;
            border-radius: 999px;
            padding: 4px 4px 4px 16px;
        }

        .message-input-container input {
            flex: 1;
            background: transparent;
            border: none;
            outline: none;
            font-size: 0.85rem;
        }

        .message-input-container button {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            border: none;
            cursor: pointer;
            transition: all 0.2s;
        }

        .gallery-btn {
            background: transparent;
            color: #6b7280;
        }
        .gallery-btn:hover {
            background: #e5e7eb;
            color: #374151;
        }

        .send-btn {
            background: #3b82f6;
            color: white;
        }
        .send-btn:hover {
            background: #2563eb;
        }

        .message-image-preview {
            max-width: 100px;
            max-height: 100px;
            border-radius: 8px;
            margin: 8px 0;
            position: relative;
            display: inline-block;
        }
        .message-image-preview img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 8px;
        }
        .message-image-preview .remove-image {
            position: absolute;
            top: -8px;
            right: -8px;
            width: 20px;
            height: 20px;
            background: #ef4444;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            cursor: pointer;
        }

        @media (max-width: 640px) {
            .notification-panel {
                position: fixed !important;
                top: 60px !important;
                right: 10px !important;
                left: 10px !important;
                width: auto !important;
                max-width: calc(100% - 20px) !important;
                max-height: 70vh !important;
                z-index: 1000 !important;
            }
            
            .notification-item {
                padding: 10px !important;
            }
            
            .notification-item .flex {
                flex-wrap: nowrap !important;
            }
            
            .notification-item .text-sm {
                font-size: 0.75rem !important;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                max-width: 180px;
            }
            
            .notification-item .text-xs {
                font-size: 0.65rem !important;
            }
            
            .notification-item .line-clamp-2 {
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
                max-width: 200px;
            }
        }

        @media (max-width: 380px) {
            .notification-panel {
                top: 55px !important;
                right: 5px !important;
                left: 5px !important;
                max-width: calc(100% - 10px) !important;
            }
            
            .notification-item .text-sm {
                max-width: 140px;
            }
            
            .notification-item .line-clamp-2 {
                max-width: 160px;
            }
        }

        @media (max-width: 768px) {
            .order-image {
                width: 100% !important;
                height: auto !important;
                max-height: 250px !important;
                min-height: 180px !important;
                aspect-ratio: 16/9;
                object-fit: contain;
                background: #f5f5f5;
                border-radius: 12px;
                padding: 10px;
            }
            
            .order-image img {
                width: 100% !important;
                height: 100% !important;
                object-fit: contain !important;
            }
            
            .order-content {
                flex-direction: column !important;
                padding: 15px !important;
            }
            
            .order-details {
                width: 100% !important;
                grid-template-columns: 1fr 1fr !important;
                gap: 12px !important;
            }
            
            #distribution-container .order-image {
                width: 100% !important;
                height: 200px !important;
                margin-bottom: 10px;
            }
        }

        @media (max-width: 480px) {
            .order-image {
                max-height: 200px !important;
                min-height: 150px !important;
            }
            
            .order-details {
                grid-template-columns: 1fr !important;
            }
            
            #distribution-container .order-image {
                height: 180px !important;
            }
        }

        .fixed.top-0 {
            height: 60px;
            background: black;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 50;
            padding: 0 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .nav-logo {
            flex: 0 0 auto;
        }

        .nav-icons {
            flex: 0 0 auto;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        main {
            margin-top: 0;
            padding-top: 80px;
            min-height: calc(100vh - 60px);
        }

        .page .max-w-7xl,
        .page .max-w-3xl {
            padding-top: 16px;
            padding-bottom: 100px;
        }

        @media (max-width: 768px) {
            .fixed.top-0 {
                height: 58px;
                padding: 0 15px;
            }
            
            main {
                padding-top: 58px;
            }
            
            .page .max-w-7xl,
            .page .max-w-3xl {
                padding-bottom: 100px;
            }
        }

        @media (max-width: 480px) {
            .fixed.top-0 {
                height: 56px;
                padding: 0 12px;
            }
            
            .fixed.top-0 img {
                height: 28px !important;
            }
            
            .fixed.top-0 i {
                font-size: 1.1rem !important;
            }
            
            main {
                padding-top: 56px;
            }
            
            .page .max-w-7xl,
            .page .max-w-3xl {
                padding-bottom: 90px;
            }
        }

        @media (max-width: 360px) {
            .fixed.top-0 {
                height: 54px;
                padding: 0 10px;
            }
            
            .fixed.top-0 img {
                height: 26px !important;
            }
            
            .fixed.top-0 i {
                font-size: 1rem !important;
            }
            
            main {
                padding-top: 54px;
            }
        }

        .page .max-w-7xl,
        .page .max-w-3xl {
            padding-top: 8px;
        }

        .page h1.text-2xl {
            margin-top: 0;
            margin-bottom: 12px;
        }

        #page-profile .max-w-3xl {
            padding-top: 4px;
        }

        #page-profile h1 {
            margin-top: 0;
            margin-bottom: 10px;
        }

        #product-mgmt-list .card .flex-col.md\:flex-row {
            align-items: flex-start;
        }
        
        #product-mgmt-list .card img {
            width: 120px;
            height: 120px;
            object-fit: contain;
            background: #f5f5f5;
            border-radius: 12px;
            padding: 8px;
            border: 1px solid #e5e7eb;
        }
        
        @media (max-width: 768px) {
            #product-mgmt-list .card img {
                width: 100px;
                height: 100px;
            }
        }
        
        @media (max-width: 480px) {
            #product-mgmt-list .card img {
                width: 80px;
                height: 80px;
                padding: 4px;
            }
        }

        .privacy-toggle {
            cursor: pointer;
            color: #6b7280;
            transition: color 0.2s;
        }
        .privacy-toggle:hover {
            color: #000;
        }
        .privacy-toggle.active {
            color: #10b981;
        }

        .hidden-info {
            filter: blur(4px);
            user-select: none;
            transition: filter 0.2s;
        }
        .hidden-info.revealed {
            filter: none;
        }

        .privacy-badge {
            background: #f3f4f6;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 0.65rem;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .alliance-card {
            background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
            color: white;
            border-radius: 20px;
            padding: 20px;
            position: relative;
            overflow: hidden;
        }
        .alliance-card::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, transparent 70%);
            animation: rotate 20s linear infinite;
        }
        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .btn-invite {
            background: linear-gradient(145deg, #FFD700, #FFA500);
            color: #000;
            font-weight: 600;
            transition: all 0.3s;
            font-size: 0.85rem;
        }
        .btn-invite:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
        }

        .financial-stat {
            background: #f8fafc;
            border-radius: 16px;
            padding: 16px;
            border-left: 4px solid #000;
        }
        .financial-stat .label {
            font-size: 0.75rem;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .financial-stat .value {
            font-size: 1.5rem;
            font-weight: 700;
            line-height: 1.2;
        }
        .financial-stat .sub-value {
            font-size: 0.8rem;
            color: #475569;
        }

        .financial-timeline {
            position: relative;
            padding-left: 30px;
        }
        .financial-timeline::before {
            content: '';
            position: absolute;
            left: 10px;
            top: 0;
            bottom: 0;
            width: 2px;
            background: linear-gradient(to bottom, #e5e7eb, #9ca3af, #e5e7eb);
        }
        .timeline-item {
            position: relative;
            margin-bottom: 20px;
        }
        .timeline-item::before {
            content: '';
            position: absolute;
            left: -24px;
            top: 4px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #000;
            border: 2px solid white;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .timeline-item.positive::before {
            background: #10b981;
        }
        .timeline-item.negative::before {
            background: #ef4444;
        }
        .timeline-content {
            background: #f9fafb;
            border-radius: 12px;
            padding: 12px;
        }

        .usdt-icon {
            font-weight: bold;
            font-size: 1rem;
            line-height: 1;
        }
        
        .network-icon .usdt-symbol {
            font-weight: 700;
            color: white;
            font-size: 1rem;
        }

        #global-loader {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            align-items: center;
            justify-content: center;
            z-index: 9999;
            backdrop-filter: blur(4px);
        }
        
        #global-loader.show {
            display: flex;
        }
        
        .loader-content {
            background: white;
            border-radius: 24px;
            padding: 2rem;
            text-align: center;
            max-width: 300px;
            animation: slideUp 0.3s ease;
        }
        
        .loader-spinner {
            width: 48px;
            height: 48px;
            border: 3px solid #f3f3f3;
            border-top: 3px solid #000;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 1rem;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .category-dist-btn {
            transition: all 0.3s ease;
        }
        .category-dist-btn.bg-violet {
            background: linear-gradient(145deg, #8b5cf6, #7c3aed);
            color: white;
        }
        .category-dist-btn i {
            transition: all 0.3s ease;
        }
        .category-dist-btn:hover i {
            transform: scale(1.1);
        }
        .category-dist-btn.bg-violet:hover {
            background: linear-gradient(145deg, #9f7aea, #8b5cf6);
            box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
        }

        .category-dist-btn[data-active="true"] i {
            color: #8b5cf6;
        }
        .category-dist-btn[data-active="true"] span {
            color: #8b5cf6;
        }
        .category-dist-btn[data-active="true"] {
            border-bottom-color: #8b5cf6;
        }

        #smart-refresh {
            position: fixed;
            bottom: 110px;
            right: 24px;
            background: black;
            color: white;
            padding: 12px;
            border-radius: 50%;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
            transition: all 0.3s;
            z-index: 40;
        }
        #smart-refresh.hidden {
            display: none;
        }

        .off-shell-message {
            background: #fef3c7;
            border: 1px solid #f59e0b;
            border-radius: 8px;
            padding: 12px;
            margin: 10px 0;
            font-size: 0.8rem;
            color: #92400e;
        }

        .privacy-confirm-bubble {
            position: fixed;
            bottom: 100px;
            left: 50%;
            transform: translateX(-50%);
            background: #000;
            color: white;
            padding: 12px 24px;
            border-radius: 40px;
            font-size: 0.85rem;
            box-shadow: 0 10px 25px rgba(0,0,0,0.2);
            z-index: 100;
            display: none;
            animation: slideUp 0.3s ease;
        }
        .privacy-confirm-bubble.show {
            display: block;
        }
        .privacy-confirm-bubble button {
            background: white;
            color: black;
            border: none;
            padding: 4px 12px;
            border-radius: 20px;
            margin-left: 12px;
            font-weight: 600;
            cursor: pointer;
        }
        .privacy-confirm-bubble button:hover {
            background: #f0f0f0;
        }

        /* Styles pour le swipe (mobile) */
        .swipe-container {
            position: relative;
            overflow: hidden;
            transition: transform 0.3s ease;
        }

        .swipe-container.swiping {
            transform: translateX(-60px);
        }

        .swipe-delete {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            width: 60px;
            background: #ef4444;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            transform: translateX(100%);
            transition: transform 0.3s ease;
            border-radius: 0 12px 12px 0;
            cursor: pointer;
            z-index: 10;
        }

        .swipe-container:hover .swipe-delete,
        .swipe-container.swiping .swipe-delete {
            transform: translateX(0);
        }

        .swipe-delete i {
            font-size: 1.1rem;
        }

        .message-actions {
            display: flex;
            gap: 8px;
            margin-left: auto;
        }

        .message-action-btn {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #f3f4f6;
            color: #6b7280;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .message-action-btn:hover {
            background: #e5e7eb;
            color: #374151;
        }

        .message-action-btn.delete:hover {
            background: #fee2e2;
            color: #ef4444;
        }

        .message-action-btn.reply:hover {
            background: #dbeafe;
            color: #3b82f6;
        }

        /* Styles pour le swipe des messages */
        .swipe-message-container {
            position: relative;
            overflow: hidden;
            transition: transform 0.3s ease;
            cursor: pointer;
        }

        .swipe-message-container.swiping {
            transform: translateX(-60px);
        }

        .swipe-message-delete {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            width: 60px;
            background: #ef4444;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            transform: translateX(100%);
            transition: transform 0.3s ease;
            border-radius: 0 12px 12px 0;
            cursor: pointer;
            z-index: 10;
            font-size: 1.1rem;
        }

        .swipe-message-delete i {
            font-size: 1.2rem;
        }

        .swipe-message-container:hover .swipe-message-delete,
        .swipe-message-container.swiping .swipe-message-delete {
            transform: translateX(0);
        }

        .swipe-message-delete:hover {
            background: #dc2626;
        }

        /* Styles pour les modals de conversation par commande */
.order-conversation-modal {
    max-width: 450px;
    width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    margin: 0 auto;
}

@media (max-width: 480px) {
    .order-conversation-modal {
        max-width: 100%;
        width: 95%;
        max-height: 90vh;
    }
}

.order-conversation-header {
    background: linear-gradient(145deg, #0084ff, #0066cc);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.order-conversation-header .order-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.order-conversation-header .order-info .order-id-badge {
    background: rgba(255,255,255,0.2);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    display: inline-block;
    white-space: nowrap;
}

.order-conversation-header .order-info h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 3px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-conversation-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f0f2f5;
    min-height: 200px;
    max-height: 50vh;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Style pour le texte dans les bulles de messages */
.order-conversation-messages .text-sm,
.order-conversation-messages .whitespace-pre-wrap {
    word-wrap: break-word !important;
    word-break: break-word !important;
    white-space: pre-wrap !important;
    overflow-wrap: break-word !important;
    max-width: 100%;
}

.order-conversation-messages .max-w-\[80\%\] {
    max-width: 85% !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

.order-conversation-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

/* Panel des conversations Messenger */
.messenger-panel {
    max-width: 350px;
    width: 95%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

@media (max-width: 480px) {
    .messenger-panel {
        max-width: 100%;
        width: 92%;
        max-height: 85vh;
    }
}

.messenger-panel-header {
    background: linear-gradient(145deg, #0084ff, #0066cc);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.messenger-panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.messenger-panel-header button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.messenger-panel-header button:hover {
    background: rgba(255,255,255,0.3);
}

.messenger-conversation-item {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.messenger-conversation-item:hover {
    background: #f0f2f5;
}
.messenger-conversation-item.unread {
    background: #e7f3ff;
}

.messenger-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(145deg, #0084ff, #0066cc);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.messenger-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.messenger-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.messenger-info .order-badge {
    background: #e5e7eb;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.6rem;
    color: #4b5563;
    white-space: nowrap;
}

/* Style pour le dernier message dans les notifications */
.messenger-info .last-message {
    font-size: 0.75rem;
    color: #6b7280;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
    line-height: 1.3;
}

.messenger-info .time {
    font-size: 0.6rem;
    color: #9ca3af;
    margin-top: 4px;
}

.messenger-unread-badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 4px;
}

/* Bouton X pour supprimer les notifications Messenger */
.messenger-delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.messenger-conversation-item:hover .messenger-delete-btn {
    opacity: 1;
}

.messenger-delete-btn:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* Assurer que le conteneur de la liste est scrollable */
#messenger-conversations-list {
    flex: 1;
    overflow-y: auto;
    max-height: 60vh;
}

/* Ajouter ces styles pour les bulles de message */
.order-conversation-messages .max-w-\[80\%\] {
    max-width: 85% !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

.order-conversation-messages .whitespace-pre-wrap {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
}
        .messenger-info .last-message {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%; /* Ajouté */
    word-wrap: break-word; /* Ajouté */
    white-space: normal; /* Changé de nowrap à normal */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limite à 2 lignes */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

        .messenger-info .time {
            font-size: 0.6rem;
            color: #9ca3af;
            margin-top: 4px;
        }

        .messenger-unread-badge {
            background: #ef4444;
            color: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.65rem;
            font-weight: bold;
            flex-shrink: 0;
        }

        /* Bouton X pour supprimer les notifications Messenger */
        .messenger-delete-btn {
            position: absolute;
            top: 5px;
            right: 5px;
            width: 20px;
            height: 20px;
            background: rgba(239, 68, 68, 0.8);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            cursor: pointer;
            z-index: 10;
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .messenger-conversation-item:hover .messenger-delete-btn {
            opacity: 1;
        }

        .messenger-delete-btn:hover {
            background: #ef4444;
            transform: scale(1.1);
        }

        .message-input-container {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f3f4f6;
    border-radius: 999px;
    padding: 4px;
}

.message-input-container input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.85rem;
    min-width: 0;
    padding: 8px 12px;
}

.message-input-container button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .message-input-container {
        gap: 2px;
        padding: 2px;
    }
    
    .message-input-container input {
        font-size: 0.8rem;
        padding: 8px 8px;
    }
    
    .message-input-container button {
        width: 36px;
        height: 36px;
    }
    
    .message-input-container button i {
        font-size: 0.85rem;
    }
}

.keypad-btn {
    background: #f3f4f6;
    border: none;
    padding: 18px 0;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 60px;
}

.keypad-btn:active {
    background: #d1d5db;
    transform: scale(0.95);
}

.keypad-delete {
    background: #fee2e2;
    color: #ef4444;
}

.keypad-delete:active {
    background: #fecaca;
}

.keypad-confirm {
    background: #000;
    color: white;
    grid-column: span 3;
    padding: 20px 0;
    font-size: 1.2rem;
    border-radius: 40px;
    margin-top: 8px;
}

.keypad-confirm:active {
    background: #333;
    transform: scale(0.98);
}

@media (max-width: 480px) {
    .keypad-btn {
        padding: 16px 0;
        font-size: 1.2rem;
        min-height: 55px;
        border-radius: 14px;
    }
    
    .keypad-confirm {
        padding: 18px 0;
        font-size: 1.1rem;
        border-radius: 35px;
    }
}

@media (max-width: 360px) {
    .keypad-btn {
        padding: 14px 0;
        font-size: 1.1rem;
        min-height: 50px;
    }
}

/* Couleurs des cartes du dashboard */
#page-home .card:nth-child(1) {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

#page-home .card:nth-child(2) {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

#page-home .card:nth-child(3) {
    border-left: 4px solid #ec4899;
    background: linear-gradient(135deg, #fdf2f8 0%, #ffffff 100%);
}

#page-home .card:nth-child(4) {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

/* Remplacer les styles actuels des chiffres du dashboard */
#stat-orders, #stat-sales, #stat-profit, #followers-count {
    font-size: 1.3rem !important;
    font-weight: 600;
    background: linear-gradient(135deg, #1f2937, #4b5563);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin: 0;
}

/* Pour le texte en dessous (ex: 4.567) */
#shop-rating, #credit-score {
    font-size: 0.7rem !important;
    font-weight: 500;
    color: #6b7280;
}

/* Ajuster les conteneurs des cartes pour être plus compacts */
#page-home .card .text-sm.text-gray-500 {
    font-size: 0.7rem !important;
    margin-bottom: 4px;
}

#page-home .card .text-3xl {
    font-size: 1.3rem !important;
    font-weight: 600;
}

/* Réduire aussi le padding des cartes pour plus de compacité */
#page-home .card.rounded-xl.p-5 {
    padding: 12px !important;
}

/* Ajustement responsive */
@media (max-width: 768px) {
    #stat-orders, #stat-sales, #stat-profit, #followers-count {
        font-size: 1.2rem !important;
    }
    
    #page-home .card.rounded-xl.p-5 {
        padding: 10px !important;
    }
}

@media (max-width: 480px) {
    #stat-orders, #stat-sales, #stat-profit, #followers-count {
        font-size: 1.1rem !important;
    }
    
    #page-home .card .text-sm.text-gray-500 {
        font-size: 0.65rem !important;
    }
}

/* Animation des cartes */
.fade-in {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

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

/* Ajouter ces styles dans la section <style> */

/* Couleurs des cartes du dashboard */
#page-home .card:nth-child(1) {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

#page-home .card:nth-child(2) {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

#page-home .card:nth-child(3) {
    border-left: 4px solid #ec4899;
    background: linear-gradient(135deg, #fdf2f8 0%, #ffffff 100%);
}

#page-home .card:nth-child(4) {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

/* Taille des chiffres du dashboard */
#stat-orders, #stat-sales, #stat-profit, #followers-count {
    font-size: 2.5rem !important;
    font-weight: 700;
    background: linear-gradient(135deg, #1f2937, #4b5563);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animation des cartes */
.fade-in {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

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

/* Amélioration du conteneur du graphique */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

@media (max-width: 640px) {
    .chart-container {
        height: 250px;
    }
}

/* Style pour le total des ventes */
#chart-total {
    font-size: 1.5rem !important;
    font-weight: 700;
    background: linear-gradient(135deg, #1f2937, #4b5563);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animation de chargement du graphique */
.chart-container canvas {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Cibler spécifiquement les valeurs de Today's Sales et Today's Profit */
#page-home .card p span[id="stat-sales"],
#page-home .card p span[id="stat-profit"] {
    font-size: 1.3rem !important;
    font-weight: 600 !important;
}

/* Style pour le symbole $ devant les valeurs */
#page-home .card p:has(> span[id="stat-sales"]),
#page-home .card p:has(> span[id="stat-profit"]) {
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

/* Alternative si le :has() ne fonctionne pas */
#page-home .card .font-bold[id="stat-orders"],
#page-home .card .font-bold {
    font-size: 1.3rem !important;
}

/* S'assurer que TOUS les textes dans les cartes du dashboard sont uniformes */
#page-home .card p.text-3xl,
#page-home .card p[class*="text-3xl"],
#page-home .card p[class*="font-bold"] {
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
}

/* Spécifiquement pour les spans contenant les valeurs */
#stat-sales,
#stat-profit {
    font-size: inherit !important;
    font-weight: inherit !important;
}

/* Responsive */
@media (max-width: 768px) {
    #page-home .card p.text-3xl,
    #page-home .card p[class*="text-3xl"],
    #page-home .card p[class*="font-bold"] {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 480px) {
    #page-home .card p.text-3xl,
    #page-home .card p[class*="text-3xl"],
    #page-home .card p[class*="font-bold"] {
        font-size: 1rem !important;
    }
}

/* CENTER FIX 2026-05-26: stable product hover + clickable order pickup checkbox */
.product-item,
.product-image-container,
.product-image {
    transform: translateZ(0);
    backface-visibility: hidden;
}

.product-item:hover .product-image {
    transform: none !important;
}

.product-info-overlay {
    transform: none !important;
    will-change: opacity;
}

.product-item:hover .product-info-overlay {
    transform: none !important;
}

.order-checkbox-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    position: relative;
    z-index: 5;
    cursor: pointer;
}

.order-checkbox {
    pointer-events: auto !important;
    position: relative;
    z-index: 6;
    flex: 0 0 auto;
}

.order-checkbox:hover {
    transform: none !important;
}


/* CENTER UPGRADE 2026-05-26: fluid UI, stable product zoom, full images */
img { image-rendering: auto; }
.product-item { contain: layout paint; will-change: transform; }
.product-image-container { background:#f8fafc; }
.product-image { width:100% !important; height:100% !important; object-fit:contain !important; transform-origin:center center; will-change: transform; }
.product-item:hover .product-image { transform: scale(1.045) !important; }
.product-info-overlay { pointer-events:none; opacity:0; transform:translate3d(0,8px,0) !important; transition:opacity .22s ease, transform .22s ease !important; }
.product-item:hover .product-info-overlay { pointer-events:auto; opacity:1; transform:translate3d(0,0,0) !important; }
.product-actions { pointer-events:auto; }
.order-image, #distribution-container .order-image { background:#f8fafc; display:flex; align-items:center; justify-content:center; }
.order-image img, #distribution-container .order-image img, .product-mgmt-image { width:100% !important; height:100% !important; object-fit:contain !important; background:#f8fafc; }
.product-mgmt-image { min-width:120px; max-width:160px; height:120px; border-radius:14px; padding:6px; }
.order-checkbox-wrap { min-width:44px !important; min-height:44px !important; border-radius:14px; background:rgba(236,72,153,.08); border:1px solid rgba(236,72,153,.18); }
.order-checkbox { width:24px !important; height:24px !important; }
@media (max-width: 640px) {
  body { font-size:14px; }
  button, .btn-primary, .btn-outline, .btn-pink, .btn-pickup { min-height:42px; font-size:.9rem; }
  .product-name { font-size:.95rem; }
  .product-price { font-size:1.05rem; }
  .product-actions { gap:6px; }
  .btn-edit-simple, .btn-delete-simple { padding:8px 6px; font-size:.72rem; }
}


/* Messaging polish: direct support badge and cleaner notification cards */
.direct-message-badge {
    display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 6px; border-radius:999px; background:#ef4444; color:#fff; font-size:11px; font-weight:800; margin-left:8px; box-shadow:0 8px 18px rgba(239,68,68,.28);
}
.support-direct-btn { position:relative; }
.support-direct-btn .direct-message-badge { position:absolute; top:12px; right:14px; margin-left:0; }
.messenger-type-pill { display:inline-flex; align-items:center; gap:5px; padding:3px 8px; border-radius:999px; font-size:10px; font-weight:800; margin-bottom:4px; }
.messenger-type-pill.buyer { background:#dbeafe; color:#1d4ed8; }
.messenger-type-pill.direct { background:#ede9fe; color:#6d28d9; }
@media (max-width: 480px) { .support-direct-btn .direct-message-badge { top:8px; right:10px; } }

/* Native funds password input: the system keyboard does the job, no giant keypad. */
.funds-password-input {
    width: 100%;
    min-height: 56px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    background: #f9fafb;
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: clamp(1.2rem, 4vw, 1.55rem);
    font-weight: 700;
    letter-spacing: .65rem;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    padding: 0 18px 0 28px;
}
.funds-password-input:focus {
    background: #fff;
    border-color: #111827;
    box-shadow: 0 0 0 5px rgba(17, 24, 39, .08);
}
.numeric-keypad.hidden { display: none !important; }
@media (max-width: 480px) {
    .funds-password-input { min-height: 52px; letter-spacing: .45rem; font-size: 1.15rem; }
}

/* Modern seller conversation polish */
.order-conversation-modal {
    max-width: min(520px, 96vw) !important;
    border-radius: 26px !important;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .24);
}
.order-conversation-header {
    padding: 18px !important;
    background: radial-gradient(circle at 12% 0%, rgba(255,255,255,.35), transparent 30%), linear-gradient(135deg, #0084ff, #6d5dfc) !important;
}
.order-conversation-messages {
    background: linear-gradient(180deg, #f8fbff 0%, #eef2f7 100%) !important;
    padding: 18px !important;
    min-height: 310px !important;
}
.order-conversation-messages > div {
    animation: chatBubbleIn .18s ease both;
}
.order-conversation-messages .bg-blue-500,
.order-conversation-messages .bg-purple-500 {
    border-radius: 20px 20px 6px 20px !important;
    box-shadow: 0 8px 22px rgba(37, 99, 235, .18);
}
.order-conversation-messages .bg-gray-100 {
    background: #fff !important;
    border: 1px solid #e5e7eb;
    border-radius: 20px 20px 20px 6px !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}
.order-conversation-footer {
    padding: 14px 16px !important;
    background: rgba(255,255,255,.94) !important;
    backdrop-filter: blur(10px);
}
.message-input-container {
    background: #f3f6fb !important;
    border: 1px solid #e5e7eb;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.message-input-container input {
    min-height: 42px;
    font-size: .92rem !important;
}
.message-input-container button {
    background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
    box-shadow: 0 10px 25px rgba(37, 99, 235, .22);
}
@keyframes chatBubbleIn { from { opacity:0; transform: translateY(4px) scale(.98); } to { opacity:1; transform:none; } }

/* ===== 2026-05 polish: seller chat modal alignment ===== */
#order-conversation-modal.modal.active{display:flex;align-items:center;justify-content:center;padding:16px;}
.order-conversation-modal{width:min(680px,96vw)!important;height:min(720px,88vh)!important;max-height:88vh!important;border-radius:24px!important;overflow:hidden!important;box-shadow:0 24px 80px rgba(15,23,42,.35)!important;background:#fff!important;display:flex!important;flex-direction:column!important;}
#order-conversation-content{height:100%;display:flex;flex-direction:column;min-height:0;}
.order-conversation-header{flex:0 0 auto!important;padding:16px 18px!important;display:flex!important;align-items:center!important;gap:12px!important;border-radius:0!important;}
.order-conversation-header .order-info{min-width:0!important;}
.order-conversation-header .order-info h3{font-size:17px!important;font-weight:850!important;margin-top:4px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.order-conversation-messages{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;padding:20px 18px!important;background:linear-gradient(180deg,#f8fafc,#eef2f7)!important;}
.order-conversation-messages .max-w-\[80\%\],
.order-conversation-messages .message-bubble{max-width:min(82%,430px)!important;border-radius:20px!important;box-shadow:0 8px 22px rgba(15,23,42,.08)!important;word-break:break-word;}
.order-conversation-messages .justify-end .max-w-\[80\%\]{border-bottom-right-radius:7px!important;}
.order-conversation-messages .justify-start .max-w-\[80\%\]{border-bottom-left-radius:7px!important;}
.order-conversation-footer{flex:0 0 auto!important;background:#fff!important;border-top:1px solid #e5e7eb!important;padding:14px 16px!important;box-shadow:0 -8px 26px rgba(15,23,42,.05)!important;}
.message-input-container{display:flex!important;align-items:center!important;gap:10px!important;background:#f3f4f6!important;border:1px solid #e5e7eb!important;border-radius:999px!important;padding:7px 8px!important;}
.message-input-container input[type="text"]{height:40px!important;flex:1!important;min-width:0!important;background:transparent!important;border:0!important;outline:0!important;box-shadow:none!important;padding:0 4px!important;font-size:14px!important;}
.message-input-container .gallery-btn,.message-input-container .send-btn{width:42px!important;height:42px!important;border-radius:50%!important;display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 42px!important;}
.message-input-container .gallery-btn{background:#fff!important;color:#64748b!important;border:1px solid #e5e7eb!important;}
.message-input-container .send-btn{color:#fff!important;transition:.15s!important;}
.message-input-container .send-btn:hover{transform:translateY(-1px) scale(1.03);filter:brightness(.96);}
@media(max-width:720px){
  #order-conversation-modal.modal.active{padding:0;align-items:stretch;}
  .order-conversation-modal{width:100vw!important;height:100dvh!important;max-height:none!important;border-radius:0!important;margin:0!important;}
  .order-conversation-messages{padding:16px 12px!important;}
  .order-conversation-messages .max-w-\[80\%\],.order-conversation-messages .message-bubble{max-width:88%!important;}
}


/* ===== Final seller conversation modal fix: footer/input stays inside ===== */
#order-conversation-modal,
#order-conversation-modal * { box-sizing: border-box; }
#order-conversation-modal.modal.active{
  overflow:hidden !important;
}
.order-conversation-modal{
  height:min(700px, calc(100dvh - 32px)) !important;
  max-height:calc(100dvh - 32px) !important;
}
#order-conversation-content{
  width:100% !important;
  height:100% !important;
  max-height:100% !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
  min-height:0 !important;
}
.order-conversation-footer{
  width:100% !important;
  margin:0 !important;
  position:relative !important;
  bottom:auto !important;
}
.message-input-container{
  width:100% !important;
  max-width:100% !important;
  overflow:hidden !important;
}
@media(max-width:720px){
  .order-conversation-modal{height:100dvh !important;max-height:100dvh !important;}
}
