/* ========================================
 * 경영공시 전용 스타일시트
 * ======================================== */

/* 공통 */
.disclosure-container {
	max-width: 1400px;
	margin: 0 auto;
	font-family: 'Noto Sans KR', sans-serif;
}

.disclosure-title {
	font-size: 24px;
	font-weight: 700;
	color: #333;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 3px solid #0056b3;
}

/* 필터 영역 */
.disclosure-filter {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
	padding: 12px 16px;
	background: #f8f9fa;
	border-radius: 6px;
}

.disclosure-filter label {
	font-weight: 600;
	color: #555;
}

.disclosure-filter select {
	padding: 6px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
}

/* 목록 테이블 */
.disclosure-table-wrap {
	overflow-x: auto;
}

.disclosure-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.disclosure-table thead th {
	background: #0056b3;
	color: #fff;
	padding: 12px 10px;
	text-align: center;
	font-weight: 600;
	white-space: nowrap;
	font-size: clamp(14px, 2vw, 18px);
	border-right: 1px solid #dee2e6;
}

.disclosure-table thead th:last-child {
	border-right: none;
}

.disclosure-table tbody td {
	padding: 10px;
	border: 1px solid #dee2e6;
	vertical-align: middle;
	font-size: clamp(14px, 2vw, 18px);
	word-break: keep-all;
}

.disclosure-table tbody tr:hover {
	background: #f0f7ff;
}

.num-cell {
	width: 60px;
	text-align: center;
	color: #666;
}

.sort1-cell {
	background: #e8f0fe;
	font-weight: 700;
	text-align: center;
	color: #0056b3;
	font-size: 18px;
}

.sort2-cell {
	background: #f5f8fb;
	font-weight: 600;
	text-align: center;
	font-size: 16px;
}

.type-cell {
	text-align: center;
	white-space: nowrap;
}

.period-cell {
	text-align: center;
	white-space: nowrap;
}

.view-cell {
	text-align: center;
}

.btn-view {
	display: inline-block;
	padding: 5px clamp(8px,1.2vw,16px);
	background: #0056b3;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-size: clamp(12px, 1.4vw, 16px);
	transition: background 0.2s;
	min-width: 60px;
}

.btn-view:hover {
	background: #003d82;
	color: #fff;
}

.no-link {
	color: #999;
}


/* ===== 상세 페이지 레이아웃 ===== */

.disclosure-view-layout {
	display: flex;
	gap: 20px;
	min-height: 600px;
}

/* 사이드바 */
.disclosure-sidebar {
	width: 280px;
	flex-shrink: 0;
	background: #f8f9fa;
	border-radius: 8px;
	padding: 16px;
	border: 1px solid #e0e0e0;
}

.sidebar-title {
	font-size: 16px;
	font-weight: 700;
	color: #0056b3;
	padding-bottom: 10px;
	border-bottom: 2px solid #0056b3;
	margin-bottom: 12px;
}

.sidebar-group {
	margin-bottom: 12px;
}

.sidebar-group-title {
	font-size: 13px;
	font-weight: 700;
	color: #555;
	padding: 6px 0;
	margin: 0;
}

.sidebar-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sidebar-list li {
	margin: 2px 0;
}

.sidebar-list li a {
	display: block;
	padding: 6px 10px;
	color: #333;
	text-decoration: none;
	font-size: 13px;
	border-radius: 4px;
	transition: all 0.2s;
}

.sidebar-list li a:hover {
	background: #e8f0fe;
	color: #0056b3;
}

.sidebar-list li.active a {
	background: #0056b3;
	color: #fff;
	font-weight: 600;
}

/* 메인 콘텐츠 */
.disclosure-main {
	flex: 1;
	min-width: 0;
}

.disclosure-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid #333;
}

.disclosure-header h2 {
	font-size: 20px;
	font-weight: 700;
	color: #333;
	margin: 0;
}

.year-filter select {
	padding: 6px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

/* 담당자 정보 */
.disclosure-contacts {
	margin-bottom: 20px;
}

.contact-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.contact-table th,
.contact-table td {
	padding: 8px 12px;
	border: 1px solid #dee2e6;
	text-align: center;
}

.contact-table thead th {
	background: #f5f5f5;
	font-weight: 600;
}

/* 본문 */
.disclosure-content {
	padding: 20px;
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	margin-bottom: 20px;
	line-height: 1.7;
}

/* 첨부파일 */
.disclosure-files {
	margin-bottom: 20px;
}

.disclosure-files h3 {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 10px;
	color: #333;
}

.file-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.file-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #f8f9fa;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	margin-bottom: 6px;
}

.file-link {
	color: #0056b3;
	text-decoration: none;
	font-weight: 500;
}

.file-link:hover {
	text-decoration: underline;
}

.file-size {
	color: #999;
	font-size: 12px;
}

