﻿﻿@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@100;200;300&display=swap');

* {
    margin: 0;
    padding: 0;
    text-decoration: none;
    font-family: 'Kanit', sans-serif;
}

body {
    overflow-x: hidden;
}

html {
    position: relative;
    min-height: 100%
}

a {
    text-decoration: none;
    color: var(--co-blue-two);
}

    a:hover {
        text-decoration: none;
        color: var(--co-blue-two);
    }

i {
    font-family: 'Arial';
}

ul li {
    list-style-type: none;
}

.zindextop {
    z-index: 9999;
}

/* ไม่ให้ลากรูป */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* pointer */
.cursor-pointer {
    cursor: pointer;
}

.fa-bars {
    cursor: move;
}

/* ---------------------------------------------------
    PANTONE COLOR OF BACKGROUND AND FONT
----------------------------------------------------- */
:root {
    --co-background: #f4f5f9;
    --co-navbar: #002838;
    --co-black-one: #1C2026;
    --co-black-two: #393E46;
    --co-black-three: #545A64;
    --co-black-four: #727881;
    --co-blue-one: #036986;
    --co-blue-two: #19A6CE;
    --co-blue-three: #3EB4D6;
    --co-blue-four: #67C5E0;
    --co-green-one: #008563;
    --co-green-two: #16C79B;
    --co-green-three: #3AD0AA;
    --co-green-four: #64DCBE;
    --co-red-one: #AF0F0F;
    --co-red-two: #F24C4C;
    --co-red-three: #FF7272;
    --co-red-four: #FF9D9D;
    --co-orange-one: #A74C00;
    --co-orange-two: #FD841F;
    --co-orange-three: #FF9C4A;
    --co-orange-four: #FFB374;
    --co-yellow-one: #A79500;
    --co-yellow-two: #FFE71B;
    --co-yellow-three: #FFEB47;
    --co-yellow-four: #FFF071;
}

/* ------------------ BACKGROUND ------------------ */
.bg-background {
    background-color: var(--co-background) !important;
}

.bg-navbar {
    background-color: var(--co-navbar) !important;
}

.bg-black-one {
    background-color: var(--co-black-one) !important;
}

.bg-black-two {
    background-color: var(--co-black-two) !important;
}

.bg-black-three {
    background-color: var(--co-black-three) !important;
}

.bg-black-four {
    background-color: var(--co-black-four) !important;
}

.bg-blue-one {
    background-color: var(--co-blue-one) !important;
}

.bg-blue-two {
    background-color: var(--co-blue-two) !important;
}

.bg-blue-three {
    background-color: var(--co-blue-three) !important;
}

.bg-blue-four {
    background-color: var(--co-blue-four) !important;
}

.bg-green-one {
    background-color: var(--co-green-one) !important;
}

.bg-green-two {
    background-color: var(--co-green-two) !important;
}

.bg-green-three {
    background-color: var(--co-green-three) !important;
}

.bg-green-four {
    background-color: var(--co-green-four) !important;
}

.bg-red-one {
    background-color: var(--co-red-one) !important;
}

.bg-red-two {
    background-color: var(--co-red-two) !important;
}

.bg-red-three {
    background-color: var(--co-red-three) !important;
}

.bg-red-four {
    background-color: var(--co-red-four) !important;
}

.bg-orange-one {
    background-color: var(--co-orange-one) !important;
}

.bg-orange-two {
    background-color: var(--co-orange-two) !important;
}

.bg-orange-three {
    background-color: var(--co-orange-three) !important;
}

.bg-orange-four {
    background-color: var(--co-orange-four) !important;
}

.bg-yellow-one {
    background-color: var(--co-yellow-one) !important;
}

.bg-yellow-two {
    background-color: var(--co-yellow-two) !important;
}

.bg-yellow-three {
    background-color: var(--co-yellow-three) !important;
}

.bg-yellow-four {
    background-color: var(--co-yellow-four) !important;
}

/* --------------------- FONT --------------------- */
.font-black-one {
    color: var(--co-black-one) !important;
}

.font-black-two {
    color: var(--co-black-two) !important;
}

.font-black-three {
    color: var(--co-black-three) !important;
}

.font-black-four {
    color: var(--co-black-four) !important;
}

.font-blue-one {
    color: var(--co-blue-one) !important;
}

.font-blue-two {
    color: var(--co-blue-two) !important;
}

