body {
    font-family: "Pridi", sans-serif;
    font-size: 16px !important;
}
h1, h2, h3, h4, h5, h6 {
    font-family: "Pridi", sans-serif;
}
.e-feed-color {
    color: #747474;
}
label {
    font-size: 15px !important;
    color: #4d5a6d !important;
}
.form-check-label {
    color: #4d5a6d !important;
}
.btn {
    font-family: "Pridi", sans-serif;
    font-weight: 600 !important;
}
.menu-title {
    font-family: "Pridi", sans-serif;
    font-weight: 400 !important;
    font-size: 16px !important;
}
.card-label {
    font-family: "Pridi", sans-serif;
    font-size: 18px !important;
}
.form-control {
    font-family: "Pridi", sans-serif;
    font-size: 16px !important;
}
.separator {
    border-top: 1px solid #ccc;
    margin: 20px 0;
    width: 100%;
}
.th-bg th{
    background-color: #747474 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    /*font-family: "Pridi", sans-serif;*/
}
tr td {
    font-size: 14px !important;
}
.btn-manage {
    color: #12BA8D !important;
    font-weight: 700 !important;
    border: 1px solid #12BA8D !important;
    background-color: #fff !important;
    box-shadow: none !important;
}
.btn-manage i {
    color: #12BA8D !important;
}
.btn-manage:hover,
.btn-manage:focus {
    background-color: #12BA8D !important;
    color: #fff !important;
    border-color: #12BA8D !important;
}
.btn-manage:hover i,
.btn-manage:focus i {
    color: #fff !important;
}
:root {
    --bs-header-link-bg-color: linear-gradient(180deg, #12BA8D 0%, #117257 100%);
}
.footer-custom {
    background: linear-gradient(90deg, #12BA8D 0%, #117257 100%);
}

#kt_app_header_menu {
    --bs-menu-link-color-active: #12BA8D;
    --bs-menu-link-bg-color-active: rgba(18, 186, 141, 0.10);
    --bs-menu-link-color-here: #12BA8D;
    --bs-menu-link-bg-color-here: rgba(18, 186, 141, 0.10);

    --efeed-menu-hover-bg: #f7f7f7;
    --efeed-menu-hover-color: #4b5675;

    /*--efeed-menu-hover-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);*/
    /*--efeed-menu-hover-shadow-active: 0 2px 6px rgb(95 157 139 / 45%)*/
}

#kt_app_header_menu .menu-sub .menu-item > .menu-link.active {
    background-color: rgba(18, 186, 141, 0.10);
}
#kt_app_header_menu .menu-sub .menu-item > .menu-link.active .menu-title {
    color: #12BA8D;
    font-weight: 600 !important;
}
#kt_app_header_menu .menu-sub .menu-item > .menu-link.active .menu-icon,
#kt_app_header_menu .menu-sub .menu-item > .menu-link.active .menu-icon i {
    color: #12BA8D;
}

@media (min-width: 992px) and (hover: hover) {
    .app-header-menu .menu > .menu-item > .menu-link {
        border-radius: .625rem;
        transition: background-color .2s ease, box-shadow .2s ease;
    }

    .app-header-menu .menu > .menu-item:not(.here) > .menu-link:hover,
    .app-header-menu .menu > .menu-item.hover:not(.here) > .menu-link {
        background-color: var(--efeed-menu-hover-bg);
        /*box-shadow: var(--efeed-menu-hover-shadow);*/
    }

    #kt_app_header_menu > .menu-item:not(.here) > .menu-link:hover .menu-title,
    #kt_app_header_menu > .menu-item.hover:not(.here) > .menu-link .menu-title,
    #kt_app_header_menu > .menu-item:not(.here) > .menu-link:hover .menu-icon i,
    #kt_app_header_menu > .menu-item.hover:not(.here) > .menu-link .menu-icon i {
        color: var(--efeed-menu-hover-color);
    }

    .app-header-menu .menu > .menu-item.here > .menu-link:hover,
    .app-header-menu .menu > .menu-item.here.hover > .menu-link {
        /*box-shadow: var(--efeed-menu-hover-shadow-active);*/
    }

    #kt_app_header_menu .menu-sub .menu-item > .menu-link {
        transition: background-color .2s ease, box-shadow .2s ease;
    }
    #kt_app_header_menu .menu-sub .menu-item > .menu-link:not(.active):hover {
        background-color: var(--efeed-menu-hover-bg);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
    }
    #kt_app_header_menu .menu-sub .menu-item > .menu-link:not(.active):hover .menu-title,
    #kt_app_header_menu .menu-sub .menu-item > .menu-link:not(.active):hover .menu-icon,
    #kt_app_header_menu .menu-sub .menu-item > .menu-link:not(.active):hover .menu-icon i {
        color: var(--efeed-menu-hover-color);
    }
}

@media (min-width: 992px) {
    .app-header-menu .menu>.menu-item>.menu-link {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 120px;
        height: 80px
    }
}

.select2-selection--multiple {
    height: auto !important;
}

@media (min-width: 992px) {
    .header {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: justify;
        -ms-flex-pack: justify;
        justify-content: space-between;
        -webkit-transition: height 0.3s ease;
        transition: height 0.3s ease;
        position: relative;
        z-index: 2;
    }
    .header .header-top {
        height: 70px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: stretch;
        -ms-flex-align: stretch;
        align-items: stretch;
        background-color: #0057B8;
    }
    .header .header-top .container,
    .header .header-top .container-fluid,
    .header .header-top .container-sm,
    .header .header-top .container-md,
    .header .header-top .container-lg,
    .header .header-top .container-xl,
    .header .header-top .container-xxl {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: stretch;
        -ms-flex-align: stretch;
        align-items: stretch;
        -webkit-box-pack: justify;
        -ms-flex-pack: justify;
        justify-content: space-between;
    }
    .header .header-bottom {
        height: 55px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: stretch;
        -ms-flex-align: stretch;
        align-items: stretch;
        background-color: #ffffff;
    }
    .header .header-bottom .container,
    .header .header-bottom .container-fluid,
    .header .header-bottom .container-sm,
    .header .header-bottom .container-md,
    .header .header-bottom .container-lg,
    .header .header-bottom .container-xl,
    .header .header-bottom .container-xxl {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: stretch;
        -ms-flex-align: stretch;
        align-items: stretch;
        -webkit-box-pack: justify;
        -ms-flex-pack: justify;
        justify-content: space-between;
    }
    .header-fixed .header {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 97;
        height: 70px;
        -webkit-box-shadow: none;
        box-shadow: none;
    }
    .header-fixed.header-bottom-enabled .header {
        height: 145px;
        -webkit-box-shadow: 0px 10px 30px 0px rgba(82, 63, 105, 0.08);
        box-shadow: 0px 10px 30px 0px rgba(82, 63, 105, 0.08);
    }
}

.badge-light-info {
    color: #1b84ff !important;
}

header-fixed .wrapper {
    padding-top: 0px;
}

.header-bottom {
    background-color: #FFFFFF !important;

}

:not(.day).active {
    color: #12ba8d !important;
    border-bottom: none !important;
}

@media (min-width: 992px) {
    .header-bottom {
        background-color: #17c653 !important;
    }
}

/* พื้นหลัง header เต็มจอ */
.header-bottom {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Container ด้านใน */
.header-bottom .container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

/* เมนูจัดกึ่งกลางทั้งแนวนอนและแนวตั้ง */
#kt_header_menu {
    display: flex !important;
    justify-content: center !important; /* กึ่งกลางซ้าย-ขวา */
    align-items: center !important;    /* กึ่งกลางบน-ล่าง */
    width: 100% !important;
    height: 100% !important;
}

/* เมนูไอเท็ม */
#kt_header_menu .menu-item {
    margin: 0 8px; /* ระยะห่างซ้าย-ขวา */
}

/* เมนูหลัก ปกติ */
#kt_header_menu > .menu-item > a.menu-link,
#kt_header_menu > .menu-item > span.menu-link {
    color: #ffffff !important;
    background-color: #17c653 !important;
}

/* เมนูหลัก Hover */
#kt_header_menu > .menu-item > a.menu-link:hover,
#kt_header_menu > .menu-item > span.menu-link:hover {
    color: #4b5675 !important;
    background-color: #ffffff !important;
}

/* เมนูหลัก Active (ป้องกันไม่ให้กลายเป็นสีม่วง) */
#kt_header_menu .menu-link.active {
    color: #ffffff !important;
    background-color: #17c653 !important;
}

/* เมนูย่อย ปกติ */
#kt_header_menu .menu-sub .menu-item > a.menu-link,
#kt_header_menu .menu-sub .menu-item > span.menu-link {
    color: #4b5675 !important;
    background-color: #ffffff !important;
}

/* เมนูย่อย Hover */
#kt_header_menu .menu-sub .menu-item > a.menu-link:hover,
#kt_header_menu .menu-sub .menu-item > span.menu-link:hover {
    color: #ffcc00 !important;
    background-color: #E4E6EF !important;
}

