@font-face {
	font-family: 'Sarabun';
	src: url('fonts/Sarabun-Regular.ttf');
	-fs-pdf-font-embed: embed;
	-fs-pdf-font-encoding: Identity-H;
}

body {
	/*font-family: 'Sarabun', sans-serif;*/
	font-family: system-ui, -apple-system, BlinkMacSystemFont, Roboto,
		Helvetica, Arial, sans-serif;
	margin: 0;
	background: linear-gradient(#dfeee8 15%, #0000) no-repeat;
	color: #333;
}

body, input, textarea, select, button {
	/* font-size: 0.9rem; */
	/*font-family: 'Sarabun', sans-serif;*/
	font-family: system-ui, -apple-system, BlinkMacSystemFont, Roboto,
		Helvetica, Arial, sans-serif;
	font-size: 1rem;
	font-weight: 400;
}

.header {
	background-color: #0f4005;
	color: white;
	padding: 20px;
	text-align: center;
	display: flex;
}

.header h1 {
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	flex: 1;
	left: 50%;
	transform: translateX(-50%);
	margin: 0;
}

.header span {
	display: flex;
}

.header-left {
	display: flex;
	align-items: center;
	flex: 1;
	gap: 0.4rem;
}

.navbar {
	background-color: #fff;
	border-bottom: 1px solid #ddd;
	padding: 10px 20px;
	display: flex;
	gap: 20px;
}

.navbar a {
	text-decoration: none;
	color: #444;
}

.navbar a.highlight-link {
	color: #434A8D;
	font-weight: bold;
}

.main-content {
	padding: 20px;
	position: relative;
	height: fit-content;
	z-index: 1;
}

/*.summary-section {
	display: flex;
	gap: 20px;
	margin-bottom: 30px;
}

.summary-section p {
	margin: 0;
}

.card {
	background: white;
	padding: 20px;
	border-radius: 8px;
	flex: 1;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	text-align: center;
}

.card-link, .btn {
	display: inline-block;
	text-decoration: none;
	padding: 8px 12px;
	border-radius: 4px;
}

.card-link {
	color: #434A8D;
}*/
.summary-section {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 5px;
}

.summary-section.grid-template-columns-5 {
	grid-template-columns: repeat(5, 1fr);
}

.summary-section .card {
	padding: 12px;
	border: 1px solid #dedede;
	background: #fff;
	cursor: pointer;
	border-radius: 12px;
	text-align: left;
	padding: 12px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.summary-section .card h2 {
	font-feature-settings: "tnum" on, "lnum" on;
	font-style: normal;
	white-space: nowrap;
	width: fit-content;
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
	display: block;
	margin: 0;
	padding: 0;
}

.summary-section .card h2 a {
	text-decoration: none;
}

.summary-section .card .stats {
	font-feature-settings: "tnum" on, "lnum" on;
	font-style: normal;
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	display: block;
}

.summary-section .card .stat {
	align-items: center;
	display: flex;
	justify-content: space-between;
	height: 22px;
	gap: 0.4rem;
}

.summary-section .card .count {
	border-radius: 50px;
	background-color: #007bff;
	color: #fff;
	padding: 0.2rem 0.5rem;
	font-weight: 400;
}

.summary-section .card .title {
	color: #9a9a9a;
	margin-right: 3px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-right: 3px;
}

.btn-create {
	background-color: #43a047;
	color: white;
}

table {
	width: 100%;
	border-collapse: collapse;
	background-color: #fff;
	/* border-radius: 8px; */
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
	table-layout: fixed;
}

table th, table td {
	padding: .7rem .7rem;
	text-align: left;
	/*border-bottom: 1px solid #e5e5e5;*/
	/* border-right: 1px solid #ddd; */
	white-space: nowrap;
}

table.inline td {
	padding: 0.05rem;
	/* background-color: #fbfbfb; */
}

table.inline span.flex-content {
	padding: .7rem .7rem;
	color: #888;
}

table.inline td.align-right span {
	padding: 0 0.8rem;
}

span.span-locked {
	color: #c8c8c8;
}

table.inline button {
	background-color: #fff;
}

table.inline tfoot td {
	padding: 0.8rem 1rem;
}

.total label, .total span {
	color: #434A8D;
}

.total a {
	color: #000;
	/* สีน้ำเงินสวย สดใส แต่ไม่จัดจ้าน */
	text-decoration: none;
	/* เอาเส้นขีดใต้ลิงก์ออก */
	transition: color 0.3s ease;
	cursor: pointer;
}

.total a label {
	cursor: pointer;
}

.total a:hover, .total a:focus {
	color: #2a358d;
	text-decoration: underline;
}

tfoot .total-row td .form-group, tfoot .total-row td .form-group label,
	tfoot .total-row td .form-group span {
	margin-bottom: 0;
}

tfoot .total-row td:first-child {
	font-weight: bold;
}

table.inline td.align-right {
	padding: 0 0;
}

table td {
	text-overflow: ellipsis;
	overflow: hidden;
	/*white-space: nowrap;*/
	color: #141414;
	font-weight: 400;
	line-height: 1;
	font-size: .875rem;
}

.fixed-table-body tbody tr:nth-child(odd), table tbody tr:nth-child(odd)
	{
	/* background-color: #f5f6f8; */
	
}

table td span.flex-content {
	color: #888;
}

table th {
	background-color: #fff;
	font-weight: 400;
	color: #9a9a9a;
	font-size: .875rem;
}

table th a::after {
	content: " ";
	width: 1.5em;
	display: inline-block;
	width: 1.5em;
	position: absolute;
	text-align: center;
}

table th a.hovered::after {
	content: "▼";
}

table th a.active {
	font-weight: 400;
	color: #239825;
	border-bottom-color: #239825;
}

table th a.active::after {
	color: #d35400;
}

table th a.active.asc::after {
	content: "▼";
}

table th a.active.desc::after {
	content: "▲";
}

table th a:hover, table td a:hover {
	font-weight: 400;
	color: #239825;
	border-bottom-color: #239825;
}

table th a.active.asc:hover::after {
	content: "▲";
}

table th a.active.desc:hover::after {
	content: "▼";
}

table th a.hovered::after {
	color: #f6b093;
	transition: background-color 0.3s ease;
}

table th a.clicked.active.asc:hover::after {
	content: "▼";
}

table th a.clicked.active.desc:hover::after {
	content: "▲";
}

table th a.clicked.hovered::after {
	color: #d35400;
	transition: none;
}

table th {
	border-bottom: 2px solid #e5e5e5;
	transition: border-color 0s ease, transform 0.3s ease;
	/*white-space: nowrap;
	word-wrap: break-word;*/
}

table th.hovered-border {
	border-color: #239825;
	transform-origin: center bottom;
	/* ยืดจากตรงกลางล่าง */
}

table th.active-border {
	border-color: #239825;
	transform: scaleY(1.1);
	/* ขยายเล็กน้อยในแกน Y ให้ดูเหมือนยืด */
	transform-origin: center bottom;
	/* ยืดจากตรงกลางล่าง */
}

.fixed-table-wrapper {
	width: 100%;
	overflow-x: auto;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border-radius: 12px;
	border: 1px solid #e5e5e5;
	display: flex;
	height: fit-content;
}

.fixed-table-frozen {
	flex: 0 0 50px; /* ความกว้างคอลัมน์ frozen */
	border-right: 1px solid #ccc;
	background: #f9f9f9;
	border-collapse: collapse;
	width: 100%;
	box-sizing: border-box; /* ทำให้ padding+border รวมใน height */
}

.fixed-table-frozen table th, .fixed-table-frozen table td {
	border-right: none;
}

.fixed-table, .fixed-table-header {
	background-color: #ebecf1;
	box-sizing: border-box;
	border: 0px solid #ebecf1;
	/* border-radius: 8px; */
	border-collapse: collapse;
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.fixed-table thead, .fixed-table tbody, .fixed-table tr,
	.fixed-table-header thead, .fixed-table-header tbody,
	.fixed-table-header tr, .fixed-table-body thead, .fixed-table-body tbody,
	.fixed-table-body tr {
	background-color: #fff;
}

.fixed-table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
}

.fixed-table-body-wrapper {
	overflow-y: auto;
	max-height: 480px;
	background-color: #eee;
	/* border: 1px solid #d0d0d0; */
	box-sizing: border-box; /* ทำให้ padding+border รวมใน height */
}

/* ✅ Border-radius */
.fixed-table-header {
	border-bottom-left-radius: 0px;
	border-bottom-right-radius: 0px;
}

/* ✅ ใส่ border-radius เฉพาะแถวล่างสุด */
.fixed-table-body {
	border-top-left-radius: 0px;
	border-top-right-radius: 0px;
}

.btn {
	padding: 0 1rem;
	border: 1px solid #0f4005;
	background: #fff;
	cursor: pointer;
	margin-right: .5rem;
	border-radius: 4px;
	/* height: 36px; */
	/*min-width: 36px;*/
	/* line-height: 36px; */
	font-size: .875rem;
	letter-spacing: .057em;
	transition: box-shadow .42s cubic-bezier(.165, .84, .44, 1), color .42s
		cubic-bezier(.165, .84, .44, 1), background .42s
		cubic-bezier(.165, .84, .44, 1);
	height: 2.5rem;
	line-height: 2.5;
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	min-width: 5rem;
	justify-content: center;
}

.btn:hover {
	/* background-color: #eaeaea; */
	box-shadow: inset 0 0 0 1px #0f4005;
}

.btn.btn-export {
	display: inline-block;
	margin: 1rem 1rem 0 0;
	padding: 0.6rem 1.2rem;
	background: #009688;
	color: white;
	border: none;
	border-radius: 5px;
	text-decoration: none;
}

.export-buttons {
	margin-bottom: 20px;
}

.export-buttons .btn {
	display: inline-block;
	padding: 8px 16px;
	text-decoration: none;
	border-radius: 5px;
	margin-right: 10px;
	font-weight: bold;
	transition: background 0.3s;
}

.btn.pdf {
	background-color: #e74c3c;
	color: white;
}

.btn.pdf:hover {
	background-color: #c0392b;
}

.btn.excel {
	background-color: #27ae60;
	color: white;
}

.btn.excel:hover {
	background-color: #1e8449;
}

.filter-form label {
	margin-right: 5px;
}

.error {
	color: red;
	font-size: small;
	left: 0.5rem;
	padding: 0.4rem !important;
	height: 0.5rem !important;
	display: none !important;
	z-index: 99;
}

.inline .error {
	color: red;
	position: absolute;
	bottom: 0.5rem;
}

.error.invalid {
	display: block !important;
}

input.error::placeholder {
	color: red;
	opacity: 1;
	/* Firefox */
}

input.invalid, select.invalid, textarea.invalid, canvas.invalid {
	border: 1px solid red !important;
}

.container {
	width: 90%;
	max-width: 1200px;
	margin: 40px auto;
	background: #fff;
	padding: 2rem;
	border-radius: 12px;
	border: 1px solid #e5e5e5;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.container>p {
	padding: 0.8rem 1rem;
	text-align: left;
	border-bottom: 1px solid #ddd;
	margin: 0;
}

.container>.form-actions>p {
	padding: 0.8rem 1rem;
	text-align: left;
	margin: 0;
}

.container strong {
	display: inline-block;
	width: 10rem;
}

.form-row {
	display: flex;
	flex-wrap: wrap;
}

.form-group {
	margin-bottom: 0.8rem;
	display: flex;
	align-items: center;
	position: relative;
	gap: 2rem;
}

@media ( max-width : 600px) {
	.form-group {
		flex: 1 1 100%;
	}
}

label {
	display: block;
	margin-bottom: 0.5rem;
	color: #444;
}

.form-group>span {
	margin-bottom: 0.4rem;
	padding: 0 0.8rem;
	height: 1.5rem;
	line-height: 1.5;
	display: flex;
	font-size: .875rem;
	/* align-items: center; */
}

.form-group>span.flex-content {
	color: #888;
	display: flex;
	align-items: center;
	margin-bottom: 0;
	font-size: .875rem;
}

.form-group>span.flex-content.picker {
	width: 250px;
	justify-content: space-between;
	gap: 0.4rem; /* ✅ เพิ่มระยะห่างระหว่างข้อความกับปุ่ม */
}

.form-group>span.flex-content.picker>span {
	white-space: nowrap; /* ✅ ไม่ตัดบรรทัด */
	overflow: hidden; /* ✅ ซ่อนข้อความที่เกิน */
	text-overflow: ellipsis; /* ✅ แสดง ... */
}

.form-group label {
	width: 10rem;
	padding-left: 1rem;
	flex: none;
	/* white-space: pre; */
	font-size: .875rem;
	align-items: center;
	display: flex;
	line-height: 1rem;
	gap: 0.2rem;
}

.form-group .form-sub-group label {
	padding-left: 0;
}

.form-group .sub-label {
	width: 2rem;
}

input, textarea, select {
	box-sizing: border-box;
	padding: 0.6rem 0.8rem;
	border: 1px solid #ccc;
	border-radius: 8px;
	/* font-size: 1rem; */
	height: 2.5rem;
	min-height: 2.5rem;
	margin-right: 4rem;
	box-sizing: border-box;
	flex: none;
	z-index: 99;
	font-size: .875rem;
}

textarea {
	height: 5.5rem;
	min-height: 5.5rem;
}

input, select {
	width: 250px;
}

textarea {
	min-width: 250px;
}

.select-wrapper {
	position: relative;
	border: 1px solid #ccc;
	border-radius: 8px;
	padding: 0;
	height: 2.5rem;
	display: flex;
	align-items: center;
	margin-right: 4rem;
	width: 250px;
	flex: none;
}

/* ปรับ select เองให้โปร่ง */
.select-wrapper select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	border: none;
	padding: 0rem 2rem 0rem 0.8rem;
	height: 100%;
	box-sizing: border-box;
	margin-right: 0;
	-webkit-appearance: none;
	-moz-appearance: none;
	width: 100%;
	line-height: 1.5;
}

/* ลูกศร */
.select-wrapper::after {
	content: "▾";
	position: absolute;
	right: 0.8rem;
	pointer-events: none;
	color: #666;
	font-size: 1.5rem;
	z-index: 100;
}

.form-sub-group input, .form-sub-group textarea, .form-sub-group select,
	.form-sub-group .select-wrapper {
	margin-right: 0;
	width: auto;
}

input[type='checkbox'], input[type='radio'] {
	height: auto;
	min-height: auto;
}

table.inline input, table.inline textarea {
	height: 35px;
	border-radius: 4px;
	min-height: 35px;
	margin-right: 0;
	width: 100%;
	/*font-family: 'Sarabun', sans-serif;*/
	font-family: system-ui, -apple-system, BlinkMacSystemFont, Roboto,
		Helvetica, Arial, sans-serif;
	border: 1px solid #ccc;
}

table.inline .select-wrapper {
	height: 33px;
	border-radius: 4px;
	min-height: 33px;
	margin-right: 0;
	width: 98%;
}

table.inline .select-wrapper select {
	min-height: 33px;
	line-height: 1.5rem;
}

table.inline .checkbox-wrapper {
	height: 33px;
	min-height: 33px;
	margin-right: 0;
	width: 100%;
}

textarea, .form-group>span.textarea {
	resize: block;
	line-height: 1.4rem;
	white-space: pre-line;
	height: auto;
}

.form-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 1rem 1rem;
}

