  /*@font-face {
    font-family: "Sarabun_Medium";
    src: url("../../fonts/Kanit-Regular.ttf");
  }

  @font-face {
    font-family: "Sarabun_Light";
    src: url("../../fonts/Kanit-Light.ttf");
  }*/


  /*@font-face {
    font-family: "Sarabun_Medium";
    src: url("../../fonts/IBMPlexSansThai.ttf");
  }

  @font-face {
    font-family: "Sarabun_Light";
    src: url("../../fonts/IBMPlexSansThai.ttf");
  }*/

  @font-face {
    font-family: "Sarabun_Medium";
    src: url("../../fonts/Sarabun-Regular.ttf");
  }

  @font-face {
    font-family: "Sarabun_Light";
    src: url("../../fonts/Sarabun-Regular.ttf");
  }

  .sarabun {font-family: "Sarabun_Light";}
  .sarabun-m {font-family: "Sarabun_Medium";}


  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }


  .loader {
    border: 12px solid #f3f3f3;
    border-radius: 50%;
    border-top: 12px solid #3498db;
    width: 80px;
    height: 80px;
    margin: auto;
    -webkit-animation: spin 2s linear infinite; /* Safari */
    animation: spin 2s linear infinite;
  }

  .loader-md {
    border: 8px solid #f3f3f3;
    border-radius: 50%;
    border-top: 8px solid #3498db;
    width: 50px;
    height: 50px;
    margin: auto;
    -webkit-animation: spin 2s linear infinite; /* Safari */
    animation: spin 2s linear infinite;
  }

  .loader-sm {
    border: 6px solid #f3f3f3;
    border-radius: 50%;
    border-top: 6px solid #3498db;
    margin-top: 8px;
    margin-bottom: 3px;
    width: 31px;
    height: 31px;
    -webkit-animation: spin 2s linear infinite; /* Safari */
    animation: spin 2s linear infinite;
  }

  .loader-lg {
    border: 15px solid #f3f3f3;
    border-radius: 60%;
    border-top: 15px solid #3498db;
    width: 100px;
    height: 100px;
    margin: auto;
    -webkit-animation: spin 2.5s linear infinite; /* Safari */
    animation: spin 2.5s linear infinite;
  }
  

  /* Safari */
  @-webkit-keyframes spin {
    0% { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  body.swal2-shown {
    .swal2-container {
      z-index: 1999999 !important; /* ปรับเลขตามที่ต้องการ */
    }
  }

  .float{
    position:fixed;
    width: 50px;
    height:50px;
    bottom: 55px;
    right: 55px;
    background-color:#0C9;
    color:#FFF;
    border-radius:50px;
    text-align:center;
    box-shadow: 2px 2px 3px #999;
  }

  .my-float{
    margin-top:18px;
  }

  ::-webkit-scrollbar {
    width: 12px;
  }

  ::-webkit-scrollbar-track {
    background: transparent;
    backdrop-filter: blur(4px);
    border-radius: 50px;
    margin: 10px; /* เว้นระยะจากด้านบนของ Container */
  }

  ::-webkit-scrollbar-thumb {
    background: rgba(209, 201, 201, 0.589);
    border-radius: 50px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
  }

  ::-webkit-scrollbar-thumb:hover {
    background: rgba(216, 170, 170, 0.5);
  }


  .bottomright {
    position: fixed;
    width: 50px;
    height:50px;
    bottom: 50px;
    right: 20px;
    font-size: 16px;
    border-radius: 50px;
    background-color:#007bff;
    color:#FFF;
    text-align: center;
    box-shadow: 2px 2px 3px #999;
    cursor: pointer;
  }

  .main-sidebar{
    z-index: 999999;
  }

  .footer-button {
    position: fixed;
    width: 100%;
    bottom: 0px;
    right: 0px;
  }


  .footer-cost {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: #ffffff;
    color: #333;
    text-align: center;
    padding: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); /* เพิ่มเงาด้านบนให้ดูมีมิติ */
    z-index: 1000; /* มั่นใจว่าอยู่เหนือเนื้อหาปกติ */
  }

  .sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    top: 0;
    right: 0;
    background-color: #fff;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
    z-index: 1000;
  }

  .sidenav-footer {
    position: fixed;
    bottom: 0;
    width: 0;
    right: 0;
    z-index: 1;
    overflow-x: hidden;
    background-color: #fff;
    transition: 0.5s;
    z-index: 999999;
  }

  .sidenav-back {
    height: 100%;
    width: 0;
    position: fixed;
    top: 0;
    right: 0;
    background-color: rgba(0,0,0,0.4);
    overflow-x: hidden;
    padding-top: 60px;
    z-index: 999;
  }

  @media screen and (max-height: 450px) {
    .sidenav {padding-top: 15px;}
    .sidenav a {font-size: 18px;}
  }

  .dropdown-menu-center {
    left: 50%;
    transform: translateX(-50%);
  }

  .loader-title {
    display: inline-block;
    width: 100%;
    height: 16px;
    position: relative;
    background-color: #DCDCDC;
    border-radius: 5px;
    animation: loader 2s infinite ease;
  }

  .loader-detail {
    display: inline-block;
    width: 100%;
    height: 14px;
    position: relative;
    background-color: #DCDCDC;
    border-radius: 25px;
    animation: loader 2s infinite ease;
    margin-top: 5px;
  }

  .card-custom {
      border: none;
      border-radius: 10px;
      box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
      margin-bottom: 1.5rem;
  }

  .fab-button {
    /* การวางตำแหน่ง */
    position: fixed;
    bottom: 20px;
    right: 20px;
    
    /* รูปลักษณ์ของปุ่ม */
    width: 45px;
    height: 45px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    text-decoration: none;
  }

  /* เอฟเฟกต์เมื่อเอาเมาส์ไปชี้ */
  .fab-button:hover {
    background-color: #0056b3;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  }

  /* เอฟเฟกต์เมื่อกด */
  .fab-button:active {
    transform: scale(0.95);
  }

  /* กล่องข้อความอธิบาย */
  .content-demo {
    max-width: 600px;
    margin: 50px auto;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  @keyframes loader {
    0% {
      opacity: 1;
    }
    50% {
      opacity: 0.2;
    }
    100% {
      opacity: 1;
    }
  }


  .dropdown-content {
    display: none;
    position: fixed;
    z-index: 10000;  
    background: white;
    min-width: 200px;
    border: 1px solid #ddd;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 5px 0;
    margin: 5px;
  }


  /* สำหรับ Textarea */
  textarea.custom-input {
    resize: vertical;
    min-height: 100px;
  }


  :root {
    --bg-dark: #fafafa;
    --text-light: #f4f4f4;
    --accent: #778a43ff;
    --border: #333;
    --side-width: min(500px, 100%);
    --dropdown-bg: #ffffff;
    --dropdown-border: rgba(0, 0, 0, 0.08);
    --item-hover-bg: #b6c9ccde;
    --item-hover-text: #4f46e5;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --accent-color: #6366f1; 
    --status-bg: #e0f2fe;
    --status-text: #fff;
    --radius-main: 16px;
    --radius-item: 0px; /* ปรับเป็น 0 เพราะใช้เส้นคั่นแบบเต็มขอบ */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-body: #f8fafc;
    --card-border: #e2e8f0;
    --plan-primary: #6366f1;
    --plan-primary-light: #eef2ff;
    --plan-bg: #f8fafc;
    --plan-card-bg: #ffffff;
    --plan-text-main: #1e293b;
    --plan-text-muted: #64748b;
    --plan-accent: #f43f5e;
    --plan-radius: 16px;
    -plan-status-pending: #f59e0b;
    --plan-status-done: #10b981;
    --plan-status-cancel: #ef4444;

    --header-bg: #ffffff;
    --row-hover: #f1f5f9;
  }

  .border-bottom-1 {
      border-bottom: 1px solid #ddd; /* สีเทาอ่อนมาตรฐาน Bootstrap */
  }

  .iframe-preview {
      /* ความสูง = 100% ของหน้าจอ - 500px */
      height: calc(100vh - 300px);
      
      /* แนะนำให้ใส่ overflow เพื่อให้เลื่อนดูเนื้อหาภายในได้หากยาวเกิน */
      overflow-y: auto; 
      
      border: 0px solid #ddd; /* ใส่เพื่อให้เห็นขอบเขตชัดเจน */

      min-height: 300px
  }

  .th-exepense {
    display: none; 
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.5s ease;
    overflow: hidden;
    white-space: nowrap;
    max-width: 0;
    padding: 0 !important; /* บีบไม่ให้เห็นพื้นที่เลย */
  }

  /* 2. สถานะที่เตรียมจะเคลื่อนไหว (เปิด Display แต่ยังไม่เลื่อน) */
  .th-exepense.preparing {
    display: table-cell;
  }

  /* 3. สถานะที่แสดงผลสมบูรณ์ (ค่อยๆ สไลด์และจางเข้ามา) */
  .th-exepense.show {
    opacity: 1;
    transform: translateX(0);
    max-width: 300px; /* ปรับให้พอดีกับเนื้อหาของคุณ */
    padding: 10px 15px !important; /* คืนค่า padding ปกติ */
  }

  .btn-toggle-expense {
    cursor: pointer;
    border-radius: 4px;
    background: transparent;
    transition: all 0.3s;
  }

  .btn-toggle-expense:hover {
    background: transparent;
  }

  .btn-toggle-expense i {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  .btn-toggle-expense.active i {
    transform: rotate(-180deg);
  }

  .total-cell {
    font-weight: 600;
    color: var(--text-main);
  }

  /*
    .th-exepense {
      opacity: 0;               /* โปร่งแสง *
      max-width: 0;             /* บีบความกว้างให้เหลือ 0 *
      overflow: hidden;         /* ซ่อนเนื้อหาที่เกินออกมา *
      white-space: nowrap;      /* ป้องกันข้อความตัดบรรทัดตอนบีบ *
      transform: translateX(20px); /* ดันไปทางขวา 20px เตรียมเลื่อนเข้า *
      transition: all 0.5s ease; /* กำหนดความเร็วในการขยับ *
      
      /* สำหรับ th/td ต้องใส่พวกนี้เพิ่มเพื่อให้บีบได้ *
      padding: 0;
      border: none;
    }

    /* สถานะเมื่อแสดงผล (.show) *
    .th-exepense.show {
      opacity: 1;               /* ชัดเจน *
      max-width: 200px;         /* ขยายความกว้าง (ตั้งให้มากกว่าเนื้อหาจริง) *
      transform: translateX(0);  /* เลื่อนกลับมาตำแหน่งซ้ายปกติ *
      padding: 8px;             /* คืนค่า padding ตามตารางปกติ *
      /* ถ้าเป็นตารางควรใช้ display: table-cell; *
    }
  */

/* Class-based Sidebar Styles */
  .sideoverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 9998;
  }
  .sideoverlay.active { display: block; }

  .side {
    position: fixed;
    top: 0;
    right: calc(var(--side-width) * -1);
    width: var(--side-width);
    /*height: 90vh;  กำหนดความสูงเต็มหน้าจอ */
    height: 100%;
    background-color: var(--bg-dark);
    color: var(--text-light);
    display: flex; /* เปิดใช้งาน Flexbox */
    flex-direction: column; /* จัดเรียงลูกๆ เป็นแนวตั้ง */
    transition: right 0.s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: -4px 0 15px rgba(0,0,0,0.3);
    z-index: 9999;
  }
  
  .side.open { right: 0;}

  .side-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* คงขนาดส่วนหัวไว้ ไม่ให้ถูกบีบ */
    background-color: #252525;
  }

  .side-search {
    padding: 15px 20px;
    background-color: #222;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }

  .search-container {
    display: flex;
    gap: 0; /* ระยะห่างระหว่าง input และ button */
    align-items: center;
  }

  .search-dropdown {
    flex-grow: 1;
    padding: 10px 15px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 20px 0 0 20px; 
    color: white;
    outline: none;
    transition: border-color 0.3s;
  }

  .search-input {
    flex-grow: 1;
    padding: 10px 15px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 20px 0 0 20px; 
    color: white;
    outline: none;
    transition: border-color 0.3s;
  }

  .search-input:focus {
    border-color: var(--accent);
  }

  .search-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 11px 20px; /* ปรับ padding ให้สมดุลกับ input */
    /* ปรับ border-radius ให้ด้านซ้ายตรง */
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.2s;
    white-space: nowrap;
  }

  .search-btn:hover {
    opacity: 0.8;
  }


  /* ส่วนเนื้อหา */
  .side-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0px;
  }

  .side-content-quotation {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
  }

  .side-footer {
    background-color: #252525;
    padding: 20px;
    border-top: 2px solid var(--accent);
    flex-shrink: 0;
    gap: 8px;
  }

  .footer-actions {
    display: flex;
    gap: 10px;
    width: 100%;
  }


  .btn-back {
    flex: 1;
    padding: 8px;
    background-color: transparent;
    border: 1px solid #555;
    color: #ccc;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    justify-content: center; /* จัดกลางแนวนอน */
    align-items: center;
    text-align: center;
  }

  .btn-back:hover {
    background-color: #333;
    color: white;
  }

  .btn-confirm {
    flex: 2;
    padding: 8px;
    background-color: var(--accent);
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.2s;
    justify-content: center; /* จัดกลางแนวนอน */
    align-items: center;
    text-align: center;
  }

  .btn-confirm:hover {
    opacity: 0.9;
  }


  .btn-check-in {
    flex: 2;
    padding: 8px;
    background-color: var(--accent-color);
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.2s;
    justify-content: center; /* จัดกลางแนวนอน */
    align-items: center;
    text-align: center;
  }

  .btn-check-in:hover {
    opacity: 0.9;
  }

  .text-black {
    color: #271c1c;
  }

  .text-link {
    display: inline-block;
    color: #f8f9faff; /* ปรับสีฟ้าให้สว่างขึ้นเพื่อให้ตัดกับสีเทา */
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0px 0;
    cursor: pointer;
    position: relative;
  }

  /* เอฟเฟกต์เมื่อเอาเมาส์วาง */
  .text-link:hover {
    color: #ffffff; /* เปลี่ยนเป็นสีขาวสว่าง */
    text-shadow: 0 0 8px rgba(130, 202, 255, 0.6);
  }

  /* สร้างเส้นใต้แบบอนิเมชั่น */
  .text-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #82caff;
    transition: width 0.3s ease;
  }

  .text-link:hover::after {
    width: 100%;
    background-color: #ffffff;
  }