.font-blue-three {
    color: var(--co-blue-three) !important;
}

.font-blue-four {
    color: var(--co-blue-four) !important;
}

.font-green-one {
    color: var(--co-green-one) !important;
}

.font-green-two {
    color: var(--co-green-two) !important;
}

.font-green-three {
    color: var(--co-green-three) !important;
}

.font-green-four {
    color: var(--co-green-four) !important;
}

.font-red-one {
    color: var(--co-red-one) !important;
}

.font-red-two {
    color: var(--co-red-two) !important;
}

.font-red-three {
    color: var(--co-red-three) !important;
}

.font-red-four {
    color: var(--co-red-four) !important;
}

.font-orange-one {
    color: var(--co-orange-one) !important;
}

.font-orange-two {
    color: var(--co-orange-two) !important;
}

.font-orange-three {
    color: var(--co-orange-three) !important;
}

.font-orange-four {
    color: var(--co-orange-four) !important;
}

.font-yellow-one {
    color: var(--co-yellow-one) !important;
}

.font-yellow-two {
    color: var(--co-yellow-two) !important;
}

.font-yellow-three {
    color: var(--co-yellow-three) !important;
}

.font-yellow-four {
    color: var(--co-yellow-four) !important;
}


/* ---------------------------------------------------
    SIDEBAR FOR COMPUTER
----------------------------------------------------- */
.logo {
    height: 90px;
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

.width250 {
    width: 250px;
}

#sidebar {
    min-width: 250px;
    max-width: 250px;
    color: #d3e9ff;
    transition: all 0.3s;
    overflow-y: auto;
}

    #sidebar::-webkit-scrollbar {
        display: none;
    }

    #sidebar.active {
        min-width: 50px;
    }

        #sidebar.active span.nav-link {
            display: flex !important;
            justify-content: center;
        }

            #sidebar.active span.nav-link > span {
                display: none !important;
            }

                #sidebar.active span.nav-link > span .badge {
                    display: none;
                }

        #sidebar.active .dd-list {
            display: none !important;
        }

        #sidebar.active .dd-list-set {
            display: none !important;
        }

        #sidebar.active hr {
            display: none;
        }

        #sidebar.active .position-absolute.bottom-0 {
            display: none;
        }

        #sidebar.active a {
            text-align: center;
        }

        #sidebar.active i:not(.icons) {
            margin-left: 0rem !important;
            font-size: 1.2rem;
        }

        #sidebar.active i.icons {
            display: none;
        }

        /* Show notification dot when sidebar is collapsed */
        #sidebar.active .dd-btn:has(.badge) .nav-link::after {
            content: '';
            position: absolute;
            top: 10px;
            right: 15px;
            width: 8px;
            height: 8px;
            background-color: #dc3545;
            border-radius: 50%;
            border: 2px solid var(--co-navbar);
        }

        #sidebar.active .dd-btn {
            position: relative;
        }

        #sidebar.active .logo {
            height: 20px;
        }

    /* Desktop hover-expand: only for true-hover devices (mouse/trackpad), not touch */
    @media (hover: hover) and (pointer: fine) {
        #sidebar.active:hover {
            min-width: 250px;
            max-width: 250px;
        }

        #sidebar.active:hover span.nav-link {
            justify-content: flex-start;
        }

        #sidebar.active:hover .dd-btn .nav-link::after {
            display: none;
        }

        #sidebar.active:hover span.nav-link > span {
            display: inline-flex !important;
            align-items: center;
            gap: 0.25rem;
            white-space: nowrap;
            flex-wrap: nowrap;
        }

        #sidebar.active:hover i:not(.icons) {
            font-size: 1rem;
        }

        #sidebar.active:hover i.icons {
            display: inline;
            flex-shrink: 0;
        }

        /* Only show dropdowns on hover if they were already open (visible) */
        #sidebar.active:hover .dd-btn.active + .dd-list[style*="display: block"] {
            display: block !important;
        }

        #sidebar.active:hover .dd-btn-set.active + .dd-list-set[style*="display: block"] {
            display: block !important;
        }

        #sidebar.active:hover hr {
            display: block;
        }

        #sidebar.active:hover .position-absolute.bottom-0 {
            display: block;
        }

        #sidebar.active:hover i {
            padding-right: 0.5rem !important;
        }

        #sidebar.active:hover .logo {
            height: 90px;
        }

        #sidebar:hover a {
            min-width: 250px;
            text-align: left;
        }
    }

    /*#sidebar:hover i {
        margin-left: 1rem !important;
    }*/

    #sidebar .sidebar-header {
        padding: 20px;
    }

    #sidebar ul p {
        color: var(--bs-white);
        padding: 10px;
    }

    #sidebar ul li a {
        padding: 10px;
        font-size: 15px;
        display: block;
    }

    #sidebar .dd-btn {
        font-weight: bold;
    }

    #sidebar a ul li a:hover, #sidebar li:hover, .dd-btn.active, li.active {
        color: var(--co-blue-two);
        font-weight: bold;
        background: #c0edfe1f;
        width: 90%;
        border-radius: 0px 30px 30px 0px;
        cursor: pointer;
    }

    @media (hover: none) {
        #sidebar a ul li a:hover, #sidebar li:hover {
            font-weight: inherit;
            width: 100%;
            background: none;
            color: inherit;
        }
    }