.btn-pdf-view {
	padding: 3px 10px;
	background: #dc3545;
	color: #fff;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	font-size: 12px;
}

.btn-pdf-view:hover {
	background: #c82333;
}

.btn-download {
	padding: 3px 10px;
	background: #28a745;
	color: #fff;
	text-decoration: none;
	border-radius: 3px;
	font-size: 12px;
}

.btn-download:hover {
	background: #218838;
	color: #fff;
}

/* PDF 뷰어 */
.disclosure-pdf-viewer {
	margin-top: 20px;
	border: 2px solid #dee2e6;
	border-radius: 6px;
	overflow: hidden;
}

/* 빈 상태 */
.disclosure-empty {
	padding: 60px 20px;
	text-align: center;
	color: #999;
	font-size: 16px;
	background: #f8f9fa;
	border-radius: 6px;
}


/* ===== 반응형 ===== */

/* 태블릿 */
@media (max-width: 768px) {
	.disclosure-view-layout {
		flex-direction: column;
	}

	.disclosure-sidebar {
		width: 100%;
	}

	.disclosure-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.disclosure-table {
		font-size: 13px;
	}

	.file-list li {
		flex-wrap: wrap;
	}
}

/* 모바일 */
@media (max-width: 480px) {
	.disclosure-container {
		padding: 10px;
	}

	.disclosure-title {
		font-size: 18px;
	}

	.disclosure-table thead th {
		padding: 8px 5px;
		font-size: 12px;
	}

	.disclosure-table tbody td {
		padding: 6px 5px;
		font-size: 12px;
	}

	.btn-view {
		padding: 4px 10px;
		font-size: 12px;
	}
}


/* ============================================
 * 경영공시 상세 (disclosure_view) 리디자인
 * ============================================ */

/* 레이아웃 */
.dv-layout {
	display: flex;
	min-height: 100vh;
	font-family: 'Noto Sans KR', sans-serif;
}

/* ── 사이드바 ── */
.dv-sidebar {
	width: 300px;
	flex-shrink: 0;
	background: #1e2a3a;
	color: #ddd;
	overflow-y: auto;
	padding: 0;
	transition: width 0.3s ease;
	border-radius: 0 16px 16px 0;
}

/* 로고 헤더 */
.dv-logo-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 18px;
	background: #2563eb;
}

.dv-logo-img {
	max-height: 40px;
	filter: brightness(0) invert(1);
}

.dv-logo-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	color: #fff;
	background: transparent;
	cursor: pointer;
	font-size: 16px;
	transition: all 0.2s;
}

.dv-logo-back:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.15);
}

.dv-icon-sidebar {
	transition: transform 0.3s ease;
}

/* 사이드바 접기 */
.sidebar-collapsed .dv-sidebar {
	width: 86px;
	min-width: 86px;
	overflow: hidden;
	background: #2563eb;
	border-radius: 0 16px 16px 0;
}

.sidebar-collapsed .dv-logo-header {
	padding: 16px 7px;
	justify-content: center;
}

.sidebar-collapsed .dv-logo-img,
.sidebar-collapsed .dv-nav {
	display: none;
}

.sidebar-collapsed .dv-logo-back {
	border-color: rgba(255, 255, 255, 0.6);
}

.sidebar-collapsed .dv-icon-sidebar {
	transform: rotate(180deg);
}

.dv-nav {
	padding: 0;
}

/* 대분류 섹션 헤더 */
.dv-section {
	margin-bottom: 0;
	border-bottom: 1px solid #1a2430;
}

.dv-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	background: #263545;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	user-select: none;
	transition: background 0.2s;
}

.dv-section-header:hover {
	background: #2e4358;
}

.dv-section-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: #3b82f6;
	color: #fff;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 700;
	flex-shrink: 0;
}

.dv-section-body {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.5s ease;
}

.dv-section-body.open {
	max-height: 2000px;
	/* 대분류가 다치지 않게 충분한 여유 */
}

/* 중분류 그룹 */
.dv-group {
	border-bottom: 1px solid #253242;
}

.dv-group-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 18px 10px 28px;
	font-size: 17px;
	font-weight: 600;
	color: #ccc;
	cursor: pointer;
	transition: background 0.2s;
}

.dv-group-title:hover {
	background: #253545;
}

.dv-toggle-icon {
	color: #888;
	display: flex;
	align-items: center;
}

.dv-icon-chevron {
	transition: transform 0.3s ease;
}

.dv-icon-chevron.rotate {
	transform: rotate(180deg);
}

/* 항목 리스트 */
.dv-group-list {
	list-style: none;
	padding: 0;
	margin: 0;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.5s ease;
}

.dv-group-list.open {
	max-height: 600px;
}

.dv-group-list li a {
	display: block;
	padding: 8px 18px 8px 30px;
	color: #aab;
	text-decoration: none;
	font-size: 16px;
	transition: all 0.5s;
	border-left: 3px solid transparent;
}