/* Class-based Sidebar Styles */


  /* Item Styles */

/* custom-dropdown-item */
  .custom-dropdown-item-old {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    padding: 16px 20px;
    color: var(--text-main);
    text-decoration: none;
    /* เพิ่มเส้นคั่นด้านล่าง */
    border: none;
    border-bottom: 1px solid #f1f5f9; 
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    box-sizing: border-box;
    outline: none;
    text-align: left;
  }

  .custom-dropdown-item {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* สำคัญ: เพื่อให้ item-bottom ลงไปแถวล่างได้ */
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 16px 20px;
    color: var(--text-main);
    text-decoration: none;
    /* เพิ่มเส้นคั่นด้านล่างตามที่คุณต้องการ */
    border: none;
    border-bottom: 1px solid var(--border-color); 
    background: var(--item-bg);
    cursor: pointer;
    transition: var(--transition);
    box-sizing: border-box;
    outline: none;
    text-align: left;
  }

  .custom-item-home {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* สำคัญ: เพื่อให้ item-bottom ลงไปแถวล่างได้ */
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin: 0 auto;
    padding: 16px 20px;
    color: var(--text-main);
    text-decoration: none;
    /* เพิ่มเส้นคั่นด้านล่างตามที่คุณต้องการ */
    border: none;
    border-bottom: 1px solid var(--border-color); 
    background: var(--item-bg);
    transition: var(--transition);
    box-sizing: border-box;
    outline: none;
    text-align: left;
  }

  .custom-dropdown-item-home {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* สำคัญ: เพื่อให้ item-bottom ลงไปแถวล่างได้ */
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 16px 20px;
    color: var(--text-main);
    text-decoration: none;
    /* เพิ่มเส้นคั่นด้านล่างตามที่คุณต้องการ */
    border: none;
    border-bottom: 1px solid var(--border-color); 
    background: var(--item-bg);
    transition: var(--transition);
    box-sizing: border-box;
    outline: none;
    text-align: left;
  }

  .custom-item {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* สำคัญ: เพื่อให้ item-bottom ลงไปแถวล่างได้ */
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 16px 20px;
    color: var(--text-main);
    text-decoration: none;
  }

  

  .item-top {
    flex: 1 1 100%; /* บังคับให้ขยายเต็ม 100% เพื่อขึ้นแถวใหม่ */
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: center;
    gap: 2px;
    justify-content: space-between; /* จัดเนื้อหาซ้าย-ขวาในแถวล่าง*/
  }

  .item-main-content {
    flex: 1 1 100%;
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }

  /* รูปโปรไฟล์วงกลม */
  .profile-container {
    flex-shrink: 0;
  }

  .profile-circle-custom {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background-color: #e0e0e0;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      border: 2px solid #fff;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .profile-circle-custom-blank {
      width: 50px;
      height: 0px;
      border-radius: 50%;
      background-color: #ffffff00;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
  }

  .profile-circle-custom img {
      width: 100%;
      height: 100%;
      object-fit: cover;
  }

  .profile-circle-custom i {
    font-size: 30px;
    color: #999;
  }

  /* กลุ่มข้อมูลวันและเวลา */
  .info-grid {
    display: flex;
    flex-grow: 1;
    justify-content: space-between;
    gap: 10px;
  }

  .item-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .item-middle {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
  }

  

  /* ฝั่งขวา: สถานะและราคา */
  .item-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }

  .item-right-row {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: flex-end; /* ดันเนื้อหาไปทางขวาสุด */
    align-items: center;       /* จัดให้อยู่กึ่งกลางแนวตั้ง (ถ้าต้องการ) */
    gap: 2px;
  }
  /*      margin-top: 5px; border-top: 1px dashed var(--item-hover-bg); /* เพิ่มเส้นประคั่น */

  .item-bottom {
    flex: 1 1 100%; /* บังคับให้ขยายเต็ม 100% เพื่อขึ้นแถวใหม่ */
    padding-top: 5px;
    display: flex;
    flex-direction: column;
    /*justify-content: space-between; /* จัดเนื้อหาซ้าย-ขวาในแถวล่าง 
    align-items: center;*/
  }

  .item-bottom-img {
    flex: 1 1 100%; /* บังคับให้ขยายเต็ม 100% เพื่อขึ้นแถวใหม่ */
    padding-top: 5px;
    display: flex;
    flex-direction: column;
    padding-left: 60px;
    /*justify-content: space-between; /* จัดเนื้อหาซ้าย-ขวาในแถวล่าง 
    align-items: center;*/
  }

  .item-span {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
  }

  .company-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--accent-color);
  }

  .quotation-no {
    font-weight: 600;
    font-size: 14px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .date-created {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
  }

  .schedule-job-id {
    font-weight: 600;
    font-size: 16px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .schedule-date {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
  }

  .schedule-place {
    font-weight: 600;
    font-size: 14px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .schedule-address {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
  }

  .schedule-remark {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
  }

  

  .status-badge {
    font-size: 11px;
    font-weight: 590;
    padding: 4px 8px;
    border-radius: 99px;
    color: var(--status-text);
    text-transform: uppercase;
  }

  .total-amount {
    font-weight: 700;
    font-size: 15px;
    color: var(--item-hover-text);
  }

  .staff-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .staff-nickname {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .staff-emp-type {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 4px;
  }
  

  /* เอฟเฟกต์ตอน Hover */
  .custom-dropdown-item:hover {
      background-color: var(--item-hover-bg);
      /* เมื่อ Hover ให้ขยับเล็กน้อยและแสดงไฮไลท์ */
      z-index: 1;
      position: relative;
  }

  .custom-dropdown-item-select {
      background-color: var(--item-hover-bg);
  }

  .custom-dropdown-item:active {
      background-color: #f1f5f9;
  }


  .custom-dropdown-item-program {
    padding: 15px 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background-color: #252525;
  }

  .custom-dropdown-item-health-list {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    padding: 6px 10px;
    color: var(--text-main);
    text-decoration: none;
    /* เพิ่มเส้นคั่นด้านล่าง */
    border: none;
    border-bottom: 1px solid #cedae7ff; 
    background: transparent;
    transition: var(--transition);
    box-sizing: border-box;
    outline: none;
    text-align: left;
  }

  .custom-dropdown-item-health-list:last-child {
    border-bottom: none;
  }

  .health-code {
    font-weight: 600;
    font-size: 14px;
    color: var(--accent-color);
  }

  .health-description {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
  }

  .health-remark {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
  }

  .health-list-amount {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
  }

  .health-list-price {
    font-weight: 600;
    font-size: 12px;
    color: var(--accent-color);
  }

  .health-list-summary {
    font-weight: 600;
    font-size: 15px;
    color: var(--accent-color);
  }

  .custom-box {
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 10px; 
  }
  /*
  .custom-box {
    background-color: #3498db;
    border: 2px solid #2980b9;
    border-radius: 15px; 
  }
  */


  .checkup-schedule-container {
      max-width: 1000px;
      margin: 0 auto;
      padding: 0 1rem;
  }

  .checkup-header-section {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1rem;
      background: white;
      padding: 1rem;
      border: 1px solid var(--card-border);
      border-radius: 1rem;
      box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }

  /* Card Layout */
  .checkup-health-card {
      border: 1px solid var(--card-border);
      border-radius: 1rem;
      margin-bottom: 1.5rem;
      overflow: hidden;
      box-shadow: 0 1px 3px rgba(0,0,0,0.1);
      display: flex;
      flex-wrap: wrap;
  }


  /* Side Info (Date/Time) */
  .checkup-card-side {
      padding: 1rem;
      flex: 1 1 250px;
      border-right: 1px solid var(--card-border);
  }

  .checkup-info-group {
      display: flex;
      align-items: flex-start;/* เปลี่ยนจาก center เป็น flex-start เพื่อให้ไอคอนชิดบน */
      margin-bottom: 0.5rem;
  }

  .checkup-info-icon {
      width: 38px;
      height: 38px;
      min-width: 38px;
      min-height: 38px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: 12px;
      font-size: 0.9rem;
      margin-top: 2px; /* เพิ่ม margin เล็กน้อยเพื่อให้กึ่งกลางบรรทัดแรกของข้อความพอดี */
  }

  .checkup-info-icon-sm {
      width: 20px;
      height: 20px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: 10px;
      font-size: 0.9rem;
      margin-top: 2px; /* เพิ่ม margin เล็กน้อยเพื่อให้กึ่งกลางบรรทัดแรกของข้อความพอดี */
  }

  .checkup-bg-date { background: #dbeafe; color: #2563eb; }
  .checkup-bg-time { background: #d1fae5; color: #059669; }
  .checkup-bg-car { background: #fef3c7; color: #d97706; }
  .checkup-bg-checkup { background: #99e5f8; color: #0673d9; }

  .checkup-info-label {
      font-size: 0.7rem;
      text-transform: uppercase;
      font-weight: 700;
      letter-spacing: 0.05em;
      color: var(--text-muted);
  }

  .checkup-info-value {
      font-weight: 600;
      font-size: 0.95rem;
      
  }

  /* Main Content (Location/Type) */
  .checkup-card-main {
      padding: 1rem;
      flex: 1 1 300px;
  }

  .checkup-type-tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--primary-color);
      font-weight: 700;
      font-size: 0.75rem;
      text-transform: uppercase;
      margin-bottom: 0.5rem;
  }

  .checkup-location-title {
      font-size: 1.0rem;
      font-weight: 700;
      margin-bottom: 0.75rem;
      flex: 1 1 100%; /* บังคับให้ขยายเต็ม 100% เพื่อขึ้นแถวใหม่ */
      display: flex;
  }

  .checkup-note-box {
      background: #fffbeb;
      border: 1px solid #fef3c7;
      padding: 0.75rem;
      border-radius: 0.75rem;
      font-size: 0.85rem;
      color: #92400e;
      margin-top: 0.5rem;
      margin-bottom: 0.5rem;
  }

  /* Staff Section */
  .checkup-card-staff {
    background: white;
    flex: 1 1 100%; /* บังคับให้ขยายเต็ม 100% เพื่อขึ้นแถวใหม่ */
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--card-border);
  }

  .checkup-staff-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1rem;
  }

  .checkup-staff-section-title {
      font-size: 0.75rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #475569;
  }

  .checkup-staff-group {
      border: none;
      padding: 0.8rem;
      margin-left: 0.8rem;
      margin-right: 0.8rem;
      margin-bottom: 0.4rem;
      border-radius: 5px;
      box-shadow: 0 0.1rem 0.5rem 0 rgba(58, 59, 69, 0.1);
  }
  

  /*.checkup-staff-group:last-child {
      margin-bottom: 0;
  }*/

  .checkup-staff-list {
      display: grid;
      gap: 0.75rem;
  }

  .checkup-staff-member {
      position: relative;
      padding: 12px;
      border-radius: 12px;
      border: 1px solid #7490ce;
      transition: all 0.2s;
      margin-bottom: 5px;
      background: #fff;
      border-color: #dbeafe;
      box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }

  /*.checkup-staff-member {
      position: relative;
      background: #f8fafc;
      padding: 12px;
      border-radius: 12px;
      border: 1px solid #7490ce;
      transition: all 0.2s;
      margin-bottom: 5px;
  }

  .checkup-staff-member:hover {
      background: #fff;
      border-color: #dbeafe;
      box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }*/

  .checkup-staff-main-info {
      display: flex;
      align-items: center;
      margin-bottom: 5px;
  }

  .image-preview {
      width: 50px;
      height: 50px;
      background: transparent;
      border-radius: 0%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      color: transparent;
      border: 0px solid white;
      overflow: hidden; /* จัดการรูปที่ล้นขอบ */
  }
  .image-preview img {
      width: 100%;
      height: 100%;
      object-fit: cover; /* ให้รูปภาพพอดีกับวงกลม */
  }

  .checkup-staff-avatar {
      width:30px;
      height: 30px;
      background: #e2e8f0;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: 10px;
      font-size: 0.75rem;
      color: #64748b;
      border: 2px solid white;
      overflow: hidden; /* จัดการรูปที่ล้นขอบ */
  }
  .checkup-staff-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover; /* ให้รูปภาพพอดีกับวงกลม */
  }

  .checkup-staff-name-text {
      width: 70%;
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--primary-color);
  }

  .checkup-staff-id-2 {
      font-size: 0.7rem;
      color: #94a3b8;
      margin-left: auto;
      font-family: monospace;
  }

  .checkup-staff-id {
      font-size: 0.7rem;
      color: #94a3b8;
      margin-left: 8px;
      font-family: monospace;
  }

  /* New rows for Driving and Notes */
  .checkup-staff-details {
      display: grid;
      gap: 4px;
      padding-left: 38px; /* Align with name (avatar width + margin) */
  }

  .checkup-detail-row {
      display: flex;
      flex-wrap: wrap;
      font-size: 0.75rem;
      color: #64748b;
  }

  .checkup-detail-row-remark {
      display: flex;
      align-items: center;
      font-size: 0.75rem;
      color: #64748b;
  }

  .checkup-detail-row i {
      width: 16px;
      margin-right: 6px;
      font-size: 0.7rem;
  }

  .checkup-text-driving {
      color: #0891b2;
      font-weight: 600;
  }

  .checkup-text-note {
      font-style: italic;
      color: #94a3b8;
  }

  /* Action Buttons for Staff Member */
  .checkup-staff-actions {
      position: absolute;
      top: 10px;
      right: 10px;
      display: flex;
      gap:2px;
  }

  .btn-checkup-staff-action {
      width: 24px;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: none;
      background: transparent;
      border-radius: 6px;
      font-size: 0.7rem;
      color: #94a3b8;
      cursor: pointer;
      transition: all 0.2s;
  }

  .btn-checkup-staff-add {
      width: 24px;
      height: 24px;
      align-items: center;
      justify-content: center;
      border: none;
      background: transparent;
      border-radius: 6px;
      font-size: 0.8rem;
      color: var(--primary-color);
      cursor: pointer;
      transition: all 0.2s;
      padding: 5px;
      margin: 10px;
  }
  .btn-checkup-staff-add:hover {
      background: #eff6ff;
      color: var(--primary-color);
      transform: scale(1.2);
  }

  .btn-checkup-staff-edit:hover {
      background: #eff6ff;
      color: var(--primary-color);
      transform: scale(1.2);
  }

  .btn-checkup-staff-delete:hover {
      background: #fef2f2;
      color: #ef4444;
      transform: scale(1.2);
  }

  .checkup-checkup-staff-item {
      background: #f8fafc;
      padding: 0.75rem;
      border-radius: 0.75rem;
      border: 1px solid #f1f5f9;
  }

  .checkup-role-name {
      font-size: 0.85rem;
      font-weight: 700;
      color: var(--primary-color);
      margin-bottom: 0.75rem;
      display: flex;
      align-items: center;
      gap: 10px;
  }

  .checkup-role-name::after {
      content: "";
      flex-grow: 1;
      height: 1px;
      background: #e2e8f0;
  }

  /*font-size: 11px;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 99px;
      color: var(--status-text);
      text-transform: uppercase;*/

  .checkup-role-count {
      font-size: 0.65rem;
      background: #f1f5f9;
      color: #64748b;
      width: 40px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 99px;
      border: 1px solid #e2e8f0;
      font-weight: 800;
  }

  .checkup-staff-names {
      font-size: 0.85rem;
      color: var(--text-main);
      margin-top: 4px;
  }

  .btn-checkup-add-inline {
      background: none;
      border: none;
      color: #94a3b8;
      padding: 0;
      font-size: 0.85rem;
      cursor: pointer;
      transition: color 0.2s;
      display: flex;
      align-items: center;
  }

  .btn-checkup-add-inline:hover {
      color: var(--primary-color);
  }

  /* Responsive */
  @media (max-width: 768px) {
      .checkup-card-side, .checkup-card-main, .checkup-card-staff {
          flex: 1 1 100%;
          border-right: none;
          border-bottom: 1px solid var(--card-border);
      }
  }
/* custom-dropdown-item */

  .fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
  }

  .fab:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.4);
  }

  .fab:active {
    transform: scale(0.95);
  }

  .card-height {
      height: 60vh;
  }