.btn-submit {
	background: #239825;
	color: white;
	padding: .75rem 1rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	/* height: 36px; */
	/* min-height: 36px; */
	line-height: 1.286;
	letter-spacing: .057em;
	transition: box-shadow .42s cubic-bezier(.165, .84, .44, 1), color .42s
		cubic-bezier(.165, .84, .44, 1), background .42s
		cubic-bezier(.165, .84, .44, 1);
	min-width: 5rem;
	justify-content: center;
}

.btn-submit:hover {
	box-shadow: inset 0 0 0 2px #fff;
}

.btn-cancel {
	background: transparent;
	color: #888;
	text-decoration: none;
	padding: 0.75rem 1.5rem;
}

td a, td button, th a {
	display: inline-block;
	/*margin: 0 1rem;*/
	/* font-size: 0.9rem; */
	text-decoration: none;
	/* border-radius: 6px; */
	border: none;
	cursor: pointer;
	white-space: nowrap;
	box-sizing: border-box;
	color: #9a9a9a;
	/* border-radius: 4px; */
	position: relative;
	font-weight: 400;
	text-decoration: none;
	line-height: 1.555;
}

th a {
	padding: 0;
}

td a.btn {
	background-color: #007bff;
	color: white;
}

td a.btn-danger {
	background-color: #dc3545;
}

