﻿@charset "UTF-8";

:root {
    --mbgcolor: #BB8FCE;
    --sbgcolor: #8E44AD;
}

/*----------------site master--------------*/
.body {
    margin: 0;
    font-size: 1.2rem;
}

.container {
    width: 97%;
    margin-right: auto;
    margin-left: auto;
}

.body-content {
    width: 97%;
    margin-right: auto;
    margin-left: auto;
}

.footer-content {
    width: 97%;
    margin-right: auto;
    margin-left: auto;
}
/*----------------close site master--------------*/

/*----------------input from--------------*/
input {
    font-size: 16px;
    height: 35px;
}

    input[type="text"] {
        border: 1px solid blue;
        border-radius: 6px;
        outline: none;
        box-shadow: rgba(225, 228, 232, 0.2) 0px 1px 0px 0px inset;
        padding: 10px;
        box-sizing: border-box;
    }

        input[type="text"]:focus {
            border-color: #0366d6;
            outline: none;
            box-shadow: rgba(3, 102, 214, 0.3) 0px 0px 0px 3px;
        }

    input[type="password"] {
        border: 1px solid blue;
        border-radius: 6px;
        outline: none;
        box-shadow: rgba(225, 228, 232, 0.2) 0px 1px 0px 0px inset;
        padding: 10px;
        box-sizing: border-box;
    }

        input[type="password"]:focus {
            border-color: #0366d6;
            outline: none;
            box-shadow: rgba(3, 102, 214, 0.3) 0px 0px 0px 3px;
        }

textarea {
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid blue;
}

/* สไตล์สำหรับ CheckBox ที่ซ่อน */
input[type="checkbox"] {
    width: 1.3rem;
    height: 1.3rem;
    position: absolute;
    opacity: 0;
}

    /* สไตล์สำหรับ Label ที่เชื่อมโยงกับ Checkbox */
    input[type="checkbox"] + label {
        display: inline-block;
        /*background-color: rgba(255, 255, 255, 0.9);*/
        background-color: #f66868;
        border: 2px solid rgba(139, 139, 139, 0.3);
        /*color: #adadad;*/
        color: #fff;
        border-radius: 25px;
        white-space: nowrap;
        padding: 8px 12px;
        margin: 2px;
        cursor: pointer;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        transition: all 0.2s;
    }

        /* สไตล์สำหรับสัญลักษณ์ + หรือ √ */
        input[type="checkbox"] + label::before {
            content: "-";
            display: inline-block;
            font-size: 12px;
            padding: 2px 6px 2px 2px;
            transition: transform 0.3s ease-in-out;
        }

    /* เมื่อ Checkbox ถูกเลือก */
    input[type="checkbox"]:checked + label {
        border: 2px solid #1bdbf8;
        background-color: #12bbd4;
        color: #fff;
        transition: all 0.2s;
    }

        /* เปลี่ยนสัญลักษณ์เมื่อถูกเลือก */
        input[type="checkbox"]:checked + label::before {
            content: "-";
            transform: rotate(-360deg);
        }

    /* สไตล์เมื่อโฟกัสที่ Checkbox */
    input[type="checkbox"]:focus + label {
        border: 2px solid #e9a1ff;
    }

input[type="submit"] {
    display: inline-block;
    outline: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    border-radius: 500px;
    transition-property: background-color,border-color,color,box-shadow,filter;
    transition-duration: .3s;
    border: 1px solid transparent;
    letter-spacing: 2px;
    min-width: 100px;
    text-transform: uppercase;
    white-space: normal;
    font-weight: 700;
    text-align: center;
    padding: 10px 20px;
    color: #fff;
    background-color: #1ED760;
    height: 35px;
}

    input[type="submit"]:hover {
        transform: scale(1.04);
        background-color: #21e065;
    }

