
:root {
    --colortx: #9f705c;
    --colortxbr: #543a2f; /* กำหนดตัวแปรสี */

    --colortx-rd:#9f705c;
    --colortx-bk:#543a2f;

    --colortx-p:#eddace;/* กำหนดตัวแปรสีพื้น */
    
}
body {
    font-size: 12px;
    color: var(--colortx);
    
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media print {
    .no-print {
        display: none;
    }
}

.scrollable-row {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;

    .cardbar {
        flex: 0 0 auto;
        margin-right: 10px;
        background-image: url('../images/icon/map.png'); /* ระบุที่อยู่ไฟล์ภาพ */
        background-size: cover; /* ทำให้ภาพคลุมพื้นที่ทั้งหมด */
        background-position: center; 
        height: 159px;
        position: relative; 
      
    }

    .btn-group-bottom {
        position: absolute;
        bottom: 10px; /* ระยะห่างจากด้านล่าง */
        right: 10px; /* ระยะห่างจากด้านขวา */
    }

    .btn-outline-rd {
        color: var(--colortx-rd);
        background-color: #fff;
    }

    .btn-outline-rd:hover {
        background-color: var(--colortx-rd);
        color: #fff;
    }
}

a {
    text-decoration: none;
    color: var(--colortx);
}
.nav-link:active {
    color: var(--colortx);
}
.color-text-active{
    color: var(--colortx);
    background-color: #fff;
    border-radius: 29px;
}
.color-text{
    color: var(--colortx);
    background-color: #fff;
}
.color-text-border{
    color: #fff;
    background-color:var(--colortx) ;
    border-radius: 3px; 
}
.color-bg{
    /* เอฟเฟกต์กระจกใส (Glassmorphism) */
    background: rgba(255, 255, 255, 0.7); /* ปรับความใสตรงนี้ (0.7 คือโปร่งแสง 70%) */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    
    /* เส้นขอบบางๆ แบบหรูหรา */
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* เพิ่ม Transition และ Shadow ให้ดูมีมิติ */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);

    background-color: var(--colortx);
    color: #fff;
}
.color-bg:hover{
    
    border-top: 1px solid var(--colortx);
}
.color-bg-r{
    background-color: var(--colortx-rd);
    color: #fff;
}
.body-b{
   background-color: var(--colortx-p);
}

.dropdown-menu{
    font-size: 12px;
}

.dataTables_wrapper {
    color: #fff; /* สีข้อความ */
    font-size: 11px; /* ขนาดข้อความ */
}
.dt-bootstrap4 {
    color: #fff; /* สีข้อความ */
    font-size: 11px; /* ขนาดข้อความ */
}
.no-footer {
    color: #fff; /* สีข้อความ */
    font-size: 11px; /* ขนาดข้อความ */
}
.btn-group.flex-wrap .btn {
    color: #fff; /* สีข้อความ */
    font-size: 11px; /* ขนาดข้อความ */
    border: 0px;
    background-color: var(--colortx); /* สีพื้นหลังปุ่ม */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    
}
th, td {
    padding: 12px;
    border-bottom: 1px solid var(--colortx);
    text-align: left;
    
}
th {
    background-color: #f4f4f4;
}
tr:hover {
    background-color: #f1f1f1;
}
td input{
    width: 100%;
}
.responsive-element {
    width: 35%;
}
@media (min-width: 650px) {

  
} 

@media (max-width: 650px) {
    .responsive-element {
        width: 100%;
    }

    .custom-table-wrapper table,
    .custom-table-wrapper thead,
    .custom-table-wrapper tbody,
    .custom-table-wrapper th,
    .custom-table-wrapper td,
    .custom-table-wrapper tr {
        display: block;
    }
    
    .custom-table-wrapper thead tr {
        display: none;
    }
    
    .custom-table-wrapper tr {
        margin-bottom: 10px;
        border: 1px solid var(--colortx-rd);
        background-color: #fff;
        border-radius: 15px; /* Rounded corners 
        box-shadow: 0.5px 1px 2px var(--colortx-rd);*/
    }
    
    .custom-table-wrapper tr:hover {
        background-color: #fff;
    }
    
    .custom-table-wrapper td {
        text-align: left;
        border: 0;
        position: relative;
        border-radius: 15px;
    }
    
    .custom-table-wrapper td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 50%;
        padding-left: 10px;
        font-weight: bold;
        text-align: left;
    }
    
  
    .custom-table-wrapper td input { 
        text-align: right;
    }
    
    .custom-table-wrapper td:nth-child(5),
    .custom-table-wrapper td:nth-child(1) {
        border-bottom: 1px solid var(--colortx-rd);
        border-radius: 15px 15px 0 0;
    }
    
    .custom-table-wrapper tr:hover td:nth-child(6) {
        border-radius: 0 0 15px 15px;
    }
    
    .custom-table-wrapper tr:hover td:nth-child(6) a {
        display: block;
        width: 100%;
        height: 100%;
        padding: 0;
        margin: 0;
        text-align: center;
        line-height: inherit;
    }
    
    .custom-table-wrapper tr:hover td:nth-child(6) ul a {
        color: var(--colortx);
    }
    
    .custom-table-wrapper tr:hover td:nth-child(6) ul {
        width: 95%;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
        z-index: 82;
    }
    
    .custom-table-wrapper tr:hover td:nth-child(6) input {
        font-size: 16px;
        background-color: var(--colortx);
        color: #fff;
    }
    
    .custom-table-wrapper tr td:nth-child(6) input {
        font-size: 16px;
    }       
}