/*-------- plan --------*/
  /* ปรับปรุง Container ให้รองรับ Desktop */
    .plan-container {
        width: 100%;
        max-width: 480px; /* จำกัดความกว้างเพื่อรักษา UI แบบมือถือ */
        background: var(--plan-card-bg);
        min-height: 80vh;
        display: flex;
        flex-direction: column;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
        border-radius: var(--plan-radius);
        overflow: hidden;
        margin: 0 auto;
    }

  /* Header Area */
  .plan-header {
      padding: 20px 15px 10px;
      background: #fff;
  }

  .plan-month-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;
      padding: 0 5px;
  }

  .plan-month-year-text {
      font-size: 1.25rem;
      font-weight: 800;
      color: var(--plan-text-main);
  }

  .plan-nav-controls {
      display: flex;
      gap: 5px;
  }

  .plan-nav-btn {
      background: var(--plan-primary-light);
      border: none;
      width: 32px;
      height: 32px;
      border-radius: 8px;
      cursor: pointer;
      color: var(--plan-primary);
      display: flex;
      align-items: center;
      justify-content: center;
  }

  /* Grid Calendar */
  .plan-calendar-grid-header {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      text-align: center;
      font-weight: 700;
      font-size: 0.75rem;
      color: var(--plan-text-muted);
      margin-bottom: 5px;
  }

  .plan-calendar-body {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      border: 1px solid #f1f5f9;
      border-radius: 12px;
      overflow: hidden;
      background: #f1f5f9;
      gap: 1px;
      /* แก้ไข: ป้องกัน Grid ขยายกว้างเกิน container */
      table-layout: fixed;
      width: 100%;
  }

  .plan-day-cell {
      background: #fff;
      min-height: 75px;
      padding: 4px;
      display: flex;
      flex-direction: column;
      cursor: pointer;
      transition: 0.2s;
      /* แก้ไข: บังคับให้เซลล์ไม่ขยายตามเนื้อหาข้างใน */
      min-width: 0; 
      overflow: hidden;
  }

  .plan-day-cell:hover {
      background: #fafafa;
  }

  .plan-day-cell.plan-active {
      background: var(--plan-primary-light);
  }

  .plan-day-cell.plan-muted {
      background: #fcfcfc;
      color: #cbd5e1;
  }

  .plan-day-num {
      font-size: 0.85rem;
      font-weight: 700;
      margin-bottom: 4px;
  }

  .plan-day-cell.plan-today .plan-day-num {
      color: var(--plan-primary);
      background: var(--plan-primary-light);
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
  }

  /* Small labels inside the grid */
  .plan-grid-event-label {
      font-size: 0.55rem;
      /*background: var(--plan-primary);*/
      color: white;
      padding: 1px 3px;
      border-radius: 3px;
      margin-bottom: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      /*max-width: 100%;*/
      /* แก้ไข: ตัดข้อความที่ยาวเกินไปให้เป็นจุด (...) */
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      width: 100%;
      display: block;
  }

  .plan-grid-event-more {
      font-size: 0.5rem;
      color: var(--plan-text-muted);
      font-weight: 600;
  }

  /* Events Section */
  .plan-events-panel {
      flex: 1;
      background: #f8fafc;
      padding: 20px 15px;
      border-top: 1px solid #f1f5f9;
  }

  .plan-section-title {
      font-size: 1rem;
      font-weight: 700;
      margin-bottom: 15px;
      color: var(--plan-text-main);
      padding-left: 5px;
  }

  .plan-event-card {
      background: #fff;
      padding: 12px 15px;
      border-radius: 12px;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 12px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.02);
      border-left: 4px solid var(--plan-primary);
      cursor: pointer;
  }

  .plan-event-card:hover {
    background: #fafafa;
    transform: scale(1.03);
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.4);
  }

  .plan-time-badge {
      display: flex;             /* เปิดใช้งาน Flexbox */
      justify-content: center;    /* จัดกึ่งกลางแนวนอน */
      align-items: center;        /* จัดกึ่งกลางแนวตั้ง */

      font-size: 0.75rem;
      font-weight: 700;
      width: 90px;
      align-content: center;
      background: var(--plan-primary-light);
      padding: 4px 8px;
      border-radius: 6px;
      text-align: center;
  }

  .plan-event-info {
    flex: 1;
    padding-right: 10px; /* เว้นที่ให้ Badge ทางขวา */
    min-width: 0; /* แก้ไข: ให้เนื้อหาใน card ตัดข้อความได้ถ้าชื่อยาวเกินไป */
  }

  .plan-event-info .plan-name {
      font-weight: 600;
      font-size: 0.9rem;
      display: block;
      color: var(--plan-text-main);
      /* แก้ไข: ป้องกันชื่อกิจกรรมยาวจนทลุ Badge */
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
  }

  .plan-event-info .plan-desc {
      font-size: 0.75rem;
      color: var(--plan-text-muted);
      display: block;
      /* แก้ไข: รายละเอียดสามารถขึ้นบรรทัดใหม่ได้ แต่ไม่ทำให้เพี้ยน */
      word-break: break-word;
  }


  .plan-event-info .plan-create-by {
      font-size: 0.75rem;
      color: var(--plan-primary);
      display: block;
      /* แก้ไข: รายละเอียดสามารถขึ้นบรรทัดใหม่ได้ แต่ไม่ทำให้เพี้ยน */
      word-break: break-word;
  }

  .plan-status-badge {
    top: 12px;
    right: 15px;
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
  }

  .plan-empty-state {
      text-align: center;
      padding: 30px;
      color: var(--plan-text-muted);
      font-size: 0.9rem;
  }
