        :root { --primary-orange: #FF9800; --gradient-orange: linear-gradient(135deg, #FF9800, #FFC107); }
        body { background-color: #FFF3E0; font-family: 'Sarabun', sans-serif; overflow-x: hidden; }
        .sidebar { min-height: 100vh; background: #fff; box-shadow: 2px 0 5px rgba(0,0,0,0.1); }
        .nav-link { color: #555; margin-bottom: 5px; border-radius: 10px; }
        .nav-link:hover, .nav-link.active { background: var(--gradient-orange); color: white; font-weight: bold; }
        .nav-link i { margin-right: 10px; }
        .card-custom { border: none; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
        .product-card { cursor: pointer; border: 2px solid transparent; transition: 0.2s; }
        .product-card:hover { border-color: var(--primary-orange); }
        .product-img { height: 120px; background: #eee; border-radius: 10px 10px 0 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #aaa; }
        .fab-sync { position: fixed; bottom: 20px; right: 20px; width: 60px; height: 60px; border-radius: 50%; background: var(--gradient-orange); color: white; display: flex; align-items: center; justify-content: center; font-size: 24px; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.2); z-index: 1000; }
        
/* --- Sticky Header Table (ตารางล็อคหัว) --- */

/* 1. กล่องครอบตาราง: กำหนดความสูงและสั่งให้มี Scrollbar */
.table-scrollable {
    max-height: 65vh;       /* ความสูง 65% ของจอ (ปรับได้) */
    overflow-y: auto;       /* ถ้าเนื้อหาล้น ให้มี Scrollbar แนวตั้ง */
    border: 1px solid #dee2e6;
    display: block;         /* บังคับเป็นบล็อก */
    border-radius: 5px;     /* มนนิดๆ */
    background-color: #fff;
}

/* 2. ตัวตาราง: ให้ขยายเต็มความกว้าง */
.table-scrollable table {
    width: 100%;
    border-collapse: collapse;
}

/* 3. หัวตาราง: สั่งให้ลอยติดเพดาน */
.table-scrollable thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa; /* สีพื้นหลังต้องทึบ (สำคัญ) */
    color: #333;
    z-index: 10;               /* ลอยเหนือข้อมูล */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* เงาใต้หัวตาราง */
}

.product-card h6.card-title {
    white-space: normal !important;   /* ยกเลิกการตัดคำทิ้ง */
    text-overflow: unset !important;  /* เอา ... ออก */
    overflow: hidden !important;
    
    /* จัดระเบียบ 2 บรรทัด */
    display: -webkit-box;
    -webkit-line-clamp: 2;            /* โชว์ 2 บรรทัด */
    -webkit-box-orient: vertical;
    
    /* ปรับขนาด */
    font-size: 0.9rem;
    line-height: 1.3;
    height: 2.5em;                    /* ล็อคความสูงให้เท่ากันเป๊ะ */
    margin-bottom: 5px;
}