.body-inner {
    position: relative;
    min-height: 100vh;
}

.messenger-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #0084ff, #00c6ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: all 0.3s ease;
    animation: bounce 3s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.messenger-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 22px rgba(0,0,0,0.3);
}

.faq-float-btn {
    position: fixed;
    bottom: 20px;
    right: 90px;
    width: 55px;
    height: 55px;
    background-color: #294581 ;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 9999;
    text-decoration: none;
}

.faq-float-btn:hover {
    background-color: #032346;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.faq-float-btn svg {
    width: 35px;
    height: 35px;
    fill: white;
}

/* responsive สำหรับมือถือ */
@media (max-width: 768px) {
    .faq-float-btn {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 80px;
    }
    .faq-float-btn svg {
        width: 28px;
        height: 28px;
    }
}

input[readonly] {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed !important;
    border-color: #dee2e6;
}

/* --- Wrapper ของ form-floating --- */
.form-floating {
    position: relative;
    transition: all 0.3s ease;
}

/* --- Input styling --- */
.form-floating > .form-control, .form-floating > .form-select {
    height: 58px;
    padding: 1rem 1rem 0.25rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: none;
    transition:
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;
}

/* --- Floating label --- */
.form-floating > label, .form-floating > .form-control:placeholder-shown ~ label {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 400;
    padding: 1rem;
    transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    color 0.25s ease,
    font-size 0.25s ease;
}

/* --- Focus state --- */
.form-floating > .form-control:focus, .form-floating > .form-control:not(:placeholder-shown) {
    border-color: #6366f1;
    box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.12),
    0 4px 16px rgba(99, 102, 241, 0.08);
    transform: translateY(-1px);
    outline: none;
    border-radius: 10px;
}

.form-floating > .form-control:focus ~ label, .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #6366f1;
}

/* --- Valid state --- */
.form-floating > .form-control.is-valid, .form-floating > .form-select.is-valid {
    border-color: #10b981;
    background-image: none; /* ซ่อน icon bootstrap default */
    padding-right: 1rem;
}

.form-floating > .form-control.is-valid:focus, .form-floating > .form-select.is-valid:focus {
    border-color: #10b981;
    box-shadow:
    0 0 0 4px rgba(16, 185, 129, 0.12),
    0 4px 16px rgba(16, 185, 129, 0.08);
}

.form-floating > .form-control.is-valid ~ label, .form-floating > .form-select.is-valid ~ label {
    color: #10b981;
}

/* --- Invalid state --- */
.form-floating > .form-control.is-invalid, .form-floating > .form-select.is-invalid {
    border-color: #f43f5e;
    padding-right: 1rem;
}

.form-floating > .form-control.is-invalid:focus, .form-floating > .form-select.is-invalid:focus {
    box-shadow:
    0 0 0 4px rgba(244, 63, 94, 0.12),
    0 4px 16px rgba(244, 63, 94, 0.08);
}

.form-floating > .form-control.is-invalid ~ label, .form-floating > .form-select.is-invalid ~ label {
    color: #f43f5e;
}

/* --- Hover (ยังไม่ focus) --- */
.form-floating > .form-control:not(:focus):hover, .form-floating > .form-select:not(:focus):hover {
    border-color: #cbd5e1;
}

/* --- Checkmark icon สำหรับ valid --- */
.form-floating > .form-control.is-valid + label::after,
.form-floating > .form-control.is-valid ~ label::after,
.form-floating > .form-select.is-valid + label::after,
.form-floating > .form-select.is-valid ~ label::after {
    content: " ✓";
    font-size: 0.75rem;
    color: #10b981;
}

/* --- Fade-in animation เมื่อ component โหลด --- */
.form-floating {
    animation: fadeSlideUp 0.5s ease both;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Shake animation สำหรับ invalid --- */
.form-floating > .form-control.is-invalid, .form-floating > .form-select.is-invalid {
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

/* ===== END CSS ===== */

#footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 2.5rem;
    padding: 100px 0 0 0;
}

#header #header-wrap #logo a,
#header #header-wrap #logo a span,
#header .header-inner #logo a,
#header .header-inner #logo a span {
    font-size: 24px;
    color: #000;
    font-weight: bold;
    letter-spacing: normal;
}