/*-------- plan --------*/
.dropdown-item-custom {
    display: flex;          /* ใช้ flexbox จัดเรียงแนวนอน */
    align-items: center;    /* จัดให้อยู่กึ่งกลางแนวตั้ง */
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: #333;
}

.dropdown-item-custom:hover {
    background-color: #f8f9fa;
}
.dropdown-image {
    width: 40px;            /* กำหนดความกว้าง */
    height: 40px;           /* กำหนดความสูง */
    border-radius: 50%;     /* ทำเป็นวงกลม */
    margin-right: 12px;     /* เว้นระยะห่างจากชื่อ */
    object-fit: cover;      /* ป้องกันรูปเบี้ยว */
    background-color: transparent; /* สีพื้นหลังกรณีรูปโหลดไม่ขึ้น */
    flex-shrink: 0;         /* ป้องกันรูปโดนบีบขนาด */
}

/* ส่วนของข้อความ */
.dropdown-details {
    display: flex;
    flex-direction: column; /* จัดชื่อและ Full Time ให้อยู่คนละบรรทัด */
    overflow: hidden;       /* สำหรับจัดการ text-truncate */
}

    
.custom-btn-block {
    color: var(--text-muted);
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    text-decoration: none !important;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    gap: 2px;
}
.custom-btn-block:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.btn-img-left {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 12px;
    background-color: transparent;
    flex-shrink: 0;         /* ป้องกันรูปโดนบีบขนาด */   
}