.dv-group-list li a:hover {
	background: #253545;
	color: #fff;
}

.dv-group-list li.active a {
	background: #1a4a7a;
	color: #fff;
	font-weight: 600;
	border-left-color: #3b82f6;
}

/* ── 메인 영역 ── */
.dv-main {
	flex: 1;
	min-width: 0;
	padding: 20px 24px;
	background: #f5f7fa;
}

/* 상단 툴바 */
.dv-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
	padding: 10px 16px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
}

.dv-filters {
	display: flex;
	gap: 8px;
}

.dv-filters select {
	padding: 7px 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	background: #fff;
	cursor: pointer;
}

.dv-btn-download {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	background: #3b82f6;
	color: #fff;
	text-decoration: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	transition: background 0.2s;
}

.dv-btn-download:hover {
	background: #2563eb;
	color: #fff;
}

/* 첨부자료 다운로드 */
.dv-extra-files {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	margin-bottom: 16px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
}

.dv-extra-label {
	font-weight: 600;
	font-size: 14px;
	color: #333;
	white-space: nowrap;
}

.dv-extra-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dv-file-chip {
	display: inline-block;
	padding: 4px 12px;
	background: #f0f0f0;
	border: 1px solid #ddd;
	border-radius: 20px;
	font-size: 13px;
	color: #333;
	text-decoration: none;
	transition: all 0.2s;
}

.dv-file-chip:hover {
	background: #e0e7ff;
	border-color: #3b82f6;
	color: #3b82f6;
}

/* PDF 뷰어 */
.dv-pdf-viewer {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 20px;
}

.dv-pdf-viewer iframe {
	display: block;
}

/* 본문 표시 */
.dv-content-area {
	padding: 24px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	line-height: 1.8;
	margin-bottom: 20px;
}

/* 기준일/제출일 (하단) */
.dv-dates-bottom {
	display: flex;
	justify-content: flex-end;
	gap: 16px;
	margin-top: 10px;
	font-size: 13px;
	color: #666;
}

.dv-date-item strong {
	color: #333;
	font-weight: 600;
}

/* 담당자 */
.dv-contacts {
	margin-top: 16px;
}

.dv-contacts table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.dv-contacts th,
.dv-contacts td {
	padding: 8px 12px;
	border: 1px solid #dee2e6;
	text-align: center;
}

.dv-contacts thead th {
	background: #f5f5f5;
	font-weight: 600;
}

/* 빈 상태 */
.dv-empty {
	padding: 80px 20px;
	text-align: center;
	color: #999;
	font-size: 16px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	margin-bottom: 20px;
}

/* 기준일, 제출일 (하단부) */
.dv-dates-bottom {
	display: flex;
	justify-content: flex-end;
	gap: 16px;
	padding: 10px 16px;
	margin-bottom: 16px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	font-size: 13.5px;
	color: #555;
}

.dv-dates-bottom .dv-date-item:not(:last-child)::after {
	content: "|";
	margin-left: 16px;
	color: #ddd;
}

.dv-dates-bottom strong {
	color: #222;
	font-weight: 600;
	margin-right: 4px;
}

/* 반응형 */
@media (max-width: 768px) {
	.dv-layout {
		flex-direction: column;
	}

	.dv-sidebar {
		width: 100%;
		border-radius: 0;
	}

	.sidebar-collapsed .dv-sidebar {
		width: 100%;
		min-width: 100%;
		border-radius: 0;
		background: transparent;
	}

	.sidebar-collapsed .dv-logo-header {
		padding: 16px 18px;
		justify-content: space-between;
		background: #2563eb;
	}

	.sidebar-collapsed .dv-logo-img {
		display: block;
	}

	.sidebar-collapsed .dv-logo-back {
		border-color: rgba(255, 255, 255, 0.5);
	}

	/* 화살표 애니메이션 - 모바일 (상하) */
	.dv-icon-sidebar {
		transform: rotate(90deg) !important;
		/* 열림 상태: 위쪽 화살표 */
	}

	.sidebar-collapsed .dv-icon-sidebar {
		transform: rotate(-90deg) !important;
		/* 닫힘 상태: 아래쪽 화살표 */
	}

	/* 모바일에서는 메뉴 영역 접기(애니메이션) */
	.dv-nav {
		max-height: 2000px;
		overflow: hidden;
		transition: max-height 0.4s ease;
	}

	.sidebar-collapsed .dv-nav {
		display: block;
		max-height: 0;
	}

	.dv-toolbar {
		flex-direction: column;
		gap: 10px;
	}

	.dv-dates-bottom {
		justify-content: flex-start;
		font-size: 13px;
	}

	.dv-extra-files {
		flex-direction: column;
		align-items: flex-start;
	}
}