/* หน้าแอดมิน (ต่อจาก ../css/roombooking.css ที่มีสี --rb-* และฟอนต์) */
body {
	background: var(--rb-bg);
	font-size: .95rem;
}

/* ลิงก์ไม่ขีดเส้นใต้ (ชี้แล้วเปลี่ยนสีแทน) */
a {
	text-decoration: none;
}

a:hover {
	color: var(--rb-primary-dark);
}

/* แถบบน */
.adm-topbar {
	background: linear-gradient(135deg, var(--rb-primary) 0%, #864ca5 100%);
	color: #fff;
}

.adm-topbar .navbar-brand {
	font-family: 'Mitr', 'Kanit', sans-serif;
	font-weight: 500;
	color: #fff;
}

.adm-topbar .nav-link {
	color: rgba(255, 255, 255, .85);
	white-space: nowrap;
}

@media (min-width: 1400px) {
	.adm-topbar .navbar-nav .nav-link {
		padding-left: .45rem;
		padding-right: .45rem;
	}
}

.adm-topbar .input-group {
	flex-wrap: nowrap;
}

.adm-topbar .nav-link:hover,
.adm-topbar .nav-link:focus,
.adm-topbar .nav-link.show,
.adm-topbar .nav-link.active {
	color: #fff;
}

.adm-topbar .dropdown-menu {
	border: 0;
	border-radius: .75rem;
	box-shadow: 0 .5rem 1.5rem rgba(40, 30, 100, .18);
	max-height: 75vh;
	overflow-y: auto;
	min-width: 20rem;
}

.adm-topbar .dropdown-item {
	white-space: normal;
	padding: .45rem 1rem;
}

.adm-topbar .dropdown-header {
	font-weight: 500;
	color: var(--rb-primary);
}

.adm-topbar .form-control {
	min-width: 11rem;
}

/* จอ 1400-1599px เมนูเต็มแถว ซ่อนข้อความที่ไม่จำเป็น (ชื่อผู้ใช้ยังดูได้จาก title) */
@media (min-width: 1400px) and (max-width: 1599.98px) {
	.adm-topbar .adm-wide {
		display: none;
	}
}

/* หัวหน้าแต่ละหน้า */
.adm-page-title {
	font-family: 'Mitr', 'Kanit', sans-serif;
	font-weight: 500;
	font-size: 1.35rem;
	margin: 1.25rem 0 1rem;
}

/* ตาราง */
.table {
	--bs-table-bg: #fff;
}

.table > thead th,
.table > thead td {
	background: #ece9f8;
	color: #3a2f80;
	font-weight: 500;
	white-space: nowrap;
	vertical-align: middle;
}

.table-responsive {
	border-radius: .75rem;
	box-shadow: 0 .25rem 1rem rgba(40, 30, 100, .06);
	background: #fff;
}

.table-responsive > .table {
	margin-bottom: 0;
}

/* ตัวเลขสถิติ */
.adm-stat {
	border-radius: 1rem;
	background: #fff;
	box-shadow: 0 .25rem 1rem rgba(40, 30, 100, .08);
	padding: 1rem 1.25rem;
	height: 100%;
}

.adm-stat .adm-stat-num {
	font-family: 'Mitr', 'Kanit', sans-serif;
	font-size: 1.75rem;
	font-weight: 500;
	color: var(--rb-primary);
	line-height: 1.2;
}

.adm-stat .adm-stat-label {
	color: var(--bs-secondary-color);
	font-size: .9rem;
}

/* พิมพ์: ซ่อนเมนู */
@media print {
	.adm-topbar,
	.no-print {
		display: none !important;
	}

	body {
		background: #fff;
	}
}

/* ===== ผังห้องพัก แบบผังที่นั่งโรงหนัง (ใช้ร่วม: adminsungwein/roommap.php + manager/roommap.php ผ่าน manager/roommap_grid.php) ===== */
.mg-floor {
	display: flex;
	gap: .75rem;
	align-items: stretch;
	margin-bottom: 1rem;
}

.mg-floor-label {
	flex: 0 0 4.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-family: 'Mitr', 'Kanit', sans-serif;
	font-weight: 500;
	font-size: .9rem;
	color: #fff;
	background: linear-gradient(160deg, var(--rb-primary), #864ca5);
	border-radius: .9rem;
	padding: .5rem;
	line-height: 1.2;
}

.mg-floor-rooms {
	flex: 1 1 auto;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
	gap: .5rem;
	min-width: 0;
}

.mg-room-box {
	background: #fff;
	border-radius: .8rem;
	box-shadow: 0 .15rem .6rem rgba(40, 30, 100, .08);
	padding: .45rem .5rem .5rem;
	border: 1px solid transparent;
}

.mg-room-box.is-full {
	border-color: rgba(22, 163, 74, .35);
}

.mg-room-box.is-over {
	border-color: rgba(220, 53, 69, .6);
}

.mg-room-box.is-closed {
	background: repeating-linear-gradient(45deg, #f4f3f8, #f4f3f8 6px, #ebe9f3 6px, #ebe9f3 12px);
	box-shadow: none;
	opacity: .8;
}

.mg-room-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: .35rem;
}

.mg-room-no {
	font-family: 'Mitr', 'Kanit', sans-serif;
	font-weight: 500;
	font-size: 1rem;
	color: #2b2350;
}

.mg-room-count {
	font-size: .75rem;
	color: var(--bs-secondary-color);
	font-variant-numeric: tabular-nums;
}

.mg-room-tag {
	font-size: .7rem;
	color: #b45309;
	margin: -.2rem 0 .3rem;
}

.mg-seats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .3rem;
}

/* เตียง/ที่นั่ง */
.mg-seat {
	display: flex;
	align-items: center;
	gap: .3rem;
	min-width: 0;
	border-radius: .5rem .5rem .3rem .3rem;
	padding: .3rem .35rem;
	font-size: .72rem;
	line-height: 1.15;
	border: 0;
	text-align: left;
	color: #fff;
}

.mg-seat span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mg-seat .fa {
	flex-shrink: 0;
	opacity: .9;
}

button.mg-seat {
	cursor: pointer;
	transition: transform .1s ease, box-shadow .1s ease;
}

button.mg-seat:hover,
button.mg-seat:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 .25rem .6rem rgba(0, 0, 0, .18);
	outline: none;
}