a.profile {
    color: #4D4D4D !important;
    text-decoration: none;
}

.nav-link:focus, .nav-link:hover {
    color: var(--co-blue-two);
}

.button-toggle-menu {
    border: none;
    width: 60px;
    background-color: transparent;
    font-size: 24px;
    cursor: pointer;
    z-index: 1;
    position: relative;
    color: #4D4D4D;
}

    .button-toggle-menu:focus, .button-toggle-menu:active:focus {
        box-shadow: none;
        outline: none;
    }

.dropdown-menu {
    color: var(--co-blue-two);
    border: solid 1px #eef2f7;
    text-decoration: none;
    width: max-content;
    right: 0;
    left: auto !important;
}

.dropdown-toggle::after {
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}


.btndrowdownprofile {
    display: block;
    color: #4D4D4D !important;
}

    .btndrowdownprofile:hover {
        background-color: #F8FAFF;
        cursor: pointer;
    }

.dropdown {
    color: var(--co-blue-two);
    background-color: #F8FAFF;
    border-left: solid 1px #eef2f7;
    border-right: solid 1px #eef2f7;
}

.dropdown-item.active, .dropdown-item:active {
    color: var(--bs-white);
    text-decoration: none;
    background-color: var(--co-blue-four);
}

@media (max-width:575.98px) {

    .dropdown {
        position: static
    }

        .dropdown .dropdown-menu {
            right: 10px !important
        }
}

.dd-list {
    display: none;
}

@media (max-width: 768px) {
    .dd-btn, .listli, .listli a {
        touch-action: manipulation;
    }
}

.listli:hover {
    background: none !important;
    color: #FFFFFF !important;
    font-weight: normal !important;
}

.listli.active {
    color: var(--co-blue-two);
    background: none !important;
}

    .listli.active::before {
        background-color: var(--co-blue-two);
    }

.dd-list ul li::before {
    background-color: #FFFFFF;
    border-radius: 50%;
    content: "";
    height: 0.375rem;
    left: 1.90rem;
    position: absolute;
    top: var(--bs-nav-link-padding-y)-0.1875rem0.03125rem;
    width: 0.375rem;
    margin-top: 8px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
}

.dd-list ul li ::after {
    background-color: var(--co-black-four) !important;
    content: "";
    height: 0.625rem;
    left: 2rem;
    opacity: .3;
    position: absolute;
    transform: translateY(-50%);
    width: 0.0625rem;
    transition: opacity 0.3s ease, left 0.3s ease;
}

.dd-list ul li.active:hover::before {
    background-color: var(--co-blue-two);
}

.dd-list-set ul li::before {
    background-color: #FFFFFF;
    border-radius: 50%;
    content: "";
    height: 0.375rem;
    left: 3.90rem;
    position: absolute;
    top: var(--bs-nav-link-padding-y)-0.1875rem0.03125rem;
    width: 0.375rem;
    margin-top: 8px;
    transition: opacity 0.3s ease, left 0.3s ease;
}

.dd-list-set ul li ::after {
    background-color: var(--co-black-four) !important;
    content: "";
    height: 0.625rem;
    left: 4rem;
    opacity: .3;
    position: absolute;
    transform: translateY(-50%);
    width: 0.0625rem;
    transition: opacity 0.3s ease, left 0.3s ease;
}

