/* ============================
	전체 기본 스타일
============================ */

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	height: 100%;
	font-family: "Noto Sans KR", sans-serif;
	color: #222;
	background-color: #fff;
}

/* ============================
	전체 레이아웃
============================ */

.crm-layout {
	display: flex;
	min-height: 100vh;
	background-color: #fff;
}

/* ============================
	사이드바
============================ */

.crm-sidebar {
	width: 80px;
	background-color: #f4f4f4;
	border-right: 1px solid #e4e6eb;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 16px 0;
}

/* 로고 */

.crm-sidebar-logo {
	padding-bottom: 23px;
	border-bottom: 1px #ccc solid;
}

.crm-sidebar-logo .logo-text {
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0px;
	color: #333;
}

/* 메뉴 */

.crm-sidebar-nav {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	width: 100%;
	box-sizing: border-box;
	padding-top: 10px;
}

.nav-item {
	width: 56px;
	height: 72px;
	border: none;
	border-radius: 10px;
	background: transparent;
	cursor: pointer;
	color: #444;
	display: none;  /* to flex */
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-size: 12px;
}

.nav-item .nav-icon {
	margin-bottom: 2px;
	text-align: center;
}

.nav-item .nav-icon svg {
	width: 20px;
	height: 20px;
	fill: #444 !important;
}

.nav-item label {
	white-space: nowrap;
	cursor: inherit;
}

.nav-item:hover {
	background-color: #ccc;
}

.nav-item.active {
	background-color: #111827;
	color: #ffffff;
}

.nav-item.active svg {
	fill: #fff !important;
}

/* ============================
	사이드바 하단 로그인 사용자 영역
============================ */

.crm-sidebar-userbox {
	width: 100%;
	padding: 12px 0;
	border-top: 1px solid #e5e7eb;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.crm-sidebar-userbox .user-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background-color: #111827;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
}

.crm-sidebar-userbox .user-meta {
	text-align: center;
	font-size: 11px;
	color: #6b7280;
	line-height: 1.2;
}

.crm-sidebar-userbox .user-name {
	font-size: 12px;
	font-weight: 600;
	color: #111827;
}

.crm-sidebar-userbox .btn-logout {
	margin-top: 4px;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
	background-color: #ffffff;
	font-size: 11px;
	color: #4b5563;
	cursor: pointer;
}

.crm-sidebar-userbox .btn-logout:hover {
	background-color: #e5e7eb;
}


/* ============================
	상단바
============================ */

.crm-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.crm-topbar {
	height: 64px;
	background-color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 32px;
	border-bottom: 1px solid #e4e6eb;
}

/* 상단바 왼쪽 영역을 플렉스로 정렬 */
.topbar-left {
	display: flex;
	align-items: center;
	gap: 16px;
}

.topbar-logo {
	display: none;
	font-size: 12px;
	font-weight: 600;
	color: #111827;
}

.topbar-right {
	display: flex;
	align-items: center;
}

/* 모바일 메뉴 버튼 기본 스타일 */
.btn-menu-toggle {
	display: none;        /* 기본은 숨김 (PC용) */
	background: none;
	border: none;
	font-size: 22px;
	margin-right: 12px;
	cursor: pointer;
	padding: 0;
	line-height: 1;
}

.topbar-left .topbar-date {
	font-size: 20px;
	font-weight: 600;
	color: #111827;
}

/* 모바일 메뉴 버튼 */
.btn-menu-toggle {
	display: none;
	background: none;
	border: none;
	font-size: 24px;
	margin-right: 12px;
	cursor: pointer;
}

/* 모바일에서 사이드바 오버레이 */
.crm-sidebar-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.35);
	z-index: 900;
}

/* 모바일 토글 사이드바 */
.crm-sidebar {
	z-index: 1000;
	transition: transform 0.25s ease;
}

/* ============================
	메인 컨텐츠 영역
============================ */

.crm-main-body {
	flex: 1;
	padding: 16px 24px 24px;
	display: flex;
	justify-content: center;
}

.crm-main-inner {
	width: 100%;
	/*max-width: 1440px;*/
	min-height: 300px;
}

/* ============================
	공통 테이블 스타일
============================ */

.table {
	width: 100%;
	border-collapse: collapse;
	background-color: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
}

.table thead th {
	padding: 12px 14px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	background-color: #f9fafb;
	border-bottom: 2px solid #e5e7eb;
	color: #374151;
}

.table tbody td {
	padding: 12px 14px;
	font-size: 13px;
	border-bottom: 1px solid #f0f0f0;
	color: #374151;
	text-align: center;
}

.table tbody tr:last-child td {
	border-bottom: none;
}

/* ============================
	공통 페이징 스타일
============================ */

.pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	margin-top: 20px;
}

.page-btn {
	min-width: 28px;
	height: 28px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
	background-color: #ffffff;
	font-size: 12px;
	cursor: pointer;
	padding: 0 8px;
	transition: all 0.2s ease;
}

.page-btn:hover {
	background-color: #f3f4f6;
}

.page-btn.active {
	background-color: #111827;
	color: #ffffff;
	border-color: #111827;
}

.page-btn.disabled {
	opacity: 0.4;
	cursor: default;
}

/* ============================
	반응형 처리
============================ */

/* 모바일: 0 ~ 767px */
@media (max-width: 767px) {

	/* 햄버거 버튼 보이게 */
	.btn-menu-toggle {
		display: inline-block;
	}

	/* 모바일 사이드바: 폭 넓히고 슬라이드로 표시 */
	.crm-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		height: 100vh;
		width: 240px;
		padding-top: 24px;
		padding-left: 16px;
		padding-right: 16px;
		align-items: flex-start;
		background-color: #f4f4f4;
		box-shadow: 2px 0 8px rgba(0, 0, 0, 0.18);
		transform: translateX(-100%);
		z-index: 1000;
	}

	.crm-sidebar.open {
		transform: translateX(0);
	}

	/* 사이드바 오버레이 */
	.crm-sidebar-overlay {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.35);
		z-index: 900;
	}

	.crm-sidebar-overlay.active {
		display: block;
	}

	/* 로고 */
	.crm-sidebar-logo {
		width: 100%;
		border-bottom: 1px solid #ccc;
		padding-bottom: 20px;
		display: flex;
		justify-content: flex-start;
		padding-left: 4px;
	}

	/* 메뉴 영역 */
	.crm-sidebar-nav {
		width: 100%;
		align-items: flex-start;
		padding-top: 16px;
		gap: 5px;
	}

	/* 메뉴 아이템: 아이콘 좌측, 텍스트 우측 */
	.nav-item {
		width: 100%;
		height: 54px;
		border-radius: 8px;
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		padding-left: 10px;
		gap: 10px;
		font-size: 14px;
	}

	.nav-item .nav-icon {
		margin: 0;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.nav-item .nav-icon svg {
		width: 22px;
		height: 22px;
	}

	.nav-item .nav-label {
		display: inline-block;
		font-size: 14px;
		color: #333;
	}

	.nav-item.active {
		background-color: #111827;
		color: #fff;
	}

	.nav-item.active .nav-label {
		color: #fff;
	}

	.nav-item.active svg {
		fill: #fff !important;
	}

	/* 사이드바 하단 사용자 정보 (모바일: 가로 배치) */
	.crm-sidebar-userbox {
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		width: 100%;
		margin-top: 20px;
		padding: 8px 8px 8px 4px;
		gap: 8px;
	}

	.crm-sidebar-userbox .user-meta {
		text-align: left;
		font-size: 12px;
	}

	.crm-sidebar-userbox .btn-logout {
		margin-top: 0;
		margin-left: auto;
		font-size: 12px;
		white-space: nowrap;
	}


	/* 상단바 / 본문 */

	/* 상단바 공통 크기/패딩 */
	.crm-topbar {
		position: relative;
		height: 56px;
		padding: 0 12px;
		display: flex;
		align-items: center;
		background-color: #f4f4f4;
	}

	/* 왼쪽: 로고 영역 */
	.topbar-left {
		display: flex;
		align-items: center;
	}

	.topbar-logo {
		display: block;
		font-size: 14px;
		font-weight: 600;
		color: #111827;
	}

	/* 날짜를 헤더 전체 기준으로 정중앙에 고정 */
	.topbar-date {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		text-align: center;
		font-size: 16px;
		font-weight: 600;
	}

	/* 오른쪽: 햄버거 버튼 */
	.topbar-right {
		margin-left: auto;
		display: flex;
		align-items: center;
	}

	.btn-menu-toggle {
		display: inline-block;
		font-size: 22px;
		background: none;
		border: none;
		cursor: pointer;
	}

	.crm-main-body {
		padding: 12px;
	}

	/* 테이블 가로 스크롤 허용 */
	.table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}
}

/* 태블릿: 768px ~ 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
	.crm-topbar {
		padding: 0 20px;
	}
	.crm-main-body {
		padding: 16px;
	}
}


.sync-tpl {
	display: none;
}


.w50 {width: 50px !important}
.w80 {width: 80px !important}
.w100 {width: 100px !important}
.w120 {width: 120px !important}
.w150 {width: 150px !important}
.w200 {width: 200px !important}
.w300 {width: 300px !important}
.w400 {width: 400px !important}
