 * {
      font-family: 'Sarabun', sans-serif;
    }

    .loader {
      width: 40px;
      height: 40px;
      border: 4px solid #ccc;
      border-top-color: #3498db;
      border-radius: 50%;
      animation: spinner 1.5s linear infinite;
      margin: auto;
    }

    @keyframes spinner {
      0% {
        transform: rotate(0deg);
      }

      100% {
        transform: rotate(360deg);
      }
    }

    .swal2-popup {
      font-family: 'Sarabun', sans-serif;
    }

    .searchable-select {
      position: relative;
    }

    .searchable-select input {
      width: 100%;
      padding: 8px 12px;
      border: 1px solid #d1d5db;
      border-radius: 6px;
      background-color: white;
      cursor: pointer;
    }

    .searchable-select .dropdown {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: white;
      border: 1px solid #d1d5db;
      border-top: none;
      border-radius: 0 0 6px 6px;
      max-height: 200px;
      overflow-y: auto;
      z-index: 1000;
      display: none;
      will-change: transform;
      transform: translateZ(0);
      scroll-behavior: smooth;
    }

    .searchable-select .dropdown.show {
      display: block;
    }

    .searchable-select .option {
      padding: 8px 12px;
      cursor: pointer;
      border-bottom: 1px solid #f3f4f6;
      will-change: background-color;
    }

    .searchable-select .option:hover,
    .searchable-select .option.highlighted {
      background-color: #f3f4f6;
      transform: translateZ(0);
    }

    .searchable-select .option.selected {
      background-color: #dbeafe;
      color: #1d4ed8;
    }

    .searchable-select .no-results {
      padding: 8px 12px;
      color: #6b7280;
      font-style: italic;
    }

    .searchable-select.flex-item {
      border-radius: 6px 0 0 6px;
    }

    .searchable-select.flex-item .search-input {
      border-radius: 6px 0 0 6px;
      border-right: none;
    }

    .searchable-select.flex-item .dropdown {
      border-radius: 0 0 6px 6px;
    }


    .modal-overlay {
      backdrop-filter: blur(4px);
    }


    .loading-dots::after {
      content: '';
      animation: dots 1.5s infinite;
    }

    @keyframes dots {

      0%,
      20% {
        content: '';
      }

      40% {
        content: '.';
      }

      60% {
        content: '..';
      }

      80%,
      100% {
        content: '...';
      }
    }


    .loading-search {
      display: inline-block;
      width: 12px;
      height: 12px;
      border: 2px solid #f3f3f3;
      border-top: 2px solid #3498db;
      border-radius: 50%;
      animation: spin 1s linear infinite;
      margin-left: 8px;
    }

    @keyframes spin {
      0% {
        transform: rotate(0deg);
      }

      100% {
        transform: rotate(360deg);
      }
    }

    mark {
      background-color: #fef08a !important;
      color: inherit;
      padding: 0;
    }


    .user-info-section {
      background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
      border-left: 4px solid #3b82f6;
    }

    .admin-branch-section {
      background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
      border-left: 4px solid #f59e0b;
    }

    .form-section-title {
      color: #374151;
      border-bottom: 2px solid #e5e7eb;
      padding-bottom: 8px;
      margin-bottom: 16px;
    }


    .readonly-input {
      background-color: #f9fafb !important;
      cursor: default !important;
      color: #6b7280;
    }

    .readonly-input:focus {
      outline: none !important;
      box-shadow: 0 0 0 2px #e5e7eb !important;
      border-color: #d1d5db !important;
    }


    #supplier-address-section {
      transition: all 0.3s ease;
    }

    #supplier-address-section.hidden {
      opacity: 0;
      max-height: 0;
      overflow: hidden;
      margin-bottom: 0;
      padding: 0;
    }

    #supplier-address-section:not(.hidden) {
      opacity: 1;
      max-height: 200px;
      margin-bottom: 1.5rem;
    }

    textarea.readonly-input {
      resize: none;
      font-family: inherit;
      line-height: 1.5;
    }

    textarea.readonly-input:hover {
      border-color: #d1d5db;
    }


    .products-table {
      table-layout: fixed;
      width: 100%;
    }

    .products-table th,
    .products-table td {
      vertical-align: middle;
    }


    .products-table .col-barcode {
      width: 200px!important;
    }
 

    .products-table .col-unit {
      width: 150px!important;
    }

    .products-table .col-expdate {
      width: 130px!important;
    }

    .products-table .col-qty {
      width: 80px!important;
    }

    .products-table .col-actions {
      width: 50px!important;
    }

    .product-name-input,.product-unit-input{
      font-size: 15px!important;
    }

    .inline-barcode-search {
      position: relative;
      width: 100%;
    }

    .inline-barcode-search input {
      width: 100%;
      padding: 8px 12px;
      border: 1px solid #d1d5db;
      border-radius: 6px;
      font-size: 14px;
      background-color: white;
    }

    .inline-barcode-search input:focus {
      outline: none;
      box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
      border-color: #3b82f6;
    }

    .inline-barcode-search .dropdown {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: white;
      border: 1px solid #d1d5db;
      border-top: none;
      border-radius: 0 0 6px 6px;
      max-height: 150px;
      overflow-y: auto;
      z-index: 1000;
      display: none;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .inline-barcode-search .dropdown.show {
      display: block;
    }

    .inline-barcode-search .option {
      padding: 8px 12px;
      cursor: pointer;
      border-bottom: 1px solid #f3f4f6;
      font-size: 14px;
    }

    .inline-barcode-search .option:hover,
    .inline-barcode-search .option.highlighted {
      background-color: #f3f4f6;
    }

    .inline-barcode-search .option.selected {
      background-color: #dbeafe;
      color: #1d4ed8;
    }

    .inline-barcode-search .no-results {
      padding: 8px 12px;
      color: #6b7280;
      font-style: italic;
      font-size: 14px;
    }


    .add-item-btn {
      background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
      border: none;
      color: white;
      padding: 10px 16px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 500;
      transition: all 0.2s ease;
    }

    .add-item-btn:hover {
      background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    }


    @media (max-width: 768px) {
      .grid.grid-cols-2 {
        grid-template-columns: 1fr;
      }

      .products-table .col-barcode {
        width: 30%;
      }

      .products-table .col-name {
        width: 35%;
      }

      .products-table .col-unit {
        width: 15%;
      }

      .products-table .col-expdate {
        width: 20%;
      }

      .products-table .col-qty {
        width: 15%;
      }

      .products-table .col-actions {
        width: 15%;
      }
    }





    .view-only-modal {
      pointer-events: auto;
    }

    .view-only-modal input,
    .view-only-modal textarea,
    .view-only-modal select {
      background-color: #f9fafb !important;
      border-color: #d1d5db !important;
      color: #6b7280 !important;
      cursor: default !important;
      pointer-events: none !important;
    }

    .view-only-modal input:focus,
    .view-only-modal textarea:focus,
    .view-only-modal select:focus {
      outline: none !important;
      box-shadow: none !important;
    }

    .view-only-modal .add-item-btn,
    .view-only-modal .remove-product-btn,
    .view-only-modal #add-product-row-btn {
      display: none !important;
    }

    .view-only-modal .products-table th:last-child,
    .view-only-modal .products-table td:last-child {
      display: none !important;
    }

    .claim-images-view-only {
      margin-bottom: 1.5rem;
    }

    .claim-images-grid-view {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 1rem;
    }

    .detail-btn {
      color: #059669 !important;
    }

    .detail-btn:hover {
      color: #047857 !important;
    }


    .swal-wide {
      max-width: 95vw !important;
    }

    .swal-wide .swal2-html-container {
      max-height: 70vh;
      overflow-y: auto;
    }


    .combined-claim-details {
      font-size: 0.875rem;
    }

    .combined-claim-note {
      max-width: 200px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }



    select#user-branch {
      -webkit-appearance: menulist;
      -moz-appearance: menulist;
      appearance: menulist;
    }


    select#user-branch option {
      display: block;
    }


    .img-spinner {
      width: 40px;
      height: 40px;
      border: 4px solid #d1d5db;
      border-top-color: #3b82f6;
      border-radius: 50%;
      animation: spin 1s linear infinite;
      margin: auto;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    .claim-img-msg {
      font-size: .875rem;
      color: #6b7280;
      text-align: center;
      width: 100%;
      padding: 1rem 0;
    }
	

  @keyframes fade-in-up {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards;
  }
  
  @keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.5s ease-out forwards; 
}

	@keyframes modal-in {
	  from {
		opacity: 0;
		transform: translateY(20px) scale(0.95);
	  }
	  to {
		opacity: 1;
		transform: translateY(0) scale(1);
	  }
	}

	.animate-modal-in {
	  animation: modal-in 0.3s ease-out forwards;
	}
  


#claim-form-modal .searchable-select{
  position: relative;
  z-index: 60;           
  overflow: visible;    
}


#claim-form-modal .searchable-select .dropdown{
  position: absolute !important;
  z-index: 61 !important; 
}



#claim-form-modal .bg-green-50 {
  position: relative;   
  z-index: 30;          
}


#claim-form-modal .bg-green-50 .searchable-select .dropdown{
  z-index: 31;      
}



/*  custom by Alex */
.td-minwidth{
  min-width: 160px; 
}