/* ---------------------------------------------------
    SIDEBAR FOR MOBILE
----------------------------------------------------- */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .wrapper {
        position: relative;
        overflow: hidden;
    }

    #sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        height: 100vh;
        z-index: 9999;
        transition: left 0.3s;
        min-width: 250px !important;
        max-width: 250px !important;
        overflow-y: scroll;
        overflow-x: hidden;
    }

        #sidebar .badge,
        #sidebar.active .badge,
        #sidebar.active span.nav-link > span .badge {
            display: inline-block !important;
        }

        /* Force full width on mobile - override desktop collapsed styles */
        #sidebar.active {
            left: 0;
            min-width: 250px !important;
            max-width: 250px !important;
            transform: translateZ(0);
        }

            /* Override desktop collapsed icon-only styles for mobile */
            #sidebar span.nav-link,
            #sidebar.active span.nav-link {
                display: flex !important;
                justify-content: flex-start !important;
            }

                #sidebar span.nav-link > span,
                #sidebar.active span.nav-link > span {
                    display: inline-block !important;
                }

            #sidebar i.icons,
            #sidebar.active i.icons {
                display: inline !important;
            }

            #sidebar .dd-list,
            #sidebar.active .dd-list {
                display: block !important;
            }

            .dd-list:not([style*="display: block"]) {
                display: none;
            }

            #sidebar hr,
            #sidebar.active hr {
                display: block !important;
            }


            #sidebar .position-absolute.bottom-0,
            #sidebar.active .position-absolute.bottom-0 {
                display: block !important;
            }

            /* Override desktop notification dot on mobile */
            #sidebar .dd-btn .nav-link::after,
            #sidebar.active .dd-btn .nav-link::after {
                display: none !important;
            }

            #sidebar.active a {
                text-align: left;
            }

        #sidebar i {
            padding-left: 1rem !important;
            margin-left: 0rem !important;
        }

        #sidebar.active .logo {
            height: 90px;
        }

        /* Overlay when sidebar is open */
        #sidebar.active::before {
            content: '';
            position: fixed;
            top: 0;
            left: 250px;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: -1;
        }

    #sidebarCollapse span {
        display: none;
    }

    /* Ensure dropdowns show properly based on their inline styles */
    #sidebar .dd-list[style*="display: none"],
    #sidebar.active .dd-list[style*="display: none"] {
        display: none !important;
    }

    #sidebar .dd-list[style*="display: block"],
    #sidebar.active .dd-list[style*="display: block"] {
        display: block !important;
    }
}


/* ---------------------------------------------------
    CONTENT STYLE
----------------------------------------------------- */

#content {
    width: 100%;
    padding: 0px;
    min-height: 100vh;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    #content {
        width: 100%;
        transition: none;
    }

        #content.active {
            max-width: 100% !important;
            width: 100% !important;
        }
}

.dropdown-option {
    left: 0 !important;
}

/* ---------------------------------------------------
    FOOTER
----------------------------------------------------- */
.footer {
    position: absolute;
    width: -webkit-fill-available;
    bottom: 0;
    height: 60px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 0 1.5rem;
    color: var(--co-black-four);
    -webkit-transition: all .25s ease-in-out;
    transition: all .25s ease-in-out;
    border-top: 1px solid rgb(231 231 231 / 40%);
}

@media (max-width:767.98px) {
    .footer {
        text-align: center;
        display: contents;
        font-size: 10px;
        border-top: 1px solid rgb(231 231 231 / 40%);
    }
}

/* ---------------------------------------------------
    ALERTS
----------------------------------------------------- */

.alert-blue {
    --bs-alert-color: var(--co-blue-one) !important;
    --bs-alert-bg: var(--co-blue-four);
    --bs-alert-border-color: var(--co-blue-two);
    --bs-alert-link-color: var(--co-blue-one);
}

.alert-blue-sub {
    --bs-alert-color: var(--co-blue-two);
    --bs-alert-bg: var(--bs-white) !important;
    --bs-alert-border-color: var(--co-blue-two);
    --bs-alert-link-color: var(--co-blue-one);
}

.alert-red {
    --bs-alert-color: var(--co-red-one) !important;
    --bs-alert-bg: var(--co-red-four);
    --bs-alert-border-color: var(--co-red-two);
    --bs-alert-link-color: var(--co-red-one);
}

