<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가

add_stylesheet('<link rel="stylesheet" href="'.$skin_url.'/assets/css/bootstrap.min.css" type="text/css" media="screen">',0);
add_stylesheet('<link rel="stylesheet" href="'.$skin_url.'/style.css" type="text/css" media="screen">',0);
add_stylesheet('<link rel="stylesheet" href="'.G5_URL.'/thema/Basic/colorset/Basic/darkmode.css" type="text/css" media="screen">',0);
add_stylesheet('<link rel="stylesheet" href="'.$skin_url.'/partner-darkmode.css?fv='.filemtime($skin_path.'/partner-darkmode.css').'" type="text/css" media="screen">',0);

/* jQuery UI preload: 브라우저가 HTML 파싱 중에 미리 내려받기 시작하게 해서
   실제 <script src> 태그를 만났을 때 이미 캐시에 있게 한다 */
add_stylesheet('<link rel="preload" href="'.G5_PLUGIN_URL.'/jquery-ui/jquery-ui.min.js" as="script">',0);
add_stylesheet('<link rel="preload" href="'.G5_PLUGIN_URL.'/jquery-ui/jquery-ui.css" as="style">',0);

?>

<style>
	.navbar-brand.seller-office-brand {
		height: auto;
		padding-top: 10px;
		padding-bottom: 10px;
	}

	.navbar-brand.seller-office-brand .seller-office-brand-wrap {
		display: inline-flex;
		align-items: center;
		gap: 8px;
	}

	.navbar-brand.seller-office-brand .seller-office-brand-logo {
		height: 30px;
		width: auto;
		display: block;
	}

	.navbar-brand.seller-office-brand .seller-office-brand-label {
		display: inline-block;
		font-size: 12px;
		font-weight: 700;
		line-height: 1;
		padding: 4px 8px;
		border-radius: 999px;
		color: #ffffff;
		background: rgba(255, 255, 255, 0.18);
		border: 1px solid rgba(255, 255, 255, 0.38);
	}
</style>

<style>
/* ── 사이드바 토글 버튼 ── */
#sidebar-toggle-btn { display: none; }

/* 전환 중 초기 깜빡임 방지 */
body.sidebar-notransition #wrapper,
body.sidebar-notransition .side-nav,
body.sidebar-notransition #sidebar-toggle-btn { transition: none !important; }

@media (min-width:768px) {
	/* navbar 좌상단 고정 – 어드민 패널과 동일한 아이콘·위치 */
	#sidebar-toggle-btn {
		display: block; /* display:none 오버라이드 */
		position: fixed;
		top: 0;
		left: 0;
		z-index: 1035;
		width: 50px;
		height: 51px;
		background: url('<?php echo G5_SKIN_URL; ?>/admin/basic/img/menu-cl.png') 50% 50% no-repeat #0d0d0e;
		border: none;
		border-right: 1px solid rgba(255,255,255,0.05);
		cursor: pointer;
		overflow: hidden;
		text-indent: -9999px;
		transition: background-color 0.2s;
	}
	#sidebar-toggle-btn:hover { background-color: #1c1c1c; }
	#sidebar-toggle-btn .fa { display: none; }

	/* 접힌 상태에서 아이콘 전환 */
	body.sidebar-collapsed #sidebar-toggle-btn {
		background-image: url('<?php echo G5_SKIN_URL; ?>/admin/basic/img/menu-op.png');
	}

	/* brand를 토글 버튼 오른쪽으로 밀어냄 */
	.navbar-brand.seller-office-brand { margin-left: 50px; }

	/* 부드러운 전환 */
	#wrapper  { transition: padding-left 0.25s ease; }
	.side-nav { transition: transform 0.25s ease; }

	/* 접힌 상태 (버튼은 항상 top-left에 고정) */
	body.sidebar-collapsed #wrapper      { padding-left: 0; }
	body.sidebar-collapsed .side-nav     { transform: translateX(-225px); }
	body.sidebar-collapsed #_ppb_overlay { left: 0 !important; }

	/* ── 상단 navbar 줄바꿈 방지 ── */
	/* Bootstrap float 레이아웃 유지 + overflow 클리핑으로 줄바꿈 차단 */
	.navbar-collapse.navbar-ex1-collapse {
		overflow: hidden;
	}
	/* 개별 항목 텍스트 줄바꿈 방지 */
	.navbar-nav > li > a {
		white-space: nowrap;
	}
}