.grid-filter {
    margin: 10px 0 0 0;
    padding: 10px 0;
}

.grid-filter ul li a {
    font-size: 18px;
    text-decoration: underline;
}

.is-invalid:not(.form-control) {
    font-size: 14px !important;
}

.form-control {
    font-size: 14px;
}

.text-header {
    font-size: 17px;
}

.image-wrapper.shine img {
    -webkit-mask-image: linear-gradient(45deg, #000 25%, rgba(0, 0, 0, .2) 50%, #000 75%);
    mask-image: linear-gradient(45deg, #000 25%, rgba(0, 0, 0, .2) 50%, #000 75%);
    -webkit-mask-size: 800%;
    mask-size: 800%;
    -webkit-mask-position: 0;
    mask-position: 0;
    animation: 5s linear infinite shine
}

@keyframes shine {
    0% {
        -webkit-mask-position: 0;
        mask-position: 0
    }

    100% {
        -webkit-mask-position: 120%;
        mask-position: 120%
    }
}

.avatar {
    object-fit: cover;
}

.form-floating>.form-control:focus,
.form-floating>.form-control:not(:placeholder-shown) {
    padding-top: 1.8rem;
    padding-bottom: .8rem;
}

.form-select:disabled,
.form-control:disabled {
    background-color: #fbfbfb !important;
    cursor: no-drop;
}

.chkcontainer,
.chkcontainer input,
.form-check-input,
.pointer,
select {
    cursor: pointer;
}

.chkcontainer,
.chkcontainer input:checked~.checkmark:after {
    display: block
}

.chkcontainer {
    position: relative;
    padding-left: 35px;
    margin-bottom: 15px !important;
    font-size: 16px !important;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none
}

.chkcontainer input {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0
}

/* เพิ่ม CSS นี้ในหน้าเว็บ */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0   rgba(13, 110, 253, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);   }
  100% { box-shadow: 0 0 0 0   rgba(13, 110, 253, 0);    }
}

.btn-pulse {
  animation: pulse-ring 1.8s ease-out infinite;
}

@keyframes hand-blink {
  0%, 100% { opacity: 1;   transform: scale(1);   }
  50%       { opacity: 0.2; transform: scale(1.2); }
}

.fa-hand-point-up {
  animation: hand-blink 1.2s ease-in-out infinite;
  display: inline-block;
}

/* สำหรับปุ่ม btn-info (ฟ้า) */
@keyframes pulse-ring-info {
  0%   { box-shadow: 0 0 0 0    rgba(13, 202, 240, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(13, 202, 240, 0);    }
  100% { box-shadow: 0 0 0 0    rgba(13, 202, 240, 0);    }
}

.btn-info.btn-pulse {
  animation: pulse-ring-info 1.8s ease-out infinite;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee
}

.chkcontainer:hover input~.checkmark {
    background-color: #ccc
}

.chkcontainer input:checked~.checkmark {
    background-color: #81c868
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none
}

.chkcontainer .checkmark:after {
    left: 9px;
    top: 6px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg)
}

.form-check-input.is-invalid,
.form-check-input.is-valid {
    width: 1.3em !important
}

a.text-lg {
    font-size: 18px !important;
}

