/* --- Variables --- */
:root {
    --tg-card-background: #fdfdfd;
    --tg-white: white;
    --tg-primary: #39858D;

    --tg-primary-100: #eef9fa;
    --tg-primary-200: #ceedf0;
    --tg-primary-300: #aedfe2;
    --tg-primary-400: #81c9cf;
    --tg-primary-500: #109ca7;
    --tg-primary-600: #216969;
    --tg-primary-700: #1a5057;
    --tg-primary-800: #1d4146;
    --tg-primary-900: #152f33;



    --tg-grey-50:  #f2f2f2;
  --tg-grey-100: #eeeded;
  --tg-grey-200: #c7c7c7;
  --tg-grey-300: #cccbcb;
  --tg-grey-400: #8c8c8c;
  --tg-grey-500: #737373;
  --tg-grey-600: #595959;
  --tg-grey-700: #404040;
  --tg-grey-800: #262626;
  --tg-grey-900: #1a1a1a;
  --tg-grey-950: #0d0d0d;

    --tg-sky: #36c5df; /* base */

  --tg-sky-100: #eef7f8;
  --tg-sky-200: #d1e6eb;
  --tg-sky-300: #b3d7e6;
  --tg-sky-400: #8fcde6; /* ตามที่ให้มา */
  --tg-sky-500: #74bcd8; /* ตามที่ให้มา */
  --tg-sky-600: #36c5df; /* เท่ากับ --tg-sky */
  --tg-sky-700: #1db2cd;
  --tg-sky-800: #1397ae;
  --tg-sky-900: #0b7a8e;




  --tg-secondary: #6c757d;
  --tg-accent: #f5b041;
  --tg-blue:rgb(108, 181, 240);


    --tg-orange: #f38c16;
    --tg-grey: rgb(207, 207, 207);
    --tg-text: #333333;
     /* --label-color: #555; */
     --border-color: #ccc;

    --pending-cl: rgba(179, 223, 220, 1);
    --awaiting-cl: rgba(128, 203, 195, 1);
    --confirm-cl: rgba(77, 182, 172, 1);
    --deposit-cl: rgba(38, 166, 153, 1);
    --complete-cl: rgba(38, 166, 128, 1);
    --noshow-cl: rgba(255, 184, 77, 1);
    --cancelled-cl: rgba(229, 115, 115, 1);
    --done-cl: rgb(3, 184, 154);

    /* Define the semi-transparent gradient backgrounds */
    --pending-gd: linear-gradient(270deg, var(--tg-sky-200), rgba(179, 223, 220, 0.5));
    --awaiting-gd: linear-gradient(270deg, var(--tg-sky-200), rgba(128, 203, 195, 0.5));
    --confirm-gd: linear-gradient(270deg, var(--tg-sky-200), rgba(77, 182, 172, 0.5));
    --deposit-gd: linear-gradient(270deg, var(--tg-sky-200), rgba(38, 166, 153, 0.5));
    --complete-gd: linear-gradient(270deg, var(--tg-sky-200), rgba(38, 166, 128, 0.5));
    --noshow-gd: linear-gradient(270deg, var(--tg-sky-200), rgba(255, 184, 77, 0.5));
    --cancelled-gd: linear-gradient(270deg, var(--tg-sky-200), rgba(229, 115, 115, 0.5));
    --primary-gd: linear-gradient(270deg, var(--tg-primary-700), var(--tg-primary-600));


/* font-family: 'Inter', sans-serif; */
    /* -- Font Families -- */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Manrope', var(--font-primary);
    --font-mali: "Mali", cursive;


    /* -- Font Sizes -- */
     --fs-base: 16px;
     --fs-h1: 2.5rem;
     --fs-h2: 2rem;
     --fs-h3: 1.5rem;
     --fs-lg: 1.125rem;
     --fs-md: 1rem;
     --fs-sm: 0.875rem;
     --fs-xsm: 0.75rem;
     --fs-xxsm: 0.625rem;
    /* -- Font Weights -- */
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* --- ตัวแปร Font Weight ที่คุณมีอยู่แล้ว --- */
    --font-weight-extrabold: 800;

    /* --- [ส่วนที่เพิ่มใหม่] ตัวแปรสำหรับ Box Shadow --- */

    /* เงาขนาดเล็ก (สำหรับ UI ทั่วไป, ปุ่ม) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);

    /* เงาขนาดกลาง (สำหรับ Card, กล่องเนื้อหา) */
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);

    /* เงาขนาดใหญ่ (สำหรับ Element ที่ต้องการให้ลอยเด่น) */
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* เงาขนาดใหญ่มาก (สำหรับ Modal, Pop-up) */
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* เงาด้านใน (สำหรับ Input field ที่ถูกกด) */
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}


