:root {
    --bs-primary: #0d6efd;
    --bs-secondary: #6c757d;
    --bs-success: #198754;
    --bs-info: #0dcaf0;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;
    --bs-theme: #00519A;
    --bs-vine: #7B3A3B;
    --bs-gray: #878787;
    --bs-light-gray: #ECECEC;
    --bs-dark-gray: #393939;
    --bs-white: #FFFFFF;
    --bs-yellow: #FBB02A;
    --bs-font-16: 16px;
    --bs-font-18: 18px;
    --bs-font-20: 20px;
    --bs-font-24: 24px;
    --bs-head-font-family: 'SUKHUMVIT', Arial, sans-serif;
    --bs-body-font-family: 'BaiJamjuree', Arial, sans-serif;
}

html,
body,
.body {
    font-family: var(--bs-body-font-family), 'Kanit', 'Tahoma', sans-serif;
    background-color: var(--bs-white);
}

@font-face {
    font-family: 'SUKHUMVIT';
    src: url('font/SUKHUMVITSET-BOLD.ttf') format('ttf'),
    url('font/SUKHUMVITSET-BOLD.woff') format('woff');
}

@font-face {
    font-family: 'BaiJamjuree';
    src: url('font/BaiJamjuree-Light.ttf') format('ttf'),
    url('font/BaiJamjuree-Light.woff') format('woff');
}

/*margin*/
.m-15 {
    margin: 15px;
}

.mt-15 {
    margin-top: 15px;
}

.mb-15 {
    margin-bottom: 15px;
}

/*margin*/

/*padding*/
.pd-10 {
    padding: 10px;
}

.pd-15 {
    padding: 15px;
}

/*padding*/

.box-reset-password {
    padding: 3% 22%;
}

.hide {
    display: none;
}

.img-banner {
    width: 100%;
}

.btn-regis {
    padding: 10px 20px;
    font-size: 20px;
    text-align: center;
    border-radius: 40px;
    border: solid 1px #dedede;
    background: white;
}

.btn-regis:hover {
    background: white;
    font-weight: bold;
}