.alert-red-sub {
    --bs-alert-color: var(--co-red-two);
    --bs-alert-bg: var(--bs-white) !important;
    --bs-alert-border-color: var(--co-red-two);
    --bs-alert-link-color: var(--co-red-one);
}

.alert-green {
    --bs-alert-color: var(--co-green-one) !important;
    --bs-alert-bg: var(--co-green-four);
    --bs-alert-border-color: var(--co-green-two);
    --bs-alert-link-color: var(--co-green-one);
}

.alert-green-sub {
    --bs-alert-color: var(--co-green-two);
    --bs-alert-bg: var(--bs-white) !important;
    --bs-alert-border-color: var(--co-green-two);
    --bs-alert-link-color: var(--co-green-one);
}

.alert-orange {
    --bs-alert-color: var(--co-orange-one) !important;
    --bs-alert-bg: var(--co-orange-four);
    --bs-alert-border-color: var(--co-orange-two);
    --bs-alert-link-color: var(--co-orange-one);
}

.alert-orange-sub {
    --bs-alert-color: var(--co-orange-two);
    --bs-alert-bg: var(--bs-white) !important;
    --bs-alert-border-color: var(--co-orange-two);
    --bs-alert-link-color: var(--co-orange-one);
}

.alert-yellow {
    --bs-alert-color: var(--co-black-one);
    --bs-alert-bg: var(--co-yellow-four);
    --bs-alert-border-color: var(--co-yellow-two);
    --bs-alert-link-color: var(--co-yellow-one);
}

.alert-yellow-sub {
    --bs-alert-color: var(--co-yellow-two);
    --bs-alert-bg: var(--bs-white) !important;
    --bs-alert-border-color: var(--co-yellow-two);
    --bs-alert-link-color: var(--co-yellow-two);
}

/* ---------------------------------------------------
    BUTTONS
----------------------------------------------------- */
.custom-btn {
    width: 130px;
    height: 40px;
    color: #fff;
    border-radius: 5px;
    padding: 10px 25px;
    font-weight: 500;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    box-shadow: inset 2px 2px 2px 0px rgba(255,255,255,.5), 7px 7px 20px 0px rgba(0,0,0,.1), 4px 4px 5px 0px rgba(0,0,0,.1);
    outline: none;
}

/* 3 */
.btn-3 {
    background: rgb(0,172,238);
    background: linear-gradient(0deg, rgba(0,172,238,1) 0%, rgba(2,126,251,1) 100%);
    width: 130px;
    height: 40px;
    line-height: 42px;
    padding: 0;
    border: none;
}

    .btn-3 span {
        position: relative;
        display: block;
        width: 100%;
        height: 100%;
    }

    .btn-3:before,
    .btn-3:after {
        position: absolute;
        content: "";
        right: 0;
        top: 0;
        background: rgba(2,126,251,1);
        transition: all 0.3s ease;
    }

    .btn-3:before {
        height: 0%;
        width: 2px;
    }

    .btn-3:after {
        width: 0%;
        height: 2px;
    }

    .btn-3:hover {
        background: transparent;
        box-shadow: none;
    }

        .btn-3:hover:before {
            height: 100%;
        }

        .btn-3:hover:after {
            width: 100%;
        }

    .btn-3 span:hover {
        color: rgba(2,126,251,1);
    }

    .btn-3 span:before,
    .btn-3 span:after {
        position: absolute;
        content: "";
        left: 0;
        bottom: 0;
        background: rgba(2,126,251,1);
        transition: all 0.3s ease;
    }

    .btn-3 span:before {
        width: 2px;
        height: 0%;
    }

    .btn-3 span:after {
        width: 0%;
        height: 2px;
    }

    .btn-3 span:hover:before {
        height: 100%;
    }

    .btn-3 span:hover:after {
        width: 100%;
    }

.btn-gray {
    --bs-btn-color: var(--bs-white) !important;
    --bs-btn-bg: var(--co-black-four);
    --bs-btn-border-color: var(--co-black-four);
    --bs-btn-hover-color: var(--bs-white) !important;
    --bs-btn-hover-bg: var(--co-black-three);
    --bs-btn-hover-border-color: var(--co-black-three);
    --bs-btn-focus-shadow-rgb: 49,132,253;
    --bs-btn-active-color: var(--bs-white) !important;
    --bs-btn-active-bg: var(--co-black-three);
    --bs-btn-active-border-color: var(--co-black-four);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--bs-white) !important;
    --bs-btn-disabled-bg: var(--co-black-four);
    --bs-btn-disabled-border-color: var(--co-black-four);
}