.btn-content {
    flex-grow: 1;
    line-height: 1.2;
    min-width: 0;
    text-align: left;
}
.btn-title {
    display: block;
    color: #007bff;
    font-weight: bold;
    font-size: 1rem;
}
.btn-subtitle {
    display: block;
    color: #6c757d;
    font-size: 0.75rem;
}
.btn-actions {
    display: flex;
    align-items: center;
    color: #adb5bd;
}
.close-link {
    padding: 0 8px;
    color: #adb5bd;
    transition: color 0.2s;
}
.close-link:hover {
    color: #dc3545;
}

.dropdown-custom-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1d4ed8;
  padding: 4px 8px;
  border-radius: 25px;
  animation: dropdownCustomChipAppear 0.2s ease-out forwards;
}

@keyframes dropdownCustomChipAppear {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.dropdown-custom-chip-img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.dropdown-custom-chip-title {
  display: block;
  color: #007bff;
  font-weight: bold;
  font-size: 0.8rem;
}

.dropdown-custom-chip-subtitle {
    display: block;
    color: #6c757d;
    font-size: 0.70rem;
}

.dropdown-custom-chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 9999px;
  transition: background-color 0.2s ease;
}

.dropdown-custom-chip-remove:hover {
  background-color: #dbeafe;
}