td a.btn-success {
	background-color: #28a745;
}

td a.btn:hover {
	opacity: 0.85;
}

.alert {
	padding: 1rem;
	margin: 1rem 0;
	border-radius: 8px;
	/*font-size: 1rem;*/
	font-weight: 500;
}

.alert-success {
	background-color: #e6ffed;
	border: 1px solid #28a745;
	color: #155724;
}

.alert-danger {
	background-color: #ffe6e6;
	border: 1px solid #dc3545;
	color: #721c24;
}

h2, h3 {
	margin: 1rem 0;
	color: #444;
}

.rating-box {
	/*font-size: 1.5em;*/
	color: #f39c12;
	margin-bottom: 20px;
}

.review-list {
	list-style: none;
	padding-left: 0;
}

.review-list li {
	padding: 10px 0;
	border-bottom: 1px solid #ddd;
}

.review-date {
	/*font-size: 0.9em;*/
	color: #777;
}

ul {
	list-style: none;
	padding: 0;
}

li {
	background: white;
	padding: 10px 15px;
	margin-bottom: 8px;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pagination {
	margin: 0.5rem;
	text-align: center;
	width: fit-content;
	float: right;
	align-items: center;
	justify-content: end;
}

.pagination span, .pagination a {
	display: inline-flex;
	position: relative;
}

.pagination.page-list {
	margin: -1.5rem 1.5rem 0rem 0;
	text-align: right;
	width: auto;
	float: none;
	border-bottom: 1px solid #f0f0f0;
}

.pagination.page-list .pagination-form-wrapper {
	margin-top: 0;
}

.pagination a, .pagination>button {
	margin: 0 5px;
	text-decoration: none;
	padding: 5px 10px;
	background: #fff;
	border-radius: 5px;
	color: #333;
	border: 1px solid #cccccc;
	transition: box-shadow .42s cubic-bezier(.165, .84, .44, 1), color .42s
		cubic-bezier(.165, .84, .44, 1), background .42s
		cubic-bezier(.165, .84, .44, 1);
}

.pagination a:hover, .pagination>button:hover {
	box-shadow: inset 0 0 0 1px #cccccc
}

.pagination a.active, .pagination>button.active {
	background: #333;
	color: white;
	font-weight: bold;
}

.pagination span.seperate {
	padding: 0 0.5rem;
	color: #c0c0c0;
	margin-bottom: 0.8rem;
}

.search-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}

.search-grid label {
	display: inline-block;
	margin-bottom: 0.25rem;
	/*font-weight: bold;*/
	width: 8rem;
	flex: none;
}

.search-grid .form-sub-group {
	display: flex;
	align-items: center;
	gap: 8px;
}

.search-grid label.sub-label {
	display: inline-block;
	margin: 0 0.25rem;
	font-weight: bold;
	width: 2rem;
	text-align: center;
}

.search-grid input {
	flex: 1;
	width: 12rem;
}

.search-grid .select-wrapper, .search-grid select {
	flex: 1;
	width: 11.9rem;
}

.search-grid .form-group {
	display: flex;
	gap: 1px;
	align-items: center;
	flex-wrap: wrap;
	margin-right: 1rem;
}

.pagination-form-wrapper {
	display: inline-flex;
	margin-top: 0;
}

.pagination-form {
	display: flex;
	justify-content: end;
}

.pagination-fields {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	align-items: baseline;
}

.pagination-fields label {
	flex: none;
	/*font-size: 0.9rem;*/
	color: #333;
	margin-bottom: 0;
}

.pagination-fields label span {
	padding-right: 0.5rem;
}

.pagination-fields input[type="number"] {
	padding: 0.4rem 0.6rem;
	/*font-size: 1rem;*/
	border: 1px solid #ccc;
	border-radius: 0.5rem;
	width: 100px;
	text-align: center;
	height: 1.8rem;
	min-height: 1.8rem;
	margin-right: 0;
}

.pagination-fields button {
	padding: 0 16px;
	/* font-size: 1rem; */
	background-color: #239825;
	color: white;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: box-shadow .42s cubic-bezier(.165, .84, .44, 1), color .42s
		cubic-bezier(.165, .84, .44, 1), background .42s
		cubic-bezier(.165, .84, .44, 1);
	height: 36px;
	min-height: 36px;
	line-height: 36px;
	box-shadow: none;
	width: auto;
}

.pagination-fields button:hover {
	/* background-color: #050b52; */
	box-shadow: inset 0 0 0 2px #fff;
}

.center {
	text-align: center;
}

input[type="checkbox"], table.inline input[type="checkbox"], input[type="radio"]
	{
	width: 18px;
	height: 18px;
	cursor: pointer;
	margin: auto;
}

.w-30 {
	width: 30px;
}

.w-50 {
	width: 50px;
}

.w-100 {
	width: 100px;
}

.w-150 {
	width: 150px;
}

.w-200 {
	width: 200px;
}

.w-250 {
	width: 250px;
}

.w-280 {
	width: 280px;
}

input.w-440, textarea.w-440 {
	width: 440px;
}

/* ---------- Main Menu ---------- */
.main-menu {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: #f7f7f7;
	padding: 0 24px;
	height: 56px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 99;
}

.menu-left, .menu-right {
	display: flex;
	align-items: center;
	gap: 22px;
}

.main-menu a, .notif-wrapper button {
	color: #1d1d1d;
	text-decoration: none;
	font-weight: 400;
	padding: 8px 12px;
	border-radius: 6px;
	transition: background 0.3s ease;
	font-size: .875rem;
	display: flex;
	gap: 0.4rem;
	align-items: flex-end;
}

.main-menu a svg, .notif-wrapper button svg {
	width: 20px;
	height: 20px;
}

.notif-wrapper button {
	display: flex;
	gap: 0.4rem;
}

.main-menu .menu-right {
	color: #1d1d1d;
	text-decoration: none;
	font-weight: 400;
	padding: 8px 12px;
	border-radius: 6px;
	transition: background 0.3s ease;
	font-size: .875rem;
}

.notif-wrapper svg {
	position: relative;
	/*top: 0.3rem;*/
}

.main-menu a:hover, .notif-wrapper button:hover {
	background-color: #97de95;
	color: #434A8D;
}

/* ---------- Dropdown ---------- */
.dropdown {
	position: relative;
}

/*.dropdown>a::after {
	content: " ▼";
	font-size: 0.8rem;
}*/
.dropdown-content {
	display: none;
	position: absolute;
	top: 2.2rem;
	left: 0;
	background-color: #f7f7f7;
	min-width: 180px;
	padding: 0;
	border-radius: 10px;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
	flex-direction: column;
	z-index: 99;
	transition: opacity 0.2s ease;
}

.dropdown-content a {
	color: #2c3e50;
	padding: 10px 20px;
	font-size: 15px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
	border-left: 4px solid transparent;
}

.dropdown-content a:hover {
	background-color: #97de95;
	border-left: 4px solid #3e7115;
	color: #434A8D;
	font-weight: 500;
}

/*.menu-left>.dropdown:hover .dropdown-content {
	display: flex;
}*/
.dropdown:hover>.dropdown-content {
	display: flex;
}