.mg-seat-in {
	background: #16a34a;
}

.mg-seat-book {
	background: #f59e0b;
}

.mg-seat-over {
	background: #dc3545;
}

.mg-seat-free {
	background: transparent;
	color: #9ca3af;
	border: 1.5px dashed #cbd5e1;
}

.mg-seat.is-hit {
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--rb-primary);
	transform: scale(1.04);
}

/* ป้ายอธิบายสี */
.mg-seat-dot {
	display: inline-block;
	width: 1rem;
	height: .8rem;
	padding: 0;
	vertical-align: -1px;
}

.mg-room-closed-dot {
	display: inline-block;
	width: 1rem;
	height: .8rem;
	border-radius: .2rem;
	vertical-align: -1px;
	background: repeating-linear-gradient(45deg, #f4f3f8, #f4f3f8 3px, #d9d6e6 3px, #d9d6e6 6px);
}

@media (max-width: 575.98px) {
	.mg-floor {
		flex-direction: column;
		gap: .4rem;
	}

	.mg-floor-label {
		flex: none;
		justify-content: flex-start;
		padding: .3rem .75rem;
	}

	.mg-floor-rooms {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media print {
	.mg-room-box {
		break-inside: avoid;
		box-shadow: none;
		border: 1px solid #ccc;
	}

	.mg-seat {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
}

/* เมนูหลัก (แอดมิน + ผู้ปกครองหอ): ไม่ใช้ไอคอน — คั่นด้วยเส้นบางไล่สี + เว้นระยะ (เฉพาะตอนเมนูกางเป็นแถว) */
.adm-topbar .navbar-nav > .nav-item > .nav-link {
	letter-spacing: .01em;
}

@media (min-width: 1200px) {
	.adm-topbar.navbar-expand-xl .navbar-nav > .nav-item + .nav-item::before {
		content: "";
		align-self: center;
		width: 1px;
		height: 1.15rem;
		margin: 0 .35rem;
		background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .6), transparent);
	}

	.adm-topbar.navbar-expand-xl .navbar-nav > .nav-item {
		display: flex;
	}

	.adm-topbar.navbar-expand-xl .navbar-nav > .nav-item > .nav-link {
		padding-left: .7rem;
		padding-right: .7rem;
	}
}

@media (min-width: 1400px) {
	.adm-topbar.navbar-expand-xxl .navbar-nav > .nav-item + .nav-item::before {
		content: "";
		align-self: center;
		width: 1px;
		height: 1.15rem;
		margin: 0 .3rem;
		background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .6), transparent);
	}

	.adm-topbar.navbar-expand-xxl .navbar-nav > .nav-item {
		display: flex;
	}

	.adm-topbar.navbar-expand-xxl .navbar-nav > .nav-item > .nav-link {
		padding-left: .6rem !important;
		padding-right: .6rem !important;
	}
}

/* เมนูหลักตอนย่อ (มือถือ): คั่นด้วยเส้นแนวนอนจาง ๆ แทน */
@media (max-width: 1399.98px) {
	.adm-topbar.navbar-expand-xxl .navbar-nav > .nav-item + .nav-item {
		border-top: 1px solid rgba(255, 255, 255, .15);
	}
}

@media (max-width: 1199.98px) {
	.adm-topbar.navbar-expand-xl .navbar-nav > .nav-item + .nav-item {
		border-top: 1px solid rgba(255, 255, 255, .15);
	}
}
