/* ==========================================
   1. Google-Style Base Settings
   ========================================== */
:root {
    --bg-color: #f5f0e6;      /* สีพื้นหลังแบบ Google นวลตา */
    --text-color: #444444;    /* สีตัวอักษรแบบนุ่มนวล */
    --brand-blue: #73c8f0;    /* สีฟ้า P.CRM.AIAgent */
    --google-dark: #202124;   /* เพิ่มตัวแปรที่ขาดไป */
}

body {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
    font-family: 'Inter', sans-serif !important;
}

/* ==========================================
   2. Navbar Styling 
   ========================================== */
.navbar {
     background-color: var(--bg-color) !important; /* เปลี่ยน Navbar เป็นสีครีม */
    border-bottom: 1px solid #e0dcd0; /* เส้นขอบบางๆ เพื่อแยกส่วน */
   
}

.navbar-brand span {
    color: var(--brand-blue) !important;
    font-weight: 600 !important;
    letter-spacing: -0.3px;
}

.nav-link {
    color:  #444444 !important;
    background-color: white !important;
}

/* ==========================================
   3. UI Components & Search
   ========================================== */
.card {
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    background-color: #ffffff !important; /* พื้นหลังการ์ดขาวสะอาดแบบ Google */
}

.search-container {
    background: white !important;
    padding: 10px 20px !important;
    border-radius: 30px !important;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1) !important;
    border: 1px solid #dfe1e5 !important;
}

.btn {
    background-color: #e8e8e8 !important;
    color: var(--text-color) !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 8px !important;
    padding: 8px 20px !important;
}

.btn:hover {
    background-color: #dbdbdb !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
    border-color: #c0c0c0 !important;
}
.sidebar, .list-group-item {
    background-color: #f5f0e6 !important; /* พื้นหลัง Sidebar ให้เข้ากับสีหน้าเว็บ */
    color: #444444 !important;            /* เปลี่ยนตัวอักษรเป็นสี #444444 */
    border: none !important;
}

/* เพิ่มลูกเล่นเวลาเอาเมาส์ไปชี้ (Hover Effect) ให้ดูมีมิติแบบ Google */
.list-group-item:hover {
    background-color: #e8e3d6 !important; /* สีเข้มกว่าพื้นหลังนิดหน่อยให้รู้ว่าชี้อยู่ */
    border-radius: 6px !important;
    transition: all 0.2s ease;
}

/* การเลือกหัวข้อที่ใช้งานอยู่ (Active State) */
.list-group-item.active-category {
    background-color: #e8e3d6 !important;
    color: #444444 !important;
    font-weight: 700 !important;
    border-left: 4px solid #444444 !important; /* เส้นขอบข้างซ้ายสี #444444 */
}
.navbar-amazon-style { background-color: #232f3e; color: white; }
.top-nav { display: flex; align-items: center; padding: 10px 20px; }

/* ช่องค้นหาแบบ Amazon */
.search-bar { flex-grow: 1; display: flex; margin: 0 20px; }
.search-bar input { flex-grow: 1; padding: 10px; border: none; border-radius: 4px 0 0 4px; }
.search-btn { background: #febd69; border: none; padding: 0 20px; border-radius: 0 4px 4px 0; }

/* แถบเมนูสีเข้มสไตล์ Professional */
.sub-nav { background-color: #37475a; padding: 8px 20px; display: flex; gap: 20px; }
.sub-nav a { color: white; text-decoration: none; font-size: 0.9rem; }
.table-danger-custom { background-color: #fff5f5 !important; color: #b91c1c !important; }
    
    /* นำโค้ดใหม่มาวางตรงนี้ */
    @keyframes highlight-new {
        0% { background-color: #d1ecf1; }
        100% { background-color: transparent; }
    }
    #inbound-list tr:first-child {
        animation: highlight-new 3s ease-out;
    }


    /* ปรับแต่งสีพื้นหลังและสีตัวอักษรเมื่อ Tab เป็น Active */
    .nav-tabs .nav-link.active {
        font-weight: bold;
        border-bottom: 3px solid #007bff; /* ขีดเส้นใต้สีน้ำเงิน */
    }

    /* สีพิเศษตามแต่ละสถานะ */
    .nav-tabs .nav-link[href="#pending"].active { color: #856404; background-color: #fff3cd; border-color: #ffeeba; }
    .nav-tabs .nav-link[href="#underpaid"].active { color: #0c5460; background-color: #d1ecf1; border-color: #bee5eb; }
    .nav-tabs .nav-link[href="#approved"].active { color: #155724; background-color: #d4edda; border-color: #c3e6cb; }
    .nav-tabs .nav-link[href="#rejected"].active { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }
    
.card-body .text-warning {
    letter-spacing: 2px;
}
.text-muted.small {
    font-size: 0.8rem;
}
#alert-container {
    margin-bottom: 20px;
    z-index: 1050;
    transition: all 0.3s ease-in-out;
}

.alert {
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