/* ── 상단 내비: 아이콘 전용 표시 구간 (줄바꿈 방지) ── */
/* 768px–1399px: 아이콘만, 회원 정보 숨김 */
@media (min-width:768px) and (max-width:1399px) {
	.navbar-userinfo-li { display: none !important; }
	/* li 높이를 navbar와 동일하게 고정 */
	.navbar-left > li {
		height: 51px;
	}
	/* a 태그: padding 제거 후 flex로 수직 중앙 정렬 → 우측 다크모드 버튼과 동일 위치 */
	.navbar-left > li > a {
		display: flex !important;
		align-items: center;
		justify-content: center;
		height: 51px !important;
		padding-top: 0 !important;
		padding-bottom: 0 !important;
		padding-left: 10px !important;
		padding-right: 10px !important;
		font-size: 0 !important;
		letter-spacing: 0 !important;
	}
	.navbar-left > li > a .fa {
		font-size: 15px !important;
		margin: 0;
		line-height: 1;
	}
	.navbar-left > li > a .badge {
		font-size: 10px !important;
		letter-spacing: 0;
	}
}
/* 1400px 이상: 텍스트+아이콘 모두 표시 */
@media (min-width:1400px) {
	.navbar-userinfo-li { display: list-item !important; }
}
/* 포인트: 768–1399px 구간에서 숫자 텍스트 숨김 (아이콘만 표시) */
@media (min-width:768px) and (max-width:1399px) {
	.navbar-point-text { display: none; }
}
</style>

<script>
/* 사이드바 접힘 상태를 첫 렌더 전에 복원 (깜빡임 방지) */
(function(){
	try {
		if (localStorage.getItem('partner_sb_col') === '1') {
			document.body.classList.add('sidebar-collapsed', 'sidebar-notransition');
			requestAnimationFrame(function(){ requestAnimationFrame(function(){
				document.body.classList.remove('sidebar-notransition');
			}); });
		}
	} catch(e){}
})();
</script>