.dropdown:hover>.dropdown-content .dropdown:hover .dropdown-content.grid-layout {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.menu-right>.dropdown:hover .dropdown-content {
	display: flex;
}

.menu-right .dropdown-content {
	left: auto;
	right: 0;
}

.more-menu>a {
	cursor: pointer;
	text-align: center;
}

.more-menu>.dropdown-content {
	align-items: center;
	flex-direction: column;
	width: max-content;
	background-color: #f7f7f7;
	align-items: flex-start;
	height: max-content;
	border-radius: 0;
	top: 2rem;
}

.more-menu>.dropdown-content .dropdown {
	width: 100%;
}

.more-menu>.dropdown-content .dropdown-content {
	top: 0;
	left: 10rem;
	border-radius: 0;
}

@media ( max-width : 768px) {
	.main-menu {
		flex-direction: column;
		align-items: flex-start;
		padding: 12px;
		height: auto;
	}
	.menu-left, .menu-right {
		flex-direction: column;
		width: 100%;
		gap: 10px;
	}
}

.notif-wrapper {
	position: relative;
	display: inline-block;
}

.notif-button {
	background-color: transparent;
	border: none;
	/*font-size: 1rem;*/
	cursor: pointer;
}

.notif-badge {
	background-color: red;
	color: white;
	border-radius: 999px;
	padding: 0.1rem 0.5rem;
	/*font-size: 0.8rem;*/
	margin-left: 0.3rem;
}

.notif-wrapper.empty .notif-badge {
	background-color: #9a9a9a;
}

.notif-dropdown {
	right: 0;
	width: 300px;
	max-height: 400px;
	overflow-y: auto;
	position: absolute;
	top: 2.5rem;
	background-color: #fff8f2;
	/* ครีมอ่อน */
	min-width: 180px;
	padding: 0;
	border-radius: 10px;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
	flex-direction: column;
	z-index: 99;
	transition: opacity 0.2s ease;
}

.notif-item {
	border-bottom: 1px solid #eee;
}

.menu-right a.notif-link {
	display: block;
	padding: 0.75rem;
	color: #333;
	text-decoration: none;
	transition: background 0.2s;
	cursor: pointer;
}

.notif-link:hover {
	background-color: #f9f9f9;
}

.notif-title {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	margin: 0 0 6px 0;
	margin: 0 0.4rem 0 0;
	font-size: .875rem;
	gap: 0.4rem;
}

.notif-title .timeago {
	color: #999;
	font-size: 12px;
}

.notif-message {
	font-size: 12px;
	color: #666;
}

.notif-empty {
	padding: 1rem;
	text-align: center;
	color: #888;
}

.notif-empty.empty {
	display: none;
}

.notif-wrapper.empty .notif-empty.empty {
	display: flex;
}

.notif-wrapper.empty .notif-empty.mark-all-as-read {
	display: none;
}

.notif-item .notif-div {
	display: block;
	padding: 0.75rem;
}

.notif-item .button-actions {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	justify-content: center;
	padding: 0.75rem;
}

.notif-item .button-actions .btn {
	min-height: fit-content;
	height: fit-content;
	line-height: 1;
	display: flex;
	align-items: center;
	gap: 0.4rem;
	justify-content: center;
}

.logout-link {
	color: red;
	font-weight: 500;
}

/* Submenu */
.submenu {
	display: none;
	background-color: #0f4005;
	padding: 10px 20px;
	/* border-bottom: 2px solid #434A8D; */
	min-height: 34px;
	box-shadow: 0 .2rem 3.2rem #0000000d;
	color: #fff;
}

.submenu.active {
	display: flex;
}

.submenu .dropdown {
	display: flex;
}

.submenu a {
	margin-right: 15px;
	color: #fff;
	font-weight: 500;
	text-decoration: none;
	padding: 6px 12px;
	border-radius: 4px;
	transition: background-color 0.3s ease;
}

.submenu a:hover {
	background-color: #97de95;
	color: #434A8D;
}

.submenu a.active {
	background-color: #434A8D;
	color: #fff;
	font-weight: bold;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.align-right {
	text-align: right;
}

.flex-1 .flex-content {
	display: flex;
	flex: 1;
	width: 250px;
	margin-right: 2.4rem;
	height: 2.5rem;
	line-height: 1.5rem;
	font-size: small;
	color: #888;
}

.sidebar {
	position: fixed;
	top: 40px;
	right: 40px;
	width: 180px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	padding: 1rem;
	height: fit-content;
	z-index: 10;
	overflow-y: auto;
}

.sidebar a {
	display: block;
	margin: 0.1rem;
	color: #333;
	font-weight: 500;
	text-decoration: none;
	padding: 0.5rem 0.8rem;
}

@media ( max-width : 1024px) {
	.sidebar {
		display: none;
		/* ซ่อนบนจอเล็ก */
	}
}

.sidebar a:hover, .sidebar a.active {
	color: #434A8D;
	border-left: 4px solid #434A8D;
	background: rgba(67, 74, 141, 0.05);
	border-radius: 6px;
}

.sidebar.collapsed {
	width: 60px;
	height: 30px;
	overflow-y: hidden;
}

.toggle-btn {
	background-color: #dee2e6;
	border: none;
	border-radius: 6px;
	padding: 0.5rem 1rem;
	cursor: pointer;
	transition: background 0.3s ease;
	width: 100%;
	display: flex;
	align-items: center;
	margin-bottom: 0.4rem;
}

.toggle-btn:hover {
	background-color: #ced4da;
}

.toggle-icon {
	font-size: 18px;
	line-height: 1;
}

.sidebar.collapsed .toggle-btn {
	justify-content: center;
}

.sidebar.collapsed a {
	display: flex;
	justify-content: center;
	align-items: center;
}

.sidebar.collapsed .label {
	display: none;
}

.sidebar .icon {
	font-size: 1.25rem;
	width: 24px;
	text-align: center;
}

.sidebar .label {
	transition: opacity 0.3s ease, transform 0.3s ease;
	padding-left: 0.8rem;
}

section {
	/* border-bottom: 1px solid #e5e5e5; */
	padding-bottom: 0.8rem;
	/* box-shadow: 0 0 8px rgba(5,10,82,.04),0 12px 24px rgba(5,10,82,.08); */
	/* padding: 20px 30px 40px; */
	/* background-color: #fff; */
}

section h2 {
	/*padding: 0.5rem 0 0 0;*/
	margin: 0.5rem 0 1rem;
}

small {
	color: #1a237e;
}

.note a {
	color: #000;
	text-decoration: none;
	transition: color 0.3s ease;
	cursor: pointer;
}

.note small a {
	color: #434A8D;
}

.note a:hover, .note a:focus, .note small a:hover, .note small a:focus {
	color: #2a358d;
	text-decoration: underline;
}

.filter-button {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.8rem 1rem;
	cursor: pointer;
	overflow: hidden;
	color: #333;
	background-color: #fff;
	border: 1px solid #0f4005;
	border-radius: 8px;
	padding: .75rem 1rem;
	font-size: 1rem;
	cursor: pointer;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: center;
	transition: background-color 0.2s;
	position: absolute;
	top: 1rem;
	right: 2rem;
	transition: box-shadow .42s cubic-bezier(.165, .84, .44, 1), color .42s
		cubic-bezier(.165, .84, .44, 1), background .42s
		cubic-bezier(.165, .84, .44, 1);
}

.filter-button:hover {
	box-shadow: inset 0 0 0 1px #0f4005;
}

.filter-button span {
	margin-left: 0.5rem;
}

/* Filter Form Container */
.filter-form {
	width: 100%;
	background: white;
	border-radius: 12px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
	box-sizing: border-box;
	position: relative;
	transition: opacity 0.4s ease, opacity 0.3s ease;
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	padding: 0 2rem;
	visibility: hidden;
	/* ยังไม่ให้ padding ด้านบนล่าง เพื่อไม่ให้กินพื้นที่ขณะซ่อน */
	pointer-events: none;
	/* ไม่ให้คลิกอะไรได้ในขณะซ่อน */
}

.filter-form.show {
	max-height: fit-content;
	/* ปรับตามความสูงที่ต้องการ */
	opacity: 1;
	padding: 2rem;
	/* เริ่มมี padding ด้านบน/ล่างเมื่อแสดง */
	pointer-events: auto;
	visibility: visible;
}

.filter-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 1.2rem;
}

.collapse-button {
	background: #fff;
	border: none;
	font-size: 1.2rem;
	cursor: pointer;
	position: absolute;
	right: 2rem;
	top: 2rem;
	transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.collapse-button:hover {
	background-color: #e0e0e0;
	color: #d00;
	transform: rotate(90deg);
}

.search-summary {
	background: #239825;
	padding: .5rem;
	font-weight: 400;
	/* line-height: 36px; */
	border: .1rem solid #dedede;
	border-radius: 8px;
	font-size: .875rem;
	color: #fff;
	margin-bottom: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
}

.search-summary .summary-item {
	background: #fff;
	padding: 0.4rem 0.75rem;
	border-radius: 17px;
	color: #434A8D;
	font-weight: 500;
}

.checkbox-wrapper {
	position: relative;
	padding: 0;
	height: 2.9rem;
	display: flex;
	align-items: center;
	margin-right: 4rem;
	width: 250px;
	flex: none;
}

.checkbox-wrapper input[type='checkbox'] {
	margin: 0;
}

.p-0 {
	padding: 0;
}

.clear {
	clear: both;
}

.fixed-table-body .image-card {
	background-color: #f9f9f9;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 0 4px rgba(0, 0, 0, 0.05);
	position: relative;
	height: 18px;
	width: auto;
}

.fixed-table-body .image-card img {
	width: auto;
	height: 100%;
	object-fit: cover;
}

#submenu-service-request a {
	margin-right: 0;
}

#submenu-service-request .dropdown-content {
	display: none;
	position: absolute;
	top: 40px;
	left: 0;
	/* ให้แสดงด้านขวา */
	background-color: #F5F1EE;
	min-width: 180px;
	padding: 0;
	border-radius: 10px;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
	flex-direction: column;
	z-index: 99;
	transition: opacity 0.2s ease;
}