/* เมนูย่อย Active */
#kt_header_menu .menu-sub .menu-item > a.menu-link.active,
#kt_header_menu .menu-sub .menu-item.show > a.menu-link {
    color: #ffcc00 !important;
    background-color: #E4E6EF !important;
}
.bg-gradient-success-custom {
    background: linear-gradient(90deg, #12ba8d 0%, #08543f 100%);
}

.bg-efeet-box {
    background: linear-gradient(90deg, #12BA8D 0%, #117257 100%);
    color: var(--bs-text-white) !important;
    border-radius: 0.475rem;
}

.bg-efeet-footer {
    background: linear-gradient(90deg, #12BA8D 0%, #117257 100%);
    color: var(--bs-text-white) !important;
}

.container-fluid-index {
    width: 90% !important;
    max-width: 90% !important;
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-right: auto;
    margin-left: auto;
}

@media (max-width: 767px) {
    .app-container.container-fluid-index {
        flex-wrap: wrap !important;
        box-sizing: border-box !important;
        width: calc(100% - 40px) !important;
        padding-left: 0px !important;
        padding-right: 0px !important;
        margin-left: 20px !important;
    }
}


/* ฟอนต์หลักของหน้า */
.efeed{ font-family:"Pridi",var(--bs-font-sans-serif); }

/* แถบหัวเรื่องไล่เฉดด้านบน */
.ribbon{
    background:linear-gradient(90deg,#12BA8D 0%,#117257 100%);
    color:#fff!important; border-radius:.475rem;
}

.border-radius-custom{ border-radius:0.475rem!important; }

/* กล่องหัวข้อแบบไล่เฉด (ใช้หลายจุด) */
.bg-efeet-box{
    background:linear-gradient(90deg,#12BA8D 0%,#117257 100%);
    color:#fff; border-radius:.6rem;
}

/* การ์ดพื้นนิ่ม */
.card-soft{ border:1px solid var(--bs-gray-300); box-shadow:var(--bs-box-shadow-sm); border-radius:.8rem; }

/* สถิติ */
.stat-card{ background:#1a7f65; color:#fff; border:0; border-radius:.8rem; }
.stat-value{ font-size:3rem; font-weight:800; line-height:1; }
.stat-label{ opacity:.95; }

/* ลิงก์ด่วน 6 ใบ */
.quick-card1{
    background: linear-gradient(90deg, #205781 0%, #15344C 100%);
    color:#fff;
    box-shadow: 0 0 20px 0 rgba(94,98,120,.04);
    border-radius:18px;
    transition:transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.quick-card1:hover{
    transform:translateY(-1px); box-shadow:0 10px 18px rgba(0,0,0,.08);
    background: linear-gradient(90deg, #205781 0%, #15344C 100%);
}
.quick-card1 .card-body{ padding:18px; }
.quick-card1 .lh-sm{ line-height:1.25; }

.quick-card2{
    background: linear-gradient(90deg, #4F959D 0%, #274B4F 100%);
    color:#fff;
    box-shadow: 0 0 20px 0 rgba(94,98,120,.04);
    border-radius:18px;
    transition:transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.quick-card2:hover{
    transform:translateY(-1px); box-shadow:0 10px 18px rgba(0,0,0,.08);
    background: linear-gradient(90deg, #4F959D 0%, #274B4F 100%);
}
.quick-card2 .card-body{ padding:18px; }
.quick-card2 .lh-sm{ line-height:1.25; }

.quick-card3{
    background: linear-gradient(90deg, #469B87 0%, #285D50 100%);
    color:#fff;
    box-shadow: 0 0 20px 0 rgba(94,98,120,.04);
    border-radius:18px;
    transition:transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.quick-card3:hover{
    transform:translateY(-1px); box-shadow:0 10px 18px rgba(0,0,0,.08);
    background: linear-gradient(90deg, #469B87 0%, #285D50 100%);
}
.quick-card3 .card-body{ padding:18px; }
.quick-card3 .lh-sm{ line-height:1.25; }

.quick-card4{
    background: linear-gradient(90deg, #00ffc0 0%, #469b87 100%);
    color:#fff;
    box-shadow: 0 0 20px 0 rgba(94,98,120,.04);
    border-radius:18px;
    transition:transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.quick-card4:hover{
    transform:translateY(-1px); box-shadow:0 10px 18px rgba(0,0,0,.08);
    background: linear-gradient(90deg, #00ffc0 0%, #469b87 100%);
}
.quick-card4 .card-body{ padding:18px; }
.quick-card4 .lh-sm{ line-height:1.25; }

/* วงกลมลูกศร */
.quick-arrow{
    width:36px; height:36px; border-radius:50%;
    border:2px solid rgba(255,255,255,.9);
    display:flex; align-items:center; justify-content:center;
}

/* ยูทิลิตี้ตำแหน่งที่ Bootstrap/Metronic ไม่มี */
.end-3{ right:1rem; }
.bottom-3{ bottom:1rem; }

/* รายการประกาศฝั่งซ้าย */
.notice-item .date{
    width:86px; min-width:86px;
    border-right:1px solid var(--bs-gray-300);
    background:#12BA8D!important; color:#fff;
}
.notice-item .more{
    background:#7F7F7F; color:#fff; text-align:center;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:.25rem; padding:.5rem;
}
.notice-item:hover .more{ filter:brightness(1.05); }

/* การ์ดข่าว */
.news-card{ border-radius:14px; }
.news-thumb{
    width:210px; height:140px; object-fit:cover;
    border-radius:10px; flex-shrink:0;
}
.badge-news{
    position:absolute; top:-6px; right:0; transform:translateY(-50%);
    background:#6c6f72; color:#fff; padding:6px 12px; border-radius:999px;
    font-size:.85rem; font-weight:600;
}

/* สีหัวข้อข่าว */
.text-teal-700{ color:#0ab381!important; }

/* Responsive ย่อบางองค์ประกอบ */
@media (max-width:576px){
    .quick-card .card-body{ padding:16px; }
    .quick-arrow{ width:34px; height:34px; }
    .notice-item .date{ width:70px; min-width:70px; }
    .news-thumb{ width:120px; height:80px; }
    .badge-news{ top:-2px; font-size:.8rem; padding:5px 10px; }
}


.text-top-right { color:#7F7F7F!important; }

/* index css */
:root { --mobile-header-h: 80px; }

/* ===== Desktop defaults ===== */
#kt_header_mobile { display: none; }
#kt_app_header.index { position: sticky; top: 0; z-index: 95; }
#kt_app_toolbar { position: sticky; top: var(--kt-header-height, 88px); z-index: 90; }

#kt_app_header_container img { max-width: 100%; height: auto; }

.h-85px { height: 85px; }

/* ===== Mobile (≤ 991.98px) ===== */
@media (max-width: 991.98px) {
    .h-85px {
        height: 60px; /* ย่อโลโก้ลง */
    }
    body {
        padding-top: calc(var(--mobile-header-h) + env(safe-area-inset-top, 0px));
    }
    #kt_header_mobile {
        position: fixed;
        top: 0; left: 0; right: 0;
        z-index: 1042;
        display: flex;
        height: var(--mobile-header-h);
        align-items: center;
        padding: calc(env(safe-area-inset-top, 0)) .75rem 0 .75rem; /* รองรับ notch */
        background-color: #0057B8; /* กันโดน override */
        box-shadow: 0 2px 8px rgba(0,0,0,.08);
    }

    #kt_app_header.index { display: none !important; }

    .header-bottom .container .header-navs .tab-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: .75rem;
    }

    .header-bottom .d-flex.align-items-center.mb-3.mb-lg-0 {
        margin-bottom: .25rem !important;
    }

    .header-bottom img.max-h-70px { max-height: 52px !important; }

    #kt_header_mobile img.max-h-50px { max-height: 42px !important; }
    #kt_header_mobile img.max-h-55px { max-height: 46px !important; }

    #kt_header_mobile .fs-8 { font-size: .85rem !important; line-height: 1.25; }
    #kt_header_mobile .fs-7 { font-size: .95rem !important; }

    .header-bottom br { display: none; }

    .page-item { margin-right: .25rem; }
    .page-item:last-child { margin-right: 0; }
    #kt_app_header_wrapper .h-85px { height: 60px !important; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    #kt_app_header_container { gap: .75rem; }
    .h-85px { height: 70px; }
}
@media (min-width: 992px) {
    #kt_header_mobile { display: none !important; position: static; }
    body { padding-top: 0; }
}
@media (max-width: 768px) {
    .h-85px {
        height: 45px; /* ย่ออีก */
    }
}

@media (max-width: 991.98px) {
    .app-header-menu.drawer {
        padding: calc(env(safe-area-inset-top, 0px) + .5rem) 0 1.5rem 0;
    }

    .app-header-menu .menu > .menu-item > .menu-link,
    .app-header-menu .menu .menu-sub .menu-item > .menu-link {
        width: 100%;
        min-height: 48px;
        padding: .65rem .9rem;
        border-radius: .475rem;
    }

    .app-header-menu .menu > .menu-item {
        width: 100%;
        margin-bottom: .15rem;
    }

    .app-header-menu .menu .menu-icon {
        width: 26px;
        min-width: 26px;
        margin-right: .65rem;
        justify-content: flex-start;
    }

    .app-header-menu .menu .menu-title {
        white-space: normal;
        line-height: 1.35;
    }

    .app-header-menu .menu .menu-arrow {
        margin-left: auto;
    }

    .app-header-menu .menu .menu-sub-lg-down-accordion {
        min-width: 0 !important;
        padding: .25rem 0 .25rem .35rem !important;
        margin-left: .9rem;
        border-left: 1px solid var(--bs-gray-200);
        border-radius: 0;
        background-color: transparent;
        box-shadow: none;
    }

    .app-header-menu .menu .menu-sub .menu-item > .menu-link {
        min-height: 42px;
        padding-left: .75rem;
    }

    .app-header-menu .menu > .menu-item > .menu-link.active,
    .app-header-menu .menu > .menu-item.here > .menu-link {
        background: var(--bs-header-link-bg-color);
    }

    .app-header-menu .menu > .menu-item > .menu-link.active .menu-title,
    .app-header-menu .menu > .menu-item.here > .menu-link .menu-title,
    .app-header-menu .menu > .menu-item > .menu-link.active .menu-icon,
    .app-header-menu .menu > .menu-item > .menu-link.active .menu-icon i,
    .app-header-menu .menu > .menu-item.here > .menu-link .menu-icon,
    .app-header-menu .menu > .menu-item.here > .menu-link .menu-icon i {
        color: var(--bs-white);
    }

    .app-header-menu .menu > .menu-item.here > .menu-link .menu-arrow:after {
        background-color: var(--bs-white);
    }
}

@media (max-width: 991.98px) and (hover: hover) {
    .app-header-menu .menu .menu-item > .menu-link {
        transition: background-color .2s ease, box-shadow .2s ease;
    }
    .app-header-menu .menu .menu-item:not(.here) > .menu-link:not(.active):hover {
        background-color: var(--efeed-menu-hover-bg);
        /*box-shadow: var(--efeed-menu-hover-shadow);*/
    }
    .app-header-menu .menu .menu-item:not(.here) > .menu-link:not(.active):hover .menu-title,
    .app-header-menu .menu .menu-item:not(.here) > .menu-link:not(.active):hover .menu-icon i {
        color: var(--efeed-menu-hover-color);
    }
    .app-header-menu .menu > .menu-item.here > .menu-link:hover,
    .app-header-menu .menu > .menu-item > .menu-link.active:hover {
        /*box-shadow: var(--efeed-menu-hover-shadow-active);*/
    }
}

.bg-gray-gradient {
    background: linear-gradient(135deg, #4b5563, #374151);
    color: #fff;
}

.login .card,
.login .card-soft,
.login .card-xxl-stretch,
.login .quick-card,
.login .news-card {
    border-radius: 1rem !important; /* ปรับค่าความโค้งได้ เช่น 0.75rem หรือ 20px */
}

/* สำหรับภาพภายในการ์ด */
.login img,
.login .quick-card img,
.login .news-card img {
    border-radius: inherit !important; /* ให้ภาพโค้งตามการ์ด */
}

/* ถ้ามีเงาหรือสีพื้นหลัง */
.login .card,
.login .quick-card,
.login .news-card {
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.news-card {
    border-radius: 1rem !important;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    position: relative;
    overflow: visible; /* อนุญาตให้ badge ลอยอยู่นอกการ์ด */
}

.news-card .card-body {
    display: flex;
    align-items: stretch;
    border-radius: inherit;
    overflow: visible; /* แก้: อย่าใช้ hidden ที่นี่ */
}

/* ห่อรูปภาพด้วย div เพิ่มชื่อ .news-thumb-wrapper */
.news-card .news-thumb-wrapper {
    overflow: hidden;
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

/* รูปภาพข่าว */
.news-card img {
    width: 200px;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* เนื้อหาฝั่งขวา */
.news-card .flex-grow-1 {
    border-top-right-radius: 1rem;
    border-bottom-right-radius: 1rem;
    background-color: #fff;
    padding: 1.5rem;
}

.badge-news {
    position: absolute;
    top: 0rem;
    right: 1rem;
    background: #6c757d;
    color: #fff;
    padding: 0.35rem 1rem;
    border-radius: 50rem;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-select {
    border-radius: 0.425rem!important;
}

.bg-efeet-box1{
    background: linear-gradient(90deg, #205781 0%, #15344C 100%);
    color:#fff;
    border-radius:.475rem;
    box-shadow: 0 0 20px 0 rgba(94,98,120,.04);
}

.bg-efeet-box2 {
    background: linear-gradient(90deg, #12BA8D 0%, #117257 100%);
    color: var(--bs-text-white) !important;
    border-radius: 0.475rem;
}

.bg-efeet-box3 {
    background: linear-gradient(90deg, #12BA8D 0%, #117257 100%);
    color: var(--bs-text-white) !important;
    border-radius: 0.475rem;
}

/* 2 layer */
/* เขียวแบบในภาพ */
.stat-card{
    --bs-card-bg: #00000000;
    --g1: rgba(8,84,63,.92);      /* #08543F @ 92% */
    --g2: rgba(18,186,141,.92);   /* #12BA8D @ 92% */
    --img-filter: brightness(.95) contrast(1.05);
    color:#fff;
    position:relative; overflow:hidden; border-radius:.75rem;
    box-shadow:0 0 20px rgba(94,98,120,.04);
}

.stat-card::before,
.stat-card::after{ content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; }
.stat-card::before{
    background: var(--stat-img) center/cover no-repeat;
    filter: var(--img-filter);
}
.stat-card::after{

    background: linear-gradient(90deg, var(--g1) 0%, var(--g2) 100%);
    mix-blend-mode: multiply;
}

.stat-card .card-body{ position:relative; z-index:1; text-align:center; }
.stat-card .card-body *{ text-shadow:0 2px 6px rgba(0,0,0,.25); }

/* ====== ThaID Modal Style ====== */
.thaid-modal{
    --bs-modal-bg: transparent; /* ตัดพื้นหลังขาวเดิมของ modal-content */
    background: #2F5DA6;        /* น้ำเงินโทนใกล้ภาพ */
    color: #fff;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    border: 1px solid rgba(255,255,255,.15);
}

.thaid-modal-body{ position: relative; }

/* กล่อง QR พื้นขาวกรอบบาง */
.thaid-qr{
    background:#fff;
    padding: .9rem;
    border-radius: .35rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
    border: 1px solid rgba(0,0,0,.05);
}
.thaid-qr img{
    width: 260px; height: 260px; object-fit: contain; display: block;
}

/* คำอธิบายและเวอร์ชัน */
.thaid-caption{ font-size: .92rem; opacity: .95; }
.thaid-version{ position:absolute; right:.5rem; bottom:.3rem; font-size:.8rem; opacity:.8; }


#tab_event {
    border: 2px solid var(--app-primary);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

/*#tab_event .nav-item {*/
/*    display: flex;*/
/*    justify-content: center;*/
/*}*/

#tab_event .nav-item:has(a.active) {
    background-color: var(--app-primary);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

#tab_event .nav-item a {
    color: var(--app-primary);
    padding: 0;
    margin: 0;
    border: none;
    width: 100%;
    text-align: center;
}

#tab_event .nav-item a.active {
    color: var(--bs-white);
    padding: 0px;
    margin: 0px;
    border: none;
}

/*register*/
.choice{
    cursor:pointer; display:flex;
    flex-direction:column;
    border:1px solid var(--bs-gray-200);
    border-radius:.8rem;
    padding:1rem 1rem 1.25rem;
    min-width:200px; background:#fff;
    transition:box-shadow .15s ease,
    transform .15s ease;
}
.choice:hover{ transform:translateY(-1px); box-shadow:0 8px 20px rgba(0,0,0,.08); }

.choice-box{
    border:2px dashed #d7d7d7; border-radius:.8rem; min-height:128px;
    display:flex; align-items:center; justify-content:center; background:#fff;
}

.icon-circle{
    width:74px; height:74px; border-radius:50%;
    background:#eaebf0; display:flex; align-items:center; justify-content:center;
}

.choice-foot{
    display:flex; align-items:center; gap:.5rem; margin-top: .9rem; padding-left:.25rem;
}
.choice .form-check-input{ width:18px; height:18px; border-width:2px; }
.choice-title{ font-weight:600; color:#2b2b2b; }

.choice:has(.choice-radio:checked) .choice-box{
    border-color: var(--bs-gray-400);
    box-shadow: inset 0 0 0 2px rgba(0,0,0,.02);
}


.select-loading-wrapper {
    position: relative;
}

.select-spinner {
    position: absolute;
    top: 0;
    right: 36px;
    bottom: 0;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1055;
}

.select-spinner::before {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid #cfcfcf;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.or-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #6c757d;           /* สีเทาแบบ Bootstrap */
    font-weight: 500;
}

.or-divider::before,
.or-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #dee2e6;  /* สีเส้น */
}

.or-divider::before {
    margin-right: 0.75rem;
}

.or-divider::after {
    margin-left: 0.75rem;
}

/* cookie bar */
.cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #0f0f0f;
    z-index: 1055;
    font-family: "Pridi", sans-serif;
}

/* inner layout */
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    gap: 16px;
}

/* text */
.cookie-text {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
}

/* orange link */
.cookie-link {
    color: #f7931e;
    font-weight: 600;
    text-decoration: none;
}

.cookie-link:hover {
    text-decoration: underline;
}

/* action area */
.cookie-action {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* accept button */
.btn-accept {
    background: #8b2c2c;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 6px 18px;
    font-size: 14px;
    cursor: pointer;
}

.btn-accept:hover {
    background: #a13434;
}

/* mobile */
@media (max-width: 768px) {
    .cookie-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-action {
        width: 100%;
        justify-content: flex-end;
    }
}

/* cookie-bar */
.cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1055;
    padding: 10px 0;
    /* พื้นหลังโปร่ง */
    background: rgba(0, 0, 0, 0.80);
    /* เบลอด้านหลัง */
    backdrop-filter: blur(0px);
}

/* inner white border look */
.cookie-container {
    margin: 0 auto;
    padding: -1px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* text */
.cookie-text {
    color: #ffffff;
    font-size: 14px;
}

.cookie-text a {
    color: #ffffff;
    text-decoration: underline;
}

/* buttons */
.cookie-actions {
    display: flex;
    gap: 12px;
    white-space: nowrap;
}

.btn-cookie {
    background: #ffffff;
    color: #000;
    border: none;
    border-radius: 999px;
    padding: 6px 18px;
    font-size: 14px;
    cursor: pointer;
}

.btn-cookie:hover {
    background: #e6e6e6;
}

/* mobile */
@media (max-width: 768px) {
    .cookie-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-actions {
        width: 100%;
        justify-content: flex-end;
    }
}


/* ================================================
   BIZ PORTAL
   ================================================ */

/* --- Layout: กัน scroll ทั้งหน้า --- */
html:has(body.biz-portal),
body.biz-portal {
    height: 100% !important;
    overflow: hidden !important;
    padding-top: 0 !important;
}

body.biz-portal #kt_app_root {
    height: 100% !important;
    flex: 1;
    display: flex;
    flex-direction: column;
}

body.biz-portal #kt_app_page {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

body.biz-portal #kt_app_wrapper {
    min-height: 0 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

body.biz-portal #kt_app_wrapper > div {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ปิด mobile header เฉพาะหน้านี้ */
body.biz-portal #kt_header_mobile {
    display: none !important;
}

/* --- Hero --- */
.biz-hero {
    padding: 12px 16px 20px;
    flex-shrink: 0;
}

.biz-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 1px solid #fff;
    background: #fff;
    object-fit: cover;
    box-shadow:
            0 8px 20px rgba(0,0,0,0.25),
            0 0 0 6px rgba(255,255,255,0.15),
            0 0 30px rgba(18,186,141,0.55);
    transition: transform .3s ease;
}

.biz-avatar:hover {
    transform: scale(1.05);
}

.biz-name {
    color: #ffffff;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.3px;
    text-shadow:
            0 3px 8px rgba(0,0,0,0.55),
            0 0 12px rgba(0,0,0,0.25);
    margin: 0;
}

.biz-name-wrapper {
    display: inline-block;
    padding: 8px 22px;
    border-radius: 30px;
    background: linear-gradient(
            180deg,
            rgba(0,0,0,0.45),
            rgba(0,0,0,0.25)
    );
    backdrop-filter: blur(8px);
    box-shadow:
            0 6px 18px rgba(0,0,0,0.25),
            inset 0 1px 0 rgba(255,255,255,0.25);
}

.biz-welcome {
    display: inline-block;
    padding: 2px 60px;
    border-radius: 40px;
    background: linear-gradient(180deg, #ffffff, #f1f1f1);
    color: #198754;
    font-weight: 600;
    font-size: 16px;
    box-shadow:
            0 6px 16px rgba(0,0,0,0.18),
            inset 0 1px 2px rgba(255,255,255,0.8);
    letter-spacing: 0.3px;
}

/* --- Content wrapper --- */
.biz-top-radius {
    border-radius: 30px 30px 0 0;
    overflow: hidden;
}

/* --- Section title --- */
.biz-section-title {
    position: relative;
    left: 0;
    margin-top: 20px;
    margin-left: -16px;
    width: 140px;
    max-width: none;
    background: #12b98c;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    padding: 6px 20px;
    display: inline-flex;
    align-items: center;
    clip-path: polygon(
            0 0,
            85% 0,
            100% 50%,
            85% 100%,
            0 100%
    );
}

/* --- Card list --- */
.biz-cards {
    flex: 1;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px 80px;
}

/* --- Service card --- */
.biz-service-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 22px;
    text-decoration: none;
    width: 100%;
    box-shadow:
            0 4px 12px rgba(0,0,0,0.15),
            0 1px 4px rgba(0,0,0,0.1);
    transition: all .25s ease;
}

.biz-service-card:hover {
    transform: translateY(-4px);
    box-shadow:
            0 8px 24px rgba(0,0,0,0.2),
            0 2px 8px rgba(0,0,0,0.12);
}

.biz-service-card:hover .biz-icon-wrapper {
    background: #d1f2e0;
}

/* --- Icon wrapper --- */
.biz-icon-wrapper {
    width: 45px;
    height: 45px;
    border-radius: 16px;
    background: #e9f7ef;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.biz-service-icon {
    width: 30px;
}

/* --- Card text --- */
.biz-service-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #1f2d3d;
    line-height: 1.4;
}

/* --- Arrow --- */
.biz-arrow {
    margin-left: auto;
    font-size: 35px;
    font-weight: bolder;
    color: #12b98c;
    flex-shrink: 0;
}

/* --- Footer --- */
body.biz-portal #kt_app_footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    border: none !important;
    background-image: url('/assets/media/biz/bizBgCard.png') !important;
    background-size: cover !important;
    background-position: center bottom !important;
    padding: 8px 16px 12px !important;
    z-index: 99 !important;
}

body.biz-portal #kt_app_footer .w-100 {
    background: #fff;
    border-radius: 40px;
    padding: 6px 24px !important;
    font-size: 15px !important;
    color: #444;
    font-style: italic;
    border: none;
}

/* --- Responsive: จอสูงน้อย --- */
@media (max-height: 700px) {
    body.biz-portal .biz-avatar        { width: 70px; height: 70px; }
    body.biz-portal .biz-name          { font-size: 16px; }
    body.biz-portal .biz-welcome       { font-size: 13px; padding: 4px 20px; }
    body.biz-portal .biz-section-title { font-size: 16px; margin-top: 12px; }
    body.biz-portal .biz-service-card  { padding: 6px 12px; }
    body.biz-portal .biz-service-text  { font-size: 13px; }
    body.biz-portal .biz-icon-wrapper  { width: 38px; height: 38px; }
    body.biz-portal .biz-service-icon  { width: 24px; }
}

@media (max-height: 600px) {
    body.biz-portal .biz-avatar        { width: 55px; height: 55px; }
    body.biz-portal .biz-name          { font-size: 14px; }
    body.biz-portal .biz-section-title { font-size: 14px; margin-top: 8px; }
    body.biz-portal .biz-service-card  { padding: 4px 10px; }
    body.biz-portal .biz-service-text  { font-size: 12px; }
    body.biz-portal .biz-icon-wrapper  { width: 32px; height: 32px; }
}

/* --- Card list --- */
.biz-cards {
    flex: 1;
    overflow-y: auto !important; /* ตัวนี้คือตัวปลดล็อกให้สามารถสไลด์ขึ้นลงได้ */
    -webkit-overflow-scrolling: touch; /* ทำให้การสไลด์บนมือถือลื่นไหลขึ้น */
    padding: 12px 16px 80px;
}

.biz-tracking-fab {
    position: fixed;
    bottom: 28px;
    right: 16px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, #14c99a 0%, #0b8c68 100%);
    border: 3px solid #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    box-shadow:
            0 0 0 5px rgba(18,185,140,0.25),
            0 6px 20px rgba(18,185,140,0.55);
    z-index: 999;
}

.biz-tracking-fab::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(18,185,140,0.35);
    animation: biz-fab-ring 2s ease-out infinite;
}

@keyframes biz-fab-ring {
    0%   { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.biz-tracking-fab-icon {
    width: 28px;
}

.biz-tracking-fab-text {
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
}

/* ================================================
   END BIZ PORTAL
   ================================================ */

/*chat bot*/
.btn-index {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-index img {
    height: 35px;
    width: 35px;
    object-fit: contain;
    margin-right: 0.75rem;
}
.btn-index img.iconNational {
    height: 40px;
    width: 40px;
    object-fit: contain;
    margin-right: 0.75rem;
}

.rounded-4.overflow-hidden:hover > div:first-child {
    filter: brightness(0.8);
}

.rounded-4.overflow-hidden:hover .rounded-circle {
    filter: brightness(0.8);
}

.date-container-days .day .active {
    color: #fff !important;
}

.portal-new-icon {
    width: 48px; !important;
    height: 48px; !important;
}

/* การ์ดข่าวหลัก */
.news-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: rgb(255, 255, 255);
    border: 1px solid rgb(229, 238, 233);
    border-radius: 18px;
    padding: 14px 19px;
    box-shadow: rgba(16, 60, 46, 0.04) 0px 1px 2px;
    transition: all 0.22s ease-in-out;
    cursor: pointer;
    height: 100%;
    width: 100%;
}

/* เอฟเฟกต์ยกตัวเล็กน้อยเมื่อเอาเมาส์มาวางบนการ์ด */
.news-card:hover {
    box-shadow: rgba(16, 60, 46, 0.08) 0px 6px 16px;
    transform: translateY(-2px);
}

/* กล่องครอบไอคอนด้านซ้าย */
.news-card-icon-wrapper {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(255, 255, 255);
    background: linear-gradient(150deg, rgb(18, 122, 89), color-mix(rgb(18, 122, 89) 42%, rgb(5, 39, 28)));
    box-shadow: color-mix(rgb(18, 122, 89) 42%, rgb(5, 39, 28)) 0px 10px 20px -10px;
}

/* ขนาดไอคอนหลัก */
.news-card-icon {
    font-size: 28px; !important;
    line-height: 1;
}

/* กล่องครอบเนื้อหาด้านขวา */
.news-card-content {
    flex: 1 1 auto;
    min-width: 0px;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

/* หมวดหมู่ข่าว */
.news-card-category {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgb(18, 122, 89);
    margin-bottom: 7px;
}

/* หัวข้อข่าวสาร (ล็อกไว้ไม่เกิน 2 บรรทัด) */
.news-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.42;
    color: color-mix(rgb(18, 122, 89) 52%, rgb(4, 33, 26));
    margin: 0px 0px 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* รายละเอียดข่าวแบบย่อ (ล็อกไว้ไม่เกิน 2 บรรทัด) */
.news-card-desc {
    font-size: 12.5px;
    line-height: 1.6;
    color: rgb(105, 117, 110);
    margin: 0px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* แถบด้านล่างสุดของการ์ด */
.news-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 5px;
    border-top: 1px solid rgb(239, 244, 241);
}

/* ข้อความวันที่ */
.news-card-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: rgb(152, 164, 158);
    white-space: nowrap;
}

/* ไอคอนปฏิทิน */
.news-card-date-icon {
    font-size: 15px;
}

/* ปุ่มเปิดอ่านรูปทรงวงรี */
.news-card-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: rgb(18, 122, 89);
    background: color-mix(rgb(18, 122, 89) 10%, white);
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.18s ease-in-out;
}

/* เอฟเฟกต์เมื่อเมาส์ชี้ไปที่ปุ่มเปิดอ่าน */
.news-card-btn:hover {
    background: color-mix(rgb(18, 122, 89) 20%, white);
    color: color-mix(rgb(18, 122, 89) 80%, black);
}

/* ไอคอนลูกศรบนปุ่มเปิดอ่าน */
.news-card-btn-icon {
    font-size: 12px;
}

/* ==========================================================================
   ส่วนหัวและรายการของระบบเอกสารอิเล็กทรอนิกส์ล่าสุด(E-Document System)
   ========================================================================== */

/* แถบหัวข้อเอกสารอิเล็กทรอนิกส์ล่าสุด */
.edoc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(115deg, rgb(11, 74, 56) 0%, rgb(18, 112, 79) 55%, rgb(30, 146, 100) 100%);
    border-radius: 16px;
    padding: 16px 22px;
    box-shadow: rgba(11, 74, 56, 0.55) 0px 12px 30px -14px;
}

.edoc-header-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0px;
}

.edoc-header-icon {
    font-size: 23px;
    line-height: 1;
    color: rgb(255, 255, 255);
}

.edoc-header-text {
    color: rgb(255, 255, 255);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.edoc-header-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgb(255, 255, 255);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    opacity: 0.92;
    transition: opacity 0.2s ease;
}

.edoc-header-link:hover {
    opacity: 1;
    color: rgb(255, 255, 255);
    text-decoration: underline;
}

.edoc-header-link-icon {
    font-size: 14px;
    line-height: 1;
}

/* กล่องการ์ดเอกสารในรายการ Loop */
.edoc-item-card {
    display: flex;
    align-items: stretch;
    gap: 14px;
    background: rgb(255, 255, 255);
    border: 1px solid rgb(229, 238, 233);
    border-radius: 14px;
    padding: 12px;
    box-shadow: rgba(16, 60, 46, 0.04) 0px 1px 2px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    width: 100%;
}

.edoc-item-card:hover {
    box-shadow: rgba(16, 60, 46, 0.08) 0px 4px 12px;
    border-color: color-mix(rgb(18, 122, 89) 20%, rgb(229, 238, 233));
    transform: translateY(-1px);
}

/* บล็อกแสดงวันที่ด้านซ้าย */
.edoc-item-card-date-box {
    flex: 0 0 auto;
    width: 62px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 12px;
    color: rgb(255, 255, 255);
    background: linear-gradient(150deg, rgb(18, 122, 89), color-mix(rgb(18, 122, 89) 42%, rgb(5, 39, 28)));
    box-shadow: color-mix(rgb(18, 122, 89) 42%, rgb(5, 39, 28)) 0px 8px 16px -10px;
}

.edoc-item-card-day {
    font-size: 23px;
    font-weight: 700;
    line-height: 1;
}

.edoc-item-card-month {
    font-size: 11.5px;
    font-weight: 500;
    opacity: 0.92;
}

/* ส่วนเนื้อหาตรงกลาง */
.edoc-item-card-body {
    flex: 1 1 auto;
    min-width: 0px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.edoc-item-card-title {
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.4;
    color: color-mix(rgb(18, 122, 89) 52%, rgb(4, 33, 26));
    margin: 0px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.edoc-item-card-desc {
    font-size: 12.5px;
    line-height: 1.5;
    color: rgb(119, 131, 125);
    margin: 0px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ปุ่มดาวน์โหลดขวามือสุด */
.edoc-item-card-download-btn {
    flex: 0 0 auto;
    width: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    border-radius: 10px;
    color: rgb(18, 122, 89);
    background: color-mix(rgb(18, 122, 89) 10%, white);
    transition: all 0.18s ease-in-out;
}

.edoc-item-card-download-btn:hover {
    background: color-mix(rgb(18, 122, 89) 20%, white);
    color: color-mix(rgb(18, 122, 89) 80%, black);
}

.edoc-item-card-download-icon {
    font-size: 22px;
    line-height: 1;
}

.edoc-item-card-download-text {
    font-size: 11.5px;
    font-weight: 600;
}


.card-busy {
    position: relative;
    opacity: 0.55;
    pointer-events: none;
}
.card-busy::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid rgba(0, 0, 0, 0.15);
    border-top-color: #0d9488;
    border-radius: 50%;
    animation: card-busy-spin 0.8s linear infinite;
}
@keyframes card-busy-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .card-busy::after { animation: none; }
}

.pdpa-title {
    font-weight: bold;
    text-align: center;
    white-space: pre-line;
}

.pdpa-detail {
    white-space: pre-wrap;
    tab-size: 4;
    text-align: left;
    word-break: break-word;
    line-height: 1.8;
}

.form-control.form-control-solid {
    background-color: var(--bs-gray-200) !important;
    border-color: var(--bs-gray-300) !important;
    color: var(--bs-gray-700) !important;
    -webkit-transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, -webkit-box-shadow 0.15s ease;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, -webkit-box-shadow 0.15s ease;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, -webkit-box-shadow 0.15s ease;
}


.btn-manage-sm {
    color: #12BA8D !important;
    border: 1px solid #12BA8D !important;
    background-color: #fff !important;
    box-shadow: none !important;
}
.btn-manage-sm i {
    color: #12BA8D !important;
}
.btn-manage-sm:hover,
.btn-manage-sm:focus {
    background-color: #12BA8D !important;
    color: #fff !important;
    border-color: #12BA8D !important;
}
.btn-manage-sm:hover i,
.btn-manage-sm:focus i {
    color: #fff !important;
}


.edoc-news-card {
    background: #fff;
    border: 1px solid #E4E7EC;
    border-radius: 14px;
    padding: 20px 20px 12px;
}

.edoc-news-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 3px;
    margin-bottom: 4px;
    border-bottom: 1px solid #EEF0F3;
}

.edoc-news-card-header-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 8px;
    background: #E9F0FF;
    color: #2F6FED;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.edoc-news-card-header-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1D2939;
    margin: 0;
}

.edoc-news-list {
    display: flex;
    flex-direction: column;
}

.edoc-news-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 6px;
    border-bottom: 1px solid #F1F2F4;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease;
    border-radius: 8px;
}

.edoc-news-item:hover {
    background-color: #F7F9FC;
}

.edoc-news-item:last-child {
    border-bottom: none;
}

.edoc-news-item-badge {
    min-width: 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.edoc-news-item-badge.is-new {
    background: #E9F9EF;
    color: #12B76A;
}

.edoc-news-item-badge.is-doc {
    background: #FFF3E0;
    color: #F79009;
}

.edoc-news-item-new-tag {
    position: absolute;
    transform: translate(-6px, -18px);
    background: #12B76A;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 999px;
    letter-spacing: .3px;
}

.edoc-news-item-body {
    flex: 1;
    min-width: 0;
}

.edoc-news-item-title {
    font-size: 1.115rem;
    font-weight: 600;
    color: #1D2939;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edoc-news-item-desc {
    font-size: 0.95rem;
    color: #98A2B3;
    margin: 2px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edoc-news-item-date {
    font-size: 0.95rem;
    color: #98A2B3;
    white-space: nowrap;
    flex-shrink: 0;
}

.edoc-news-card-footer {
    border-top: 1px solid #F1F2F4;
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
}

.edoc-news-card-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #2F6FED;
    text-decoration: underline;
    font-size: .9rem;
}

.edoc-news-card-footer-link i {
    font-size: .8rem;
}

#kt_tree_4,
.tree-demo {
    overflow-x: auto !important;
}
#kt_tree_4 .jstree-node,
.tree-demo .jstree-node {
    white-space: nowrap !important;
    height: auto !important;
    min-height: 24px;
    margin-left: 16px !important;
}

#kt_tree_4 > .jstree-container-ul > .jstree-node,
.tree-demo > .jstree-container-ul > .jstree-node {
    margin-left: 0 !important;
}

#kt_tree_4 .jstree-anchor,
.tree-demo .jstree-anchor {
    display: inline-flex !important;
    align-items: flex-start;
    vertical-align: top;
    box-sizing: border-box;
    white-space: normal !important;
    min-width: 160px;
    max-width: calc(100% - 30px);
    height: auto !important;
    min-height: 24px;
    line-height: 24px !important;
    word-break: break-word;
    overflow-wrap: anywhere;
}

#kt_tree_4 .jstree-anchor > .jstree-icon,
.tree-demo .jstree-anchor > .jstree-icon {
    flex: 0 0 auto;
}

.custom-main-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.grid-banner { order: 1; }
.grid-login  { order: 2; }
.grid-cards  { order: 3; }
@media (min-width: 768px) {
    .custom-main-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); /* minmax ป้องกัน Content ดัน Grid ทะลุ */
        grid-template-rows: auto 1fr;
        gap: 1rem;
    }

    .grid-banner {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .grid-cards {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        align-self: end;
    }

    .grid-login {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
        display: flex;
        flex-direction: column;
    }

    .grid-login .card {
        height: 100%;
    }
}

/* ย่อฟอนต์และระยะห่างของ Login Form เมื่อแสดงผลแบบซ้าย-ขวาบนหน้าจอ Tablet / iPad */
@media (min-width: 768px) and (max-width: 1366.00px) {
    /* ลด Padding ของตัวการ์ด */
    .grid-login .card-body {
        padding: 1.25rem 1rem !important;
    }

    /* กระชับ Margin ของช่องต่างๆ */
    .grid-login .mb-8 { margin-bottom: 1rem !important; }
    .grid-login .mb-5 { margin-bottom: 0.75rem !important; }
    .grid-login .mb-4 { margin-bottom: 0.5rem !important; }
    .grid-login .mb-3 { margin-bottom: 0.5rem !important; }
    .grid-login .my-3 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }

    /* ย่อขนาดตัวอักษรของ Label, Heading และ Links */
    .grid-login .fs-1 { font-size: 1.2rem !important; }
    .grid-login .fs-2 { font-size: 1.1rem !important; }
    .grid-login .fs-3 { font-size: 1.1rem !important; }
    .grid-login .fs-4 { font-size: 0.875rem !important; }

    /* ย่อขนาด Input และ Icon ซ่อน/แสดงรหัสผ่าน */
    .grid-login .form-control {
        font-size: 1.1rem !important;
        padding: 0.4rem 0.75rem !important;
    }

    /* ย่อขนาดปุ่มกดเข้าสู่ระบบ ปุ่ม ThaID และปุ่มทางรัฐ */
    .grid-login .btn-index {
        height: 38px !important;
        font-size: 1.1rem !important;
        padding: 0.35rem 0.5rem !important;
    }

    /* ย่อขนาดโลโก้ในปุ่ม */
    .grid-login .btn-index img,
    .grid-login .btn-index img.iconNational {
        height: 22px !important;
        width: 22px !important;
        margin-right: 0.4rem !important;
    }

    .grid-cards a {
        min-height: 150px !important;
    }

    /* ลด Padding ขอบในของการ์ด */
    .grid-cards .p-4 {
        padding: 0.85rem !important;
    }

    /* ย่อขนาดหัวข้อภาษาไทย */
    .grid-cards .fw-bold {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
    }

    /* ย่อขนาดคำอธิบายภาษาอังกฤษ */
    .grid-cards .mt-1 {
        font-size: 0.72rem !important;
    }

    /* ย่อขนาดวงกลมลูกศรด้านล่างขวา */
    .grid-cards .rounded-circle {
        width: 32px !important;
        height: 32px !important;
    }

    .grid-cards .rounded-circle i {
        font-size: 0.75rem !important;
    }
}

.text-dbd {
    color: #462a7a!important;
}

.btn-dbd {
    color: #462a7a !important;
    font-weight: 700 !important;
    background-color: #fff !important;
    border: 1px solid #462a7a !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    height: calc(1.5em + 1.55rem + 2px);
    padding: 0.775rem 1.5rem !important;
}

.btn-dbd img {
    object-fit: contain;
    width: 32px;
    height: 28px;
}

/*.btn-dbd:hover,*/
/*.btn-dbd:focus {*/
/*    background-color: #462a7a !important;*/
/*    color: #fff !important;*/
/*}*/

/*.btn-dbd:hover img,*/
/*.btn-dbd:focus img {*/
/*    filter: brightness(0) invert(1);*/
/*}*/

.edoc-icon-box {
    width: 56px;
    height: 56px;
    background-color: #ebf6f0;
    transition: all 0.2s ease-in-out;
}

.edoc-icon-box:hover {
    background-color: #d6ede1 !important;
}

.edoc-icon-box:hover i {
    color: #005b3f !important;
}

.btn-edoc-download {
    background-color: #ebf6f0 !important;
    color: #007a55 !important;
    border-radius: 0.55rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    transition: all 0.2s ease-in-out;
}

.btn-edoc-download:hover {
    background-color: #d6ede1 !important;
    color: #005b3f !important;
}

.btn-edoc-download:hover i {
    color: #005b3f !important;
}

.text-edoc-primary {
    color: #007a55 !important;
}

.custom-card-option {
    position: relative !important;
    background-color: #ffffff !important;
    border: 2px solid #e4e6ef !important;
    border-radius: 1.25rem !important;
    padding: 2rem 1.5rem 1.5rem 1.5rem !important;
    cursor: pointer !important;
    transition: all 0.25s ease-in-out !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.badge-custom-green {
    background-color: #12BA8D !important;
    color: #ffffff !important;
    font-size: 0.8rem;
    padding: 0.35rem 0.8rem;
    border-radius: 0.5rem;
}

.custom-card-option .top-status-circle {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ffffff !important;
    border: 2px solid #d8d8d8 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease-in-out;
    z-index: 10;
}

.custom-card-option .top-status-circle .circle-icon {
    display: none;
    color: #ffffff;
    font-size: 0.95rem;
}

.custom-card-option .card-title-text {
    color: #181c32 !important;
    transition: color 0.25s ease;
}

.custom-card-option .list-icon {
    color: #8a94a6 !important;
    transition: color 0.25s ease;
}

.custom-radio-input {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.custom-radio-input:checked {
    border-color: #12BA8D;
    background-color: #12BA8D;
}

.custom-radio-input:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffffff;
}

.custom-card-option:has(.custom-radio-input:checked) {
    background-color: #f3faf7 !important;
    border: 2px solid #12BA8D !important;
}

.custom-card-option:has(.custom-radio-input:checked) .top-status-circle {
    background-color: #12BA8D !important;
    border-color: #12BA8D !important;
}

.custom-card-option:has(.custom-radio-input:checked) .top-status-circle .circle-icon {
    display: block !important;
}

.custom-card-option:has(.custom-radio-input:checked) .card-title-text {
    color: #12BA8D !important;
}

.custom-card-option:has(.custom-radio-input:checked) .list-icon {
    color: #12BA8D !important;
}

.custom-card-option.active {
    background-color: #f3faf7 !important;
    border: 2px solid #12BA8D !important;
}

.custom-card-option.active .top-status-circle {
    background-color: #12BA8D !important;
    border-color: #12BA8D !important;
}

.custom-card-option.active .top-status-circle .circle-icon {
    display: block !important;
}

.custom-card-option.active .card-title-text {
    color: #12BA8D !important;
}

.custom-card-option.active .list-icon {
    color: #12BA8D !important;
}

.notice-info-blue {
    background-color: #ebf3fe !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 1rem;
}

.notice-info-red {
    background-color: #fceef0 !important;
    border: 1px solid #f3d1d6 !important;
    border-radius: 1rem;
}

.notice-action-box {
    border-radius: 0.55rem !important;
}

.notice-info-icon {
    color: #3b82f6 !important;
}

.notice-success-icon {
    color: #12ba8d !important;
}

.btn-next-green {
    background-color: #12BA8D !important;
    border-color: #12BA8D !important;
    color: #ffffff !important;
    border-radius: 0.65rem;
    padding: 0.75rem 2.25rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.btn-next-green:hover {
    background-color: #0e9671 !important;
    border-color: #0e9671 !important;
    color: #ffffff !important;
}

.email-otp-grid {
    display: grid;
    grid-template-columns: 66.6667% 33.3333%;
    column-gap: 1.5rem;
    grid-template-rows: auto 1fr;
}

.grid-input-left  { grid-column: 1; grid-row: 1; }
.grid-input-right { grid-column: 2; grid-row: 1; }
.grid-notice-left  { grid-column: 1; grid-row: 2; }
.grid-notice-right { grid-column: 2; grid-row: 2; }

@media (max-width: 992px) {
    .email-otp-grid {
        grid-template-columns: 1fr;
    }
    .grid-input-left, .grid-input-right,
    .grid-notice-left, .grid-notice-right {
        grid-column: 1;
    }
    .grid-input-left  { grid-row: 1; }
    .grid-notice-left { grid-row: 2; }
    .grid-input-right { grid-row: 3; }
    .grid-notice-right{ grid-row: 4; }
}

/*-------------*/
.notice-box-red {
    background-color: #fceef0 !important;
    border: 1px solid #f3d1d6 !important;
}
.notice-box-blue {
    background-color: #ebf3fe !important;
    border: 1px solid #bfdbfe !important;
}
.notice-info-yellow {
    background-color: #fff8e6 !important;
    border: 1px solid #ffe4a3 !important;
}
.notice-info-icon-yellow {
    color: #f79009 !important;
}

.notice-info-icon-yellow {
    color: #f79009 !important;
}

.name-th-en-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
    grid-template-rows: auto auto;
}
.grid-col-left      { grid-column: 1; grid-row: 1; }
.grid-col-right     { grid-column: 2; grid-row: 1; }
.grid-example-left  { grid-column: 1; grid-row: 2; }
.grid-example-right { grid-column: 2; grid-row: 2; }

@media (max-width: 992px) {
    .name-th-en-grid { grid-template-columns: 1fr; }
    .grid-col-left, .grid-col-right,
    .grid-example-left, .grid-example-right { grid-column: 1; }
    .grid-col-left      { grid-row: 1; }
    .grid-example-left  { grid-row: 2; }
    .grid-col-right     { grid-row: 3; }
    .grid-example-right { grid-row: 4; }
}

.notice-icon-wrap {
    width: 90px;
    height: 90px;
}

@media (max-width: 991.98px) {
    .notice-icon-wrap {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 576px) {
    .notice-action-box.notice-info-yellow {
        flex-wrap: wrap;
    }
    .notice-icon-wrap {
        width: 48px;
        height: 48px;
        margin-left: 0 !important;
        margin-top: 1rem;
    }
}

/* css poa-card */
.poa-outer-card {
    box-shadow: none !important;
}

.poa-card {
    background-color: #ffffff !important;
    border: 1px solid #e4e6ef !important;
    border-radius: 1rem !important;
    transition: all 0.2s ease-in-out;
}

.poa-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
}

.poa-icon {
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.poa-icon-green {
    background-color: #e9f9ef !important;
    color: #12BA8D !important;
}

.poa-icon-blue {
    background-color: #E9F0FF !important;
    color: #2F6FED !important;
}

a.poa-download-link {
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
}

a.poa-download-link-green {
    color: #007a55 !important;
}
a.poa-download-link-green:hover {
    color: #005b3f !important;
}

a.poa-download-link-blue {
    color: #2F6FED !important;
}
a.poa-download-link-blue:hover {
    color: #1a4fc4 !important;
}

.poa-badge {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    padding: 0.1rem 0.55rem !important;
    border-radius: 999px !important;
    background-color: transparent !important;
    line-height: 1.6;
}

.poa-badge-green {
    color: #12BA8D !important;
    border: 1px solid #12BA8D !important;
}

.poa-badge-blue {
    color: #2F6FED !important;
    border: 1px solid #2F6FED !important;
}

.notice-info-yellow {
    background-color: #fff8e6 !important;
    border: 1px solid #ffe4a3 !important;
    border-radius: 1rem !important;
}

.notice-info-icon-yellow {
    color: #f79009 !important;
}

@media (max-width: 991.98px) {
    .poa-card { padding: 1.1rem !important; }
}
/* Card Outer Structure */
.poa-outer-card {
    box-shadow: none !important;
    border: none !important;
}

.poa-card {
    background-color: #ffffff !important;
    border-radius: 0.75rem !important;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
}

/* Green Variant */
.poa-card-green {
    border: 1px solid #e1f5eb !important;
}
.poa-card-green .poa-card-header {
    background-color: #f2faf6 !important;
    border-bottom: 1px solid #e1f5eb;
}
.poa-card-green .poa-icon {
    color: #12ba8d;
    font-size: 1.25rem;
}
.text-green-title {
    color: #108a67 !important;
}

/* Blue Variant */
.poa-card-blue {
    border: 1px solid #e8f0fe !important;
}
.poa-card-blue .poa-card-header {
    background-color: #f4f7fe !important;
    border-bottom: 1px solid #e8f0fe;
}
.poa-card-blue .poa-icon {
    color: #2f6fed;
    font-size: 1.25rem;
}
.text-blue-title {
    color: #2458c7 !important;
}

/* Download Box Button Styles */
.poa-btn-box {
    background-color: #ffffff !important;
    border: 1px solid #e4e6ef !important;
    border-radius: 0.5rem !important;
    padding: 0.6rem 1rem !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease;
}

.poa-btn-green {
    border-color: #12ba8d !important;
    color: #12ba8d !important;
}
.poa-btn-green:hover {
    border-color: #12ba8d !important;
    background-color: #f9fdfb !important;
}

.poa-btn-blue {
    border-color: #2f6fed !important;
    color: #2f6fed !important;
}
.poa-btn-blue:hover {
    border-color: #2f6fed !important;
    background-color: #f8faff !important;
}

/* Badge Styles */
.poa-badge {
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    padding: 0.15rem 0.5rem !important;
    border-radius: 999px !important;
}

/* Notice Box Styles */
.notice-action-box {
    border-radius: 0.5rem !important;
}

.notice-info-yellow {
    background-color: #fffbf0 !important;
    border: 1px solid #ffe8b3 !important;
}

.notice-info-icon-yellow {
    color: #f79009 !important;
}

.card-title .card-label {
    font-size: 1.15rem;
}

.border-success-icon {
    --bs-border-opacity: 1;
    border-color: #12ba8d !important;
}

.custom-card-box-success {
    position: relative !important;
    background-color: #f3faf7 !important;
    border: 2px solid #12BA8D !important;
    border-radius: 1.25rem !important;
    transition: all 0.25s ease-in-out !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.custom-tooltip .tooltip-inner {
    font-family: "Pridi", serif !important;
    font-size: 16px !important;
}

.text-sub-form-searching {
    color: #1b285c !important
}

.bg-sub-form-searching {
    background-color: #f4f5f9 !important
}

.btn-custom-close {
    background-color: #6c757d;
    color: #ffffff;
    min-width: 100px;
    transition: filter 0.1s ease;
}

.btn-custom-close:hover {
    background-color: #6c757d !important;
    color: #ffffff !important;
    filter: brightness(0.85);
}

.tempus-dominus-widget .date-container-decades div.active,
.tempus-dominus-widget .date-container-years div.active,
.tempus-dominus-widget .date-container-months div.active,
.tempus-dominus-widget .date-container-days div.active {
    background-color: #12BA8D !important;
    color: #ffffff !important;
}

.tempus-dominus-widget .date-container-decades div.active:hover,
.tempus-dominus-widget .date-container-years div.active:hover,
.tempus-dominus-widget .date-container-months div.active:hover,
.tempus-dominus-widget .date-container-days div.active:hover {
    background-color: #0f9e77 !important;
    color: #ffffff !important;
}

.tempus-dominus-widget .calendar-header .picker-switch {
    color: #212529 !important;
    font-weight: bold !important;
    opacity: 1 !important;
}

.tempus-dominus-widget .disabled,
.tempus-dominus-widget [data-action].disabled {
    color: #6c757d !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.tempus-dominus-widget .calendar-header [data-action="previous"],
.tempus-dominus-widget .calendar-header [data-action="next"] {
    color: #212529 !important;
    opacity: 1 !important;
}

.officer-dash .od-body { display: grid; gap: 2rem; }
.officer-dash .od-section { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.officer-dash.is-loading :is(.odd-kpi-num, .odc-num, .odd-alert-row b, .odb-stat-num) {
    display: inline-block; min-width: 3ch; color: transparent; border-radius: .35rem;
    background: linear-gradient(90deg, #f1f1f4 25%, #e4e6ef 37%, #f1f1f4 63%);
    background-size: 400% 100%;
    animation: od-shimmer 1.4s ease infinite;
}
.officer-dash.is-loading .odd-alert-row b {
    background: linear-gradient(90deg, #ffe3ea 25%, #ffd0dc 37%, #ffe3ea 63%);
    background-size: 400% 100%;
}
@keyframes od-shimmer {
    0%   { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) {
    .officer-dash.is-loading :is(.odd-kpi-num, .odc-num, .odd-alert-row b, .odb-stat-num) { animation: none; }
}

.officer-dash .od-ic {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 34px; height: 34px; border-radius: .6rem; font-size: .95rem;
    background: #eef3f8; color: #4b5675;
}
.officer-dash .od-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.officer-dash .od-unit { font-size: .7rem; font-weight: 500; color: #99a1b7; line-height: 1.3; }

.officer-dash .odd-kpi {
    display: flex; align-items: flex-start; gap: .75rem; height: 100%; padding: 1rem 1.1rem;
    border: 1px solid #f1f1f4; border-radius: .75rem; text-decoration: none;
}
.officer-dash .odd-kpi-accent { background: #f1faf6; border-color: #d3f0e4; }
.officer-dash .odd-kpi-accent .od-ic { background: #d9f2e6; color: #0b7a5c; }
.officer-dash .odd-kpi-label { font-size: .85rem; font-weight: 500; color: #78829d; line-height: 1.3; }
.officer-dash .odd-kpi-num { font-size: 2rem; font-weight: 700; color: #071437; line-height: 1.1; }
.officer-dash .odd-kpi-accent .odd-kpi-num { color: #0b7a5c; }

.officer-dash .odc-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
    background: #f1f1f4; border: 1px solid #f1f1f4; border-radius: .75rem; overflow: hidden;
}
.officer-dash .odc-cell {
    display: flex; align-items: flex-start; gap: .65rem; padding: 1rem; min-width: 0;
    background: #fff; text-decoration: none; transition: background .15s ease;
}
.officer-dash .odc-cell:hover { background: #f9fbfa; }
.officer-dash .odc-cell:nth-child(1) .od-ic { background: #e8f1fd; color: #1b84ff; }
.officer-dash .odc-cell:nth-child(2) .od-ic { background: #fff4e5; color: #f6a20b; }
.officer-dash .odc-cell:nth-child(3) .od-ic { background: #ffecef; color: #f8285a; }
.officer-dash .odc-cell:nth-child(4) .od-ic { background: #f0ecff; color: #7239ea; }
.officer-dash .odc-label { font-size: .8rem; font-weight: 500; color: #78829d; line-height: 1.3; }
.officer-dash .odc-num { font-size: 1.6rem; font-weight: 700; color: #071437; line-height: 1.1; }

.officer-dash .odd-alert { background: #fff5f7; border-radius: .75rem; padding: .25rem .9rem; }
.officer-dash .odd-alert-title {
    display: flex; align-items: center; gap: .5rem; padding: .75rem 0 .6rem;
    border-bottom: 1px solid #ffe3ea; font-size: .9rem; font-weight: 700; color: #d81a48;
}
.officer-dash .odd-alert-title i { color: #f8285a; }
.officer-dash .odd-alert-row {
    display: flex; align-items: center; gap: .75rem; padding: .65rem 0;
    border-bottom: 1px solid #ffe3ea; text-decoration: none; font-size: .9rem; font-weight: 500; color: #4b5675;
}
.officer-dash .odd-alert-row:last-child { border-bottom: 0; }
.officer-dash .odd-alert-row i { color: #f8285a; width: 16px; text-align: center; flex-shrink: 0; }
.officer-dash .odd-alert-row span { flex-grow: 1; min-width: 0; }
.officer-dash .odd-alert-row b { font-size: 1.05rem; color: #d81a48; flex-shrink: 0; }
.officer-dash .od-disabled { cursor: not-allowed; opacity: .55; }
.officer-dash .odc-cell.od-disabled:hover { background: #fff; }

.officer-dash .odb-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.officer-dash .odb-stats a {
    display: flex; align-items: flex-start; gap: .6rem; padding: .25rem .5rem; min-width: 0;
    text-decoration: none;
}
.officer-dash .odb-stats a + a { border-left: 1px solid #f1f1f4; }
.officer-dash .odb-stats a:nth-child(1) .od-ic { background: #e8f1fd; color: #1b84ff; }
.officer-dash .odb-stats a:nth-child(2) .od-ic { background: #e6f7f1; color: #12ba8d; }
.officer-dash .odb-stats a:nth-child(3) .od-ic { background: #fff4e5; color: #f6a20b; }
.officer-dash .odb-stat-num { font-size: 1.5rem; font-weight: 700; color: #071437; line-height: 1.1; white-space: nowrap; }
.officer-dash .odb-stat-label { font-size: .8rem; font-weight: 500; color: #78829d; line-height: 1.3; }

.officer-dash .od-note {
    display: flex; align-items: flex-start; gap: .6rem; margin-top: 1.75rem; padding: .75rem 1rem;
    background: #e9f3ff; border: 1px solid #b8d7ff; border-radius: .75rem;
    font-size: .75rem; font-weight: 500; color: #1b4f9c; line-height: 1.6;
}
.officer-dash .od-note i { margin-top: .2rem; flex-shrink: 0; font-size: .9rem; color: #1b84ff; }

@media (min-width: 768px) and (max-width: 991.98px) {
    .officer-dash .od-body { grid-auto-flow: column; grid-auto-columns: 1fr; }
}

/* narrow column: checkpoint tiles stack into rows so long numbers never overflow */
@media (max-width: 575.98px), (min-width: 768px) and (max-width: 1099.98px) {
    .officer-dash .odb-stats { grid-auto-flow: row; }
    .officer-dash .odb-stats a { align-items: center; padding: .55rem .25rem; }
    .officer-dash .odb-stats a + a { border-left: 0; border-top: 1px solid #f1f1f4; }
    .officer-dash .odb-stats .od-text { flex-direction: row; align-items: baseline; gap: .5rem; flex-grow: 1; }
    .officer-dash .odb-stats .odb-stat-label { flex-grow: 1; }
    .officer-dash .odb-stats .odb-stat-num { margin-left: auto; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .officer-dash .od-ic { width: 30px; height: 30px; font-size: .85rem; }
    .officer-dash .odd-kpi { padding: .85rem; gap: .6rem; }
    .officer-dash .odd-kpi-num { font-size: 1.6rem; }
    .officer-dash .odc-cell { padding: .8rem; gap: .55rem; }
    .officer-dash .odc-num { font-size: 1.35rem; }
    .officer-dash .odb-stat-num { font-size: 1.3rem; }
}

@media (max-width: 575.98px) {
    .officer-dash .od-body { gap: 1.5rem; }
    .officer-dash .od-ic { width: 30px; height: 30px; font-size: .85rem; }
    .officer-dash .odd-kpi { padding: .85rem; gap: .6rem; }
    .officer-dash .odd-kpi-num { font-size: 1.6rem; }
    .officer-dash .odc-cell { padding: .8rem; gap: .55rem; }
    .officer-dash .odc-num { font-size: 1.35rem; }
    .officer-dash .odd-alert-row { font-size: .85rem; }
    .officer-dash .odb-stat-num { font-size: 1.3rem; }
    .officer-dash .odb-stat-label { font-size: .75rem; }
}

.password-field .form-control {
    padding-right: 4.5rem !important;
}

.password-field .form-control.is-invalid,
.password-field .form-control.is-valid {
    background-position: right 3rem center;
}

.tree-resizer { display: none; }
@media (min-width: 992px) {
    .tree-resizable { position: relative; }
    .tree-resizer {
        display: block;
        position: absolute;
        top: 0;
        right: -1rem; /* อยู่ในช่อง gap-3 ระหว่าง Tree กับตาราง */
        width: 1rem;
        height: 100%;
        cursor: col-resize;
        touch-action: none;
        z-index: 5;
    }
    .tree-resizer::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 4px;
        height: 48px;
        border-radius: 2px;
        transform: translate(-50%, -50%);
        background: var(--bs-gray-300);
        transition: background-color .15s, height .15s;
    }
    .tree-resizer:hover::after,
    .tree-resizer:focus-visible::after,
    .tree-resizer.is-dragging::after {
        height: 96px;
        background: var(--bs-success);
    }
    .tree-resizer:focus-visible { outline: none; }
}
body.tree-resizing { cursor: col-resize; user-select: none; }