/* --- Status Badges (Backgrounds) --- */
.bg-pending { background: var(--pending-cl); color: #333; }
.bg-awaiting { background: var(--awaiting-cl); color: #fff; }
.bg-confirm { background: var(--confirm-cl); color: #fff; }
.bg-deposit { background: var(--deposit-cl); color: #fff; }
.bg-complete { background: var(--complete-cl); color: #fff; }
.bg-noshow { background: var(--noshow-cl); color: #fff; }
.bg-cancelled { background: var(--cancelled-cl); color: #fff; }
.bg-done { background: var(--done-cl); color: #fff; }

.bg-gd-pending { background: var(--pending-gd); color: #333; }
.bg-gd-awaiting { background: var(--awaiting-gd); color: #fff; }
.bg-gd-confirm { background: var(--confirm-gd); color: #fff; }
.bg-gd-deposit { background: var(--deposit-gd); color: #fff; }
.bg-gd-complete { background: var(--complete-gd); color: #fff; }
.bg-gd-noshow { background: var(--noshow-gd); color: #fff; }
.bg-gd-cancelled { background: var(--cancelled-gd); color: #fff; }
.bg-gd-done { background: var(--done-gd); color: #fff; }

/* --- Text Colors --- */
.color-pending { color: var(--pending-cl); }
.color-awaiting { color: var(--awaiting-cl); }
.color-confirm { color: var(--confirm-cl); }
.color-deposit { color: var(--deposit-cl); }
.color-complete { color: var(--complete-cl); }
.color-noshow { color: var(--noshow-cl); }
.color-cancelled { color: var(--cancelled-cl); }

 .status-submit {
    display: grid;
    border-radius: 5px;
    width: max-content;
    padding:2px 7px;
    }
    .status-submit.pending {

background-image: linear-gradient(140deg,rgb(215, 239, 245),rgb(197, 241, 247)) !important;color:#0a2024 !important;
    }
    .status-submit.submit {
    background-image: linear-gradient(140deg,rgb(194, 245, 217),rgb(180, 238, 197)) !important;color:#293c3f !important;
    }

    .status-submit.cancel {
        background-image: linear-gradient(140deg,rgb(228, 163, 163),rgb(243, 158, 158)) !important;
    }

    .status-title {
    font-size: 0.8rem

    }
    .status-time {
    font-size: 0.5rem
    }

html {
    font-size: 100%; /* 1rem = 16px */
    box-sizing: border-box;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
}

body {
    font-family: var(--font-primary);
    font-size: var( --fs-md);
    line-height: 1.5;
    background-color: #f4f7f6;
    position: relative !important;
    width: 100%;
}

/* Hide scrollbar for all elements but keep scroll functionality */
html, body {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none; /* WebKit browsers (Chrome, Safari, Edge) */
}
body::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        z-index: -1;
        background:white;

        background-image: url('/image/backgrounds/bg-wave.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.1;
        }


.hidden {
    display: none;
}
/* --- Layout --- */
/* section.main {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position:relative;
     background: red;
} */



.t-primary {
    color:var(--tg-primary)
}

.t-grey {
    color:var(--tg-grey-600)
}

.t-link {
    color:var(--tg-blue);
    cursor:pointer;
}
.t-link:active {
  scale:o
}

.box-title {
    border-radius: 15px;
    padding:3px 10px;
    width: max-content;
}


.tg-title {
    color:var(--tg-primary);
    font-size: var(--tg-title);
}

/* --- Main Layout --- */
    .page-container {
        display: grid;
        gap:10px;
    }
    .page-container > section ,.page-container .section , .content .tg-box-container{
        padding:10px;
        /* box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px; */
        box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
        background: linear-gradient(rgb(253, 255, 255),rgb(253, 255, 255));
        border-radius: 10px;
    }
    .tg-box-container .title {
        
    }
    .tg-box-container-svg {
        background: white;
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
        position: relative;
        overflow: hidden;
    }

    .tg-box-container-svg::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ffffff;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' x2='0' y1='1' y2='0' gradientTransform='rotate(140,0.5,0.5)'%3E%3Cstop offset='0' stop-color='%230FF'/%3E%3Cstop offset='1' stop-color='%23CF6'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='0' x2='0' y1='0' y2='1' gradientTransform='rotate(137,0.5,0.5)'%3E%3Cstop offset='0' stop-color='%236FFFC9'/%3E%3Cstop offset='1' stop-color='%236CFFD4'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='%23FFF' fill-opacity='0' stroke-miterlimit='10'%3E%3Cg stroke='url(%23a)' stroke-width='11.219999999999999'%3E%3Cpath transform='translate(-142.8 10.799999999999999) rotate(0.9000000000000004 1409 581) scale(0.9412780000000001)' d='M1409 581 1450.35 511 1490 581z'/%3E%3Ccircle stroke-width='3.74' transform='translate(-163.5 105) rotate(12 800 450) scale(1.0133729999999999)' cx='500' cy='100' r='40'/%3E%3Cpath transform='translate(32.099999999999994 -139.5) rotate(100.5 401 736) scale(1.0133729999999999)' d='M400.86 735.5h-83.73c0-23.12 18.74-41.87 41.87-41.87S400.86 712.38 400.86 735.5z'/%3E%3C/g%3E%3Cg stroke='url(%23b)' stroke-width='3.4'%3E%3Cpath transform='translate(630 -3) rotate(0.75 150 345) scale(0.970426)' d='M149.8 345.2 118.4 389.8 149.8 434.4 181.2 389.8z'/%3E%3Crect stroke-width='7.48' transform='translate(-205.5 -282) rotate(97.19999999999999 1089 759)' x='1039' y='709' width='100' height='100'/%3E%3Cpath transform='translate(-411.6 116.4) rotate(16.200000000000003 1400 132) scale(0.805)' d='M1426.8 132.4 1405.7 168.8 1363.7 168.8 1342.7 132.4 1363.7 96 1405.7 96z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        background-attachment: fixed;
        background-size: cover;
        opacity: 0.4;
        z-index: 0;
    }
   
    @keyframes backgroundMove {
        0% {
            background-position: 0% 0%;
        }
        100% {
            background-position: 0% 100%;
        }
    }

    .tg-box-container-svg:hover::before {
        opacity: 0.8;
        transform: scale(1.5);
        transition: all 0.3s ease;
        background-color: var(--tg-sky-2000);
        animation: backgroundMove 3s linear infinite;
    }

    .action-button {
        display: flex;
        gap:3px;
    }

    .action-button > a ,.action-button > div {
        text-decoration: none;
        color: inherit;
        font-size: 20px;
        color:var(--tg-primary-500);
        cursor: pointer;
        padding:2px 5px;
        border-radius: 5px;
        margin-right: 3px;
        box-shadow: rgba(9, 30, 66, 0.25) 0px 1px 1px, rgba(9, 30, 66, 0.13) 0px 0px 1px 1px;
    }

    .action-button > a[disabled] ,.action-button > div[disabled] {
        opacity: 0.5;
        cursor: not-allowed;
        color:grey;
    }

    .action-button > a:hover ,.action-button > div:hover {
        opacity: 1;
        transform: translateY(-1px);
    }

    .action-button > a:hover i .action-button > div:hover i{
        transform: translateY(-1px);
    }


    .action-button a:active i{
    scale: 0.95;
    }

    .tg-text-primary{
        color:var(--tg-primary);
        font-weight: 600;
        text-decoration: none;
    }

.tg-text-primary:active {
    scale: 0.95;
}

.tg-text-primary a {
    text-decoration: none;
    color: inherit;
}
.tg-btn {
    font-size: 14px;
    border-radius: 5px;
    padding:5px 9px;
    text-decoration: 1px solid rgb(20, 149, 172);
    text-transform: capitalize;
    border:1px solid var(--tg-primary);
    cursor: pointer;
    align-content: center;
    font-family : sans-serif;
   /* box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; */
   background:linear-gradient(40deg, rgb(20, 149, 172),rgb(7, 172, 175));
   color: white;
   transition: tg-btn-hover 0.3s ease;
   
}

@keyframes tg-btn-hover {
    from {
        background: linear-gradient( 170deg ,rgb(20, 149, 172),rgb(7, 172, 175));
    }
    to {
        background: linear-gradient( 170deg ,rgb(172, 20, 139),rgb(10, 7, 175));
    }
}

.tg-btn a {
    text-decoration: none;
    color:white;
}
.tg-btn:active {
    scale: 0.95;
}

table .tg-btn {
    background: linear-gradient(10deg,rgb(214, 249, 250),rgb(217, 246, 247));
color:rgb(3, 67, 97);
box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
border:1px solid var(--tg-primary);
background:white;
}

table .tg-btn[disabled] {
    color:white;
box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
border:1px solid var(--tg-grey-400);
background:white;
color:var(--tg-grey-400);
}
table .tg-btn:hover {
    background:var(--tg-primary);
    border:1px solid var(--tg-primary);
    color:white;
}

table .tg-btn.danger {
    background: linear-gradient(10deg,rgb(214, 249, 250),rgb(217, 246, 247));
color:rgb(97, 3, 16);
box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
border:1px solid rgb(97, 3, 16);
background:white;
}
table .tg-btn.danger:hover {
    background:rgb(97, 3, 16);
    color:white;
}

.tg-btn-outline {
    font-size: 15px;
    border-radius: 5px;
    padding:5px 9px;
    text-transform: capitalize;
    border: 1px solid var(--tg-primary);
    cursor: pointer;
    align-content: center;
    font-family : sans-serif;
   background:linear-gradient(40deg, white,rgb(248, 252, 252));
   color: var(--tg-primary);
   transition: tg-btn-hover 0.3s ease;
}

.tg-btn-outline:hover {
    background:linear-gradient(240deg, white,rgb(253, 255, 255));
}
.tg-btn-outline:active {
    scale: 0.95;
   
}
.tg-btn-light {
    font-size: 0.8rem;
    height: 25px;
    background: var(--tg-primary-100);
    border-radius: 5px;
    padding: 0 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tg-primary-400);
    border:1px solid var(--tg-primary-300);
    cursor: pointer;
    border-radius: 5px;
    padding: 0 5px;
    cursor: pointer;

}
.tg-btn-light:active {
    scale: 0.95;
}


  .date-search {
        border:1px solid var(--tg-grey-300);
        border-radius: 5px;
        background:white;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    .date-search input {
        border:none;
        background:transparent;
        padding:0px 7px;
        text-align: center;
    }
    .date-search button {
        padding:0px 12px;
        border-radius:0px 5px 5px 0px;
    }


.tg-bt-light {
    border:none;
    color:var(--tg-primary);
    background: linear-gradient(rgb(230, 243, 247),var(--tg-primary-200));
    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
    border-radius: 5px;
    font-size: 14px;
    padding:0px 7px;
}
.tg-bt-light:active {
    border:1px solid var(--tg-primary-200);
    scale: 0.95;
}


.bg-grey {
    background: #6b7280;
    color: white;
}

.bg-grey:hover {
    background: #4b5563;
}


.tg-btn.bg-danger {
    background: linear-gradient(40deg, rgb(172, 20, 28),rgb(155, 26, 3));
    color: white;
}

.bg-gd-primary {
    background: linear-gradient(to left,var(--tg-primary),var(--tg-sky));
    color: var(--tg-white);

}


.btn-copy-link {
    background-color: var(--tg-sky);
    color: var(--tg-white);

}

.tg-bt-view {
    background-color: var(--tg-sky);
    color: var(--tg-white);
    }

.tg-bt-view.active {
    background-color: var(--tg-secondary);
    color: white;
}

.bt-create {
    background: var(--tg-accent);
}
    .bt-cancel {
    background: var(--tg-grey-600);
    color:white;
}
.bt-preview {
    background-color: var(--tg-sky);
    color:white;
}

.bt-add {
    background-color: var(--tg-primary);
    color:white;
}

.bt-edit {
    background-color: var(--tg-accent);
    color:white;
}
    .bt-back {
/* background: white; */
padding:5px 10px;
border:white 1px solid;
text-decoration: none;
border-radius: 7px;
color:white;
white-space: nowrap;
}
    .bt-back  i{
    color:white;
    }
    .bt-back:hover {
        background: rgba(255, 255, 255, 0.24);
    }

    @media (max-width:400px){
        .bt-back i {
            display: none;;
        }
    }

.tg-modal-title {
    color: var(--tg-primary);
    font-size: 1.4rem;
    font-weight: 600;
    flex-grow: 1;
    text-align: center;
}

.tg-img-bank img{
margin-right: 0.25rem;
border-radius: 0.375rem;
max-width: 35px;
}


/* modal setting */
.d-none {
display: none;
}
.tg-image-preview-container {
    position: relative;
    display: inline-block;
}
#preview-image {
    max-width: 300px;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 8px;
}
.btn-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
}



        .modal-body-custom {
            position: relative;
            overflow: hidden;
        }
        .tg-svg-background {
            position: absolute;
            bottom: 0; left: 0;
            width: 100%; height: 100%;
            z-index: 0;
            pointer-events: none;
        }
        .tg-form-content {
            position: relative;
            z-index: 1;
        }

        .similar-names {
            border: 1px solid #fde68a;
            background-color: #fffbeb;
            border-radius: 6px;
            padding: 0.75rem;
            margin-bottom: 1rem;
            font-size: 0.9rem;
        }
        .similar-names p { margin: 0.5rem 0; }
        .similar-ok { color: #16a34a; }
        .similar-warn { color: #dc3545; }
        .tg-image-preview {
            width: 60px; height: 60px;
            object-fit: contain;
            border: 1px solid #dee2e6;
            padding: 5px;
            border-radius: 6px;
        }
        .tg-sm-text-grey {
            font-size: 0.8rem;
            color: #6c757d;
        }


        /* ////modal setting */
.box {
    width: 1000px;
    height: auto;
}

.main-container {
    width: 100%;
    height: 45rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 3px 30px rgba(0, 0, 0, 0.5);
    background:white;
}

.img-container {
    width: 50%;
    height: 100%;
    padding: 4rem 1rem;
    animation: slide-down 0.5s ease;
}

.img-container img {
    width: 100%;
    height: 100%;
}

.form-container {
    width: 60%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slide-up 0.1s ease;
    position:relative;
}

.login-text {
    position:absolute;
    top:15px;
    right:20px;
    border-radius:5px;
    padding:4px 15px;
    font-size: var( --fs-sm);
    color:var(--tg-secondary);
    font-weight: var(--font-weight-semibold);
}

/* --- Typography --- */
p {
    font-size: var( --fs-md);
    line-height: 1.5;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
}
h1 { font-size: var( --fs-h1); }
h2 { font-size: var( --fs-h2); }
h3 { font-size: var( --fs-h3); }





.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap:0.5rem;
}
.grid-container-10 {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap:0.5rem;
}




.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-7 { grid-column: span 7; }
.col-span-8 { grid-column: span 8; }
.col-span-9 { grid-column: span 9; }
.col-span-10 { grid-column: span 10; }
.col-span-11 { grid-column: span 11; }
.col-span-12 { grid-column: span 12; }


@media (max-width: 500px) {
    .col-span-1 { grid-column: span 12; }
    .col-span-2 { grid-column: span 12; }
    .col-span-3 { grid-column: span 12; }
    .col-span-4 { grid-column: span 12; }
    .col-span-5 { grid-column: span 12; }
    .col-span-6 { grid-column: span 12; }
    .col-span-7 { grid-column: span 12; }
    .col-span-8 { grid-column: span 12; }
    .col-span-9 { grid-column: span 12  ; }
    .col-span-10 { grid-column: span 12; }
    .col-span-11 { grid-column: span 12; }
    .col-span-12 { grid-column: span 12; }
}

.tg-button {
    border-radius: 5px;
    border:none;
    padding: 5px 10px;
    font-weight: var(--font-weight-regular);
    height: 40px;
    background:var(--tg-primary);
    background: linear-gradient(to bottom,var(--tg-primary),#28626b);
    color: white;
    width: max-content;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;
}

.tg-button.tg-lg {
    height: 41px;
    font-size: var( --fs-md);
}



/* --- Utility Classes --- */


.tg-grid-autofit-100px {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  width: 100%;
}

.tg-grid-autofit-200px {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
}

.tg-grid-autofit-500px {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 1rem;
  width: 100%;
}

.tg-grid-10 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.tg-grid-9 {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 1rem;
}

.tg-grid-8 {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1rem;
}

.tg-grid-7 {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(100px, 1fr)
  ); /* Responsive columns */
  gap: 1rem;
  width: 100%;
}

.tg-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.tg-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.tg-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.tg-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.tg-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.text-tg-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
}
.text-tg-grid-2 :nth-child(1) {
  display: flex;
  justify-content: end;
}
.text-tg-grid-2 :nth-child(2) {
  display: flex;
  justify-content: start;
}

.d-flex-2 {
  display: flex;
}
.d-flex-2 > div {
  flex-grow: 1;
}

@media (max-width: 500px) {
  .d-flex-2 {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (min-width: 720px) and (max-width: 1000px) {
  .tg-grid-10-none10 > :nth-child(10) {
    color: red;
    display: none;
  }
}

@media (max-width: 1000px) {
  .tg-grid-10 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  @media (max-width: 720px) {
    .tg-grid-10 {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
    }
  }

  .tg-grid-9 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .tg-grid-8 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .tg-grid-7 {
    display: grid;
    grid-template-columns: repeat(12, 1fr); /* 4 cards in the first row */
  }

  /* Adjust for the second row (cards 5, 6, and 7) */
  .tg-grid-7 > :nth-child(1),
  .tg-grid-7 > :nth-child(2),
  .tg-grid-7 > :nth-child(3) {
    grid-column: span 4; /* Each card takes one column */
  }

  /* Adjust for the second row (cards 5, 6, and 7) */
  .tg-grid-7 > :nth-child(5),
  .tg-grid-7 > :nth-child(6),
  .tg-grid-7 > :nth-child(7),
  .tg-grid-7 > :nth-child(4) {
    grid-column: span 3; /* Each card takes one column */
  }

  .tg-grid-5 {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }

  .tg-grid-6 {
    display: grid;
    grid-template-columns: repeat(3, auto);
  }

  .tg-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, auto);
  }
}

@media (max-width: 500px) {
  .tg-grid-10,
  .tg-grid-9,
  .tg-grid-8,
  .tg-grid-7,
  .tg-grid-6,
  .tg-grid-5,
  .tg-grid-4,
  .tg-grid-3,
  .tg-grid-2 {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
  }

  .tg-grid-7 > :nth-child(5),
  .tg-grid-7 > :nth-child(6),
  .tg-grid-7 > :nth-child(7),
  .tg-grid-7 > :nth-child(4) {
    grid-column: span 4; /* Each card takes one column */
  }
}



.flex-start {
    display: flex;
    gap:10px;
    align-items: cetner;;
}

.flex-start-end {
    display: flex;
    gap:10px;
    align-items: end;

}

.flex-end {
    display:flex;
    align-items:center;
    justify-content:end;
    gap:10px;
}

.center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width:500px) {

    .flex-start {
    flex-direction: column;
}
}

/* ... other utilities ... */

/* --- Animations & Responsive --- */
@keyframes slide-down {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(0); }
}

@keyframes slide-up {
    0% { transform: translateY(100%); }
    100% { transform: translateY(0); }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


@media screen and (max-width: 500px) {
    .img-container {
        display: none;
    }
    .tg-form-control.tg-lg {
        min-width: 100%;
    }
    .main-container {
        box-shadow:none;
        background:var(--tg-white);
    }
}








                            .border-dash {
                                border: 1px dashed var(--tg-primary);
                            }



/* timeline */
.timeline-container {
    position: relative;
    padding: 2rem 0;
}
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 140px;
    height: 100%;
    width: 2px;
    background-color: var(--tg-grey-300);
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.timeline-time {
    position: absolute;
    left: 0;
    width: 120px;
    text-align: right;
    color: var(--tg-grey-600);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    padding-top: 5px;
}

.timeline-icon {
    position: absolute;
    left: 140px;
    top: 7px;
    width: 16px;
    height: 16px;
    background-color: var(--tg-grey-100);
    border: 3px solid var(--tg-grey-500);
    border-radius: 50%;
    transform: translateX(-50%); /* จัดให้อยู่กึ่งกลางเส้น */
    z-index: 1;
}

.timeline-content {
    background-color: var(--tg-primary-100);
    border-radius: 8px;
    padding: 1.25rem;
    margin-left: 175px; /* ระยะห่างจากเส้นกลาง */
    width: 100%;
    max-width: 600px;
    position: relative;
}


.timeline-content .content-header {
    margin-bottom: 0.3rem;
}
.timeline-content .user {
    font-weight: 600;
    color: var(--tg-primary);
    margin-right: 0.5rem;
}
.timeline-content .action {
    font-weight: 500;
}
.timeline-content .content-body p {
    margin:0;
    font-size: 0.9rem;
    color: var(--tg-grey-600);
    word-break: break-all;
}
.timeline-content .content-body p strong {
    color: var(--tg-primary);
    font-weight: 500;
}
.timeline-content.warning {
    background-color: rgb(245, 235, 209);
}
.timeline-content.warning .user {
    color: rgb(92, 77, 21);
}

.timeline-content.warning .content-body p strong {
    color: rgb(92, 77, 21);
}



/* scroll style */
/* สำหรับ Firefox */
.scroll-style-sm {
    scrollbar-width: thin;
    scrollbar-color: var(--tg-grey-400) transparent;
    overflow-y: auto;
}

/* สำหรับ Chrome, Safari, Edge และเบราว์เซอร์ที่ใช้ WebKit */
.scroll-style-sm::-webkit-scrollbar {
    width: 1px;
}

.scroll-style-sm::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.scroll-style-sm::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
    height: 30px;
}

.scroll-style-sm::-webkit-scrollbar-thumb:hover {
    background: #555;
}




.tg-box-white {
    background-color: var(--tg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}


    /* --- Styles for the Table Cell Preview --- */
.tg-td-image-gallery-preview {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.tg-td-image-gallery-preview .tg-img-bank img {
    width: 40px; /* Or your desired size */
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}
.tg-badge-circle {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--tg-sky); /* Teal color */
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid white;
}

/* --- Styles for the Modal Gallery --- */
.tg-modal-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.tg-modal-image-grid img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

 .bg-round-grey {
    background: var(--tg-grey-500);
    border-radius: 7px;
}




        /* --- Custom Round Checkbox Style (สำหรับในตาราง) --- */
        .checkbox-transfer-items .round {
            position: relative;
            width: 20px;
            height: 20px;
        }
        .checkbox-transfer-items .round label {
            background-color: #fff;
            border: 1px solid #ccc;
            border-radius: 50%;
            cursor: pointer;
            height: 20px;
            width: 20px;
            display: block;
        }
        .checkbox-transfer-items .round label:after {
            border: 2px solid #f3efef;
            border-top: none;
            border-right: none;
            content: "";
            height: 5px;
            left: 3px;
            opacity: 0;
            position: absolute;
            top: 6px;
            transform: rotate(-45deg);
            width: 12px;
        }
        .checkbox-transfer-items .round input[type="checkbox"] {
            visibility: hidden;
            display: none;
            opacity: 0;
        }
        .checkbox-transfer-items .round input[type="checkbox"]:checked + label {
            background-color: var(--tg-accent);
            border-color: var(--tg-accent);
        }
        .checkbox-transfer-items .round input[type="checkbox"]:checked + label:after {
            opacity: 1;
        }


    #toast-container {
    position: fixed;
    top:20px;
    right:50%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
     opacity: 0;
    transition: all 0.4s ease-in-out; /* ปรับความเร็วเล็กน้อย */
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}
.toast.error { background-color: #dc3545; }
.toast.success { background-color: #198754; }

.wrap-card-summary{
    display: flex;
    flex-wrap: wrap;
    gap:5px;
    margin-bottom: 10px;
}
@media (max-width: 768px) {
    .wrap-card-summary {
        display:grid;
        grid-template-columns:repeat(3,1fr);
    }
}

@media (max-width: 500px) {
    .wrap-card-summary {
        display:grid;
        grid-template-columns:1fr 1fr;
    }
}