#submenu-service-request .dropdown-content a {
	color: #2c3e50;
	padding: 10px 20px;
	font-size: 15px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
	border-left: 4px solid transparent;
}

#submenu-service-request .dropdown-content a:hover {
	background-color: #97de95;
	border-left: 4px solid #3e7115;
	color: #434A8D;
	font-weight: 500;
}

@media ( max-width : 768px) {
	.container {
		width: 95%;
		padding: 1rem;
		margin: 0 auto;
		box-shadow: none;
		border: none;
		height: fit-content;
	}
	.form-row {
		flex-direction: column;
	}
	.form-group, .checkbox-wrapper {
		width: 95%;
		margin-right: 0;
	}
	.form-group label, .form-group input, .form-group select, .form-group textarea,
		.select-wrapper {
		width: 100%;
		margin-right: 0;
		font-size: 16px;
	}
	.search-grid {
		grid-template-columns: 1fr;
	}
	.search-grid .form-group {
		display: block;
		width: 100%;
		overflow: hidden;
	}
	.search-grid input, .search-grid select {
		width: 100%;
	}
	.search-grid .form-sub-group {
		display: block;
	}
	.search-grid input.w-440 {
		width: 100%;
	}
	.pagination.page-list {
		margin: 0.5rem 1.5rem 0rem 0;
	}
	.pagination span.seperate {
		display: none;
	}
	.pagination-fields {
		flex-wrap: wrap-reverse;
		align-items: end;
		margin-top: 0.5rem;
	}
	.pagination-fields input[type="number"] {
		width: 80px;
		display: flex;
	}
	.page-list .pagination-fields input[type="number"] {
		display: inline-flex;
	}
	.filter-button {
		gap: 0;
		position: relative;
		top: 0;
		right: 0;
		margin: 0 0 0.5rem auto;
	}
	.fixed-table-body-wrapper {
		max-height: 400px;
		overflow-x: auto;
	}
	.main-menu {
		flex-direction: column;
		align-items: flex-start;
	}
	.menu-left, .menu-right {
		width: 100%;
		flex-direction: column;
	}
	.sidebar {
		display: none;
	}
	.form-group {
		display: block;
	}
	.form-group label {
		font-weight: bold;
		color: #333;
		font-size: small;
		padding: 0 0.8rem;
	}
	.form-group>span {
		display: none;
		margin-bottom: 0;
	}
	.form-group span.flex-content {
		/* กรณีคุณต้องการตกแต่งเพิ่มเติม */
		display: flex;
		color: #888;
		font-size: small;
	}
	.flex-1 .flex-content {
		font-size: small;
		color: #888;
	}
	/*#upload-form {
		display: block !important;
	}*/
	#upload-form #file-input {
		display: none;
	}
	#upload-form button {
		margin: 0.5rem 0;
	}
	.form-actions {
		margin: 1rem 1rem 1rem 0;
	}
	table.inline span {
		font-size: small;
	}
	.fixed-table thead th {
		font-size: small;
	}
	table td span.flex-content {
		color: #888;
		font-size: small;
	}
	.pagination-fields label span {
		font-size: small;
	}
	.pagination a, .pagination>button {
		font-size: small;
	}
	table th {
		font-size: small;
	}
	table td {
		font-size: small;
	}
}

/* ในไฟล์ style.css */
.hamburger {
	display: none;
	background: none;
	font-size: 24px;
	border: none;
	cursor: pointer;
	margin: 10px;
	color: #fff;
}

@media ( max-width : 768px) {
	.menu-left, .menu-right {
		display: none;
		flex-direction: column;
		width: 100%;
		height: 0;
		overflow: hidden;
	}
	.main-menu a, .notif-wrapper button {
		padding: 10px 20px;
		font-size: 15px;
		display: block;
	}
	.main-menu a, .notif-wrapper button {
		border-radius: 6px 6px 0 0;
		text-align: center;
	}
	.menu-left.active, .menu-right.active {
		display: flex;
		height: auto;
	}
	.hamburger {
		display: block;
	}
	.main-menu {
		flex-direction: column;
	}
	.dropdown {
		width: 90%;
	}
	.dropdown-content {
		top: auto;
		position: relative;
		border-radius: 0 0 6px 6px;
	}
	.dropdown-content a:hover {
		border-radius: 0;
	}
}

.image-upload-section, .image-gallery-section {
	background: #fff;
	padding: 0 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.form-group .image-upload-section, .form-group .image-gallery-section {
	align-items: center;
}

.image-gallery-section .btn {
	width: fit-content;
}

.image-upload-section h3, .image-gallery-section h3 {
	color: #333;
	margin-bottom: 15px;
}

#upload-form {
	display: flex;
	align-items: center;
	gap: 10px;
}

#upload-form input[type="file"] {
	flex-grow: 1;
	display: none;
}

/*#upload-form button {
	background-color: #434A8D;
	color: white;
	padding: 8px 16px;
	border: none;
	border-radius: 5px;
	cursor: pointer;
}

#upload-form button:hover {
	background-color: #2a358d;
}*/
.image-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 15px;
	margin-top: 15px;
}

.image-card {
	background-color: #f9f9f9;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 0 4px rgba(0, 0, 0, 0.05);
	position: relative;
	text-align: center;
}

.image-card img {
	width: 100%;
	height: 120px;
	object-fit: cover;
}

.image-card .image-info {
	font-size: 0.95rem;
	font-weight: 600;
	margin-bottom: 0.2rem;
	text-align: center;
	word-break: break-word;
}

.image-card .time-info {
	font-size: 0.8rem;
	color: #888;
	margin-bottom: 0.5rem;
	text-align: center;
}

.image-card .main-radio {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	cursor: pointer;
	justify-content: center;
}

.image-card .main-radio input[type="radio"] {
	accent-color: #50b333;
	cursor: pointer;
	margin: 0;
}

.image-card .delete-btn {
	position: absolute;
	top: 6px;
	right: 6px;
	background: #F7948E;
	border: none;
	color: #ffffff;
	border-radius: 50%;
	width: 22px;
	height: 22px;
	font-size: 1.25rem;
	cursor: pointer;
	transition: color 0.2s ease;
	text-align: center;
	padding: 0;
	display: flex;
	align-items: center;
	justify-items: center;
	flex-direction: column;
	line-height: 1;
}

.image-card .delete-btn:hover {
	background: #e74c3c;
}

.image-card .delete-btn span {
	position: relative;
}

h1 {
	margin: 0 0 1rem 0;
	font-weight: 700;
	font-size: 2rem;
	line-height: 1.25;
	color: #0f4005;
}

/* แถวที่ถูกเลือก */
.fixed-table-body tbody tr.selected, table tbody tr.selected {
	background-color: #dcfeda;
	/* ฟ้าอ่อน */
}

.fixed-table-body tbody tr:hover, table tbody tr:hover {
	background-color: #ecfef0 !important;
}

.fixed-table-body tbody tr.no-data:hover, table tbody tr.no-data:hover {
	background-color: inherit !important;
}

.container-wrapper {
	display: flex;
	justify-content: center;
	min-height: 100vh;
	/* padding: 48px 0; */
	flex-direction: column;
}

.container.login {
	max-width: 400px;
	margin: 0 auto 100px auto;
}

.container.login h2 {
	text-align: center;
}

.container.login .form-group {
	display: block;
	margin-right: 0;
}

.container.login .form-group label, .container.login .form-group input,
	.container.login .form-group .password-wrapper {
	width: 100%;
	margin-right: 0;
	font-size: 16px;
}

.container.login .form-group label {
	padding-left: 0;
}

.container.login .btn-submit {
	flex: none;
}

.app-header {
	width: 100%;
	max-width: 400px;
	margin: 0 auto;
	background-color: #fff;
	padding: 10px 0;
	display: flex;
	align-items: center;
	justify-content: center;
	position: sticky;
	top: 0;
	z-index: 1000;
}