.tab-banner {
    background: var(--bs-theme);
    padding: 10px 16px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.top-banner-home {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border-radius: 12px 12px 0 0;
    padding: 15px;
}

.top-banner-home img {
    width: 100%;
}

.content-index {
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
}
.content-index img{
    width: 100% !important;
}


/* พื้นที่รวม */
.summary-score {
    margin-bottom: 1rem;
}

.chart-wrapper {
    position: relative;
    margin: auto;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* การ์ดหลัก */
.score-card-2 {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 20px 18px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

/* เส้นคั่น */
.score-card-2 hr {
    border: 0;
    border-top: 1px solid #e9ecef;
    opacity: 1;
}

/* grid หลัก */
.score-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px 90px;
    column-gap: 14px;
    align-items: center;
}

/* หัวตาราง */
.score-head {
    margin-bottom: 6px;
}

.score-head .score-full,
.score-head .score-get {
    font-size: 13px;
    font-weight: 700;
    color: #6c757d;
    text-align: center;
}

/* ฝั่งซ้าย */
.score-left {
    min-width: 0;
}

.score-title {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 2px;
}

/* หัวข้อย่อย */
.score-left h5 {
    font-size: 16px;
    line-height: 1.4;
    color: #495057 !important;
    margin-bottom: 10px !important;
}

/* progress */
.progress-custom {
    height: var(--height-progress-custom, 26px);
    border-radius: 999px;
    overflow: hidden;
    margin: 0;
    background-color: #edf1f5;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.progress-custom .progress-bar {
    height: 100%;
    display: flex;
    align-items: center;
    border-radius: 999px;
}

.progress-bar.custom {
    background-color: var(--progress-bar-bgColor) !important;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

/* ตัวเลขด้านขวา */
.score-full,
.score-get,
.score-full-detail,
.score-get-detail {
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
    align-self: start;
}

/* แถวคะแนนรวม */
.score-grid-2 .score-full,
.score-grid-2 .score-get {
    padding-top: 2px;
}

/* แถวรายละเอียด */
.score-full-detail,
.score-get-detail {
    padding-top: 44px; /* ให้ตรงกับแนว progress */
    font-size: 18px;
}

/* คะแนนที่ได้ เน้นสี */
.score-get,
.score-get-detail,
.score-percent1 {
    font-weight: 800;
}

/* เปอร์เซ็นต์รวมล่างสุด */
.score-percent1 {
    grid-column: 3 / 4;
    justify-self: center;
    font-size: 30px;
    line-height: 1;
    margin-top: 4px;
}

/* tooltip bootstrap */
.tooltip .tooltip-inner {
    white-space: normal;
    max-width: min(260px, 85vw);
    word-break: break-word;
    text-align: left;
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 8px;
}

/* วงกลม/legend ถ้าใช้ร่วม */
.circle {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 50%;
    background-color: var(--circle-color, #0d6efd);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 -1px 3px rgba(0, 0, 0, .12);
}

.circle::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-image: linear-gradient(
            45deg,
            rgba(255, 255, 255, .18) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, .18) 50%,
            rgba(255, 255, 255, .18) 75%,
            transparent 75%,
            transparent
    );
    background-size: 1rem 1rem;
    animation: circleStripeMove 1s linear infinite;
}

/*profile*/
.menu-profile {
    width: 100%;
    display: flex;
    padding: 15px;
    font-weight: bold;
    text-decoration: none;
    color: #00519A;
}

.menu-profile:hover {
    background: var(--bs-theme);
    color: var(--bs-white);
}

.menu-profile-active {
    width: 100%;
    display: flex;
    padding: 15px;
    font-weight: bold;
    text-decoration: none;
    background: var(--bs-theme);
    color: var(--bs-white);
}
/*profile*/

@keyframes circleStripeMove {
    0% {
        background-position: 1rem 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* responsive */
@media (max-width: 991.98px) {
    .score-card-2 {
        padding: 16px 14px;
        border-radius: 16px;
    }

    .score-grid-2 {
        grid-template-columns: minmax(0, 1fr) 60px 70px;
        column-gap: 10px;
    }

    .score-title {
        font-size: 16px;
    }

    .score-left h5 {
        font-size: 14px;
        margin-top: 10px !important;
        margin-bottom: 8px !important;
    }

    .score-full,
    .score-get {
        font-size: 18px;
    }

    .score-full-detail,
    .score-get-detail {
        font-size: 22px;
        padding-top: 38px;
    }

    .score-percent1 {
        font-size: 24px;
    }
}

@media (max-width: 575.98px) {
    .btn-regis {
        font-size: 16px !important;
    }

    .score-grid-2 {
        grid-template-columns: minmax(0, 1fr) 52px 58px;
        column-gap: 8px;
    }

    .score-head .score-full,
    .score-head .score-get {
        font-size: 11px;
    }

    .score-full,
    .score-get,
    .score-full-detail,
    .score-get-detail {
        font-size: 18px;
    }

    .score-full-detail,
    .score-get-detail {
        padding-top: 34px;
    }

    .progress-bar.custom {
        font-size: 12px;
    }
}

.progress-custom {
    border-radius: 999px;
    overflow: hidden;
}

/* reset ก่อน */
.progress-custom .progress-bar {
    border-radius: 0;
}

/* 👉 ตัวแรก โค้งซ้าย */
.progress-custom .progress-bar:first-child {
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
}

/* 👉 ตัวสุดท้าย โค้งขวา */
.progress-custom .progress-bar:last-child {
    border-top-right-radius: 999px;
    border-bottom-right-radius: 999px;
}

.file-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #111827;
    transition: all 0.25s ease;
    position: relative;
    margin-bottom: 10px;
}

/* hover effect */
.file-card:hover {
    border-color: #6366f1;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* thumbnail */
.file-thumb {
    width: 52px;
    height: 52px;
    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 26px;
}

/* PDF สีแดง */
.file-thumb.pdf {
    background: #fee2e2;
    color: #dc2626;
}

/* details */
.file-details {
    flex: 1;
    overflow: hidden;
}

/* ชื่อไฟล์ */
.file-name {
    font-size: 15px;
    font-weight: 600;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* meta */
.file-meta {
    margin-top: 4px;
    font-size: 13px;
    color: #6b7280;
}

.file-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* download button */
.dl-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f3f4f6;
    color: #374151;

    transition: all 0.2s ease;
}

/* hover ปุ่ม */
.file-card:hover .dl-btn {
    background: #6366f1;
    color: #fff;
}

/* icon animation */
.dl-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.file-card:hover .dl-btn svg {
    transform: translateY(2px);
}

.icon-sm {
    width: 14px;
    height: 14px;
}


.custom-footer {
    background: linear-gradient(180deg, #00519A 0%, #111827 100%);
    color: #e5e7eb;
    padding: 48px 0 20px;
    margin-top: 60px;
    font-size: 15px;
    line-height: 1.7;
}

.custom-footer .container {
    max-width: 1200px;
}

.custom-footer .row {
    row-gap: 28px;
}

/* logo */
.footer-logo {
    width: 150px;
    max-width: 100%;
    height: auto;
    margin-bottom: 14px;
    display: block;
}

/* หัวข้อ */
.custom-footer h5 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* ข้อความทั่วไป */
.custom-footer p {
    margin: 0;
    color: #cbd5e1;
}

/* item ติดต่อ */
.footer-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    color: #cbd5e1;
}

.footer-item i {
    font-size: 18px;
    color: #60a5fa;
    line-height: 1.4;
    margin-top: 2px;
    flex-shrink: 0;
}

.footer-item span {
    display: inline-block;
}

/* social link */
.social {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #e5e7eb;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.25s ease;
    width: fit-content;
    min-width: 220px;
}

.social:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(96, 165, 250, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.social i {
    font-size: 22px;
    flex-shrink: 0;
}

.social span {
    font-size: 15px;
    font-weight: 500;
}

/* เส้นคั่นด้านล่าง */
.custom-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 28px;
    padding-top: 16px;
}

/* version text */
.custom-footer .version-text {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
}

.alert-text{
    width: 100%;
    margin-top: 0.25rem;
    font-size: 14px;
    color: var(--bs-form-invalid-color);
}

/* responsive */
@media (max-width: 991.98px) {
    .custom-footer {
        padding: 40px 0 18px;
    }

    .custom-footer h5 {
        font-size: 17px;
    }

    .social {
        min-width: unset;
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .custom-footer {
        text-align: left;
    }

    .footer-logo {
        width: 78px;
    }

    .custom-footer .version-text {
        text-align: left;
        margin-top: 10px;
    }
}