.pass-strength-visible input.form-control,
input.form-control:focus {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.pass-wrapper {
    width: 100%;
}

.progress .progress-bar {
    height: 12px;
}

.progress {
    width: 100%;
    background: #e9ecef;
    overflow: hidden;
    height: 12px;
    margin-top: 3px;
    padding: 0;
    display: none;
}

.progress-bar {
    height: 12px;
    padding: 2px 0 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(90deg, #5bce5f, #2e7d32);
    color: #fff;
    font-weight: bold;
    transition: width 0.3s ease;
    font-size: 11px;
}

.pass-strength-visible .pass-graybar,
.pass-strength-visible .pass-colorbar,
.form-control:focus+.pass-wrapper .pass-graybar,
.form-control:focus+.pass-wrapper .pass-colorbar {
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
}

.pass-graybar {
    height: 3px;
    background-color: #ccc;
    width: 100%;
    position: relative
}

.pass-colorbar {
    height: 3px;
    background-image: url("../images/passwordstrength.jpg");
    position: absolute;
    top: 0;
    left: 0
}

.pass-percent,
.pass-text {
    font-size: 1em
}

.pass-percent {
    margin-right: 5px
}

.badge {
    font-size: 12px;
}

.main-text a {
    line-height: 1.2em !important;
}

.table-responsive .table>thead tr th {
    padding: 10px;
    border-bottom: 2px solid #DDD;
}

.table-responsive .table tr td {
    padding: 10px;
}

.text-left {
    text-align: left;
}

.table-bordered td,
.table-bordered th {
    vertical-align: middle;
}

.font-normal {
    font-weight: normal !important;
}

.form-check-label {
    float: left;
}

.form-check {
    clear: both;
    margin-bottom: 10px;
}

.avatar-big {
    width: 140px;
    height: 160px;
    object-fit: cover;
}

.tabs.tabs-folder .nav-tabs .nav-link.active {
    border-bottom-width: 2px;
}

.container-lg {
    max-width: 1400px;
}

/* ===== PDPA MODAL ===== */
#pdpaModal .modal-dialog {
    max-width: 680px;
}

#pdpaModal .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(26, 58, 107, 0.18);
}

/* Header */
#pdpaModal .modal-header {
    background-color: #264d94 !important;
    padding: 24px 28px 20px;
    border: none;
    position: relative;
}

#pdpaModal .modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #e8c96a;
}

#pdpaModal .modal-header .shield-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 14px;
    flex-shrink: 0;
}

#pdpaModal .modal-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

#pdpaModal .modal-title small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 2px;
    letter-spacing: 0.5px;
}

#pdpaModal .btn-close-custom {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

#pdpaModal .btn-close-custom:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Body */
#pdpaModal .modal-body {
    padding: 0;
    background: #fff;
}

#pdpaModal .pdpa-scroll-area {
    max-height: 480px;
    overflow-y: auto;
    padding: 24px 28px 20px;
    font-size: 14.5px;
    line-height: 1.85;
    scroll-behavior: smooth;
}

#pdpaModal .pdpa-scroll-area::-webkit-scrollbar {
    width: 6px;
}

#pdpaModal .pdpa-scroll-area::-webkit-scrollbar-track {
    background: #e2e8f4;
}

#pdpaModal .pdpa-scroll-area::-webkit-scrollbar-thumb {
    background: #b0bcda;
    border-radius: 3px;
}

#pdpaModal .scroll-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 28px;
    background: #fff7e6;
    border-bottom: 1px solid #f0e0b0;
    font-size: 12.5px;
    color: #8a6a00;
}

#pdpaModal .scroll-indicator.hidden {
    display: none;
}

/* Consent area */
#pdpaModal .consent-area {
    padding: 20px 28px 24px;
}

#pdpaModal .consent-checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    user-select: none;
}

#pdpaModal .consent-checkbox-wrap:hover {
    background: #eef2fa;
}

#pdpaModal .consent-checkbox-wrap.checked {
    background: #eef2fa;
}

#pdpaModal .custom-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid #b0bcda;
    border-radius: 6px;
    background: #fff;
    background-color: #1a3a6b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all 0.2s;
    font-size: 12px;
    color: #fff;
}

#pdpaModal .consent-label {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
}

#pdpaModal .consent-label span {
    font-weight: 700;
}

/* Footer */
#pdpaModal .modal-footer {
    padding: 16px 28px 20px;
    gap: 10px;
}

#pdpaModal .btn-pdpa-cancel {
    background: #fff;
    border-radius: 8px;
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

#pdpaModal .btn-pdpa-cancel:hover {
    border-color: #aab;
    color: #444;
}

#pdpaModal .btn-pdpa-accept {
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 28px;
    font-family: 'Sarabun', sans-serif;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 7px;
    opacity: 0.45;
    background: #143060;
    pointer-events: none;
}