.app-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: #e67e22;
	margin: 0;
	padding: 0;
	line-height: 1.2;
	/*font-family: 'Sarabun', sans-serif;*/
	font-family: system-ui, -apple-system, BlinkMacSystemFont, Roboto,
		Helvetica, Arial, sans-serif;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
}

.app-header span {
	display: flex;
}

span.seperate {
	display: inline-flex;
	margin: 0 0.8rem;
}

.calendar-wrapper {
	margin: auto;
	top: 0;
	left: 0;
}

.calendar-wrapper .calendar-header {
	display: flex;
	gap: 8px;
	justify-content: left;
	margin: 10px 0;
}

.calendar-wrapper .calendar-header a {
	padding: 0 11px;
	border: 1px solid #cccccc;
	background: #fff;
	cursor: pointer;
	border-radius: 5px;
	text-align: left;
	height: 34px;
	align-items: center;
	justify-content: center;
	vertical-align: middle;
	text-align: center;
	position: relative;
	text-decoration: none;
	color: #333;
	display: flex;
}

.calendar-wrapper .calendar-header button svg {
	position: relative;
	top: 2px;
}

.calendar-wrapper .calendar-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 5px;
	margin-bottom: 15px;
}

.calendar-wrapper .calendar-weekdays button {
	padding: 12px;
	border: 1px solid #dedede;
	background: #fff;
	cursor: pointer;
	border-radius: 12px;
	text-align: left;
}

.calendar-wrapper .calendar-weekdays button.active {
	background: #007bff;
	color: #fff;
}

.calendar-wrapper .calendar-weekdays button.day-btn .date {
	font-feature-settings: "tnum" on, "lnum" on;
	font-style: normal;
	white-space: nowrap;
	width: fit-content;
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
	display: block;
}

.calendar-wrapper .calendar-weekdays button.day-btn .stats {
	font-feature-settings: "tnum" on, "lnum" on;
	font-style: normal;
	margin-top: 8px;
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	display: block;
}

.calendar-wrapper .calendar-weekdays button.day-btn .stat {
	align-items: center;
	display: flex;
	justify-content: space-between;
}

.calendar-wrapper .calendar-weekdays button.day-btn .title {
	color: #9a9a9a;
	margin-right: 3px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-right: 3px;
}

.calendar-wrapper .calendar-weekdays button.day-btn .count {
	border-radius: 50px;
	background-color: #007bff;
	color: #fff;
	padding: 0.2rem 0.5rem;
	font-weight: 400;
}

.calendar-wrapper .calendar-weekdays button.active.day-btn .title {
	color: #fff;
}

.calendar-wrapper .calendar-weekdays button.active.day-btn .count {
	background-color: #fff;
	color: #007bff;
}

.calendar-wrapper .calendar-events {
	border-top: 1px solid #ddd;
	padding-top: 10px;
}

tr, td {
	position: relative;
}

.action-btns {
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	display: none;
	gap: 0.5rem;
	/*background-color: #ecf1fd !important;*/
	justify-content: center;
	width: 100%;
}

tr:hover .action-btns {
	display: flex;
}

.action-btn {
	padding: 2px 11px;
	background-color: #ff9632;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-size: .875rem;
	text-decoration: none;
	flex: fit-content;
	color: #fff;
	max-width: 6rem;
}

.action-btn:hover {
	background-color: color(display-p3 0.7664 0.3597 0.1411);
	color: #fff;
}

.status span {
	color: white;
}

.status>span {
	padding: 0.4rem 0.75rem;
	border-radius: 17px;
}

table.inline .status span.flex-content {
	padding: 0.4rem 0.75rem;
}

/* Draft – เทาอ่อนสดใส */
.status-DRAFT span {
	background-color: #95a5a6;
	/* silver */
}

/* Pending – เหลืองสด */
.status-PENDING span {
	background-color: #f1c40f;
	/* bright yellow */
	color: #333;
}

/* Work Order – น้ำเงินสด */
.status-WORK_ORDER span {
	background-color: #3498db;
	/* vivid blue */
}

/* In Progress – ฟ้า-เขียวสด */
.status-IN_PROGRESS span {
	background-color: #1abc9c;
	/* turquoise */
}

/* Waiting Confirm – ม่วงสด */
.status-WAITING_CONFIRM span {
	background-color: #9b59b6;
	/* amethyst */
}

/* Done – เขียวสด */
.status-DONE span {
	background-color: #2ecc71;
	/* emerald green */
}

/* Cancelled – ส้มหม่น (ถูกยกเลิก) */
.status-CANCELLED span {
	background-color: #e67e22; /* carrot orange */
	color: #fff;
}

/* Active – เขียวสด */
.status-ACTIVE span {
	background-color: #2ecc71;
}

/* Issued – เหลืองสด */
.status-ISSUED span {
	background-color: #f1c40f;
	/* bright yellow */
	color: #333;
}

/* Paid – เขียวสด */
.status-PAID span {
	background-color: #2ecc71;
}

/* Inactive – เทาอ่อนสดใส */
.status-INACTIVE span {
	background-color: #95a5a6;
	/* silver */
}

/* Replace – เทาอ่อนสดใส */
.status-REPLACED span {
	background-color: #95a5a6;
	/* silver */
}

/* Accepted – เขียว (positive, success) */
.status-ACCEPTED span {
	background-color: #27ae60; /* emerald green */
	color: #fff;
}

/* Rejected – แดง (negative, error) */
.status-REJECTED span {
	background-color: #e74c3c; /* alizarin red */
	color: #fff;
}

.form-group.status span {
	padding: 0 0.8rem;
	border-radius: 17px;
	color: #333;
	background-color: #fff;
}

.form-group.status .flex-content span {
	padding: 0.2rem 0.75rem 0.2rem 0.75rem;
	border-radius: 17px;
	color: white;
	position: relative;
	right: 0.75rem;
}

/* Draft – เทาอ่อนสดใส */
.form-group.status.DRAFT .flex-content span {
	background-color: #95a5a6;
	/* silver */
}

/* Pending – เหลืองสด */
.form-group.status.PENDING .flex-content span {
	background-color: #f1c40f;
	/* bright yellow */
	color: #333;
}

/* Work Order – น้ำเงินสด */
.form-group.status.WORK_ORDER .flex-content span {
	background-color: #3498db;
	/* vivid blue */
}

/* In Progress – ฟ้า-เขียวสด */
.form-group.status.IN_PROGRESS .flex-content span {
	background-color: #1abc9c;
	/* turquoise */
}

/* Waiting Confirm – ม่วงสด */
.form-group.status.WAITING_CONFIRM .flex-content span {
	background-color: #9b59b6;
	/* amethyst */
}

/* Done – เขียวสด */
.form-group.status.DONE .flex-content span {
	background-color: #2ecc71;
	/* emerald green */
}

/* Cancelled – ส้มหม่น (ถูกยกเลิก) */
.form-group.status.CANCELLED .flex-content span {
	background-color: #e67e22; /* carrot orange */
	color: #fff;
}

/* Active – เขียวสด */
.form-group.status.ACTIVE .flex-content span {
	background-color: #2ecc71;
}

/* Issued – เหลืองสด */
.form-group.status.ISSUED .flex-content span {
	background-color: #f1c40f;
	/* bright yellow */
	color: #333;
}

/* Paid – เขียวสด */
.form-group.status.PAID .flex-content span {
	background-color: #2ecc71;
}

/* Inactive – เทาอ่อนสดใส */
.form-group.status.INACTIVE .flex-content span {
	background-color: #95a5a6;
	/* silver */
}

/* Replaced – เทาอ่อนสดใส */
.form-group.status.REPLACED .flex-content span {
	background-color: #95a5a6;
	/* silver */
}

/* Accepted – เขียว (positive, success) */
.form-group.status.ACCEPTED .flex-content span {
	background-color: #27ae60; /* emerald green */
	color: #fff;
}

/* Rejected – แดง (negative, error) */
.form-group.status.REJECTED .flex-content span {
	background-color: #e74c3c; /* alizarin red */
	color: #fff;
}

.flex {
	display: flex;
}

.hide {
	display: none !important;
}

.switch-group {
	display: inline-flex;
	overflow: hidden;
	gap: 0;
}

.switch-group input[type="radio"] {
	display: none;
}