.btn-green {
    --bs-btn-color: var(--bs-white) !important;
    --bs-btn-bg: var(--co-green-two);
    --bs-btn-border-color: var(--co-green-two);
    --bs-btn-hover-color: var(--bs-white) !important;
    --bs-btn-hover-bg: var(--co-green-one);
    --bs-btn-hover-border-color: var(--co-green-one);
    --bs-btn-focus-shadow-rgb: 49,132,253;
    --bs-btn-active-color: var(--bs-white) !important;
    --bs-btn-active-bg: var(--co-green-one);
    --bs-btn-active-border-color: var(--co-green-two);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--bs-white) !important;
    --bs-btn-disabled-bg: var(--co-green-two);
    --bs-btn-disabled-border-color: var(--co-green-two);
}

.btn-red {
    --bs-btn-color: var(--bs-white) !important;
    --bs-btn-bg: var(--co-red-two);
    --bs-btn-border-color: var(--co-red-two);
    --bs-btn-hover-color: var(--bs-white) !important;
    --bs-btn-hover-bg: var(--co-red-one);
    --bs-btn-hover-border-color: var(--co-red-one);
    --bs-btn-focus-shadow-rgb: 49,132,253;
    --bs-btn-active-color: var(--bs-white) !important;
    --bs-btn-active-bg: var(--co-red-one);
    --bs-btn-active-border-color: var(--co-red-two);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--bs-white) !important;
    --bs-btn-disabled-bg: var(--co-red-two);
    --bs-btn-disabled-border-color: var(--co-red-two);
}

.btn-blue {
    --bs-btn-color: var(--bs-white) !important;
    --bs-btn-bg: var(--co-blue-two);
    --bs-btn-border-color: var(--co-blue-two);
    --bs-btn-hover-color: var(--bs-white) !important;
    --bs-btn-hover-bg: var(--co-blue-one);
    --bs-btn-hover-border-color: var(--co-blue-one);
    --bs-btn-focus-shadow-rgb: 49,132,253;
    --bs-btn-active-color: var(--bs-white) !important;
    --bs-btn-active-bg: var(--co-blue-one);
    --bs-btn-active-border-color: var(--co-blue-two);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--bs-white) !important;
    --bs-btn-disabled-bg: var(--co-blue-two);
    --bs-btn-disabled-border-color: var(--co-blue-two);
}


.btn-orange {
    --bs-btn-color: var(--bs-white) !important;
    --bs-btn-bg: var(--co-orange-two);
    --bs-btn-border-color: var(--co-orange-two);
    --bs-btn-hover-color: var(--bs-white) !important;
    --bs-btn-hover-bg: var(--co-orange-one);
    --bs-btn-hover-border-color: var(--co-orange-one);
    --bs-btn-focus-shadow-rgb: 49,132,253;
    --bs-btn-active-color: var(--bs-white) !important;
    --bs-btn-active-bg: var(--co-orange-one);
    --bs-btn-active-border-color: var(--co-orange-two);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--bs-white) !important;
    --bs-btn-disabled-bg: var(--co-orange-two);
    --bs-btn-disabled-border-color: var(--co-orange-two);
}

.btn-yellow {
    --bs-btn-color: var(--co-black-one);
    --bs-btn-bg: var(--co-yellow-two);
    --bs-btn-border-color: var(--co-yellow-two);
    --bs-btn-hover-color: var(--bs-white) !important;
    --bs-btn-hover-bg: var(--co-yellow-one);
    --bs-btn-hover-border-color: var(--co-yellow-one);
    --bs-btn-focus-shadow-rgb: 49,132,253;
    --bs-btn-active-color: var(--bs-white) !important;
    --bs-btn-active-bg: var(--co-yellow-one);
    --bs-btn-active-border-color: var(--co-yellow-two);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--bs-white) !important;
    --bs-btn-disabled-bg: var(--co-yellow-two);
    --bs-btn-disabled-border-color: var(--co-yellow-two);
}