.custom-item-scroll-area {
    height: 600px;
    overflow-y: auto;
}

.custom-item-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.custom-item-scroll-area::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Custom Component Classes */
.custom-item-inspection-item {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

@media (min-width: 640px) {
    .custom-item-inspection-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.custom-item-inspection-item:hover {
    background-color: var(--hover-bg);
}

.custom-item-doc-id {
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
}

.custom-item-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 600;
    background-color: #eff6ff;
    color: var(--accent-blue);
    border: 1px solid #dbeafe;
}

.custom-item-project-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.custom-item-info-group {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.custom-item-info-date {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-item-action-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.custom-rounded {
  border-radius: 20px !important; /* ปรับค่าตัวเลขตรงนี้ได้ตามต้องการ */
}

.bg-white-custom {
    background-color: #ffffff !important;
}



/* Container สำหรับตารางที่ต้องการ Fixed Header */
.table-responsive-fixed {
    min-height: 65vh;
    max-height: 65vh; /* กำหนดความสูงที่ต้องการ Scroll */
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background: white;
    border: 1px solid #e2e8f0;
}

/* ปรับแต่ง Table ใหม่ทั้งหมดเพื่อเลี่ยง CSS เดิมของ Bootstrap ที่ดื้อด้าน */
.custom-fixed-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* หัวตารางติดหนึบ (Sticky Header) */
.custom-fixed-table thead th {
  position: sticky;
  top: 0;
  background-color: var(--header-bg);
  z-index: 100;
  padding: 16px;
  font-weight: 600;
  
  /* ลบเส้นขอบทุกด้านอย่างเด็ดขาด โดยเฉพาะด้านบน */
  border-top: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  
  /* ใช้ shadow เล็กน้อยด้านล่างแทนเส้นเพื่อให้ดูมีมิติเวลา scroll */
  box-shadow: inset 0 -1px 0 #e2e8f0; 
}

.custom-fixed-table tbody tr:hover {
  background-color: var(--row-hover);
}

/* ปรับแต่งเนื้อหาตาราง */
.custom-fixed-table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    font-size: 0.9rem;
}

/* เอฟเฟกต์เมื่อ Hover แถว */
.custom-fixed-table tbody tr:hover {
  background-color: var(--row-hover);
}

.bg-transparent{
  background: transparent;
}


.custom-btn-dorpdown {
  color: var(--text-muted);
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 25px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  text-decoration: none !important;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  gap: 2px;
  height: 38px;
}
.custom-btn-dorpdown:hover {
  box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.1);
}

.custom-search-input {
  flex-grow: 1;
  padding: 10px 15px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 25px 0 0 25px; 
  color: var(--text-muted);
  outline: none;
  transition: border-color 0.3s;
  height: 38px;
}

.custom-search-input:focus {
  box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.1);
}