select {
    background-color: aqua;
    font-size: 16px;
    height: 35px;
    border: none;
    border-radius: 0.5em;
    display: inline-block;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

    select option {
        list-style: none;
        position: absolute;
        top: 3.2em;
        width: 100%;
        border-radius: 0.5em;
    }

        select option:hover {
            background: #1d1f24;
            cursor: pointer;
        }

.table .tr .td {
    vertical-align: top;
}

.imgcant {
    width: 100%; /* ทำให้ภาพกว้างเต็ม div */
    height: auto; /* รักษาสัดส่วนภาพ */
    display: block; /* กำจัดช่องว่างด้านล่างของ img */
}

/*----------------close input from--------------*/

/*----------------bar--------------*/
.navbar {
    display: flex;
    align-items: center;
    background: radial-gradient(circle, #5e1780, #d07cfc);
    /*position: sticky;*/
    width: 100%; /* กว้างเต็ม */
    height: 80px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 9999; /* ให้เป็นชั้นสูงสุด */
}

.navbar-brand {
    display: flex;
    justify-content: flex-start; /* จัดโลโก้ให้ชิดซ้าย */
    padding-top: 5px;
    margin: 0;
}

.navbar-brand-item img {
    padding-top: 0;
    margin: 0;
    /*width: 70px;*/
    width: 450px;
    height: 75px;
    object-fit: fill; /* ปรับให้ภาพขยายอัตโนมัติ โดยคงสัดส่วน */
    background-color: mintcream;
    border: 4px solid #FF66FF;
}

.navbar-menu {
    flex: 1; /* ขยายพื้นที่ให้เต็ม */
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 50px;
    width: 100%;
    background: linear-gradient(to top, #fff, #eb92f8);
    /*padding-left: 10px;  ระยะห่างจากโลโก้ */
    /*border: 1px solid red;*/
    position: relative;
    z-index: 9998; /* ให้เป็นชั้นสูงสุด */
}

    .navbar-menu ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        gap: 10px; /*ระยะห่างระหว่างเมนู */
        align-items: center;
        /*border: 1px solid red;*/
    }

    /* เมนู */
    .navbar-menu li {
        padding: 1px 5px;
        transition: background-color 0.3s;
        display: flex;
        align-items: center;
        /*background: linear-gradient(to top, #fff, #eb92f8);*/
        width: max-content;
        min-width:100px;
        /*border: 1px solid red;*/
        height: 48px;
        cursor: pointer;
        /*text-decoration: none;*/
        position: relative;
    }

        .navbar-menu li:hover {
            background: #972eac;
            color: white;
            border-radius: 6px; /* มุมโค้งเล็กน้อย */
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* เงานุ่ม ๆ */
        }

            .navbar-menu li:hover ul {
                background: #972eac;
                border-radius: 6px; /*มุมโค้งเล็กน้อย */
                display: flex;
            }

                .navbar-menu li:hover ul li:hover {
                    background: #671f8a;
                    border-radius: 6px; /*มุมโค้งเล็กน้อย */
                }

            .navbar-menu li:hover a {
                color: white;
                text-decoration: none;
                width: max-content;
                cursor: pointer;
            }

        .navbar-menu li ul {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            flex-direction: column;
            background: #fff;
            padding: 5px 0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        }

            .navbar-menu li ul li {
                flex: 1;
                display: flex;
                width: 100%; /* ✅ ขยายเต็มเมนู */
                box-sizing: border-box; /* ✅ ให้ padding/width คำนวณแบบไม่ล้น */
                padding: 5px 10px; /* เพิ่ม padding ให้ดูสวย */
            }

.navbar-user {
    flex: 0 0 180px; /* กำหนดความกว้างคงที่ 180px */
    display: flex;
    align-items: center;
    justify-content: flex-end; /* จัดล็อกอินให้ชิดขวา */
    height: 80px; /* ความสูงของล็อกอิน */
    margin-left: auto; /* ดันไปด้านขวาสุด */
    z-index: 9999;
}

.navbar-user-item ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px; /* ระยะห่างระหว่างเมนู */
    align-items: center;
}

.navbar-user-item li {
    padding: 10px 15px;
    background-color: var(--mbgcolor);
    border-radius: 5px;
    font-size: 16px; /* ขนาดฟอนต์ล็อกอิน 16px */
    font-weight: bold; /* ตัวหนา */
    text-align: center;
    transition: background-color 0.3s;
    min-width: 180px;
}

    .navbar-user-item li:hover {
        background-color: var(--sbgcolor);
    }

    .navbar-user-item li a {
        color: white;
        text-decoration: none;
    }

        .navbar-user-item li a:hover {
            color: gold;
        }
/*----------------close bar--------------*/

/*----------------bar mobile--------------*/
.navbar-mobile {
    display: flex;
    align-items: center;
    background-color: var(--mbgcolor);
    /*position: sticky;*/
    width: 100%; /* กว้างเต็ม */
    height: 80px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 1000; /* ให้เป็นชั้นสูงสุด */
}

.navbar-menu-mobile {
    flex: 1; /* ขยายพื้นที่ให้เต็ม */
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 80px;
    /*border: 1px solid red;*/
}

    .navbar-menu-mobile ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        gap: 5px; /* ระยะห่างระหว่างเมนู */
        align-items: center;
        /*border: 1px solid red;*/
    }

    /* เมนู */
    .navbar-menu-mobile li {
        padding: 5px 5px;
        background-color: var(--mbgcolor);
        transition: background-color 0.3s;
        display: flex;
        align-items: center;
        /*border: 1px solid red;*/
        height: 55px;
        min-width: 80px;
        cursor: pointer;
    }

        .navbar-menu-mobile li:hover {
            background-color: var(--sbgcolor);
        }

        .navbar-menu-mobile li div {
            display: flex;
            /*border: 1px solid red;*/
            height: 55px;
            align-items: center;
        }

        .navbar-menu-mobile li img {
            /*width: 80px;*/
            width:240px;
            height: 80px;
        }

    .navbar-menu-mobile a {
        text-decoration: none;
        width: max-content;
    }

    .navbar-menu-mobile ul ul li img {
        width: 50px;
        height: 50px;
        border-radius: 5px;
    }

    .navbar-menu-mobile ul ul li label {
        color: white;
        font-size: 18px; /* ขนาดฟอนต์เมนู 18px */
        text-decoration: none;
        min-width: 100px;
        cursor: pointer;
        padding-left: 5px;
        /*border: 1px solid red;*/
    }

    .navbar-menu-mobile label:hover {
        color: lawngreen;
    }

