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 indicator (app_createuser.php) =====
       สถานะ: .active = ขั้นตอนปัจจุบัน, .completed = ทำเสร็จแล้ว
       เส้นเชื่อม: ::before = ครึ่งซ้าย, ::after = ครึ่งขวา ของแต่ละ item */
    /* Compact account actions on the left, information tabs on the right. */
    .application-navigation {
        margin: 1rem 0;
    }

    /* แท็บชุดเดียว (segmented control): ช่องกว้างเท่ากัน แท็บที่เลือก = ม่วงทึบแบบเดียวทุกแท็บ */
    .application-tabs {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        margin: 0;
        padding: 4px;
        list-style: none;
        background: #f5f3ff;
        border: 1px solid #ede9fe;
        border-radius: 14px;
    }

    .application-tabs > li { min-width: 0; }

    .application-tabs .application-tab {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .45rem;
        width: 100%;
        min-height: 46px;
        padding: .55rem .75rem;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: #5b21b6;
        font: inherit;
        font-size: .95rem;
        font-weight: 500;
        line-height: 1.3;
        text-align: center;
        cursor: pointer;
        transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
    }

    .application-tabs .application-tab:hover {
        background: #fff;
        color: #4c1d95;
    }

    .application-tabs .application-tab.active {
        background: linear-gradient(135deg, #7c3aed, #6d28d9);
        color: #fff;
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(109, 40, 217, .28);
    }

    .application-tab-icon { font-size: 1.05rem; flex: 0 0 auto; }

    .application-tabs .application-tab:focus-visible,
    .create-account-steps .step-item:focus-visible {
        outline: 3px solid #6d28d9;
        outline-offset: 3px;
    }

    /* มือถือ: 2x2 ช่องเท่ากัน ไอคอนอยู่บนข้อความ (ข้อความได้ความกว้างเต็มช่อง ไม่ตัดกลางคำบนจอ 320px) */
    @media (max-width: 575.98px) {
        .application-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .application-tabs .application-tab { flex-direction: column; gap: .15rem; min-height: 58px; padding: .45rem .35rem; font-size: .88rem; }
        .application-tab-icon { font-size: 1.15rem; }
    }

    .create-account-heading {
        margin: 2rem 0 1.5rem;
    }

    .step-wrapper.create-account-steps {
        --step-active: #6d28d9;
        --step-fill: #7c3aed;
    }

    .create-account-steps .step-item {
        border: 0;
        background: transparent;
        font: inherit;
    }

    .create-account-steps .step-item:disabled {
        cursor: not-allowed;
    }

    .create-account-steps .step-item:disabled:hover {
        background: transparent;
    }

    .create-account-steps .step-item:disabled .step-circle {
        background: #f1f5f9;
        color: #64748b;
        box-shadow: none;
        transform: none;
    }

    /* The verified TCAS step stays purple while remaining disabled. */
    .create-account-steps .step-item.completed:disabled .step-circle {
        background: var(--step-fill);
        color: #fff;
        box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
    }

    .step-wrapper {
        --step-size: 44px;
        --step-track: #e0d7f8;
        --step-fill: linear-gradient(135deg, #9575cd, #7e57c2);
        --step-active: linear-gradient(135deg, #b39ddb, #9575cd);
        display: flex;
        align-items: flex-start;
        margin: 1.5rem 0 1.25rem;
        padding: 0;
        list-style: none;
    }

    .step-item {
        position: relative;
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        cursor: pointer;
        padding: 6px 4px;
        border-radius: 12px;
        -webkit-tap-highlight-color: transparent;
        transition: background-color .2s ease;
    }

    .step-item:hover,
    .step-item:focus-visible {
        background-color: var(--accent-50, #f5f3ff);
        outline: none;
    }

    /* เส้นเชื่อมซ้าย/ขวา อยู่กึ่งกลางวงกลม */
    .step-item::before,
    .step-item::after {
        content: '';
        position: absolute;
        top: calc(6px + var(--step-size) / 2);
        height: 4px;
        width: 50%;
        background: var(--step-track);
        transform: translateY(-50%);
        z-index: 0;
    }

    .step-item::before {
        left: 0;
    }

    .step-item::after {
        right: 0;
    }

    .step-item:first-child::before,
    .step-item:last-child::after {
        display: none;
    }

    /* ขั้นที่เสร็จแล้ว: เส้นทั้งสองข้างเป็นสีม่วง / ขั้นปัจจุบัน: เฉพาะเส้นซ้าย */
    .step-item.completed::before,
    .step-item.completed::after,
    .step-item.active::before {
        background: var(--step-fill);
    }

    .step-circle {
        position: relative;
        z-index: 1;
        width: var(--step-size);
        height: var(--step-size);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        font-weight: 600;
        background: #ede9fe;
        color: #6b7280;
        border: 3px solid #fff;
        box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
        transition: transform .2s ease, box-shadow .2s ease, background .3s ease;
    }

    .step-circle .bi {
        font-size: 1.35rem;
        line-height: 1;
    }

    .step-item.completed .step-circle {
        background: var(--step-fill);
        color: #fff;
    }

    .step-item.active .step-circle {
        background: var(--step-active);
        color: #fff;
        box-shadow: 0 0 0 4px var(--accent-100, #ede9fe), 0 4px 12px rgba(126, 87, 194, .35);
    }

    .step-item:hover .step-circle {
        transform: scale(1.06);
    }

    /* ป้ายชื่อ: ::before = ชื่อสั้น (แสดงทุกขนาด), ::after = คำอธิบายยาว (แท็บเล็ต/เดสก์ท็อป) */
    .step-label {
        margin-top: .5rem;
        max-width: 100%;
        line-height: 1.3;
    }

    .step-label::before {
        content: attr(data-short);
        display: block;
        font-size: .85rem;
        font-weight: 600;
        color: #4b5563;
    }

    .step-label::after {
        content: attr(data-long);
        display: block;
        font-size: .75rem;
        color: #6b7280;
        margin-top: .15rem;
    }

    .step-item.active .step-label::before {
        color: #5e35b1;
    }

    .step-item.completed .step-label::before {
        color: #7e57c2;
    }

    /* Tablet (iPad แนวตั้ง) */
    @media (max-width: 991.98px) {
        .step-label::after {
            font-size: .7rem;
        }
    }

    /* Mobile: ซ่อนคำอธิบายยาว ย่อวงกลม */
    @media (max-width: 767.98px) {
        .step-wrapper {
            --step-size: 38px;
            margin: 1rem 0;
        }

        .step-item {
            padding: 4px 2px;
        }

        .step-circle {
            font-size: 1rem;
        }

        .step-circle .bi {
            font-size: 1.15rem;
        }

        .step-label::before {
            font-size: .75rem;
        }

        .step-label::after {
            display: none;
        }

        .step-item:hover .step-circle {
            transform: none;
        }
    }

    @media (max-width: 400px) {
        .step-wrapper {
            --step-size: 34px;
        }

        .step-label::before {
            font-size: .68rem;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .step-item,
        .step-circle {
            transition: none;
        }
    }

    /* ปรับปุ่มให้เต็มบนมือถือ */
    .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;
    }


    /* ===== Avatar uploader: คลิกที่รูป/ลากไฟล์มาวาง เพื่อเลือกรูปถ่าย ===== */
    .avatar-upload {
        position: relative;
        display: inline-block;
        border-radius: 14px;
        overflow: hidden;
        cursor: pointer;
        transition: box-shadow .2s ease;
    }

    .avatar-upload .avatar-wrap {
        border-style: solid;
    }

    .avatar-upload:hover,
    .avatar-upload:focus-within {
        box-shadow: 0 0 0 3px rgba(124, 58, 237, .18);
    }

    .avatar-upload.is-dragover {
        box-shadow: 0 0 0 3px rgba(124, 58, 237, .45);
    }

    .avatar-upload.is-dragover .avatar-wrap {
        border-color: #7c3aed;
        border-style: dashed;
    }

    .avatar-overlay {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        padding: 6px 8px;
        font-size: .8rem;
        font-weight: 500;
        color: #fff;
        text-align: center;
        background: rgba(76, 29, 149, .78);
        cursor: pointer;
        transition: background .2s ease;
    }

    .avatar-upload:hover .avatar-overlay,
    .avatar-upload:focus-within .avatar-overlay {
        background: rgba(94, 53, 177, .95);
    }

    /* ให้ focus จากคีย์บอร์ดเห็นชัด (input ซ่อนด้วย visually-hidden แต่ยังโฟกัสได้) */
    .avatar-upload #picture:focus-visible ~ .avatar-overlay {
        outline: 2px solid #fff;
        outline-offset: -4px;
    }
    /* 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;
    }

    /* ===== การ์ดแต่ละหัวข้อในฟอร์มสร้างบัญชี (app_createuser.php step 2) ===== */
    .form-card {
        background: #ffffff;
        border: 1px solid var(--border, #e5e7eb);
        border-radius: 16px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(2, 6, 23, .05);
        overflow: hidden;
    }

    .form-card-head {
        display: flex;
        align-items: center;
        gap: .75rem;
        padding: 12px 16px;
        background: linear-gradient(90deg, #f5f3ff, #ffffff);
        border-bottom: 1px solid var(--border, #e5e7eb);
    }

    .form-card-num {
        flex: 0 0 auto;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: .95rem;
        color: #fff;
        background: linear-gradient(135deg, #9575cd, #7e57c2);
        box-shadow: 0 2px 6px rgba(126, 87, 194, .35);
    }

    .form-card-title {
        margin: 0;
        font-size: 1.05rem;
        font-weight: 700;
        color: #4c1d95;
        line-height: 1.3;
    }

    .form-card-body {
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .form-card-body .col-form-label {
        font-weight: 500;
        color: #374151;
    }


    /* กริด key/value ในหน้าตรวจสอบข้อมูล (step 3) */
    .review-grid .rv-item {
        height: 100%;
        padding: 8px 12px;
        background: #fafafa;
        border: 1px solid var(--border, #e5e7eb);
        border-radius: 12px;
    }

    .review-grid .rv-k {
        font-size: .8rem;
        color: #6b7280;
        line-height: 1.3;
    }

    .review-grid .rv-v {
        font-weight: 500;
        color: #111827;
        word-break: break-word;
        min-height: 1.5em;
    }

    /* ===== ข้อความในฟอร์ม 3 ระดับ (app_createuser.php)
       .form-text            = คำอธิบายช่องกรอก (เทา เล็ก ไม่เด่น)
       .callout-info         = คำแนะนำ/ข้อกำหนดที่ต้องรู้ก่อนกรอก
       .callout-warn         = คำเตือน/สิ่งที่ต้องทำให้ถูก
       .callout-action       = ขอให้ผู้ใช้ทำ (มี checkbox กดได้ทั้งแถบ)
       .sub-head             = หัวข้อย่อยในการ์ด (เช่น ม.4 / ม.5 / ม.6) ===== */
    .callout {
        display: flex;
        align-items: flex-start;
        gap: .6rem;
        margin: 0;
        padding: 10px 14px;
        border: 1px solid;
        border-left-width: 4px;
        border-radius: 12px;
        font-size: .92rem;
        line-height: 1.45;
    }

    .callout > i {
        flex: 0 0 auto;
        margin-top: .2em;
        font-size: 1rem;
    }

    .callout a {
        color: inherit;
        font-weight: 600;
        text-decoration: underline;
    }

    .callout-info {
        background: #ecfeff;
        border-color: #a5f3fc;
        border-left-color: #0891b2;
        color: #155e75;
    }

    .callout-warn {
        background: #fffbeb;
        border-color: #fde68a;
        border-left-color: #f59e0b;
        color: #92400e;
        font-weight: 500;
    }

    .callout-action {
        align-items: center;
        background: #eff6ff;
        border-color: #bfdbfe;
        border-left-color: #2563eb;
        color: #1e3a5f;
        font-weight: 500;
        cursor: pointer;
        user-select: none;
        transition: background .15s ease, border-color .15s ease;
    }

    .callout-action:hover {
        background: #dbeafe;
        border-color: #2563eb;
    }

    .callout-action:has(.form-check-input:checked) {
        background: #dbeafe;
        border-color: #2563eb;
    }

    .callout-action:focus-within {
        outline: 2px solid #2563eb;
        outline-offset: 3px;
    }

    .callout-action .form-check-input {
        width: 1.3em;
        height: 1.3em;
        margin: 0;
        flex: 0 0 auto;
        border-color: #64748b;
    }

    .callout-action .form-check-input:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, .2);
    }

    .callout-action .form-check-input:checked {
        background-color: #2563eb;
        border-color: #2563eb;
    }

    .sub-head {
        margin: 6px 0 0;
        padding-left: .6rem;
        border-left: 3px solid #b39ddb;
        font-weight: 600;
        font-size: .95rem;
        color: #5e35b1;
        line-height: 1.3;
    }

    .form-card-body .form-text {
        color: #6b7280;
        font-size: .82rem;
    }
    /* แถบปุ่มท้ายฟอร์ม */
    .form-actions {
        text-align: center;
        padding: 16px;
        margin-top: 4px;
        background: #fafaff;
        border: 1px dashed var(--border, #e5e7eb);
        border-radius: 16px;
    }

    @media (max-width: 767.98px) {
        .form-card-head {
            padding: 10px 12px;
        }

        .form-card-body {
            padding: 12px;
        }

        .form-card-title {
            font-size: 1rem;
        }

        .form-card-num {
            width: 28px;
            height: 28px;
            font-size: .85rem;
        }

        .form-actions .btn {
            width: 100%;
        }
    }

    .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;
    }

    /* ช่องรหัสผ่าน + ปุ่มตาแสดง/ซ่อน ลอยอยู่ในช่อง (ปุ่มละช่อง) */
    .pwd-field {
        position: relative;
    }

    .pwd-field .form-control {
        padding-right: 2.75rem !important;
    }

    .pwd-toggle {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 2.75rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        background: transparent;
        color: #6b7280;
        font-size: 1rem;
        border-radius: 0 12px 12px 0;
        cursor: pointer;
        transition: color .15s;
    }

    .pwd-toggle:hover {
        color: #4c1d95;
    }

    .pwd-toggle:focus-visible {
        outline: 2px solid #7c3aed;
        outline-offset: -2px;
    }

    .pwd-toggle[aria-pressed="true"] {
        color: #7c3aed;
    }

    /* ย้ายกลางปี (#eduterm): แถวละภาคเรียน = ป้ายเทอม + จังหวัด/โรงเรียน/หลักสูตร */
    /* แท็บล็อกอิน (#login): การ์ด Username/รหัสผ่าน + ThaID คั่นด้วย "หรือ" */
    .login-wrap {
        max-width: 1040px;
        margin: 0 auto;
    }

    .login-card .form-card-head img {
        flex: 0 0 auto;
    }

    .btn-login {
        padding: .7rem 1rem;
        font-size: 1rem;
        border-radius: 12px;
        line-height: 1.3;
    }

    .btn-thaid {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        color: #1e3a8a;
        font-weight: 600;
        border: 1.5px solid #cbd5e1;
        transition: background .15s, border-color .15s, box-shadow .15s;
    }

    .btn-thaid:hover,
    .btn-thaid:focus-visible {
        background: #eff6ff;
        border-color: #93c5fd;
        color: #1e3a8a;
        box-shadow: 0 4px 12px rgba(30, 58, 138, .12);
    }

    .link-forgot {
        font-size: .85rem;
        color: #5e35b1;
        text-decoration: none;
    }

    .link-forgot:hover {
        text-decoration: underline;
        color: #4c1d95;
    }

    .login-or,
    .login-or-v {
        color: #6b7280;
        font-size: .9rem;
    }

    .login-or {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 2px 8px;
    }

    .login-or::before,
    .login-or::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #e5e7eb;
    }

    .login-or-v {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: 100%;
        padding: 0 22px;
    }

    .login-or-v::before,
    .login-or-v::after {
        content: "";
        flex: 1;
        width: 1px;
        background: #e5e7eb;
    }

    .login-or-v span {
        padding: 10px 0;
    }

    .login-details {
        font-size: .9rem;
        color: #4b5563;
    }

    .login-details summary {
        cursor: pointer;
        color: #5e35b1;
        font-weight: 500;
        list-style: none;
    }

    .login-details summary::-webkit-details-marker {
        display: none;
    }

    .login-details summary::before {
        content: "\25B8";
        display: inline-block;
        width: 1em;
    }

    .login-details[open] summary::before {
        content: "\25BE";
    }

    /* step 4: รายการคำรับรอง */
    /* ===== หน้าแก้ไขข้อมูลส่วนตัว apply_resume.php ===== */
    .resume-hero {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px 20px;
        padding: 18px 22px;
        margin-bottom: 14px;
        border: 1px solid #ddd6fe;
        border-radius: 18px;
        background: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 45%, #ffffff 100%);
    }

    .resume-title {
        margin: 0;
        font-size: 1.35rem;
        font-weight: 700;
        color: #4c1d95;
    }

    .resume-sub {
        font-size: .92rem;
        color: #6b7280;
    }

    .resume-user {
        display: inline-flex;
        align-items: center;
        gap: .6rem;
        padding: 8px 16px 8px 10px;
        border: 1px solid #ddd6fe;
        border-radius: 999px;
        background: #fff;
        font-size: .9rem;
        line-height: 1.3;
    }

    .resume-user-ico {
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #9575cd, #7e57c2);
        color: #fff;
    }

    /* ===== หน้าแจ้งผลเข้าสู่ระบบด้วย ThaID ไม่ผ่าน (process.php tpage=regist-login-thaid) ===== */
    .thaid-result {
        max-width: 560px;
        margin: 0 auto;
    }

    .thaid-result .form-card-body {
        padding: 32px 24px;
        gap: 14px;
    }

    .thaid-result-icon {
        width: 76px;
        height: 76px;
        margin: 0 auto 4px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
        color: #b45309;
        background: #fef3c7;
        box-shadow: 0 0 0 8px #fffbeb;
    }

    .thaid-result-title {
        margin: 0;
        font-size: 1.35rem;
        font-weight: 700;
        color: #4c1d95;
    }

    .thaid-result-detail {
        margin: 0;
        color: #374151;
        line-height: 1.6;
    }

    .thaid-result-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin-top: 6px;
    }

    @media (max-width: 575.98px) {
        .thaid-result-actions .btn {
            width: 100%;
        }
    }

    .consent-list {
        margin: 0;
        padding-left: 1.25rem;
        color: #374151;
        font-size: .95rem;
        line-height: 1.6;
    }

    .consent-list li + li {
        margin-top: .5rem;
    }

    .consent-list a {
        word-break: break-all;
    }

    .sub-head + .term-row {
        margin-top: .4rem;
    }

    .term-row + .term-row {
        margin-top: .5rem;
    }

    .term-tag {
        display: inline-flex;
        align-items: center;
        min-height: calc(1.5em + 1.3rem + 2px);
        min-width: 7rem;
        padding: 0 .75rem;
        border-radius: 999px;
        background: var(--accent-50, #f5f3ff);
        color: #5e35b1;
        font-size: .85rem;
        font-weight: 600;
        white-space: nowrap;
    }

    @media (max-width: 991.98px) {
        .term-tag {
            min-height: 0;
            padding: .15rem .7rem;
        }
    }

    /* 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;
    }

    /* warning box (รอดำเนินการ/รอตรวจสอบ) */
    .alert-warn-box {
        background: #fffbeb;
        color: #7a4b00;
        border: 1px solid #fde68a;
        border-radius: 12px;
        padding: 12px 14px;
        margin: 12px 0;
    }

    /* success box */
    .alert-success {
        background: #edf8ed;
        color: #09421b;
        border: 1px solid #abdbb6;
        border-radius: 12px;
        padding: 10px 12px;
        margin: 12px 0;
    }

    .alert-success 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: 767.98px) {
    .responsive-btn {
      width: 100%;
    }
  }

  /* PC: อัตโนมัติ */
  @media (min-width: 768px) {
    .responsive-btn {
      width: auto;
    }
  }

    /* ===== หน้าเมนูหลักหลังล็อกอิน apply_home.php (2026-09-22)
       .home-hero     = แถบหัว + ชื่อผู้สมัคร/Reg ID
       .round-card    = การ์ดต่อรอบ TCAS (.is-active = รอบที่เน้นตาม $activeRound: ขอบม่วง + กางไว้)
       .round-head    = ปุ่มหัวการ์ด (Bootstrap collapse) → .round-num / .round-title / .round-dates / .round-status / .round-chev
       .panel         = กล่องย่อย "การสมัคร" / "การประกาศผล" ในการ์ด
       .btn-apply-main     = ปุ่มสมัครหลัก (.is-disabled = ยังไม่เปิด)
       .action-item   = ลิงก์รายการ (.is-disabled ยังไม่เปิด, .action-final ประกาศผลผู้ยืนยันสิทธิ์ สีเขียว, .action-apply ลิงก์สมัคร) ===== */
    .home-hero {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px 20px;
        padding: 18px 22px;
        margin-bottom: 18px;
        border: 1px solid #ddd6fe;
        border-radius: 18px;
        background: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 45%, #ffffff 100%);
    }

    .home-title {
        margin: 0;
        font-size: 1.35rem;
        font-weight: 700;
        line-height: 1.3;
        color: #4c1d95;
    }

    .home-sub {
        margin: .25rem 0 0;
        font-size: .92rem;
        color: #6b7280;
    }

    .home-user {
        display: inline-flex;
        align-items: center;
        gap: .6rem;
        padding: 8px 16px 8px 10px;
        border: 1px solid #ddd6fe;
        border-radius: 999px;
        background: #fff;
        color: #374151;
        font-size: .92rem;
        line-height: 1.3;
    }

    .home-user-ico {
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #9575cd, #7e57c2);
        color: #fff;
    }

    .home-user b {
        font-weight: 600;
        color: #111827;
    }

    .home-user small {
        color: #6b7280;
    }

    .round-stack {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .round-card {
        background: #fff;
        border: 1px solid var(--border, #e5e7eb);
        border-radius: 18px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(2, 6, 23, .05);
        overflow: hidden;
    }

    .round-card.is-active {
        border-color: #a78bfa;
        box-shadow: 0 0 0 3px rgba(124, 58, 237, .12), 0 12px 32px rgba(76, 29, 149, .12);
    }

    .round-head {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        padding: 14px 18px;
        border: 0;
        background: #fff;
        color: inherit;
        font: inherit;
        text-align: left;
        cursor: pointer;
        transition: background .15s ease;
    }

    .round-head:hover {
        background: #faf9ff;
    }

    .round-head:focus-visible {
        outline: 3px solid rgba(124, 58, 237, .35);
        outline-offset: -3px;
    }

    .round-card.is-active .round-head {
        background: linear-gradient(90deg, #f5f3ff, #fff);
    }

    .round-num {
        flex: 0 0 auto;
        width: 46px;
        height: 46px;
        border-radius: 14px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        line-height: 1;
        background: #f3f4f6;
        color: #6b7280;
        font-weight: 700;
    }

    .round-num small {
        font-size: .62rem;
        font-weight: 500;
        letter-spacing: .02em;
    }

    .round-num span {
        font-size: 1.3rem;
    }

    .round-card.is-active .round-num {
        background: linear-gradient(135deg, #9575cd, #7e57c2);
        color: #fff;
        box-shadow: 0 2px 6px rgba(126, 87, 194, .35);
    }

    .round-title {
        flex: 1 1 auto;
        min-width: 0;
    }

    .round-name {
        display: block;
        font-size: 1.05rem;
        font-weight: 700;
        line-height: 1.3;
        color: #111827;
    }

    .round-card.is-active .round-name {
        color: #4c1d95;
    }

    .round-now {
        display: inline-block;
        vertical-align: middle;
        margin-left: .35rem;
        padding: 2px 9px;
        border-radius: 999px;
        background: #6d28d9;
        color: #fff;
        font-size: .72rem;
        font-weight: 600;
        line-height: 1.4;
    }

    .round-dates {
        display: block;
        margin-top: 2px;
        font-size: .88rem;
        color: #6b7280;
    }

    .round-dates b {
        font-weight: 500;
        color: #374151;
    }

    .round-status {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: .4rem;
        padding: 4px 11px;
        border-radius: 999px;
        font-size: .8rem;
        font-weight: 600;
        white-space: nowrap;
    }

    .round-status::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: currentColor;
    }

    .status-open {
        background: #dcfce7;
        color: #166534;
    }

    .status-soon {
        background: #fef3c7;
        color: #92400e;
    }

    .status-closed {
        background: #f3f4f6;
        color: #6b7280;
    }

    .status-ext {
        background: #e0f2fe;
        color: #075985;
    }

    .round-chev {
        flex: 0 0 auto;
        color: #9ca3af;
        transition: transform .2s ease;
    }

    .round-head[aria-expanded="true"] .round-chev {
        transform: rotate(180deg);
    }

    .round-body {
        padding: 14px 18px 18px;
        border-top: 1px solid var(--border, #e5e7eb);
    }

    .panel {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 14px 16px;
        border: 1px solid var(--border, #e5e7eb);
        border-radius: 14px;
        background: #fafafa;
    }

    .panel-title {
        display: flex;
        align-items: center;
        gap: .5rem;
        margin: 0 0 2px;
        font-size: 1rem;
        font-weight: 700;
        color: #4c1d95;
    }

    .panel-title i {
        color: #7c3aed;
    }

    .panel-divider {
        margin: 2px 0;
        border: 0;
        border-top: 1px dashed #d1d5db;
        opacity: 1;
    }

    .panel-empty {
        display: flex;
        align-items: center;
        gap: .75rem;
        padding: 14px;
        border: 1px dashed #d1d5db;
        border-radius: 12px;
        background: #fff;
        color: #6b7280;
        font-weight: 500;
    }

    .panel-empty i {
        font-size: 1.4rem;
        color: #9ca3af;
    }

    .panel-empty small {
        font-weight: 400;
    }

    .btn-apply-main {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .6rem;
        padding: 13px 18px;
        border-radius: 12px;
        background: linear-gradient(135deg, #7c3aed, #6d28d9);
        color: #fff;
        font-size: 1.05rem;
        font-weight: 600;
        text-align: center;
        box-shadow: 0 6px 16px rgba(109, 40, 217, .3);
        transition: transform .15s ease, box-shadow .15s ease;
    }

    .btn-apply-main:hover,
    .btn-apply-main:focus-visible {
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(109, 40, 217, .35);
    }

    .btn-apply-main.is-disabled {
        pointer-events: none;
        background: #e5e7eb;
        color: #9ca3af;
        box-shadow: none;
    }

    .action-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .action-item {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 10px 12px;
        border: 1px solid var(--border, #e5e7eb);
        border-radius: 12px;
        background: #fff;
        color: #111827;
        font: inherit;
        text-align: left;
        text-decoration: none;
        transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    }

    .action-item:hover,
    .action-item:focus-visible {
        border-color: #a78bfa;
        box-shadow: 0 4px 14px rgba(124, 58, 237, .12);
        color: #111827;
        transform: translateY(-1px);
    }

    .action-ico {
        flex: 0 0 auto;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #ede9fe;
        color: #6d28d9;
        font-size: 1rem;
    }

    .action-text {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .action-label {
        font-weight: 600;
        line-height: 1.3;
    }

    .action-detail {
        font-size: .82rem;
        color: #b91c1c;
    }

    .action-sub {
        font-size: .82rem;
        color: #6d28d9;
    }

    .action-arrow {
        flex: 0 0 auto;
        color: #c4b5fd;
    }

    .action-apply .action-ico {
        background: linear-gradient(135deg, #9575cd, #7e57c2);
        color: #fff;
    }

    .action-apply .action-sub {
        color: #4b5563;
    }

    .action-final {
        background: #f0fdf4;
        border-color: #bbf7d0;
    }

    .action-final .action-ico {
        background: #dcfce7;
        color: #15803d;
    }

    .action-final .action-label {
        color: #14532d;
    }

    .action-final .action-arrow {
        color: #86efac;
    }

    .action-final:hover,
    .action-final:focus-visible {
        border-color: #4ade80;
        box-shadow: 0 4px 14px rgba(22, 163, 74, .15);
    }

    .action-item.is-disabled,
    .action-item:disabled {
        pointer-events: none;
        border-style: dashed;
        border-color: #e5e7eb;
        background: #f9fafb;
        color: #9ca3af;
        transform: none;
        box-shadow: none;
    }

    .action-item.is-disabled .action-ico,
    .action-item:disabled .action-ico {
        background: #f3f4f6;
        color: #9ca3af;
    }

    .action-item.is-disabled .action-label,
    .action-item.is-disabled .action-detail,
    .action-item.is-disabled .action-sub,
    .action-item.is-disabled .action-arrow,
    .action-item:disabled .action-label,
    .action-item:disabled .action-detail,
    .action-item:disabled .action-sub,
    .action-item:disabled .action-arrow {
        color: #9ca3af;
    }

    .action-item[aria-expanded="true"] .action-arrow {
        transform: rotate(180deg);
    }

    .fac-list {
        padding-left: 1.2rem;
        font-size: .9rem;
    }

    .fac-list a {
        word-break: break-all;
    }

    @media (max-width: 767.98px) {
        .home-hero {
            padding: 16px;
        }

        .home-title {
            font-size: 1.15rem;
        }

        .round-head {
            flex-wrap: wrap;
            gap: 10px 12px;
            padding: 12px 14px;
        }

        .round-title {
            flex: 1 1 0;
        }

        .round-chev {
            order: 3;
        }

        /* ตัวคั่นบรรทัด: ดันป้ายสถานะลงบรรทัดใหม่โดยไม่ยืดเต็มกว้าง */
        .round-head::after {
            content: "";
            order: 3;
            flex-basis: 100%;
            height: 0;
        }

        .round-status {
            order: 4;
            flex: 0 0 auto;
            margin-left: 58px;
        }

        .round-body {
            padding: 12px 14px 14px;
        }

        .panel {
            padding: 12px;
        }
    }


/* SweetAlert2: ให้หัวข้อยาว ๆ ขึ้นบรรทัดใหม่ภายในกรอบ ไม่ล้นออกนอก popup */
.swal2-popup {
    width: min(600px, calc(100vw - 16px)) !important;
}

.swal2-title {
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    line-height: 1.4 !important;
    font-size: clamp(16px, 3.5vw, 22px) !important;
}

.swal2-html-container {
    white-space: normal !important;
    overflow-wrap: break-word !important;
}