.custom-search-btn {
  height: 38px;
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 3px 20px; /* ปรับ padding ให้สมดุลกับ input */
  /* ปรับ border-radius ให้ด้านซ้ายตรง */
  border-radius: 0 20px 20px 0;
  cursor: pointer;
  font-size: medium;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.custom-search-btn:hover {
  opacity: 0.8;
}

.btn-round {
    border-radius: 25px !important; 
    /* ใส่ !important เพื่อให้มั่นใจว่ามันจะไปทับค่าเดิมของ Bootstrap */
}

.custom-btn-add {
  height: 38px;
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  transition: opacity 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  text-decoration: none !important;
  position: relative;
  gap: 2px;

  /* เพิ่มโค้ดบรรทัดนี้ */
  width: 100%; 
  /* (ตัวเลือกเสริม) ถ้าอยากให้ข้อความอยู่ตรงกลางปุ่มพอดี */
  justify-content: center; 
}

.custom-btn-add:hover {
  opacity: 0.8;
}

.card-custom-outline {
  border-top: 3px solid #ced4db !important;
}
.mileage-badge {
  background-color: #afeafc;
  border-radius: 4px;
  padding: 4px 8px;
  font-weight: bold;
}


@media (min-width: 640px) {
    .custom-item-action-group {
        margin-top: 0;
        padding-left: 1.5rem;
    }
}