.switch-group label {
	padding: 0px 4px;
	cursor: pointer;
	background: inherit;
	font-size: 12px;
	margin: 0;
	display: flex;
	align-items: center;
	flex: 1;
	text-align: center;
	justify-content: center;
	border-radius: 10rem;
	width: 38px;
	height: 38px;
}

.switch-group input[type="radio"] {
	border: none;
}

.icon-wrapper {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	/* ทำให้เป็นวงกลม */
}

.icon-pass {
	color: #888;
}

/* เขียว */
.icon-fail {
	color: #888;
}

/* แดง */
.switch-group input[type="radio"]:checked+label {
	color: #fff;
	font-weight: 600;
}

.switch-group input[type="radio"]:checked+label .icon-pass,
	.switch-group .flex-content .icon-pass {
	background-color: #16a34a;
	/* เขียว */
	color: #fff;
}

/* เขียว */
.switch-group input[type="radio"]:checked+label .icon-fail,
	.switch-group .flex-content .icon-fail {
	background-color: #ef4444;
	/* แดง */
	color: #fff;
}

/* แดง */
tr.no-border th {
	border-bottom: none;
}

tr.sub th {
	padding: 0 .7rem 0;
}

tr.sub td {
	padding: 0 .7rem .7rem;
}

tr.sub th, tr.sub td span.flex-content {
	color: #c6c6c6;
	font-size: 12px;
}

table th span.padding-left, table td span.padding-left {
	padding-left: 2rem;
}

table th span.padding-right, table td span.padding-right {
	padding-right: 4rem;
}

.image-wrapper {
	margin: 1rem auto;
}

.hint-box {
	background: #e8f4ff;
	/* ฟ้าอ่อน */
	border: 1px solid #90caf9;
	/* ฟ้าเข้ม */
	border-left: 5px solid #2196f3;
	/* แถบฟ้าเข้มด้านซ้าย */
	padding: 12px 16px;
	border-radius: 6px;
	color: #0d47a1;
	font-size: 14px;
	line-height: 1.6;
	margin: 12px 0;
	text-align: left;
}

.hint-box strong {
	display: block;
	margin-bottom: 6px;
}

.hint-box span {
	margin-left: 6px;
}

.progress-flow {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
	position: relative;
	font-family: sans-serif;
}

.progress-flow::before {
	content: "";
	position: absolute;
	top: 20%;
	left: 0;
	height: 4px;
	width: 100%;
	background: #e0e0e0;
	z-index: 1;
	transform: translateY(-50%);
}

.step {
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	align-items: center;
}

.step .stats {
	position: relative;
	z-index: 2;
	background: #fff;
	padding: 6px 10px;
	border-radius: 16px;
	border: 2px solid #ccc;
	font-size: 13px;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 80px;
}

.step .stats .stat {
	align-items: center;
	display: flex;
	justify-content: space-between;
	height: 22px;
	gap: 0.4rem;
}

.step .stats .count {
	border-radius: 50px;
	background-color: #007bff;
	color: #fff;
	padding: 0.2rem 0.5rem;
	font-weight: 400;
}

.step .stats .title {
	color: #9a9a9a;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.step h2 {
	font-feature-settings: "tnum" on, "lnum" on;
	font-style: normal;
	white-space: nowrap;
	width: fit-content;
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
	display: block;
	margin: 0;
	padding: 0;
}

.button-actions {
	display: flex;
	gap: 0.4rem;
}

.action-left, .action-right {
	display: flex;
	align-items: center;
	/* flex: 1; */
	gap: 0.4rem;
}

.action-left button {
	padding: 0 16px;
	/* font-size: 1rem; */
	background-color: #fff;
	color: #333;
	border: 1px solid #0f4005;
	border-radius: 8px;
	cursor: pointer;
	transition: box-shadow .42s cubic-bezier(.165, .84, .44, 1), color .42s
		cubic-bezier(.165, .84, .44, 1), background .42s
		cubic-bezier(.165, .84, .44, 1);
	height: 36px;
	min-height: 36px;
	line-height: 36px;
	box-shadow: none;
	width: auto;
}

.action-left button:hover {
	/* background-color: #050b52; */
	box-shadow: inset 0 0 0 1px #0f4005;
}

.action-right {
	justify-content: flex-end;
	flex: 1;
}

.chat-room {
	display: flex;
	flex-direction: column;
	height: 90vh;
}

.chat-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #ddd;
	padding: 0.5rem 1rem;
}

.chat-info {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.chat-messages {
	flex: 1;
	padding: 1rem;
	overflow-y: auto;
	background: #fafafa;
	height: 400px;
}

.message {
	/*margin-bottom: 1rem;
	max-width: 60%;
	padding: 0.5rem 1rem;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
	text-align: justify;*/
	margin-bottom: 12px;
}

.message.mine {
	/*margin-left: auto;
	background: #dcf8c6;*/ /* เขียวอ่อนเหมือน Line/WhatsApp */
	align-items: flex-end; /* ชิดขวา */
}

.message-bubble-wrapper {
	display: flex;
	gap: 0.4rem;
}

.message.mine .message-bubble-wrapper {
	flex-direction: row-reverse;
}

.message-bubble {
	max-width: 60%;
	padding: 0.5rem 1rem;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
	text-align: justify;
}

.message.mine .message-bubble {
	background: #dcf8c6;
}

.message-meta {
	font-size: 12px;
	color: #666;
	margin-top: 4px;
	align-self: flex-end;
}

.message-sender {
	font-weight: bold;
	font-size: 0.9rem;
}

.message-text {
	margin: 0.2rem 0;
}

.message-time {
	font-size: 0.8rem;
	color: gray;
	text-align: right;
}

.chat-input {
	border-top: 1px solid #ddd;
	padding: 0.5rem 0;
	background: #fff;
}

.chat-input .chat-form {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.chat-input .chat-form textarea {
	flex: 1;
	min-height: 40px;
	max-height: 120px; /* กัน textarea สูงเกินไป */
	resize: none; /* ปิด resize ด้านข้าง */
	padding: 0.5rem;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 14px;
	margin: auto;
}

.chat-input .chat-form .btn-send:hover {
	background: #0056b3;
}

.chat-messages .no-data {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	color: #9a9a9a;
	font-weight: 400;
	font-size: .875rem;
}

.message-seen {
	font-size: 0.75rem; /* ตัวเล็กกว่าเนื้อความ */
	color: #888; /* สีเทาอ่อน */
	margin-top: 2px; /* เว้นระยะนิดหน่อย */
	text-align: right; /* ชิดขวา (กรณี messageOwner = mine) */
}

.message.mine .message-seen {
	color: #4caf50; /* สีเขียวอ่อน ถ้าเป็นของตัวเอง */
	font-weight: 500;
}

.chat-messages.private .message-seen span {
	display: none;
}

/* กรอบข้อความระบบ */
.message.system {
	margin: auto;
	font-size: 0.85rem;
	font-style: italic;
	text-align: center;
	color: #666;
	position: relative;
	background-color: transparent;
	box-shadow: none;
}

.message.system .message-bubble-wrapper {
	justify-content: center;
	display: block;
}

.message.system .message-bubble {
	background-color: transparent;
	box-shadow: none;
	margin: auto;
	max-width: 100%;
	text-align: center;
}

/* ไม่แสดงชื่อ sender */
.message.system .message-sender {
	display: none;
}

/* ตัวข้อความหลัก */
.message.system .message-text {
	display: inline-block;
	background: #f2f2f2;
	color: #444;
	padding: 6px 12px;
	border-radius: 12px;
	max-width: 80%;
}

/* เวลาเล็กๆ ใต้ข้อความ */
.message.system .message-time {
	display: block;
	margin: 2px auto;
	font-size: 0.7rem;
	color: #999;
	text-align: center;
}

.btn-attach {
	padding: 0.4rem;
	border: none;
	background: #fff;
	cursor: pointer;
	border-radius: 4px;
	font-size: .875rem;
	letter-spacing: .057em;
	transition: box-shadow .42s cubic-bezier(.165, .84, .44, 1), color .42s
		cubic-bezier(.165, .84, .44, 1), background .42s
		cubic-bezier(.165, .84, .44, 1);
	height: 2.5rem;
	line-height: 2.5;
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	justify-content: center;
}

.btn-attach svg {
	width: 24px;
	height: 24px;
}

.message-attachments {
	display: flex;
	flex-direction: column;
	gap: 0.75rem; /* เว้นระหว่างไฟล์แต่ละอัน */
	margin: 0.5rem 0;
}

.message-attachments .attachment {
	display: flex;
	align-items: center;
	gap: 1rem;
	background: #f9f9f9; /* พื้นหลังเทาอ่อน */
	border: 1px solid #e0e0e0; /* เส้นขอบบาง */
	border-radius: 8px; /* มุมโค้ง */
	padding: 0.75rem;
	transition: background 0.2s ease;
}

.message-attachments .attachment:hover {
	background: #f0f8ff; /* ฟ้าอ่อนเมื่อ hover */
}

.message-attachments .attachment a.file-download-link {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 64px;
	min-height: 64px;
	color: #333;
	text-decoration: none;
}

.message-attachments .attachment a.file-download-link:hover svg {
	stroke: #007bff; /* เปลี่ยนสีไอคอนเมื่อ hover */
}

.message-attachments .attachment .content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.25rem;
	flex: 1;
}

.message-attachments .attachment .content .image-info {
	font-size: 0.95rem;
	font-weight: 500;
	color: #333;
	word-break: break-word; /* กันชื่อไฟล์ยาวเกิน */
}

.message-attachments .attachment .content .time-info {
	font-size: 0.8rem;
	color: #777;
}

#attachment-form textarea {
	flex: 1;
	min-height: 40px;
	max-height: 120px; /* กัน textarea สูงเกินไป */
	resize: none; /* ปิด resize ด้านข้าง */
	padding: 0.5rem;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 14px;
	margin: auto;
	width: 100%;
}

