/* Core Styles */
    body {
        font-family: 'Poppins', sans-serif;
        background-color: #f8f9fa;
    }
    .navbar {
        background: linear-gradient(135deg, #0d6efd 0%, #0099ff 100%);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .navbar-brand {
        font-weight: 600;
        font-size: 1.5rem;
    }
    .nav-link {
        font-weight: 500;
        transition: all 0.3s ease;
    }
    .nav-link:hover {
        transform: translateY(-2px);
        color: #fff !important;
    }
    .main-content {
        min-height: calc(100vh - 70px);
        padding: 2rem 0;
    }

    /* Card & Button Styles */
    .card {
        border: none;
        border-radius: 15px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        transition: transform 0.3s ease;
    }
    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    .btn {
        border-radius: 8px;
        padding: 0.5rem 1.5rem;
        font-weight: 500;
        transition: all 0.3s ease;
    }
    .btn-primary {
        background: linear-gradient(135deg, #0d6efd 0%, #0099ff 100%);
        border: none;
    }
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    }
    .alert {
        border-radius: 10px;
        border: none;
    }
    .user-welcome {
        background: rgba(255, 255, 255, 0.1);
        padding: 0.5rem 1rem;
        border-radius: 8px;
        margin-right: 1rem;
    }
    .dropdown-menu {
        border: none;
        border-radius: 10px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    .dropdown-item {
        padding: 0.5rem 1rem;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    .dropdown-item:hover {
        background-color: #f8f9fa;
        transform: translateX(5px);
    }
    .dropdown-item i {
        width: 20px;
        text-align: center;
    }
    .stock-difference {
        text-align: right;
    }
    .difference-excess {
        color: #856404;
        background-color: #fff3cd;
    }
    .difference-short {
        color: #721c24;
        background-color: #f8d7da;
    }
    .difference-match {
        color: #155724;
        background-color: #d4edda;
    }
    /* เพิ่ม CSS สำหรับส่วนตรวจสอบสต็อก */
    .stock-item {
        transition: all 0.3s ease;
    }
    .stock-item:hover {
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
    }
    .stock-difference {
        font-weight: bold;
    }
    .stock-status {
        min-width: 60px;
        text-align: center;
        font-weight: bold;
    }
    /* Animation */
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(20px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .stock-item {
        animation: fadeIn 0.3s ease;
    }
    .card {
        transition: all 0.3s ease;
    }
    .stock-diff {
        font-weight: bold;
        text-align: right;
    }
    #stockItems .card {
        animation: slideDown 0.3s ease;
    }
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    /* Stock check styles */
    #stockCheckSection:not(.d-none) {
        display: block !important;
    }

    .stock-item {
        opacity: 1;
        transition: opacity 0.3s ease;
    }

    .stock-item.removing {
        opacity: 0;
    }
    /* Stock Check Section Styles */
    #stockCheckSection {
        display: none;
        transition: all 0.3s ease;
    }

    #stockCheckSection:not(.d-none) {
        display: block !important;
    }

    .stock-item {
        opacity: 1;
        transition: opacity 0.3s ease;
        animation: fadeIn 0.3s ease;
    }

    .feedback-nav-item {
        list-style-type: none; /* ลบจุด bullet point */
        margin-left: 10px;
    }

    .feedback-button {
        color: white !important; /* กำหนดสีให้เป็นสีขาวเสมอ */
        background-color: rgba(255, 255, 255, 0.2); /* พื้นหลังโปร่งใสเล็กน้อย */
        border-radius: 8px;
        padding: 8px 15px !important;
        transition: all 0.3s ease;
    }

    .feedback-button:hover {
        background-color: rgba(255, 255, 255, 0.3); /* เมื่อ hover ให้พื้นหลังเข้มขึ้น */
        transform: translateY(-2px);
        color: white !important;
    }

    /* แก้ไข selectors ให้มี specificity ที่สูงขึ้นแทนการใช้ !important */
    .navbar .nav-item .feedback-button {
        color: white;
        background-color: rgba(255, 255, 255, 0.2);
        /* ... */
    }

    .navbar .nav-item .feedback-button:hover {
        /* ... */
        color: white;
    }

    /* ปุ่มให้คะแนนบนมือถือ */
    .feedback-button-mobile {
        color: white;
        background-color: #ffc107;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    .feedback-button-mobile:hover {
        transform: scale(1.1);
        background-color: #ffcd39;
        color: white;
    }

    /* ทำให้ปุ่มให้คะแนนในเมนูแฮมเบอร์เกอร์เด่นชัด */
    @media (max-width: 991px) {
        .navbar-collapse {
            padding-top: 10px;
            padding-bottom: 10px;
        }
    }

    /* สไตล์สำหรับปุ่มแนะนำติชมแบบโดดเด่น */
    .feedback-button-mobile-prominent {
        color: #212529;
        background: linear-gradient(to right, #ffc107, #ffcd39);
        border-radius: 20px;
        padding: 8px 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        box-shadow: 0 3px 8px rgba(255, 193, 7, 0.4);
        font-size: 0.875rem;
        font-weight: 600;
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .feedback-button-mobile-prominent:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 12px rgba(255, 193, 7, 0.5);
        color: #212529;
        text-decoration: none;
    }

    .feedback-button-mobile-prominent i {
        font-size: 1.1em;
    }

    /* ปรับปรุง z-index ของ datepicker เพื่อให้แน่ใจว่าจะแสดงเหนือ elements อื่นๆ */
    .ui-datepicker {
        z-index: 9999 !important;
    }
    
    /* ปรับแต่ง datepicker ให้เข้ากับ theme */
    .ui-datepicker {
        font-family: 'Poppins', sans-serif; 
        font-size: 0.9em;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
    }

    .ui-datepicker-header {
        background-color: #0d6efd;
        color: white;
        border: none;
    }
    
    .ui-datepicker th {
        background-color: #f8f9fa;
        font-weight: normal;
    }
    
    .ui-datepicker .ui-state-default {
        border: 1px solid #dee2e6;
        background: #fff;
    }
    
    .ui-datepicker .ui-state-highlight {
        background-color: #e2e3e5;
        border-color: #dee2e6;
    }
    
    .ui-datepicker .ui-state-active {
        background-color: #0d6efd;
        color: white;
        border-color: #0d6efd;
    }
    
    /* เพิ่ม cursor: pointer เพื่อให้เห็นชัดเจนว่าสามารถคลิกได้ */
    input.datepicker {
        cursor: pointer;
        background-color: #ffffff;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-calendar" viewBox="0 0 16 16"><path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4z"/></svg>');
        background-repeat: no-repeat;
        background-position: right 10px center;
        padding-right: 30px;
    }

    /* === Location Modal === */
    .modal-header.bg-primary {
        background-color: #0d6efd !important;
        color: white !important;
    }

    .modal-header.bg-warning {
        background-color: #ffc107 !important;
        color: #212529 !important;
    }

    /* === Time Attendance === */
    #current-time {
        font-size: 2.5rem;
        font-weight: bold;
        margin: 0;
    }

    #current-date {
        color: #6c757d;
        font-size: 1.2rem;
    }

    /* === Location Status === */
    #locationStatus {
        transition: all 0.3s ease;
    }

    #currentLocation {
        min-height: 60px;
    }

    /* === Check In/Out Buttons === */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1.2rem;
    }

    /* === Datepicker === */
    .datepicker {
        cursor: pointer;
        background-color: #ffffff;
    }