.btn-outline-gray {
    --bs-btn-color: var(--co-black-four);
    --bs-btn-border-color: var(--co-black-four);
    --bs-btn-hover-color: var(--bs-white) !important;
    --bs-btn-hover-bg: var(--co-black-four);
    --bs-btn-hover-border-color: var(--co-black-four);
    --bs-btn-focus-shadow-rgb: 114,124,245;
    --bs-btn-active-color: var(--bs-white) !important;
    --bs-btn-active-bg: var(--co-black-four);
    --bs-btn-active-border-color: var(--co-black-four);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--co-black-four);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--co-black-four);
    --bs-gradient: none;
}

.btn-outline-green {
    --bs-btn-color: var(--co-green-two);
    --bs-btn-border-color: var(--co-green-two);
    --bs-btn-hover-color: var(--bs-white) !important;
    --bs-btn-hover-bg: var(--co-green-two);
    --bs-btn-hover-border-color: var(--co-green-two);
    --bs-btn-focus-shadow-rgb: 114,124,245;
    --bs-btn-active-color: var(--bs-white) !important;
    --bs-btn-active-bg: var(--co-green-two);
    --bs-btn-active-border-color: var(--co-green-two);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--co-green-two);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--co-green-two);
    --bs-gradient: none;
}


.btn-outline-red {
    --bs-btn-color: var(--co-red-two);
    --bs-btn-border-color: var(--co-red-two);
    --bs-btn-hover-color: var(--bs-white) !important;
    --bs-btn-hover-bg: var(--co-red-two);
    --bs-btn-hover-border-color: var(--co-red-two);
    --bs-btn-focus-shadow-rgb: 114,124,245;
    --bs-btn-active-color: var(--bs-white) !important;
    --bs-btn-active-bg: var(--co-red-two);
    --bs-btn-active-border-color: var(--co-red-two);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--co-red-two);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--co-red-two);
    --bs-gradient: none;
}

.btn-outline-blue {
    --bs-btn-color: var(--co-blue-two);
    --bs-btn-border-color: var(--co-blue-two);
    --bs-btn-hover-color: var(--bs-white) !important;
    --bs-btn-hover-bg: var(--co-blue-two);
    --bs-btn-hover-border-color: var(--co-blue-two);
    --bs-btn-focus-shadow-rgb: 114,124,245;
    --bs-btn-active-color: var(--bs-white) !important;
    --bs-btn-active-bg: var(--co-blue-two);
    --bs-btn-active-border-color: var(--co-blue-two);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--co-blue-two);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--co-blue-two);
    --bs-gradient: none;
}

.btn-outline-orange {
    --bs-btn-color: var(--co-orange-two);
    --bs-btn-border-color: var(--co-orange-two);
    --bs-btn-hover-color: var(--bs-white) !important;
    --bs-btn-hover-bg: var(--co-orange-two);
    --bs-btn-hover-border-color: var(--co-orange-two);
    --bs-btn-focus-shadow-rgb: 114,124,245;
    --bs-btn-active-color: var(--bs-white) !important;
    --bs-btn-active-bg: var(--co-orange-two);
    --bs-btn-active-border-color: var(--co-orange-two);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--co-orange-two);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--co-orange-two);
    --bs-gradient: none;
}

.btn-outline-yellow {
    --bs-btn-color: var(--co-yellow-two);
    --bs-btn-border-color: var(--co-yellow-two);
    --bs-btn-hover-color: var(--bs-white) !important;
    --bs-btn-hover-bg: var(--co-yellow-two);
    --bs-btn-hover-border-color: var(--co-yellow-two);
    --bs-btn-focus-shadow-rgb: 114,124,245;
    --bs-btn-active-color: var(--bs-white) !important;
    --bs-btn-active-bg: var(--co-yellow-two);
    --bs-btn-active-border-color: var(--co-yellow-two);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--co-yellow-two);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--co-yellow-two);
    --bs-gradient: none;
}

/* ---------------------------------------------------
    BORDER
----------------------------------------------------- */
.border-green {
    border-color: var(--co-green-two) !important;
}

.border-red {
    border-color: var(--co-red-two) !important;
}

.border-blue {
    border-color: var(--co-blue-two) !important;
}

.border-orange {
    border-color: var(--co-orange-two) !important;
}

.border-yellow {
    border-color: var(--co-yellow-two) !important;
}

/* ---------------------------------------------------
    LIST GROUP
----------------------------------------------------- */

/*.list-group-item.active {
    z-index: 2;
    color: var(--bs-list-group-active-color);
    background-color: var(--co-blue-two);
    border-color: var(--co-blue-two);
}*/