/* ล็อกอิน */

.navbar-user-mobile {
    flex: 0 0 180px; /* กำหนดความกว้างคงที่ 180px */
    display: flex;
    align-items: center;
    justify-content: flex-end; /* จัดล็อกอินให้ชิดขวา */
    height: 80px; /* ความสูงของล็อกอิน */
    margin-left: auto; /* ดันไปด้านขวาสุด */
}

.navbar-user-item-mobile ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px; /* ระยะห่างระหว่างเมนู */
    align-items: center;
}

.navbar-user-item-mobile li {
    padding: 10px 15px;
    background-color: var(--mbgcolor);
    border-radius: 5px;
    font-size: 16px; /* ขนาดฟอนต์ล็อกอิน 16px */
    font-weight: bold; /* ตัวหนา */
    text-align: center;
    transition: background-color 0.3s;
}

    .navbar-user-item-mobile li:hover {
        background-color: var(--sbgcolor);
    }

    .navbar-user-item-mobile li a {
        color: white;
        text-decoration: none;
    }

        .navbar-user-item-mobile li a:hover {
            color: gold;
        }

.navbar-user-mobile a {
    text-decoration: none;
    width: max-content;
}
/*----------------close bar mobile--------------*/

.nav-sub-item {
}

    .nav-sub-item ul {
        list-style: none;
        margin: 0;
        padding-left: 0;
    }

    .nav-sub-item li {
        color: #fff;
        background: var(--subbgcolor);
        display: block;
        float: left;
        padding: 1rem;
        position: relative;
        transition-duration: 0.5s;
        width: max-content;
        border-radius: 0.5em;
        margin-right: 0.1em;
    }

        .nav-sub-item li:hover, .nav-sub-item li:focus {
            background-color: var(--sbgcolor);
            border-radius: 0.5em;
        }

        .nav-sub-item li a {
            color: #fff;
            text-decoration: none;
        }

            .nav-sub-item li a:hover, .nav-sub-item li a:focus {
                color: orangered;
            }

.nav_sub_io {
    float: right;
    /*margin-top: 0.4rem;
    padding: 0.5rem;
    border-radius: 0.5em;
    background-color: #1ED760;*/
}

/*----------------grid--------------*/
.grid {
    word-wrap: break-word;
    /*table-layout: fixed;*/
    overflow: scroll;
    border: none;
    vertical-align: top;
}

    .grid tr th {
        padding: 2px;
        padding-left: 1rem;
        padding-right: 1rem;
        color: #212f3d;
        background-color: #bdc3c7;
        border: 1px solid black;
        /*position: sticky;*/
        top: 0;
        left: 0;
    }

    .grid td {
        border: 0.1rem solid black;
        padding: 0.2rem;
        padding-left: 1rem;
        padding-right: 1rem;
        white-space: pre-wrap;
    }

        .grid td img {
            /*margin: 0rem 0rem -0.3rem -0.6rem;*/
            margin-top: 0rem;
            margin-bottom: -0.3rem;
        }

    .grid a {
        text-decoration: none;
    }

    .grid pre {
        /*border: 0.1rem solid black;*/
        margin-top: 0rem;
        margin-bottom: 0rem;
    }