<style>
/* ── 포인트 이력 모달 ── */
#vpnsPointModal.modal { overflow: hidden; }
#vpnsPointModal .modal-dialog {
    position: absolute; margin: 0;
    width: 94%; max-width: 1100px; min-width: 400px;
    height: 80vh; min-height: 300px;
    resize: both; overflow: hidden;
    display: flex; flex-direction: column;
}
#vpnsPointModal .modal-content {
    border-radius: 8px; flex: 1 1 auto;
    display: flex; flex-direction: column; min-height: 0; height: 100%;
}
#vpnsPointModal .modal-header {
    padding: 12px 16px; flex: 0 0 auto;
    cursor: move; user-select: none; -webkit-user-select: none;
}
#vpnsPointModal .modal-body { flex: 1 1 auto; min-height: 0; padding: 0; overflow: hidden; }
#vpnsPointFrame { display: block; border: none; width: 100%; height: 100%; }
</style>
<script>
$(function(){
    var POINT_URL = '<?php echo G5_URL; ?>/bbs/point.php';
    var $modal  = $('#vpnsPointModal');
    var $frame  = $('#vpnsPointFrame');
    var $dialog = $('#vpnsPointDialog');
    var $header = $('#vpnsPointHeader');

    /* 버튼 클릭 → 모달 열기 */
    $('#vpnsPointBtn').on('click', function(e){
        e.preventDefault();
        $modal.modal({ backdrop: true, keyboard: true });
    });

    /* 모달 열릴 때 iframe src 설정 (현재 테마 파라미터 포함) */
    $modal.on('show.bs.modal', function(){
        if ($frame.attr('src') === 'about:blank') {
            var theme = document.documentElement.getAttribute('data-site-theme') || 'light';
            $frame.attr('src', POINT_URL + '?vpntheme=' + theme);
        }
    });

    /* 모달 보인 후 중앙 배치 */
    $modal.on('shown.bs.modal', function(){
        var vw = $(window).width(), vh = $(window).height();
        var dw = $dialog.outerWidth(), dh = $dialog.outerHeight();
        $dialog.css({
            top:  Math.max(40, (vh - dh) / 2) + 'px',
            left: Math.max(10, (vw - dw) / 2) + 'px'
        });
    });

    /* iframe 로드 시 window.close() → 모달 닫기로 가로채기 */
    $frame.on('load', function(){
        try { this.contentWindow.close = function(){ $modal.modal('hide'); }; } catch(e){}
    });

    /* 모달 닫힐 때 iframe 리셋 */
    $modal.on('hidden.bs.modal', function(){
        $frame.attr('src', 'about:blank');
    });

    /* 드래그 (헤더 mousedown) */
    var _drag = null;
    $header.on('mousedown', function(e){
        if ($(e.target).is('button, button *, .close')) return;
        var off = $dialog.offset();
        _drag = { sx: e.clientX, sy: e.clientY, ox: off.left, oy: off.top };
        e.preventDefault();
    });
    $(document).on('mousemove.vpnsPoint', function(e){
        if (!_drag) return;
        $dialog.css({
            left: Math.max(0, _drag.ox + e.clientX - _drag.sx) + 'px',
            top:  Math.max(0, _drag.oy + e.clientY - _drag.sy) + 'px'
        });
    }).on('mouseup.vpnsPoint', function(){ _drag = null; });
});
</script>

<!-- 페이지 로딩바 --------------------------------------------------------- -->
<style>
#_ppb{position:fixed;top:0;left:0;right:0;height:3px;z-index:99999;pointer-events:none;background:rgba(96,165,250,0.1);}
#_ppb_bar{height:100%;width:0%;background:linear-gradient(90deg,#2563eb,#60a5fa,#93c5fd);border-radius:0 2px 2px 0;will-change:width;}
@keyframes _ppb_run{from{width:0%}to{width:84%}}
#_ppb_bar.ppb-on{animation:_ppb_run 9s cubic-bezier(.05,.65,.9,1) forwards;}
#_ppb.ppb-hide{opacity:0;transition:opacity .35s ease;}
</style>
<div id="_ppb" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-label="페이지 로딩 중">
  <div id="_ppb_bar" class="ppb-on"></div>
</div>
<!-- /페이지 로딩바 -------------------------------------------------------- -->

