body {
        font-family: Kanit;
}

:root, [data-bs-theme="light"], [data-bs-theme="dark"] { color-scheme: light; }

        :root {
            --bs-primary: #6f42c1;
            /* CMU purple */
            --bs-primary-rgb: 111, 66, 193;
            --bs-link-color: var(--bs-primary);
            --bs-link-hover-color: #5a32a3;
        }

        .navbar-glass::before {
            content: "";
            position: absolute;
            inset: 0 0 auto 0;
            height: 6px;
            background: linear-gradient(90deg, var(--bs-primary), #9b7eda);
            opacity: .25;
        }

        /* Fallback เผื่อเบราว์เซอร์ไม่รองรับ color-mix */
        .navbar-glass {
            background-color: rgba(255, 255, 255, .70);
            border-bottom: 1px solid rgba(111, 66, 193, .35);
            /* เส้นขอบม่วงบาง ๆ */
            backdrop-filter: saturate(180%) blur(10px);
            -webkit-backdrop-filter: saturate(180%) blur(10px);
        }

        /* ไล่ระดับโทนม่วงสุภาพ + กลาส (ทับ fallback) */
        .navbar-glass {
            background:
                /* ชั้นม่วงบางด้านบน → ละมุนลงด้านล่าง */
                linear-gradient(180deg,
                    rgba(111, 66, 193, .10) 0%,
                    rgba(111, 66, 193, .06) 55%,
                    rgba(111, 66, 193, .03) 100%),
                /* เบื้องหลังใส ๆ ผสมพื้นหลังหน้าเว็บ */
                color-mix(in oklab, var(--bs-body-bg) 82%, transparent);
            border-bottom: 1px solid rgba(111, 66, 193, .35);
        }

        /* โหมดมืด: เพิ่มความทึบเล็กน้อยและขอบที่สว่างขึ้นเพื่อคอนทราสต์ */
        /* [data-bs-theme="dark"] .navbar-glass {
            background:
                linear-gradient(180deg,
                    rgba(155, 126, 218, .18) 0%,
                    rgba(155, 126, 218, .12) 55%,
                    rgba(155, 126, 218, .06) 100%),
                color-mix(in oklab, var(--bs-body-bg) 90%, transparent);
            border-bottom: 1px solid rgba(155, 126, 218, .45);
        } */

        .nav-link {
            position: relative;
            font-weight: 500;
        }

        .nav-link:not(.btn)::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: -6px;
            width: 100%;
            height: 2px;
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 220ms ease;
            background: linear-gradient(90deg, var(--bs-primary), #9b7eda);
            border-radius: 2px;
        }

        .nav-link:hover::after,
        .nav-link:focus::after,
        .nav-link.active::after {
            transform: scaleX(1);
        }

        .btn-cta:hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 24px rgba(var(--bs-primary-rgb), .25);
        }

        .btn-cta {
            transition: all 200ms ease;
        }

        body {
            padding-top: 72px;
        }

        .hero {
            display: grid;
            place-items: center;
            background: radial-gradient(60% 60% at 70% 10%, rgba(var(--bs-primary-rgb), .08), transparent 60%),
                radial-gradient(50% 50% at 20% 80%, rgba(155, 126, 218, .15), transparent 60%);
        }

        /* ====== News cards ====== */
        .news-card {
            height: 100%;
        }

        .news-card .badge {
            font-weight: 500;
            background-color: #f3e9ff;
            color: var(--bs-primary);
            border: 1px solid #e0caff;
        }

        .news-card .title {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .news-meta {
            font-size: .9rem;
            opacity: .8;
        }

        .textHead {
            color: #AE75F0;
        }

        /* ปุ่มม่วง Pastel Modern Gradient */
        .btn-purple {
            display: inline-block;
            padding: 0.65rem 1.4rem;
            font-size: 1rem;
            font-weight: 500;
            color: #fff;
            background: linear-gradient(135deg, #b39ddb, #9575cd);
            /* ไล่โทนม่วง pastel */
            border: none;
            border-radius: 14px;
            box-shadow: 0 4px 10px rgba(149, 117, 205, 0.25);
            transition: all 0.3s ease-in-out;
            text-align: center;
            width: 100%;
            cursor: pointer;
        }

        .btn-purple:hover {
            background: linear-gradient(135deg, #9575cd, #7e57c2);
            /* เข้มขึ้นเวลา hover */
            box-shadow: 0 6px 14px rgba(126, 87, 194, 0.35);
            transform: translateY(-2px);
        }

        .btn-purple:active {
            background: linear-gradient(135deg, #7e57c2, #5e35b1);
            /* โทนเข้มสุดตอนกด */
            transform: translateY(0);
        }

        /* ปุ่ม Outline ม่วง Pastel Gradient */
        .btn-purple-outline {
            display: inline-block;
            padding: 0.65rem 1.4rem;
            font-size: 1rem;
            font-weight: 500;
            color: #7e57c2;
            background-color: transparent;
            border: 2px solid transparent;
            border-radius: 14px;
            background-image: linear-gradient(#fafafa, #fafafa),
                linear-gradient(135deg, #b39ddb, #9575cd);
            /* ขอบไล่เฉด */
            background-origin: border-box;
            background-clip: padding-box, border-box;
            transition: all 0.3s ease-in-out;
            text-align: center;
            width: 100%;
            cursor: pointer;
        }

        .btn-purple-outline:hover {
            color: #5e35b1;
            background-image: linear-gradient(#f3e5f5, #f3e5f5),
                linear-gradient(135deg, #9575cd, #7e57c2);
            box-shadow: 0 4px 10px rgba(126, 87, 194, 0.2);
            transform: translateY(-1px);
        }

        /* ปุ่มม่วง Pastel Modern Gradient - Small */
        .btn-purple.btn-sm {
            padding: 0.4rem 1rem;
            /* ลด padding */
            font-size: 0.875rem;
            /* ตัวอักษรเล็กลง */
            border-radius: 20px;
            /* โค้งน้อยลง */
        }

        .btn-purple-outline.btn-sm {
            padding: 0.4rem 1rem;
            font-size: 0.875rem;
            border-radius: 20px;
        }

        /* ปุ่มล็อกอินโทนม่วง Gradient - Small */
        .btn-submit-purple.btn-sm {
            padding: 0.45rem 1rem;
            /* ลดขนาด padding */
            font-size: 0.9rem;
            /* ตัวอักษรเล็กลง */
            border-radius: 20px;
            /* โค้งน้อยลงเล็กน้อยให้สวย */
        }

        /* ปุ่มปกติยังคง gradient + hover effect */
        .btn-submit-purple {
            display: inline-block;
            width: 100%;
            font-weight: 600;
            color: #fff;
            text-align: center;
            border: none;
            cursor: pointer;
            background: linear-gradient(135deg, #7e57c2, #6a1b9a);
            box-shadow: 0 4px 12px rgba(106, 27, 154, 0.3);
            transition: all 0.3s ease-in-out;
        }

        .btn-submit-purple:hover {
            background: linear-gradient(135deg, #8e24aa, #5e35b1);
            box-shadow: 0 6px 16px rgba(94, 53, 177, 0.4);
            transform: translateY(-2px);
        }

        .btn-submit-purple:active {
            background: linear-gradient(135deg, #5e35b1, #4a148c);
            box-shadow: 0 2px 6px rgba(74, 20, 140, 0.3);
            transform: translateY(0);
        }

        .btn-submit-purple:focus {
            outline: none;
            box-shadow: 0 0 0 4px rgba(126, 87, 194, 0.3);
        }

/* ปุ่มโทน modern แบบ soft */
.btn-apply {
  background: #f9fafb;
  /* เทาอ่อนมาก */
  color: #4b5563;
  /* เทาเข้ม */
  border: 1px solid #e5e7eb;
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.2s ease-in-out;
}

.btn-apply:hover {
  background: #f3f4f6;
  /* hover เทาอ่อนขึ้น */
  color: #374151;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

/* ปุ่ม active ใช้ม่วง soft */
.btn-apply-active {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  /* ม่วงอ่อน → ม่วงกลาง */
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.btn-apply-active:hover {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

/* heading modern */
.title-gradient {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
}

/* Tabs แบบมืออาชีพ Modern */
					.nav-tabs .nav-link {
						border-radius: 12px;
						border: 1px solid #d1c4e9;
						/* ขอบม่วงอ่อน */
						margin-right: 8px;
						margin-bottom: 4px;
						background-color: #f3e5f5;
						/* พื้นหลังม่วงอ่อน */
						color: #6a1b9a;
						/* ตัวหนังสือม่วงเข้ม */
						font-weight: 500;
						text-align: center;
						transition: all 0.3s ease-in-out;
					}

					.nav-tabs .nav-link.active {
						background: linear-gradient(135deg, #b39ddb, #9575cd);
						color: #fff;
						box-shadow: 0 4px 8px rgba(149, 117, 205, 0.25);
					}

					.nav-tabs .nav-link:hover {
						background: linear-gradient(135deg, #9575cd, #7e57c2);
						color: #fff;
						box-shadow: 0 4px 12px rgba(126, 87, 194, 0.3);
						transform: translateY(-1px);
					}

					/* ทำให้ปุ่มเต็มความกว้างบน mobile */
					@media (max-width: 768px) {
						.nav-tabs .nav-link {
							width: 100%;
						}
					}


                    	body {
		font-family: Kanit;
	}

	/* ===== Theme ===== */
	:root {
		--bg: #ffffff;
		--text: #111827;
		/* gray-900 */
		--muted: #6b7280;
		/* gray-500 */
		--border: #e5e7eb;
		/* gray-200 */
		--soft: #f8fafc;
		/* gray-50 */
		--accent: #6d28d9;
		/* purple-700 */
		--accent-600: #7c3aed;
		/* purple-600 */
		--accent-50: #f5f3ff;
		/* purple-50 */
		--accent-100: #ede9fe;
		/* purple-100 */
	}

	* {
		box-sizing: border-box
	}

	body {
		font-family: "Kanit", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
		color: var(--text);
		background: var(--bg)
	}
/* 
	ol,
	ul {
		margin: 0;
		padding-left: 0;
		list-style: none
	} */

	/* ===== Wrapper ===== */
	.wrapper {
		margin: 6px auto 0
	}

	/* ===== Tabs (Professional segmented + indicator) ===== */
	.tabs_wrap {
		position: relative;
		padding: 5px 10px 8px;
		border-bottom: 1px solid var(--border);
		background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
	}

	.tabs_wrap .tabs {
		display: flex;
		gap: .5rem;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}

	.tabs_wrap .tab {
		flex: 0 0 auto;
		min-width: 180px;
		border: 1px solid var(--border);
		background: #fff;
		border-radius: 12px;
		padding: .65rem .9rem;
		cursor: pointer;
		user-select: none;
		transition: background .18s, border-color .18s, color .18s, transform .12s;
		color: var(--text);
		text-align: center;
		position: relative;
	}

	.tabs_wrap .tab:hover {
		background: #f9fafb;
		border-color: #d1d5db;
		transform: translateY(-1px)
	}

	.tabs_wrap .tab.active {
		border-color: var(--accent);
		background: linear-gradient(180deg, var(--accent-50), #fff);
		color: #4c1d95;
	}

	.tabs_wrap .tab .title {
		font-weight: 600
	}

	.tabs_wrap .tab .sub {
		display: block;
		font-size: .8rem;
		color: #ef4444;
		margin-top: .15rem
	}

	/* moving underline indicator (ติดด้านล่างกล่อง tabs) */
	.tabs_wrap .indicator {
		position: absolute;
		left: 10px;
		bottom: 0;
		height: 2px;
		width: 160px;
		background: linear-gradient(90deg, var(--accent), var(--accent-600));
		border-radius: 2px;
		transform: translateX(0);
		transition: transform .25s cubic-bezier(.4, 0, .2, 1), width .25s;
	}

	/* ===== Sections / Group ===== */
	.item_wrap {
		padding: 16px 14px
	}

	.section-title {
		font-size: clamp(1.05rem, 2.4vw, 1.25rem);
		color: #16a34a;
		margin: 8px 0 10px;
	}

	/* callout badge (ดาวน์โหลด/ข่าว) */
	.badge-box {
		display: flex;
		align-items: center;
		gap: .5rem;
		font-size: 1.02rem;
		font-weight: 600;
		background: #fff;
		border: 1px solid var(--border);
		border-left: 4px solid var(--accent);
		border-radius: 10px;
		padding: .6rem .8rem;
		margin: .75rem 0 1rem;
		box-shadow: 0 2px 8px rgba(17, 24, 39, .04);
	}

	.badge-box i {
		color: var(--accent)
	}

	/* กลุ่มหัวข้อย่อย */
	.group-title {
		font-size: 1.2rem;
		font-weight: 700;
		padding: .35rem 0;
		margin-bottom: .25rem;
		color: #414040ff;
	}

	/* ===== Document list (clean + pro) ===== */
	.doc-min .item {
		display: flex;
		gap: .8rem;
		align-items: flex-start;
		padding: .75rem 0;
		border-bottom: 1px solid var(--border);
	}

	.doc-min .item:last-child {
		border-bottom: 0
	}

	.doc-min .icon {
		width: 22px;
		text-align: center;
		margin-top: .1rem;
		opacity: .9;
	}

	.doc-min .title {
		font-weight: 400;
		line-height: 1.45;
		color: inherit;
		text-decoration: none;
	}

	.doc-min .title:hover {
		text-decoration: underline
	}

	.doc-min .meta {
		font-size: .82rem;
		color: var(--muted);
		margin-top: .15rem;
		font-weight: 400;
	}

	/* NEW pill */
	.doc-min .new {
		font-size: .72rem;
		font-weight: 700;
		padding: .12rem .5rem;
		border: 1px solid #16a34a;
		color: #16a34a;
		border-radius: 999px;
		margin-left: .5rem;
	}

	/* filetype hint: สีไอคอนจาง ๆ มืออาชีพ */
	.ft-pdf {
		color: #dc2626
	}

	/* red-600 */
	.ft-word {
		color: #2563eb
	}

	/* blue-600 */
	.ft-excel {
		color: #059669
	}

	/* emerald-600 */
	.ft-ppt {
		color: #ea580c
	}

	/* orange-600 */
	.ft-img {
		color: #7c3aed
	}

	/* purple-600 */
	.ft-zip {
		color: #6b7280
	}

	/* gray-500 */
	.ft-link {
		color: #4b5563
	}

	/* gray-600 */

	@media (max-width:576px) {
		.tabs_wrap .tab {
			min-width: 160px;
			padding: .55rem .75rem
		}

		.item_wrap {
			padding: 12px 10px
		}
	}

        .step-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
        margin: 2rem 0;
        padding: 0 1rem;
    }

    .step-wrapper::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 5%;
        right: 5%;
        height: 4px;
        background: #e0d7f8;
        z-index: 0;
        transform: translateY(-50%);
        border-radius: 2px;
    }

    .step-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        z-index: 1;
        flex: 1;
    }

    .step-circle {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #dec6faff;
        color: #646363ff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        font-weight: bold;
        transition: all 0.3s;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    .step-item.completed .step-circle {
        background: linear-gradient(135deg, #9575cd, #7e57c2);
    }

    .step-item.active .step-circle {
        background: linear-gradient(135deg, #b39ddb, #9575cd);
        box-shadow: 0 4px 10px rgba(126, 87, 194, 0.3);
    }

    .step-item.completed::after,
    .step-item.active::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        height: 4px;
        background: linear-gradient(135deg, #9575cd, #7e57c2);
        z-index: -1;
        transform: translateY(-50%);
        border-radius: 2px;
    }

    .step-item:last-child::after {
        display: none;
    }

    .step-label {
        margin-top: 0.5rem;
        font-size: 0.75rem;
        text-align: center;
        color: #555;
    }

    .step-label::after {
        content: attr(data-long);
        display: block;
        font-size: 0.75rem;
        text-align: center;
        color: #555;
        margin-top: 0.5rem;
    }


    .step-wrapper {
        display: flex;
        gap: 20px;
        margin-bottom: 20px;
    }

    .step-item {
        cursor: pointer;
        text-align: center;
    }

    .step-item.active .step-circle {
        background: #6f42c1;
        /* ม่วง */
        color: #fff;
    }

    .step-item.completed .step-circle {
        background: #e0d8ff;
        /* ม่วงอ่อน */
        color: #4a2a99;
    }

    .step-label {
        font-size: 14px;
        margin-top: 6px;
    }

    /* ปรับปุ่มให้เต็มบนมือถือ */
    .btn-step-wrapper .btn {
        width: 100%;
    }

    :root {
        --bg: #ffffff;
        --soft: #f7f8fb;
        --border: #e5e7eb;
        --text: #0f172a;
        --muted: #64748b;
        --accent: #7c3aed;
        /* ม่วงนุ่ม */
        --accent-600: #6d28d9;
        --success: #16a34a;
        --warning: #f59e0b;
        --radius: 16px;
        --shadow: 0 10px 28px rgba(2, 6, 23, .08);
    }


    /* กล่องแต่ละคอลัมน์ */
    .section-card {
        background: linear-gradient(180deg, #ffffff, #fafaff);
        border: 1px solid var(--border);
        border-radius: 18px;
        box-shadow: 0 8px 24px rgba(2, 6, 23, .06);
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    /* หัวข้อย่อย */
    .section-title {
        display: flex;
        align-items: center;
        gap: .6rem;
        font-weight: 800;
        color: #4c1d95;
        margin: 4px 0 6px;
    }

    .section-title::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--accent), var(--accent-600));
        box-shadow: 0 0 0 6px rgba(124, 58, 237, .12);
    }

    /* ข้อความช่วย/หมายเหตุ */
    .hint {
        color: var(--muted);
        font-size: .9rem;
    }

    .note-soft {
        background: #fff7ed;
        border: 1px solid #fed7aa;
        color: #8a3b00;
        border-radius: 14px;
        padding: 10px 12px;
        font-size: .95rem;
    }

    /* input/ select สัมผัสดีขึ้น */
    .form-control,
    .form-select {
        border-radius: 12px !important;
        border: 1px solid var(--border) !important;
        padding: .65rem .85rem !important;
        transition: border .15s, box-shadow .15s, background .15s;
    }

    .form-control:focus,
    .form-select:focus {
        border-color: var(--accent) !important;
        box-shadow: 0 0 0 3px rgba(124, 58, 237, .15) !important;
    }

    /* ไอคอน toggle password เดิม ให้ดูกลืน */
    #btnPassword2 {
        border-radius: 10px;
    }

    /* รูปโปรไฟล์ */
    .avatar-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 150px;
        height: 150px;
        border-radius: 14px;
        overflow: hidden;
        background: var(--soft);
        border: 1px dashed var(--border);
    }

    .avatar-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* file input ให้ดูมีขอบเขต */
    #picture.form-control {
        padding: .55rem .8rem;
        background: #fff;
        border-style: dashed !important;
    }

    /* ตารางในส่วนตรวจสอบ/ยืนยัน (ถ้ามี) */
    .table {
        --bs-table-striped-bg: #fafafa;
        --bs-table-striped-color: inherit;
        border-color: var(--border);
    }

    /* บล็อกเตือน */
    .pill-warning {
        border: 1px solid #fcd34d;
        background: #fffbeb;
        color: #92400e;
        padding: 10px 14px;
        border-radius: 999px;
        text-align: center;
        font-weight: 600;
    }

    .section-card {
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        padding: 16px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
        margin-bottom: 16px;
    }

    .section-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: #111827;
        margin: 0 0 12px;
    }

    .note-soft {
        background: #f9fafb;
        border: 1px dashed #e5e7eb;
        border-radius: 12px;
        padding: 8px 12px;
        color: #374151;
    }


    .avatar-wrap img {
        display: block;
        width: 150px;
        height: 150px;
        object-fit: cover;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        background: #fff;
    }

    .input-group-password .input-group-text,
    .input-group-password .form-control,
    .input-group-password .btn {
        border-radius: 12px;
    }

    .input-group-password .input-group-text {
        background: #f9fafb;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

    .input-group-password .form-control {
        border-left: 0;
        border-right: 0;
    }

    .input-group-password .btn {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }

    .input-group-password:focus-within {
        box-shadow: 0 0 0 .25rem rgba(124, 58, 237, .15);
        border-radius: 12px;
    }

    .btn-icon {
        width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Error box */
    .alert-errors {
        background: #FEF2F2;
        color: #7F1D1D;
        border: 1px solid #FECACA;
        border-radius: 12px;
        padding: 12px 14px;
        margin: 12px 0;
    }

    .alert-errors ul {
        margin: 0;
        padding-left: 20px;
    }

    .text-Underline{
        text-decoration: underline;
    }


    /* Desktop ≥768px */
    @media (min-width: 768px) {
        .btn-step-wrapper {
            flex-direction: row;
            /* เรียงปุ่มซ้าย-ขวา */
        }

        .btn-step-wrapper .btn {
            width: auto !important;
            /* ขนาดตามข้อความ */
        }
    }

    /* Mobile-first spacing */
    @media (max-width: 767.98px) {
        .section-card {
            padding: 14px;
            border-radius: 14px;
        }

        .avatar-wrap {
            width: 120px;
            height: 120px;
        }

        .avatar-wrap img {
            width: 120px;
            height: 120px;
            margin-bottom: 8px;
        }
    }

    /* Mobile: ใช้ข้อความสั้น */
    @media (max-width: 576px) {
        .step-label::after {
            content: attr(data-short);
            font-size: 0.65rem;
        }
    }
      /* Mobile: กว้างเต็ม */
  @media (max-width: 767.98px) {
    .responsive-btn {
      width: 100%;
    }
  }

  /* PC: อัตโนมัติ */
  @media (min-width: 768px) {
    .responsive-btn {
      width: auto;
    }
  }