/* กำหนดสไตล์ให้กับขั้นตอนต่างๆ */
.step-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.step {
    position: relative;
    flex: 1 1 calc(20% - 20px);  /* ขนาดแต่ละขั้นตอน */
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.step-number {
    font-size: 24px;
    font-weight: bold;
    color: var(--colortx);
    margin-bottom: 10px;
}

.step-title {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* การจัดการเมื่อขั้นตอนถูกเลือก (hover หรือ active state) */
.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* เมื่อกำหนดให้ขั้นตอนใดถูกเลือก (active) */
.step.active {
    background-color: var(--colortx);
    color: white;
}

.step.active .step-number {
    color: white;
}

/* Responsive: เมื่อหน้าจอขนาดเล็กกว่า 768px (Mobile-first design) */
@media (max-width: 768px) {
    .step-container {
        flex-direction: column;
    }

    .step {
        flex: 1 1 100%;
        margin-bottom: 15px;
    }

    .step-number {
        font-size: 20px;
    }

    .step-title {
        font-size: 14px;
    }
}


/* Timeline Container */
.timeline {
    position: relative;
    margin: 20px 0;
    padding: 10px 0;
}

/* Timeline Item */
.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
}

/* Icon */
.timeline-icon {
    width: 25px;
    height: 25px;
    background-color:var(--colortx);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
}

/* Content */
.timeline-content {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

/* Title */
.timeline-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--colortx);
}

/* Text */
.timeline-text {
    margin-top: 5px;
    color: #555;
}

/* Remark */
.timeline-remark {
    margin-top: 5px;
    color: #888;
    font-style: italic;
}
/* Modern Soft UI Theme for SweetAlert2 */
    .swal2-custom-popup {
        background: #ffffff !important;
        border-radius: 20px !important;
        padding: 1.5rem !important;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
        border: none !important;
    }

    /* หัวข้อภาษาไทย/อังกฤษ ให้ดูเด่นและสะอาด */
    .swal2-title {
        color: #1f2937 !important;
        font-size: 1.5rem !important;
        font-weight: 700 !important;
        margin-bottom: 10px !important;
    }

    /* เนื้อหาข้อความ */
    .swal2-html-container {
        color: #4b5563 !important;
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }

    /* ปรับแต่ง Icon ให้ดูทันสมัยขึ้น */
    .swal2-icon {
        border-width: 3px !important;
        margin-top: 10px !important;
        margin-bottom: 20px !important;
    }

    /* ปุ่มยืนยัน: ใช้ Gradient เขียว-ฟ้า เพื่อความพรีเมียม */
    .custom-btn-confirm {
        background: linear-gradient(to right, #10b981, #059669) !important;
        color: #fff !important;
        font-weight: 600 !important;
        padding: 12px 32px !important;
        margin: 8px !important;
        border: none !important;
        box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.4) !important;
        transition: all 0.2s ease-in-out !important;
    }

    .custom-btn-confirm:hover {
        background: linear-gradient(to right, #059669, #047857) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4) !important;
    }

    /* ปุ่มยกเลิก: ใช้สีเทาอ่อนสะอาดๆ */
    .custom-btn-cancel {
        background: #f3f4f6 !important;
        color: #374151 !important;
        font-weight: 600 !important;
        padding: 12px 32px !important;
        margin: 8px !important;
        border: 1px solid #e5e7eb !important;
        transition: all 0.2s ease-in-out !important;
    }

    .custom-btn-cancel:hover {
        background: #e5e7eb !important;
        color: #111827 !important;
    }

    /* เฉพาะกรณีปุ่ม Delete ให้ใช้สีแดง Soft */
    .btn-danger-custom {
        background: linear-gradient(to right, #ef4444, #dc2626) !important;
        box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.4) !important;
    }

    /* Toast style */
    .swal2-toast {
        background: #ffffff !important;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
        border-left: 4px solid #10b981 !important;
    }