<div id="wrapper">
	<!-- Sidebar -->
	<nav class="navbar navbar-inverse navbar-fixed-top en" role="navigation">
		<!-- Brand and toggle get grouped for better mobile display -->
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<button type="button" id="sidebar-toggle-btn" aria-label="사이드 메뉴 접기/펼치기" title="사이드 메뉴 접기/펼치기">
				<i class="fa fa-bars"></i>
			</button>
			<a class="navbar-brand seller-office-brand" href="./" title="RPCWorld 판매자센터">
				<span class="seller-office-brand-wrap">
					<img src="<?php echo G5_DATA_URL; ?>/common/mobile_logo_img" alt="RPCWorld" class="seller-office-brand-logo">
					<span class="seller-office-brand-label">판매자센터</span>
				</span>
			</a>
		</div>

		<!-- Collect the nav links, forms, and other content for toggling -->
		<div class="collapse navbar-collapse navbar-ex1-collapse">
			<ul class="nav navbar-nav navbar-right">
				<li class="partner-darkmode-li">
					<button class="site-darkmode-btn partner-darkmode-nav-btn" aria-label="다크/라이트 모드 전환" title="다크/라이트 모드 전환"></button>
				</li>
			</ul>
			<ul class="nav navbar-nav side-nav">
				<?php if($is_guest): ?>
				<li class="bg-black">
					<a><span class="white"><i class="fa fa-lock fa-fw"></i> 로그인 필요</span></a>
				</li>
				<?php foreach([
					['fa-tachometer','대시보드'],['fa-shield','VPN 상품관리'],['fa-desktop','RPC 상품관리'],
					['fa-gavel','경매현황 (RPC)'],['fa-comments','댓글 관리'],['fa-inbox','1:1 문의'],
					['fa-thumbs-up','후기 관리'],['fa-bar-chart','신규판매 현황'],['fa-refresh','연장판매 현황'],
					['fa-table','판매 자료'],['fa-truck','배송 관리'],['fa-money','배송비 설정'],
					['fa-ban','취소 내역'],['fa-university','출금 신청'],
				] as [$icon,$label]): ?>
				<li style="opacity:0.35;pointer-events:none;"><a><i class="fa <?php echo $icon;?> fa-fw"></i> <?php echo $label;?></a></li>
				<?php endforeach; ?>
				<li class="bg-black" style="margin-top:2px;">
					<a><span class="white"><i class="fa fa-users fa-fw"></i> 추천인(마케터)</span></a>
				</li>
				<?php foreach([
					['fa-tachometer','대시보드'],['fa-pie-chart','수익 자료'],['fa-line-chart','수익 현황'],
					['fa-list-alt','수익 내역'],['fa-times-circle','취소 내역'],['fa-university','출금 신청'],
				] as [$icon,$label]): ?>
				<li style="opacity:0.35;pointer-events:none;"><a><i class="fa <?php echo $icon;?> fa-fw"></i> <?php echo $label;?></a></li>
				<?php endforeach; ?>
				<?php elseif(IS_SELLER): ?>
					<li class="bg-black">
						<a><span class="white"><i class="fa fa-briefcase fa-fw"></i> 판매자(셀러)</span></a>
					</li>
					<li<?php if(!$ap) echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/"><i class="fa fa-tachometer fa-fw"></i> 대시보드</a>
					</li>
					<li<?php if($ap == 'list_vpn' || $ap == 'item_vpn') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=list_vpn"><i class="fa fa-shield fa-fw"></i> VPN 상품관리</a>
					</li>
					<li<?php if($ap == 'list' || $ap == 'item') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=list"><i class="fa fa-desktop fa-fw"></i> RPC 상품관리</a>
					</li>
					<li<?php if($ap == 'auction_mgr') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=auction_mgr"><i class="fa fa-gavel fa-fw"></i> 경매현황 (RPC)</a>
					</li>
					<li<?php if($ap == 'comment') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=comment"><i class="fa fa-comments fa-fw"></i> 댓글 관리</a>
					</li>
					<li<?php if($ap == 'qalist') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=qalist"><i class="fa fa-inbox fa-fw"></i> 1:1 문의</a>
					</li>
					<li<?php if($ap == 'uselist') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=uselist"><i class="fa fa-thumbs-up fa-fw"></i> 후기 관리</a>
					</li>
					<li<?php if($ap == 'salelist') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=salelist"><i class="fa fa-bar-chart fa-fw"></i> 신규판매 현황</a>
					</li>
					<li<?php if($ap == 'salelist_for_extension_of_period') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=salelist_for_extension_of_period"><i class="fa fa-refresh fa-fw"></i> 연장판매 현황</a>
					</li>
					<li<?php if($ap == 'saleitem') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=saleitem"><i class="fa fa-table fa-fw"></i> 판매 자료</a>
					</li>
					<li<?php if($ap == 'delivery') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=delivery"><i class="fa fa-truck fa-fw"></i> 배송 관리</a>
					</li>
					<li<?php if($ap == 'sendcost') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=sendcost"><i class="fa fa-money fa-fw"></i> 배송비 설정</a>
					</li>
					<li<?php if($ap == 'cancelitem') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=cancelitem"><i class="fa fa-ban fa-fw"></i> 취소 내역</a>
					</li>
					<li<?php if($ap == 'paylist') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=paylist"><i class="fa fa-university fa-fw"></i> 출금 신청</a>
					</li>
				<?php endif; ?>
				<?php if(!$is_guest && IS_MARKETER) { ?>
					<li class="bg-black" style="margin-top:2px;">
						<a><span class="white"><i class="fa fa-users fa-fw"></i> 추천인(마케터)</span></a>
					</li>
					<li<?php if(!$ap) echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/"><i class="fa fa-tachometer fa-fw"></i> 대시보드</a>
					</li>
					<li<?php if($ap == 'mitem') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=mitem"><i class="fa fa-pie-chart fa-fw"></i> 수익 자료</a>
					</li>
					<li<?php if($ap == 'mlist') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=mlist"><i class="fa fa-line-chart fa-fw"></i> 수익 현황</a>
					</li>
					<li<?php if($ap == 'mitemlist') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=mitemlist"><i class="fa fa-list-alt fa-fw"></i> 수익 내역</a>
					</li>
					<li<?php if($ap == 'mcancelitem') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=mcancelitem"><i class="fa fa-times-circle fa-fw"></i> 취소 내역</a>
					</li>
					<li<?php if($ap == 'mpaylist') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=mpaylist"><i class="fa fa-university fa-fw"></i> 출금 신청</a>
					</li>
				<?php } ?>
			</ul>
			<ul class="nav navbar-nav navbar-left">
				<?php if($is_guest): ?>
				<li class="hidden-xs">
					<a style="opacity:0.5;"><i class="fa fa-user-circle fa-fw"></i> 비로그인</a>
				</li>
				<li><a href="<?php echo G5_SHOP_URL;?>"><i class="fa fa-shopping-cart fa-fw"></i> 쇼핑몰</a></li>
				<li style="display:none;"><a href="<?php echo G5_URL;?>"><i class="fa fa-users fa-fw"></i> 커뮤니티</a></li>
				<li><a href="<?php echo APMS_PARTNER_URL;?>/login.php"><i class="fa fa-sign-in fa-fw"></i> 로그인</a></li>
				<?php else: ?>
				<li class="hidden-xs navbar-userinfo-li">
					<a>
						<i class="fa fa-user-circle fa-fw"></i>
						<?php echo xp_icon($member['mb_id'], $member['level']);?>
						<?php echo "{$member['mb_nick']} ({$member['mb_id']})" ?>
					</a>
				</li>
				<li title="보유 포인트">
					<a href="javascript:void(0);" id="vpnsPointBtn" title="포인트 이력 보기">
						<i class="fa fa-star fa-fw" style="color:#f5c518;"></i>
						<span class="navbar-point-text"> <?php echo number_format((int)$member['mb_point']); ?>P</span>
					</a>
				</li>
				<?php if($member['admin']) { ?>
					<li><a href="<?php echo G5_ADMIN_URL;?>" title="관리자 패널"><i class="fa fa-cogs fa-fw"></i> 관리자</a></li>
				<?php } ?>
				<li>
					<a href="<?php echo $at_href['response'];?>" target="_blank" class="win_memo" title="내 글 반응 알림">
						<i class="fa fa-bell fa-fw"></i> 내글반응
						<?php if ($member['response']) { ?>
							<span class="badge navbar-badge-response"><?php echo number_format($member['response']);?></span>
						<?php } ?>
					</a>
				</li>
				<li>
					<a href="<?php echo $at_href['memo'];?>" target="_blank" class="win_memo" title="쪽지함">
						<i class="fa fa-envelope fa-fw"></i> 쪽지함
						<?php if ($member['memo']) { ?>
							<span class="badge navbar-badge-memo"><?php echo number_format($member['memo']);?></span>
						<?php } ?>
					</a>
				</li>
				<li>
					<a href="<?php echo $at_href['secret'];?>" title="1:1 문의"><i class="fa fa-life-ring fa-fw"></i> 1:1 문의</a>
				</li>
				<?php if(IS_SELLER) { ?>
					<li>
						<a href="<?php echo G5_SHOP_URL;?>/myshop.php?id=<?php echo urlencode($member['mb_id']);?>" title="내 판매샵"><i class="fa fa-home fa-fw"></i> 마이샵</a>
					</li>
				<?php } ?>
				<li><a href="<?php echo G5_SHOP_URL;?>" title="쇼핑몰 바로가기"><i class="fa fa-shopping-cart fa-fw"></i> 쇼핑몰</a></li>
				<?php if(IS_SELLER) { ?>
					<li<?php if($ap == 'myvpnservers' || $ap == 'vpnserver_sso_log') echo ' class="active"';?>>
						<a href="<?php echo APMS_PARTNER_URL?>/?ap=myvpnservers" title="내VPN서버관리"><i class="fa fa-hdd-o fa-fw"></i> 내VPN서버관리</a>
					</li>
				<?php } ?>
				<li style="display:none;"><a href="<?php echo G5_URL;?>" title="커뮤니티 바로가기"><i class="fa fa-users fa-fw"></i> 커뮤니티</a></li>
				<li>
					<a href="<?php echo $at_href['logout'];?>" title="로그아웃">
						<i class="fa fa-power-off fa-fw"></i> 로그아웃
					</a>
				</li>
				<?php endif; ?>
			</ul>
		</div><!-- /.navbar-collapse -->
	</nav>

	<!-- ── 포인트 이력 모달 ── -->
	<div id="vpnsPointModal" class="modal fade" role="dialog" aria-labelledby="vpnsPointModalLabel">
	  <div class="modal-dialog" id="vpnsPointDialog">
	    <div class="modal-content">
	      <div class="modal-header" id="vpnsPointHeader">
	        <button type="button" class="close" data-dismiss="modal" aria-label="닫기"><span aria-hidden="true">&times;</span></button>
	        <h4 class="modal-title" id="vpnsPointModalLabel"><i class="fa fa-star fa-fw" style="color:#f5c518;"></i> 포인트 이력</h4>
	      </div>
	      <div class="modal-body">
	        <iframe id="vpnsPointFrame" src="about:blank" frameborder="0"></iframe>
	      </div>
	    </div>
	  </div>
	</div>

	<div id="page-wrapper">

	<!-- 페이지 콘텐츠 로딩 스피너 -->
	<div id="_ppb_overlay" style="position:fixed;inset:0;left:250px;top:51px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;z-index:9000;pointer-events:none;">
		<style>
		@keyframes _ppb_spin{to{transform:rotate(360deg)}}
		#_ppb_spin_ring{animation:_ppb_spin .8s linear infinite}
		#_ppb_overlay.ppb-hide{opacity:0;transition:opacity .35s ease}
		[data-site-theme="dark"] #_ppb_overlay { background: rgba(26,27,30,0.82); }
		[data-theme="dark"] #_ppb_overlay { background: rgba(26,27,30,0.82); }
		</style>
		<div id="_ppb_spin_ring" style="width:52px;height:52px;border:4px solid rgba(96,165,250,0.18);border-top-color:#60a5fa;border-radius:50%;flex-shrink:0;"></div>
		<span style="font-size:13px;color:#9ca3af;letter-spacing:0.04em;">페이지를 불러오는 중…</span>
	</div>
	<!-- /페이지 콘텐츠 로딩 스피너 -->

<script>
/* 사이드바 토글 클릭 핸들러 */
(function(){
	var btn = document.getElementById('sidebar-toggle-btn');
	if (!btn) return;
	btn.addEventListener('click', function(){
		var collapsed = document.body.classList.toggle('sidebar-collapsed');
		try { localStorage.setItem('partner_sb_col', collapsed ? '1' : '0'); } catch(e){}
	});
})();
</script>