#pdpaModal .btn-pdpa-accept.active {
    opacity: 1;
    pointer-events: auto;
}

#pdpaModal .btn-pdpa-accept.active:hover {
    background: #143060;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(26, 58, 107, 0.3);
}

/* ===== DEMO BUTTON ===== */
.demo-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-submit-demo {
    background: var(--pdpa-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 36px;
    font-family: 'Sarabun', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(26, 58, 107, 0.25);
    transition: all 0.2s;
}

.btn-submit-demo:hover {
    background: #143060;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 58, 107, 0.35);
}

#popup-modal {
    display: none !important;
}

.modal p,
p {
    font-size: 16px;
    font-weight: normal;
}

#swal2-content label {
    float: left !important;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.header-extras>ul>li a,
.header-extras>ul>li i {
    color: #fff;
}

.avatar-attach-files {
    display: inline-block;
    cursor: pointer;
    clear: both;
    border: none !important;
}

.avatar-attach-files input[type="file"] {
    display: none;
}

.col-form-label {
    text-align: left;
}

tr.table-danger td {
    color: #000;
}

.bg-lightskyblue {
    background-color: lightskyblue;
}

.text-download {
    font-size: 16px;
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: 0;
}

.modal .modal-content .modal-header .modal-title {
    font-size: 20px;
}

select {
    cursor: pointer;
    font-size: 14px;
    transition: all .2s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%232e2e2e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat;
    background-position: right 1rem center !important;
    background-size: 16px 12px;
    border: 1px solid #e4e6ef;
    border-radius: 0.28rem;
    box-shadow: none;
}

.bootstrap-datetimepicker-widget {
    font-size: 14px !important;
}

.btn:not(.close):not(.mfp-close),
a.btn:not([href]):not([tabindex]),
button.btn {
    margin-bottom: 0;
}

h3 {
    text-shadow: 1px 1px 1px #FFF;
    font-weight: bold;
}

#header[data-transparent=true]+#page-title {
    top: -70px;
    padding: 160px 0 160px 0;
}

.bg-notice {
    background-color: #4CAF50;
}

.pink {
    color: #E91E63 !important;
}

.blue {
    color: #0014d7 !important;
}

.tab-content p {
    font-size: 16px;
    margin: 0;
}

.tab-content .col-md-4 h5,
.tab-content .col-md-3 h5,
.tab-content .col-md-9 h5 {
    color: #000;
    font-size: 16px;
    text-transform: uppercase;
}

ul.profile li {
    font-size: 19px;
    line-height: 1.8em;
}

.avatars {
    font-weight: bold;
    letter-spacing: 1px;
}

#logo .heading-text h2,
#logo .heading-text h2 {
    margin: 0;
    padding: 5px 0 0 0;
    font-size: 22px;
}

.widget .h3,
.widget h3 {
    font-size: 18px;
    font-weight: 600;
    padding: 10px 0 0 0;
}

.widget .h3,
.widget a:hover h3 {
    color: #0014d7;
}

.boundIn {
    position: relative;
}

.tabs .nav-link {
    font-size: 16px;
}

.tabs .nav-tabs .nav-link.active {
    font-weight: bold;
}

#footer {
    width: 100%;
    background-color: #fff;
}

#footer .copyright-content {
    padding: 30px 0;
    background: linear-gradient(135deg, #0e155c 0%, #0033cc 50%, #00f0ff 100%);
    color: #fff;
    line-height: 1.6em;
    background-size: 200% 100%;
    transition: all 0.5s ease;
}

@keyframes boundInAnimation {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.boundIn:hover {
    animation: boundInAnimation 0.5s ease-in-out;
}

@media (max-width: 1024px) {
    .header-extras {
        display: none;
    }

    .widget .h3,
    .widget h3 {
        font-size: 18px;
    }
}

@media (max-width: 1085px) {
    #mainMenu nav>ul>li>a { font-size:14px; }
}

@media (max-width: 768px) {
    .widget .h3,
    .widget h3 {
        font-size: 16px;
    }
}

@media (max-width: 512px) {

    .widget .h3,
    .widget h3 {
        font-size: 14px;
    }
}