#upload-logo-img-form #logo-img-input {
	display: none;
}

.picker-btn {
	border: 1px solid #ccc;
	background-color: #f8f8f8;
	color: #333;
	border-radius: 4px;
	padding: 2px 8px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
	height: 28px;
	position: relative;
	right: 10px;
	font-size: 12px;
	flex-shrink: 0; /* ✅ ไม่ให้ปุ่มถูกบีบ */
}

.picker-btn:hover {
	background-color: #e0e0e0;
}

.stars {
	display: flex;
	gap: 4px;
	justify-content: flex-start;
	margin: 0;
	width: 250px;
}

.stars label {
	font-size: 2.5rem;
	cursor: pointer;
	background: #ccc;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	transition: transform 0.2s ease;
	width: auto;
	line-height: 2.0rem;
}

.stars.flex-content label {
	background: linear-gradient(to right, #facc15 50%, #fde047 50%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	padding: 0;
}

.form-group.color-group {
	display: flex;
	align-items: center;
}

.color-wrapper {
	width: 250px;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.color-wrapper input {
	width: calc(250px - 150px);
	margin: 0;
}

.color-wrapper span {
	padding: 6px 12px;
	border-radius: 17px;
	display: flex;
	align-items: center;
	flex: 1;
	justify-content: center;
	text-align: center;
}

.flex-content.color-wrapper span:first-child {
	padding: 0;
	justify-content: flex-start;
}

.priority>span {
	padding: 0.4rem 0.75rem;
	border-radius: 17px;
}

.form-group.priority .flex-content span {
	padding: 0.2rem 0.75rem 0.2rem 0.75rem;
	border-radius: 17px;
	position: relative;
	right: 0.75rem;
}

.password-wrapper {
	display: flex;
	align-items: center;
	position: relative;
	width: 250px;
}

.password-wrapper input {
	padding-right: 35px;
}

.toggle-password {
	position: absolute;
	right: 5px;
	border: none;
	background: none;
	cursor: pointer;
	font-size: 1rem;
	z-index: 99;
}

.toggle-password:hover {
	opacity: 0.7;
}

.icon {
	width: 20px;
	height: 20px;
}

.icon.visible, .icon.invisible {
	color: #ccc;
}

.icon-home {
	color: #28a745;
}

.icon-service-request {
	color: #28a745;
}

.icon-pm {
	color: #28a745;
}

.icon-contract {
	color: #28a745;
}

.icon-master {
	color: #28a745;
}

.icon-chat {
	color: #28a745;
}

.icon-report {
	color: #28a745;
}

.icon-setting {
	color: #28a745;
}

.icon-user {
	color: #28a745;
}

.icon-no-image {
	--empty-primary: #9a9a9a;
	--empty-accent: #dff0d5;
	--empty-stroke: #dff0d5;
	--empty-text-fill: #239825;
}

.icon-no-data {
	--empty-primary: #9a9a9a;
	--empty-accent: #dff0d5;
	--empty-stroke: #dff0d5;
	--empty-text-fill: #239825;
}

.form-group>span.hint {
	display: flex;
	font-size: small;
	color: #ff6161;
}

.switch-wrapper {
	display: inline-block;
	position: relative;
	width: 250px;
	height: 28px;
	margin-right: 4rem;
}

.switch-wrapper input {
	opacity: 0;
	width: 0;
	height: 0;
}

.switch-wrapper label.switch {
	position: absolute;
	cursor: pointer;
	background-color: #ccc;
	border-radius: 34px;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	transition: 0.3s;
	width: 50px;
	margin: inherit;
	height: inherit;
	padding: 0;
}

.switch::before {
	content: "";
	position: absolute;
	height: 22px;
	width: 22px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	border-radius: 50%;
	transition: 0.3s;
}

.switch-wrapper input:checked+.switch {
	background-color: #4CAF50; /* สีเมื่อเปิด */
}

.switch-wrapper input:checked+.switch::before {
	transform: translateX(22px);
}

.image-card audio {
	width: 100%;
	height: 120px;
	object-fit: cover;
}

.required-star {
	color: red;
	font-weight: bold;
}

#success-modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

#success-modal .modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	/* ✅ ปิดการกดทั้งหมดที่พื้นหลัง */
	pointer-events: all;
}

#success-modal .modal-content {
	position: relative;
	background: white;
	padding: 1.5rem 2rem;
	border-radius: 16px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	text-align: center;
	z-index: 1;
	animation: fadeIn 0.3s ease;
	width: 100%;
	margin: 0 1rem;
	max-width: 400px;
	transform: scale(0.7);
	opacity: 0;
	transition: transform 0.3s cubic-bezier(.34, 1.56, .64, 1), opacity 0.2s
		ease;
}

#success-modal .modal-content.show {
	transform: scale(1);
	opacity: 1;
}

#success-modal .modal-icon {
	font-size: 3rem;
	color: #4BB543; /* สีเขียวสำเร็จ */
	margin-bottom: 0.5rem;
}

#success-modal .modal-message {
	font-size: 1rem;
	color: #333;
	margin-bottom: 1rem;
}

#success-modal .modal-close {
	background: #4BB543;
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 8px;
	cursor: pointer;
	font-weight: bold;
}

#success-modal .modal-close:hover {
	background: #4BB543;
}

.fab {
	position: fixed;
	bottom: 3.0rem;
	right: 1.0rem;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background-color: #007bff;
	color: white;
	border: none;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
	cursor: pointer;
	transition: background 0.3s, transform 0.2s;
	z-index: 99;
}

.fab:hover {
	background-color: #0056b3;
	transform: scale(1.05);
}

#error-modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

#error-modal .modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	/* ✅ ปิดการกดทั้งหมดที่พื้นหลัง */
	pointer-events: all;
}

#error-modal .modal-content {
	position: relative;
	background: white;
	padding: 1.5rem 2rem;
	border-radius: 16px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	text-align: center;
	z-index: 1;
	animation: fadeIn 0.3s ease;
	width: 100%;
	margin: 0 1rem;
	max-width: 400px;
	transform: scale(0.7);
	opacity: 0;
	transition: transform 0.3s cubic-bezier(.34, 1.56, .64, 1), opacity 0.2s
		ease;
}

#error-modal .modal-content.show {
	transform: scale(1);
	opacity: 1;
}

#error-modal .modal-icon {
	font-size: 3rem;
	color: #e53935;
	margin-bottom: 0.5rem;
}

#error-modal .modal-message {
	font-size: 1rem;
	color: #333;
	margin-bottom: 1rem;
}

#error-modal .modal-close {
	background: #e53935;
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 8px;
	cursor: pointer;
	font-weight: bold;
}

#error-modal .modal-close:hover {
	background: #d32f2f;
}

.form-control-wrapper {
	position: relative;
	justify-items: flex-start;
	width: -webkit-fill-available;
}

.filter-form .form-control-wrapper {
	margin-bottom: 0rem;
}