/* ---------------------------------------------------
    Scrollbar
----------------------------------------------------- */

/* width */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

/* Track */
::-webkit-scrollbar-track {
    border-radius: 5px;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: var(--co-blue-two);
    border-radius: 5px;
}

    /* Handle on hover */
    ::-webkit-scrollbar-thumb:hover {
        background: var(--co-blue-one);
    }

/* ---------------------------------------------------
    Font Size
----------------------------------------------------- */
.fs06 {
    font-size: 0.6rem !important;
}

.fs08 {
    font-size: 0.8rem !important;
}


/* ---------------------------------------------------
    ข้อความที่อยูใน Row ของ Table (ไม่ให้มันยาวเกินไป แต่ถ้าเอาเมาส์ไปชี้ จะขึ้นข้อความทั้งหมด)
----------------------------------------------------- */
.editable-content {
    border-radius: 5px;
    border: 1px solid #ccc;
    padding: 5px;
    min-height: 36px;
}

.ellipsis-text {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ellipsis-text-tb {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

    .ellipsis-text-tb:hover {
        white-space: normal;
        overflow: visible;
        text-overflow: clip; /* ไม่ให้ใส่จุด (...) */
    }

/* ---------------------------------------------------
    DROP FILE
----------------------------------------------------- */

input.dropfile::file-selector-button {
    min-height: 150px;
    background: #00000000;
    color: #00000000;
    padding: 20px 20px;
    text-align: center;
    width: 100%;
    border: 1px dashed var(--co-blue-two);
    border-radius: 5px;
    font-weight: 400;
    justify-content: center;
    cursor: pointer;
}

    input.dropfile::file-selector-button:hover {
        color: #00000000;
    }

.hidden-in-preview {
    display: none;
}

/* ---------------------------------------------------
    Pagination
----------------------------------------------------- */
.page-link {
    color: var(--co-blue-two) !important;
}

    .active > .page-link, .page-link.active {
        z-index: 3;
        color: white !important;
        background-color: var(--co-blue-two);
        border-color: var(--co-blue-two);
    }

/* Timeline responsive styles for mobile */
@media (max-width: 768px) {
    .timeline-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .timeline-hours {
        min-width: 800px; /* Ensure timeline doesn't collapse */
    }

    .hour-label {
        font-size: 0.6rem !important;
        padding-left: 1px !important;
    }

    .timeline-track {
        min-width: 800px;
        height: 50px !important;
    }

    .timeline-booking-block {
        height: 40px !important;
        font-size: 0.65rem !important;
        padding: 2px 4px !important;
    }

    /* Style the scrollbar for better UX on mobile */
    .timeline-wrapper::-webkit-scrollbar {
        height: 6px;
    }

    .timeline-wrapper::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .timeline-wrapper::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 3px;
    }

        .timeline-wrapper::-webkit-scrollbar-thumb:hover {
            background: #555;
        }

    /* Add a hint message for mobile users */
    #timeline-container::after {
        content: '← Swipe to see full timeline →';
        display: block;
        text-align: center;
        font-size: 0.7rem;
        color: #6c757d;
        margin-top: 0.5rem;
        font-style: italic;
    }
}

/* Hide swipe hint on desktop */
@media (min-width: 769px) {
    #timeline-container::after {
        display: none;
    }
}

/* Fix chevron wrapping on all states */
#sidebar span.nav-link > span {
    display: inline-flex !important;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    flex-wrap: nowrap;
    width: auto;
    max-width: 100%;
}

#sidebar .dd-btn span.nav-link {
    display: flex !important;
    align-items: center;
    width: 100%;
}

#sidebar i.icons {
    flex-shrink: 0;
    display: inline-block;
    margin-left: auto;
}

/* Force proper display on hover */
#sidebar.active:hover span.nav-link > span {
    display: inline-flex !important;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    flex-wrap: nowrap;
}

#sidebar.active:hover i.icons {
    flex-shrink: 0;
    display: inline-block !important;
}

/* Add support for datatable-ajax-wrapper (server-side datatables) */
@media (max-width: 768px) {
    .datatable-ajax-wrapper .table-view {
        display: none !important;
    }

    .datatable-ajax-wrapper .card-view {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .datatable-ajax-wrapper .table-view {
        display: block !important;
    }

    .datatable-ajax-wrapper .card-view {
        display: none !important;
    }
}