<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MSDS 교육 &#8211; 산업안전지원센터 주식회사</title>
	<atom:link href="https://safetysupport.co.kr/tag/msds-%ea%b5%90%ec%9c%a1/feed/" rel="self" type="application/rss+xml" />
	<link>https://safetysupport.co.kr</link>
	<description>안전관리위탁부터 위험성평가, 중대재해예방까지 — 사업장 맞춤 안전보건 컨설팅</description>
	<lastBuildDate>Fri, 24 Apr 2026 04:51:44 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://safetysupport.co.kr/wp-content/uploads/2026/03/cropped-파비콘1-32x32.png</url>
	<title>MSDS 교육 &#8211; 산업안전지원센터 주식회사</title>
	<link>https://safetysupport.co.kr</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>물질안전보건자료(MSDS) 교육</title>
		<link>https://safetysupport.co.kr/msds-safety-training/</link>
		
		<dc:creator><![CDATA[mangjil]]></dc:creator>
		<pubDate>Fri, 24 Apr 2026 04:45:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GHS]]></category>
		<category><![CDATA[MSDS]]></category>
		<category><![CDATA[MSDS 교육]]></category>
		<category><![CDATA[경고표지]]></category>
		<category><![CDATA[물질안전보건자료]]></category>
		<category><![CDATA[물질안전보건자료 교육]]></category>
		<category><![CDATA[보호구 착용]]></category>
		<category><![CDATA[사업장 안전관리]]></category>
		<category><![CDATA[산업안전]]></category>
		<category><![CDATA[산업안전보건법]]></category>
		<category><![CDATA[안전보건교육]]></category>
		<category><![CDATA[위험성평가]]></category>
		<category><![CDATA[화학물질 관리]]></category>
		<category><![CDATA[화학물질 안전]]></category>
		<category><![CDATA[화학물질 취급]]></category>
		<guid isPermaLink="false">https://safetysupport.co.kr/?p=3122</guid>

					<description><![CDATA[목록으로 맨 위로 맨 아래로 EDUCATION MATERIAL 교육 자료 EDU 본 교육자료를 활용하여 관련 교육을 실시하시기 바랍니다. EDUCATION LOG 교육일지 작성 LOG 교육 실시 후 아래 양식에 교육일지를 작성하여 보관하시기 바랍니다. 안전보건교육일지 📋 안전보건교육일지 🔒 워터마크 ON 📥 PDF 저장 🔐 워터마크 해제 워터마크를 끄려면 관리자 비밀번호를입력하세요. 취소 확인 산업안전지원센터㈜ 산업안전지원센터㈜safetysupport.co.kr 안전보건교육일지 산업안전보건법에 따른 안전보건교육 [&#8230;]]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="3122" class="elementor elementor-3122" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-0eb0e61 e-con-full e-flex e-con e-parent" data-id="0eb0e61" data-element_type="container" data-e-type="container">
				<div class="elementor-element elementor-element-f33d82c elementor-widget elementor-widget-html" data-id="f33d82c" data-element_type="widget" data-e-type="widget" data-widget_type="html.default">
					<style>
.edu-float-nav{position:fixed;right:20px;top:50%;transform:translateY(-50%);z-index:9999;display:flex;flex-direction:column;gap:15px;}
.edu-float-btn{display:flex;align-items:center;justify-content:center;width:70px;height:70px;border-radius:50%;background:#0D4444;border:none;cursor:pointer;box-shadow:0 2px 8px rgba(13,68,68,.25);transition:all .22s ease;text-decoration:none;}
.edu-float-btn:hover{background:#1a6b6b;transform:scale(1.1);}
.edu-float-btn svg{width:30px;height:30px;stroke:#fff;flex-shrink:0;}
.edu-float-tooltip{position:absolute;right:65px;background:#0D4444;color:#fff;font-size:13px;font-weight:500;white-space:nowrap;padding:5px 10px;border-radius:6px;opacity:0;pointer-events:none;transition:opacity .15s ease;font-family:'NanumSquareNeo','Noto Sans KR',sans-serif;}
.edu-float-btn:hover .edu-float-tooltip{opacity:1;}
.edu-float-tooltip::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border-left:5px solid #0D4444;border-top:4px solid transparent;border-bottom:4px solid transparent;}
@media(max-width:768px){.edu-float-nav{right:12px;}.edu-float-btn{width:44px;height:44px;}.edu-float-btn svg{width:18px;height:18px;}}
</style>

<div class="edu-float-nav">
    <!-- 목록으로 -->
    <a class="edu-float-btn" href="https://safetysupport.co.kr/safety-education/">
        <span class="edu-float-tooltip">목록으로</span>
        <svg viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
            <line x1="8" y1="6" x2="21" y2="6"/>
            <line x1="8" y1="12" x2="21" y2="12"/>
            <line x1="8" y1="18" x2="21" y2="18"/>
            <line x1="3" y1="6" x2="3.01" y2="6"/>
            <line x1="3" y1="12" x2="3.01" y2="12"/>
            <line x1="3" y1="18" x2="3.01" y2="18"/>
        </svg>
    </a>
    <!-- 맨 위로 -->
    <button class="edu-float-btn" onclick="window.scrollTo({top:0,behavior:'smooth'})">
        <span class="edu-float-tooltip">맨 위로</span>
        <svg viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
            <polyline points="18 15 12 9 6 15"/>
        </svg>
    </button>
    <!-- 맨 아래로 -->
    <button class="edu-float-btn" onclick="window.scrollTo({top:document.body.scrollHeight,behavior:'smooth'})">
        <span class="edu-float-tooltip">맨 아래로</span>
        <svg viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
            <polyline points="6 9 12 15 18 9"/>
        </svg>
    </button>
</div>				</div>
				<div class="elementor-element elementor-element-63d2ce8 elementor-widget elementor-widget-html" data-id="63d2ce8" data-element_type="widget" data-e-type="widget" data-widget_type="html.default">
					<!-- =====================================================
  섹션 구분자 - 교육 자료 (EDUCATION MATERIAL)
  용도: WordPress Elementor HTML 위젯
  위치: 이북/자료 콘텐츠 상단
  컬러: 딥그린 (#0D3321) 계열
====================================================== -->

<div style="
  border-radius: 12px;
  overflow: hidden;
  font-family: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  margin: 8px 0 20px;
">

  <!-- 상단 배너 -->
  <div style="
    background: linear-gradient(100deg, #0D3321 0%, #1a5c35 60%, #226b3f 100%);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    gap: 18px;
  ">
    <!-- 아이콘 원형 -->
    <div style="
      width: 42px; height: 42px;
      background: rgba(255,255,255,0.12);
      border: 1px solid rgba(255,255,255,0.18);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    ">
      <svg viewBox="0 0 24 24" style="width:19px;height:19px;fill:#a8debb;">
        <path d="M12 3L1 9l11 6 9-4.91V17h2V9M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82z"/>
      </svg>
    </div>

    <!-- 텍스트 -->
    <div style="display:flex; flex-direction:column; gap:3px;">
      <span style="
        font-size: 10px; font-weight: 600; letter-spacing: 0.16em;
        color: #7dc49b; text-transform: uppercase;
      ">EDUCATION MATERIAL</span>
      <span style="
        font-size: 17px; font-weight: 700; color: #e8f5ed; letter-spacing: -0.01em;
      ">교육 자료</span>
    </div>

    <!-- 우측 태그 -->
    <div style="
      margin-left: auto;
      background: rgba(255,255,255,0.1);
      border: 0.5px solid rgba(255,255,255,0.22);
      color: #c5e8d0;
      font-size: 10px; font-weight: 600; letter-spacing: 0.12em;
      text-transform: uppercase;
      padding: 5px 14px;
      border-radius: 20px;
      flex-shrink: 0;
      white-space: nowrap;
    ">EDU</div>
  </div>

  <!-- 하단 서브텍스트 -->
  <div style="
    background: #f0f8f3;
    border: 0.5px solid #b8d9c4;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 9px 28px;
    display: flex;
    align-items: center;
    gap: 8px;
  ">
    <div style="
      width: 5px; height: 5px;
      border-radius: 50%;
      background: #3a7a50;
      flex-shrink: 0;
    "></div>
    <span style="
      font-size: 12px; color: #2d6043; font-weight: 500; letter-spacing: 0.01em;
    ">본 교육자료를 활용하여 관련 교육을 실시하시기 바랍니다.</span>
  </div>

</div>				</div>
				<div class="elementor-element elementor-element-7e74e4a elementor-widget elementor-widget-html" data-id="7e74e4a" data-element_type="widget" data-e-type="widget" data-widget_type="html.default">
					<div class="_df_book df-lite" id="df_3125"  _slug="3125" data-title="" wpoptions="true" thumbtype="" ></div><script class="df-shortcode-script" nowprocket type="application/javascript">window.option_df_3125 = {"outline":[],"autoEnableOutline":"false","autoEnableThumbnail":"false","overwritePDFOutline":"false","enableDownload":"false","direction":"1","pageSize":"1","pageMode":"1","singlePageMode":"0","source":"https:\/\/safetysupport.co.kr\/wp-content\/uploads\/2026\/04\/msds-safety-training_260424_V1.pdf","wpOptions":"true"}; if(window.DFLIP && window.DFLIP.parseBooks){window.DFLIP.parseBooks();}</script>				</div>
				<div class="elementor-element elementor-element-731c116 elementor-widget elementor-widget-html" data-id="731c116" data-element_type="widget" data-e-type="widget" data-widget_type="html.default">
					<div style="border:1px solid #b2cae0; border-radius:8px; padding:8px; overflow:hidden">
<!-- safetysupport_콘텐츠하단_반응형 -->
<ins class="adsbygoogle"
  style="display:block"
  data-ad-client="ca-pub-3106752057307696"
  data-ad-slot="5220315587"
  data-ad-format="auto"
  data-full-width-responsive="true"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</div>				</div>
				<div class="elementor-element elementor-element-a43c2b8 elementor-widget elementor-widget-html" data-id="a43c2b8" data-element_type="widget" data-e-type="widget" data-widget_type="html.default">
					<!-- =====================================================
  섹션 구분자 - 교육일지 작성
  용도: WordPress Elementor HTML 위젯
  위치: 교육일지 콘텐츠 상단
  컬러: 딥그린 (#0D3321) 계열
====================================================== -->

<div style="
  border-radius: 12px;
  overflow: hidden;
  font-family: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  margin: 8px 0 20px;
">

  <!-- 상단 배너 -->
  <div style="
    background: linear-gradient(100deg, #0D3321 0%, #1a5c35 60%, #226b3f 100%);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    gap: 18px;
  ">
    <!-- 아이콘 원형 -->
    <div style="
      width: 42px; height: 42px;
      background: rgba(255,255,255,0.12);
      border: 1px solid rgba(255,255,255,0.18);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    ">
      <svg viewBox="0 0 24 24" style="width:19px;height:19px;fill:#a8debb;">
        <path d="M6 2h9l5 5v15a2 2 0 01-2 2H6a2 2 0 01-2-2V4a2 2 0 012-2zm0 2v16h12V8h-4V4H6zm2 8h8v1.5H8V12zm0 3h8v1.5H8V15zm0-6h4v1.5H8V9z"/>
      </svg>
    </div>

    <!-- 텍스트 -->
    <div style="display:flex; flex-direction:column; gap:3px;">
      <span style="
        font-size: 10px; font-weight: 600; letter-spacing: 0.16em;
        color: #7dc49b; text-transform: uppercase;
      ">EDUCATION LOG</span>
      <span style="
        font-size: 17px; font-weight: 700; color: #e8f5ed; letter-spacing: -0.01em;
      ">교육일지 작성</span>
    </div>

    <!-- 우측 태그 -->
    <div style="
      margin-left: auto;
      background: rgba(255,255,255,0.1);
      border: 0.5px solid rgba(255,255,255,0.22);
      color: #c5e8d0;
      font-size: 10px; font-weight: 600; letter-spacing: 0.12em;
      text-transform: uppercase;
      padding: 5px 14px;
      border-radius: 20px;
      flex-shrink: 0;
      white-space: nowrap;
    ">LOG</div>
  </div>

  <!-- 하단 서브텍스트 -->
  <div style="
    background: #f0f8f3;
    border: 0.5px solid #b8d9c4;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 9px 28px;
    display: flex;
    align-items: center;
    gap: 8px;
  ">
    <div style="
      width: 5px; height: 5px;
      border-radius: 50%;
      background: #3a7a50;
      flex-shrink: 0;
    "></div>
    <span style="
      font-size: 12px; color: #2d6043; font-weight: 500; letter-spacing: 0.01em;
    ">교육 실시 후 아래 양식에 교육일지를 작성하여 보관하시기 바랍니다.</span>
  </div>

</div>

				</div>
				<div class="elementor-element elementor-element-c54d12d elementor-widget elementor-widget-html" data-id="c54d12d" data-element_type="widget" data-e-type="widget" data-widget_type="html.default">
					<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>안전보건교육일지</title>
<style>
  @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap');

  :root {
    /* ════ 페이지 여백 ════ */
    --gap-page-top:            60px;
    --gap-page-side:           60px;
    --gap-page-bottom:         28px;
    --gap-page2-top:           60px;

    /* ════ 헤더 ════ */
    --gap-after-header:        5px;
    --approval-sign-height:    50px;

    /* ════ 작성일자행 ════ */
    --gap-after-writerow:      15px;

    /* ════ 섹션 간격 ════ */
    --gap-after-edutype:       20px;
    --gap-after-educount:      20px;
    --gap-after-educontent:    20px;
    --gap-after-loc:           20px;
    --gap-after-special:       10px;
    --gap-before-mini-roster:  12px;

    /* ════ 셀 높이/패딩 ════ */
    --main-cell-pad-v:         5px;
    --main-cell-pad-h:         8px;
    --educount-row-height:     26px;
    --educontent-min-height:   120px;
    --special-min-height:      60px;
    --loc-cell-pad-v:          7px;
    --mini-row-height:         25px;

    /* ════ 2페이지 ════ */
    --roster-row-height:       25px;

    /* ════ 워터마크 ════ */
    --watermark-opacity:       0.06;

    /* ════ 색상 ════ */
    --deep-green:  #0D3321;
    --light-green: #e8f5ed;
    --lighter-green: #f4faf6;
    --accent:      #3db86b;
    --border:      #888;
    --border-light:#ccc;
    --text:        #1a1a1a;
    --text-muted:  #555;

    /* ════ 테두리 두께 ════ */
    --main-border-width:       1px;
    --inner-table-border:      1px;
    --roster-divider-width:    1.5px;
  }

  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  body {
    font-family: 'Noto Sans KR', sans-serif;
    background: #f0f0f0;
    color: var(--text);
    font-size: 12px;
    line-height: 1.5;
  }

  #control-panel {
    background: var(--deep-green);
    color: #fff;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }

  #control-panel h1 {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
  }

  .btn-pdf {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
  }

  .btn-pdf:hover { background: #2da05a; }
  .btn-pdf:disabled { opacity: 0.6; cursor: not-allowed; }

  .btn-wm {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
  }

  .btn-wm:hover { background: rgba(255,255,255,0.25); }

  #pw-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 999;
    align-items: center;
    justify-content: center;
  }

  #pw-overlay.show { display: flex; }

  #pw-box {
    background: #fff;
    border-radius: 10px;
    padding: 28px 32px;
    width: 300px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    text-align: center;
  }

  #pw-box h2 {
    font-size: 14px;
    font-weight: 700;
    color: var(--deep-green);
    margin-bottom: 6px;
  }

  #pw-box p {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 16px;
  }

  #pw-input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    text-align: center;
    letter-spacing: 4px;
    font-family: inherit;
    outline: none;
    margin-bottom: 6px;
  }

  #pw-input:focus { border-color: var(--accent); }

  #pw-input.error {
    border-color: #e24b4a;
    animation: shake 0.3s;
  }

  #pw-error {
    font-size: 11px;
    color: #e24b4a;
    height: 16px;
    margin-bottom: 12px;
  }

  #pw-box .pw-btns { display: flex; gap: 8px; }

  #pw-box .pw-btns button {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    border: none;
  }

  .pw-confirm { background: var(--deep-green); color: #fff; }
  .pw-cancel { background: #f0f0f0; color: var(--text); }

  @keyframes shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
  }

  #pages-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    gap: 20px;
  }

  .a4-page {
    background: #fff;
    width: 794px;
    min-height: 1123px;
    padding: var(--gap-page-top) var(--gap-page-side) var(--gap-page-bottom);
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    position: relative;
  }

  #page2 { padding-top: var(--gap-page2-top); }

  .watermark {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-35deg);
    font-size: 68px;
    font-weight: 700;
    color: #000;
    opacity: var(--watermark-opacity);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    z-index: 10;
    letter-spacing: 2px;
  }

  .page-num {
    position: absolute;
    bottom: 14px;
    right: var(--gap-page-side);
    font-size: 10px;
    color: #bbb;
  }

  .doc-header {
    display: flex;
    align-items: stretch;
    border-bottom: 2.5px solid var(--deep-green);
    margin-bottom: var(--gap-after-header);
    padding-bottom: 10px;
    gap: 12px;
  }

  .doc-logo-area {
    display: flex;
    align-items: center;
    min-width: 150px;
    flex-shrink: 0;
  }

  .doc-logo-text {
    font-size: 11px;
    font-weight: 700;
    color: var(--deep-green);
    line-height: 1.5;
  }

  .doc-title-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .doc-title-area .doc-title {
    font-size: 25px;
    font-weight: 700;
    color: var(--deep-green);
    letter-spacing: 1px;
  }

  .doc-title-area .doc-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
  }

  .doc-approval {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    border: var(--main-border-width) solid var(--border);
    border-radius: 3px;
    overflow: hidden;
  }

  .doc-approval .ap-cells { display: flex; align-items: stretch; }

  .doc-approval .ap-cell {
    width: 70px;
    text-align: center;
    border-left: var(--main-border-width) solid var(--border);
    display: flex;
    flex-direction: column;
  }

  .doc-approval .ap-cell:first-child { border-left: none; }

  .doc-approval .ap-cell .ap-role {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 4px;
    border-bottom: var(--main-border-width) solid var(--border);
    background: var(--deep-green);
    color: #fff;
    text-align: center;
    word-break: keep-all;
    line-height: 1.4;
    flex: 1;
  }

  .doc-approval .ap-cell .ap-role[contenteditable]:focus {
    outline: 1px solid rgba(255,255,255,0.6);
    background: #1a5c35;
  }

  .doc-approval .ap-cell .ap-sign {
    flex: 1;
    min-height: var(--approval-sign-height);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-size: 8px;
    color: #ccc;
    padding-bottom: 3px;
  }

  .write-row {
    display: flex;
    gap: 32px;
    font-size: 11px;
    color: var(--text-muted);
    padding: 5px 4px;
    border-bottom: var(--main-border-width) solid var(--border-light);
    margin-bottom: var(--gap-after-writerow);
  }

  .write-row span {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .write-row .write-val {
    border-bottom: var(--main-border-width) solid var(--border-light);
    min-width: 90px;
    outline: none;
    display: inline-block;
    color: var(--text);
    background: transparent;
  }

  .write-row .write-val:focus { background: #fffde7; }

  .main-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: #fff;
  }

  .main-table th,
  .main-table td {
    border: var(--main-border-width) solid var(--border);
    vertical-align: middle;
    padding: var(--main-cell-pad-v) var(--main-cell-pad-h);
    background: #fff;
  }

  .main-table .section-row td {
    background: var(--deep-green) !important;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    padding: 5px 10px;
    letter-spacing: 0.3px;
    border-color: var(--deep-green);
  }

  .main-table .section-row td::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 11px;
    background: var(--accent);
    border-radius: 2px;
    margin-right: 7px;
    vertical-align: middle;
  }

  .main-table .row-th {
    background: var(--light-green) !important;
    color: var(--deep-green);
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    width: 52px;
    line-height: 1.4;
    font-size: 11px;
  }

  .section-label { background: var(--light-green) !important; }

  .main-table td[contenteditable] { background: #fff !important; }

  .main-table td[contenteditable]:focus {
    background: #fffde7 !important;
    outline: 2px solid var(--accent);
    outline-offset: -2px;
  }

  /* ════ 교육내용 고정 텍스트 스타일 ════ */
  .edu-content-fixed {
    font-size: 11.5px;
    line-height: 2.0;
    color: var(--text);
    padding: 8px 10px;
    background: #fff;
    vertical-align: top;
  }

  .edu-content-fixed .edu-item {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin-bottom: 1px;
  }

  .edu-content-fixed .edu-bullet {
    color: var(--deep-green);
    font-weight: 700;
    flex-shrink: 0;
    line-height: 2.0;
  }

  /* ════ 교육대상 화학물질 입력칸 ════ */
  .chem-input-wrap {
    padding: 8px 10px;
    background: #fff;
    vertical-align: top;
  }

  .chem-subheader {
    font-size: 10px;
    font-weight: 700;
    color: var(--deep-green);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 4px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .chem-subheader::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 10px;
    background: var(--accent);
    border-radius: 2px;
    flex-shrink: 0;
  }

  .chem-required-badge {
    font-size: 9px;
    background: #e74c3c;
    color: #fff;
    border-radius: 3px;
    padding: 1px 5px;
    font-weight: 700;
    margin-left: 4px;
  }

  .chem-input-area {
    width: 100%;
    min-height: 90px;
    border: 1.5px solid var(--border-light);
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 11px;
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text);
    outline: none;
    resize: vertical;
    line-height: 1.7;
    background: #fff;
  }

  .chem-input-area:focus {
    border-color: var(--accent);
    background: #fffde7;
    outline: none;
  }

  .chem-notice {
    margin-top: 5px;
    font-size: 10px;
    color: #c0392b;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 3px;
  }

  .chem-notice::before {
    content: '⚠';
    flex-shrink: 0;
    margin-top: 1px;
  }

  .edu-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 2px;
    font-size: 11px;
    background: #fff;
  }

  .edu-type-grid label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    background: #fff;
  }

  .edu-type-grid input[type="checkbox"] {
    accent-color: var(--deep-green);
    width: 12px;
    height: 12px;
    flex-shrink: 0;
  }

  .educount-row > td,
  .loc-row > td {
    vertical-align: top !important;
    padding: 0 !important;
    line-height: 0;
    font-size: 0;
    background: #fff !important;
  }

  .educount-row > th.row-th,
  .loc-row > th.row-th {
    vertical-align: middle !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* 교육내용행 - 두 칸이 나란히 있는 행 */
  .educontent-row > td.content-cell,
  .educontent-row > td.chem-cell {
    vertical-align: top;
    padding: 0 !important;
    line-height: 0;
    font-size: 0;
    background: #fff !important;
  }

  .educontent-row > th.row-th {
    vertical-align: middle !important;
  }

  .inw-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 11px;
    margin: 0;
    background: #fff;
  }

  .inw-table th,
  .inw-table td {
    border: var(--inner-table-border) solid var(--border);
    text-align: center;
    padding: 3px 4px;
    height: var(--educount-row-height);
    background: transparent;
    vertical-align: middle;
  }

  .inw-table th {
    color: var(--deep-green);
    font-weight: 700;
  }

  .inw-head { background: var(--lighter-green) !important; }

  .inw-table td.row-label {
    background: #fff !important;
    font-weight: 700;
    text-align: left;
    padding-left: 18px;
    color: var(--deep-green);
  }

  .inw-label { background: var(--lighter-green) !important; }

  .inw-table td[contenteditable] { background: #fff !important; }

  .inw-table td[contenteditable]:focus {
    background: #fffde7 !important;
    outline: 1px solid var(--accent);
    outline-offset: -1px;
  }

  .inw-table .miss-reason {
    text-align: left;
    padding: 3px 6px;
    background: #fff !important;
  }

  .loc-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 11px;
    margin: 0;
    background: #fff;
  }

  .loc-table th,
  .loc-table td {
    border: var(--inner-table-border) solid var(--border);
    padding: var(--loc-cell-pad-v) 8px;
    background: transparent;
    vertical-align: middle;
  }

  .loc-table th {
    color: var(--deep-green);
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    width: 14%;
  }

  .loc-label { background: var(--lighter-green) !important; }

  .loc-table td[contenteditable] { background: #fff !important; }

  .loc-table td[contenteditable]:focus {
    background: #fffde7 !important;
    outline: 1px solid var(--accent);
    outline-offset: -1px;
  }

  .mini-roster-wrap { margin-top: var(--gap-before-mini-roster); }

  .mini-roster-title {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    letter-spacing: 2px;
    background: var(--deep-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
  }

  .mini-roster-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 11px;
    background: var(--accent);
    border-radius: 2px;
  }

  .mini-roster-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    table-layout: fixed;
  }

  .mini-roster-table th {
    background: var(--light-green);
    color: var(--deep-green);
    font-weight: 700;
    text-align: center;
    border: var(--main-border-width) solid var(--border);
    padding: 4px 3px;
  }

  .mini-roster-table td {
    border: var(--main-border-width) solid var(--border);
    padding: 2px 3px;
    text-align: center;
    height: var(--mini-row-height);
    vertical-align: middle;
    background: #fff;
  }

  .mini-roster-table td[contenteditable]:focus {
    background: #fffde7;
    outline: 1px solid var(--accent);
    outline-offset: -1px;
  }

  .mini-roster-table .seq-cell {
    background: var(--light-green) !important;
    color: var(--deep-green);
    font-weight: 700;
    width: 22px;
  }

  .mini-roster-table .col-divider {
    border-right: var(--roster-divider-width) solid var(--deep-green) !important;
  }

  .page2-header {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2.5px solid var(--deep-green);
  }

  .logo-text {
    font-size: 11px;
    font-weight: 700;
    color: var(--deep-green);
    line-height: 1.4;
  }

  .roster-meta {
    display: flex;
    gap: 24px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    justify-content: center;
    margin: 12px 0 14px;
  }

  .roster-meta strong {
    font-weight: 400;
    border-bottom: var(--main-border-width) solid var(--border-light);
    min-width: 90px;
    display: inline-block;
    outline: none;
  }

  .roster-meta strong:focus { background: #fffde7; }

  .roster-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    table-layout: fixed;
  }

  .roster-table thead th {
    background: var(--deep-green);
    color: #fff;
    font-weight: 700;
    padding: 5px 3px;
    border: var(--main-border-width) solid var(--border);
    text-align: center;
  }

  .roster-table tbody td {
    border: var(--main-border-width) solid var(--border);
    padding: 2px 3px;
    text-align: center;
    height: var(--roster-row-height);
    vertical-align: middle;
    background: #fff !important;
  }

  .roster-table tbody td[contenteditable]:focus {
    background: #fffde7 !important;
    outline: 1px solid var(--accent);
    outline-offset: -1px;
  }

  .roster-table .col-divider {
    border-right: var(--roster-divider-width) solid var(--deep-green) !important;
  }

  .legal-footer {
    margin-top: 14px;
    padding-top: 7px;
    border-top: var(--main-border-width) solid var(--border-light);
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.6;
  }

  @media print {
    body { background: #fff; }
    #control-panel { display: none; }
    #pw-overlay { display: none !important; }
    #pages-wrap { padding: 0; gap: 0; }
    .a4-page {
      box-shadow: none;
      margin: 0;
      page-break-after: always;
    }
    .chem-input-area { resize: none; }
  }
</style>
</head>
<body>

<div id="control-panel">
  <h1>📋 안전보건교육일지</h1>
  <div style="display:flex; gap:8px; align-items:center;">
    <button class="btn-wm" id="btn-wm" onclick="toggleWatermarkUI()">🔒 워터마크 ON</button>
    <button class="btn-pdf" onclick="generatePDF()">📥 PDF 저장</button>
  </div>
</div>

<div id="pw-overlay">
  <div id="pw-box">
    <h2>🔐 워터마크 해제</h2>
    <p>워터마크를 끄려면 관리자 비밀번호를<br>입력하세요.</p>
    <input type="password" id="pw-input" placeholder="비밀번호" maxlength="20"
      onkeydown="if(event.key==='Enter') confirmPW()">
    <div id="pw-error"></div>
    <div class="pw-btns">
      <button class="pw-cancel" onclick="closePW()">취소</button>
      <button class="pw-confirm" onclick="confirmPW()">확인</button>
    </div>
  </div>
</div>

<div id="pages-wrap">

<!-- ══════════════ 1페이지 ══════════════ -->
<div class="a4-page" id="page1">
<div class="watermark" id="wm-page1">산업안전지원센터㈜</div>

  <div class="doc-header">
    <div class="doc-logo-area">
      <div class="doc-logo-text">산업안전지원센터㈜<br><span style="font-weight:400; font-size:10px; color:#4a7a5a;">safetysupport.co.kr</span></div>
    </div>
    <div class="doc-title-area">
      <div class="doc-title">안전보건교육일지</div>
      <div class="doc-sub">산업안전보건법에 따른 안전보건교육 실시 확인 문서</div>
    </div>
    <div class="doc-approval">
      <div class="ap-cells">
        <div class="ap-cell">
          <div class="ap-role">담 당</div>
          <div class="ap-sign">서명</div>
        </div>
        <div class="ap-cell">
          <div class="ap-role" contenteditable="true" style="outline:none;" id="ap-role2">팀 장</div>
          <div class="ap-sign">서명</div>
        </div>
        <div class="ap-cell">
          <div class="ap-role" contenteditable="true" style="outline:none;" id="ap-role3">대 표</div>
          <div class="ap-sign">서명</div>
        </div>
      </div>
    </div>
  </div>

  <div class="write-row">
    <span>작성일자 : <span class="write-val" contenteditable="true" id="f-write-date"></span></span>
    <span>작성자 : <span class="write-val" contenteditable="true" id="f-writer" style="min-width:60px;"></span></span>
  </div>

  <table class="main-table">

    <!-- 교육 구분 -->
    <tr class="section-row"><td colspan="4">교육 구분</td></tr>
    <tr>
      <th class="row-th section-label">교육<br>구분</th>
      <td colspan="3" style="padding:8px 12px; background:#fff;">
        <div class="edu-type-grid">
          <label><input type="checkbox" name="edutype" value="정기교육"> 정기교육</label>
          <label><input type="checkbox" name="edutype" value="채용시교육"> 채용 시 교육</label>
          <label><input type="checkbox" name="edutype" value="작업내용변경"> 작업내용 변경시의 교육</label>
          <label><input type="checkbox" name="edutype" value="특별교육"> 특별교육</label>
          <label><input type="checkbox" name="edutype" value="물질안전보건자료교육" id="cb-msds"> 물질안전보건자료 교육</label>
          <div style="display:flex; align-items:center; gap:4px; font-size:11px; background:#fff;">
            <input type="checkbox" name="edutype" value="기타" id="cb-etc">
            <label for="cb-etc">기 타 (</label><span id="etc-input" contenteditable="true"
              style="min-width:30px; display:inline-block; outline:none; border-bottom:1px solid #ccc; background:#fff;"></span><span>) 교육</span>
          </div>
        </div>
      </td>
    </tr>
    <tr><td colspan="4" style="padding:0; height:var(--gap-after-edutype); border:none; background:#fff;"></td></tr>

    <!-- 교육 인원 -->
    <tr class="section-row"><td colspan="4">교육 인원</td></tr>
    <tr class="educount-row">
      <th class="row-th section-label">교육<br>인원</th>
      <td colspan="3" style="padding:0; line-height:0; font-size:0; vertical-align:top; background:#fff;">
        <table class="inw-table">
          <thead>
            <tr>
              <th class="inw-head" style="width:22%;">구분</th>
              <th class="inw-head" style="width:10%;">계</th>
              <th class="inw-head" style="width:10%;">남</th>
              <th class="inw-head" style="width:10%;">여</th>
              <th class="inw-head">교육미실시 사유</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td class="row-label inw-label">교육 대상자 수</td>
              <td contenteditable="true"></td>
              <td contenteditable="true"></td>
              <td contenteditable="true"></td>
              <td class="miss-reason" contenteditable="true" rowspan="3"></td>
            </tr>
            <tr>
              <td class="row-label inw-label">참석 인원</td>
              <td contenteditable="true"></td>
              <td contenteditable="true"></td>
              <td contenteditable="true"></td>
            </tr>
            <tr>
              <td class="row-label inw-label">교육미실시자수</td>
              <td contenteditable="true"></td>
              <td contenteditable="true"></td>
              <td contenteditable="true"></td>
            </tr>
          </tbody>
        </table>
      </td>
    </tr>
    <tr><td colspan="4" style="padding:0; height:var(--gap-after-educount); border:none; background:#fff;"></td></tr>

    <!-- 교육 내용 + 교육대상 화학물질 -->
    <tr class="section-row"><td colspan="4">교육 내용 및 교육대상 화학물질</td></tr>
    <tr class="educontent-row">
      <th class="row-th section-label" style="vertical-align:middle;">교육<br>내용</th>

      <!-- 교육내용: 고정 텍스트 (편집 불가) -->
      <td class="content-cell" style="width:50%; vertical-align:top; padding:0; background:#fff; line-height:normal; font-size:12px;">
        <div class="edu-content-fixed">
          <div class="edu-item"><span class="edu-bullet">○</span><span>대상화학물질의 명칭(또는 제품명)</span></div>
          <div class="edu-item"><span class="edu-bullet">○</span><span>물리적 위험성 및 건강 유해성</span></div>
          <div class="edu-item"><span class="edu-bullet">○</span><span>취급상의 주의사항</span></div>
          <div class="edu-item"><span class="edu-bullet">○</span><span>적절한 보호구</span></div>
          <div class="edu-item"><span class="edu-bullet">○</span><span>응급조치 요령 및 사고 시 대처방법</span></div>
          <div class="edu-item"><span class="edu-bullet">○</span><span>물질안전보건자료 및 경고표지를 이해하는 방법</span></div>
        </div>
      </td>

      <!-- 교육대상 화학물질: 사용자 입력 -->
      <td class="chem-cell" style="width:calc(50% - 52px); vertical-align:top; padding:0; background:#fff; line-height:normal; font-size:12px;" colspan="2">
        <div class="chem-input-wrap" style="height:100%; min-height:var(--educontent-min-height);">
          <div class="chem-subheader">
            교육대상 화학물질
            <span class="chem-required-badge">직접 입력</span>
          </div>
          <textarea class="chem-input-area" id="f-chem-list"
            placeholder="취급하는 화학물질의 정확한 명칭을 입력하세요.&#10;&#10;예) AC-4599(절삭유), 에탄올 80%, 00방청유,&#10;    00크리너, IPA 등&#10;&#10;※ 제품명·농도 등을 MSDS와 동일하게 기재"></textarea>
          <div class="chem-notice">화학물질명은 MSDS(물질안전보건자료)에 기재된 명칭과 동일하게 입력하십시오.</div>
        </div>
      </td>
    </tr>
    <tr><td colspan="4" style="padding:0; height:var(--gap-after-educontent); border:none; background:#fff;"></td></tr>

    <!-- 교육실시자 및 장소 -->
    <tr class="section-row"><td colspan="4">교육실시자 및 장소</td></tr>
    <tr class="loc-row">
      <th class="row-th section-label" style="white-space:nowrap; font-size:10px; line-height:1.5;">교육실시자<br>및 장소</th>
      <td colspan="3" style="padding:0; line-height:0; font-size:0; vertical-align:top; background:#fff;">
        <table class="loc-table">
          <tr>
            <th class="loc-label">교육실시자</th>
            <td contenteditable="true" id="f-instructor"></td>
            <th class="loc-label">교육일시</th>
            <td contenteditable="true" id="f-date"></td>
          </tr>
          <tr>
            <th class="loc-label">교육시간</th>
            <td contenteditable="true" id="f-hours"></td>
            <th class="loc-label">교육장소</th>
            <td contenteditable="true" id="f-place"></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr><td colspan="4" style="padding:0; height:var(--gap-after-loc); border:none; background:#fff;"></td></tr>

    <!-- 특기사항 -->
    <tr class="section-row"><td colspan="4">특기사항</td></tr>
    <tr>
      <th class="row-th section-label">특기<br>사항</th>
      <td colspan="3" contenteditable="true" id="f-remark"
        style="height:var(--special-min-height); vertical-align:top; padding:7px 10px; background:#fff;">
      </td>
    </tr>
    <tr><td colspan="4" style="padding:0; height:var(--gap-after-special); border:none; background:#fff;"></td></tr>

  </table>

  <!-- 참석자 명단 (8칸) -->
  <div class="mini-roster-wrap">
    <div class="mini-roster-title">참석자 명단</div>
    <table class="mini-roster-table">
      <thead>
        <tr>
          <th style="width:22px;">No</th>
          <th>직 책</th>
          <th>성 명</th>
          <th class="col-divider">서 명</th>
          <th style="width:22px;">No</th>
          <th>직 책</th>
          <th>성 명</th>
          <th>서 명</th>
        </tr>
      </thead>
      <tbody id="mini-roster-body"></tbody>
    </table>
  </div>

  <div class="page-num">1 / 2</div>
</div>

<!-- ══════════════ 2페이지 ══════════════ -->
<div class="a4-page" id="page2">
<div class="watermark" id="wm-page2">산업안전지원센터㈜</div>

  <div class="page2-header">
    <div style="display:flex; align-items:center; gap:8px; min-width:140px;">
      <div class="logo-text">산업안전지원센터㈜<br><span style="font-weight:400; font-size:10px;">safetysupport.co.kr</span></div>
    </div>
    <div style="flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center;">
      <div style="font-size:16px; font-weight:700; color:var(--deep-green);">교육 참석자 명단</div>
      <div style="font-size:11px; color:var(--text-muted); margin-top:2px;">안전보건교육 수강 확인 서명부</div>
    </div>
    <div style="min-width:140px;"></div>
  </div>

  <div class="roster-meta">
    <span>교육일시:&nbsp;<strong contenteditable="true" id="r-date"></strong></span>
    <span>교육장소:&nbsp;<strong contenteditable="true" id="r-place"></strong></span>
    <span>참석인원:&nbsp;<strong contenteditable="true" id="r-count"></strong></span>
  </div>

  <table class="roster-table">
    <thead>
      <tr>
        <th style="width:14%;">소속/부서</th>
        <th style="width:10%;">직위</th>
        <th style="width:11%;">성명</th>
        <th class="col-divider" style="width:15%;">서명</th>
        <th style="width:14%;">소속/부서</th>
        <th style="width:10%;">직위</th>
        <th style="width:11%;">성명</th>
        <th style="width:15%;">서명</th>
      </tr>
    </thead>
    <tbody id="roster-body"></tbody>
  </table>

  <div class="legal-footer">
    본 교육일지는 「산업안전보건법」 제29조(근로자에 대한 안전보건교육) 및 동법 시행규칙 제26조에 따른 안전보건교육 실시 확인 목적으로 작성되었으며, 3년간 보존하여야 합니다.
  </div>

  <div class="page-num">2 / 2</div>
</div>

</div><!-- /pages-wrap -->

<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<script>
/* ── 참석자 명단 (8칸 = 4행 × 2열) ── */
(function buildMiniRoster() {
  var tbody = document.getElementById('mini-roster-body');
  for (var i = 0; i < 4; i++) {
    var n1 = i + 1, n2 = i + 5;
    var tr = document.createElement('tr');
    tr.innerHTML =
      '<td class="seq-cell">' + n1 + '</td>' +
      '<td contenteditable="true"></td>' +
      '<td contenteditable="true"></td>' +
      '<td class="col-divider"></td>' +
      '<td class="seq-cell">' + n2 + '</td>' +
      '<td contenteditable="true"></td>' +
      '<td contenteditable="true"></td>' +
      '<td></td>';
    tbody.appendChild(tr);
  }
})();

/* ── 2페이지 명단 (30행) ── */
(function buildRoster() {
  var tbody = document.getElementById('roster-body');
  for (var i = 0; i < 30; i++) {
    var tr = document.createElement('tr');
    tr.innerHTML =
      '<td contenteditable="true" style="font-size:11px;"></td>' +
      '<td contenteditable="true" style="font-size:11px;"></td>' +
      '<td contenteditable="true" style="font-size:11px;"></td>' +
      '<td class="col-divider"></td>' +
      '<td contenteditable="true" style="font-size:11px;"></td>' +
      '<td contenteditable="true" style="font-size:11px;"></td>' +
      '<td contenteditable="true" style="font-size:11px;"></td>' +
      '<td></td>';
    tbody.appendChild(tr);
  }
})();

/* ── 오늘 날짜 자동 입력 ── */
(function setToday() {
  var d = new Date();
  var str = d.getFullYear() + '년 ' + (d.getMonth()+1) + '월 ' + d.getDate() + '일';
  ['f-date','f-write-date','r-date'].forEach(function(id) {
    var el = document.getElementById(id);
    if (el && !el.textContent.trim()) el.textContent = str;
  });
})();

/* ── 교육일시/장소 동기화 ── */
document.getElementById('f-date').addEventListener('input', function() {
  document.getElementById('r-date').textContent = this.textContent.trim();
});
document.getElementById('f-place').addEventListener('input', function() {
  document.getElementById('r-place').textContent = this.textContent.trim();
});

/* ══ 워터마크 ══ */
var WM_PASSWORD = 'ossc01432';
var wmOn = true;

function toggleWatermark(show) {
  document.querySelectorAll('.watermark').forEach(function(el) {
    el.style.display = show ? 'block' : 'none';
  });
}
toggleWatermark(true);

function toggleWatermarkUI() {
  if (wmOn) {
    openPW();
  } else {
    wmOn = true;
    toggleWatermark(true);
    document.getElementById('btn-wm').textContent = '🔒 워터마크 ON';
  }
}

function openPW() {
  document.getElementById('pw-input').value = '';
  document.getElementById('pw-error').textContent = '';
  document.getElementById('pw-input').classList.remove('error');
  document.getElementById('pw-overlay').classList.add('show');
  setTimeout(function() { document.getElementById('pw-input').focus(); }, 50);
}

function closePW() {
  document.getElementById('pw-overlay').classList.remove('show');
}

function confirmPW() {
  var val = document.getElementById('pw-input').value;
  if (val === WM_PASSWORD) {
    closePW();
    wmOn = false;
    toggleWatermark(false);
    document.getElementById('btn-wm').textContent = '🔓 워터마크 OFF';
  } else {
    var inp = document.getElementById('pw-input');
    inp.classList.remove('error');
    void inp.offsetWidth;
    inp.classList.add('error');
    document.getElementById('pw-error').textContent = '비밀번호가 올바르지 않습니다.';
    inp.value = '';
    inp.focus();
  }
}

/* ══ 교육구분 텍스트 추출 (PDF용) ══ */
function buildEduTypeText() {
  var checked = document.querySelectorAll('input[name="edutype"]:checked');
  return Array.from(checked).map(function(c) {
    if (c.value === '기타') {
      var etc = document.getElementById('etc-input').textContent;
      return '■ 기타(' + (etc || '') + ')교육';
    }
    return '■ ' + c.value;
  }).join('  ') || '(선택 없음)';
}

/* ══ PDF 저장 ══ */
async function generatePDF() {
  var btn = document.querySelector('.btn-pdf');
  btn.disabled = true;
  btn.textContent = '생성 중…';

  /* 교육구분 체크박스 → 텍스트 치환 */
  var gridEl = document.querySelector('.edu-type-grid');
  var txtEl = document.createElement('span');
  txtEl.style.fontSize = '11px';
  txtEl.textContent = buildEduTypeText();
  gridEl.parentNode.insertBefore(txtEl, gridEl);
  gridEl.style.display = 'none';

  /* textarea → div 치환 (html2canvas textarea 렌더링 보정) */
  var chemTA = document.getElementById('f-chem-list');
  var chemDiv = document.createElement('div');
  chemDiv.className = 'chem-input-area';
  chemDiv.style.resize = 'none';
  chemDiv.style.whiteSpace = 'pre-wrap';
  chemDiv.style.overflow = 'hidden';
  chemDiv.textContent = chemTA.value;
  chemTA.parentNode.insertBefore(chemDiv, chemTA);
  chemTA.style.display = 'none';

  try {
    var jsPDF = window.jspdf.jsPDF;
    var pdf = new jsPDF({ orientation: 'portrait', unit: 'mm', format: 'a4' });
    var pages = ['page1', 'page2'];

    for (var i = 0; i < pages.length; i++) {
      var cvs = await html2canvas(document.getElementById(pages[i]), {
        scale: 2,
        useCORS: true,
        backgroundColor: '#ffffff',
        logging: false
      });
      if (i > 0) pdf.addPage();
      pdf.addImage(cvs.toDataURL('image/jpeg', 0.95), 'JPEG', 0, 0, 210, 297);
    }

    var today = new Date();
    var ds = today.getFullYear() +
      String(today.getMonth()+1).padStart(2,'0') +
      String(today.getDate()).padStart(2,'0');

    pdf.save('안전보건교육일지_' + ds + '.pdf');
  } catch(e) {
    alert('PDF 생성 오류: ' + e.message);
  } finally {
    gridEl.style.display = '';
    txtEl.remove();
    chemTA.style.display = '';
    chemDiv.remove();
    btn.disabled = false;
    btn.textContent = '📥 PDF 저장';
  }
}
</script>
</body>
</html>				</div>
				<div class="elementor-element elementor-element-8836766 elementor-widget elementor-widget-html" data-id="8836766" data-element_type="widget" data-e-type="widget" data-widget_type="html.default">
					<div style="border:1px solid #b2cae0; border-radius:8px; padding:8px; overflow:hidden">
<!-- safetysupport_콘텐츠하단_반응형 -->
<ins class="adsbygoogle"
  style="display:block"
  data-ad-client="ca-pub-3106752057307696"
  data-ad-slot="5220315587"
  data-ad-format="auto"
  data-full-width-responsive="true"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</div>				</div>
				</div>
				</div>
		]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