.gridbg tr:nth-child(even) {
    background-color: #d6eaf8;
}

.gridbg tr:nth-child(odd) {
    background-color: #fdfefe;
}

.gridth tr th {
    white-space: nowrap;
}

.gridtd tr td {
    white-space: nowrap;
}
/*----------------close grid--------------*/

/*----------------mpe--------------*/
.ModalPopupBG {
    background-color: #666699;
    opacity: 0.7;
}
/*----------------close mpe--------------*/

/*----------------chart--------------*/
.Container1 {
    /*display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    vertical-align: top;
    gap: 4px;*/
    border: 1px solid red;
    width: 100%;
    float: left;
}

.Chart1 {
    border: 1px solid blue;
    /*color: blue;*/
    /*font-size: 1.25rem;*/
    /*display: block;*/
    max-width: fit-content;
    text-align: center;
    float: left;
    /*padding: 1rem 1rem 1rem 1rem;*/
}

.GView1 {
    border: 1px solid green;
    /*color: blue;*/
    /*font-size: 1.25rem;*/
    /*display: block;*/
    max-width: fit-content;
    float: left;
    /*padding: 1rem 1rem 1rem 1rem;*/
}
/*----------------close mpe--------------*/

/*----------------div--------------*/
.center-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    /*height: 80vh;*/
    background-color: #f5f5f5;
}

.form-container {
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.form-container-box {
    position: relative;
    width: 300px;
    height: 500px;
    max-width: 90%;
    overflow: hidden;
}

.form-container h2 {
    text-align: center;
    color: #0000FF;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

    .form-group label {
        display: block;
        font-weight: bold;
        margin-bottom: 5px;
        text-align: left;
    }

    .form-group input, .form-group select, .form-group textarea {
        width: 100%;
        box-sizing: border-box;
    }

        .form-group input[type="file"] {
            padding: 3px;
        }

.form-group-inline {
    display: flex;
    justify-content: space-between;
    gap: 10px; /* Space between items */
    margin-bottom: 15px;
}

.inline-item {
    flex: 1; /* Items take equal width */
    display: flex;
    flex-direction: column;
}

.inline-input {
    width: 100%; /* Ensures inputs take full width of their container */
}

.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

    .button-group button {
        margin: 0 10px;
    }

.alert {
    color: #FF3300;
    margin-top: 15px;
    text-align: center;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    z-index: 0;
    opacity: 0.3; /* ปรับความโปร่งใส */
}

.content-overlay {
    position: relative;
    z-index: 1; /* ให้ข้อความอยู่ด้านหน้า */
    height: 100%; /* เพื่อจัดข้อความในพื้นที่ */
}

.label-top {
    position: absolute;
    font-size: 40px;
    color: #333; /* สีของข้อความ */
    text-decoration: none;
}

.label-top-center {
    position: absolute;
    top: 0px; /* ระยะห่างจากด้านบน (ปรับตามต้องการ) */
    left: 50%; /* จัดกึ่งกลางหน้าจอแนวนอน */
    transform: translateX(-50%); /* เลื่อน Label กลับครึ่งหนึ่งของความกว้าง */
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 4px 30px; /* ระยะห่างด้านใน */
    border: 2px solid #ccc; /* กรอบ */
    border-radius: 15px; /* มุมโค้งมน */
    background-color: #f9f9f9; /* พื้นหลังสีเทาอ่อน */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1); /* เพิ่มเงา */
    z-index: 10; /* ให้อยู่ด้านหน้าขององค์ประกอบอื่น */
    width: auto; /* ปรับขนาดอัตโนมัติตามข้อความ */
    max-width: 90%; /* จำกัดความกว้างไม่ให้ใหญ่เกินไป */
}


.label-bottom {
    position: absolute;
    bottom: 10px; /* ระยะห่างจากขอบล่าง */
    left: 0;
    right: 0;
    text-align: center; /* จัดข้อความให้อยู่กึ่งกลาง */
    font-size: 14px;
    color: #333; /* สีของข้อความ */
}

/*----------------close div--------------*/


