@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root{
  --bg:#f4f6f8;
  --surface:#ffffff;
  --surface-soft:#f8fafb;
  --line:#dfe5ec;
  --line-soft:#edf1f5;
  --text:#111827;
  --muted:#667085;
  --muted-2:#8a94a6;
  --primary:#1e3a8a;
  --primary-strong:#172554;
  --primary-soft:#eff6ff;
  --blue:#2563eb;
  --blue-soft:#eff6ff;
  --amber:#b7791f;
  --amber-soft:#fff7e6;
  --red:#b42318;
  --red-soft:#fff1f0;
  --shadow:0 8px 30px rgba(0,0,0,.08);
  --shadow-strong:0 20px 48px rgba(17,24,39,.14);
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{
  margin:0;
  min-height:100vh;
  background:var(--bg);
  color:var(--text);
  font-family:"Pretendard",-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR",system-ui,sans-serif;
  font-size:15px;
}
.wrap{
  max-width:none;
  margin:0 auto;
  padding:0;
}
header{
  position:relative;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:64px;
  margin:0;
  padding:0 32px;
  background:#fff;
  border-bottom:1px solid var(--line);
  box-shadow:none;
}
.brand{
  display:grid;
  grid-template-columns:32px minmax(0,auto) auto;
  grid-template-rows:auto auto;
  column-gap:10px;
  align-items:center;
  min-width:0;
  cursor:pointer;
}
.brand::before{
  content:"JP";
  grid-row:1 / span 2;
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  background:var(--primary);
  color:#fff;
  border-radius:4px;
  font-size:13px;
  font-weight:950;
}
.brand h1{
  grid-column:2;
  grid-row:1;
}
.brand .pill{
  grid-column:3;
  grid-row:1;
}
.brand .sub{
  grid-column:2 / span 2;
  grid-row:2;
}
h1,h2,h3,p{margin:0}
h1{
  font-size:20px;
  line-height:1.25;
  font-weight:800;
  letter-spacing:0;
}
h2{
  font-size:20px;
  line-height:1.35;
  font-weight:800;
}
h3{
  font-size:16px;
  line-height:1.4;
  font-weight:800;
}
.sub{
  margin-top:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}
#counselorApp{
  position:relative;
  min-height:calc(100vh - 64px);
  padding:0 20px 72px;
}
#counselorApp::before{
  content:"온라인 직무 역량 강화\A일본 담당자 교육\A스마트 러닝 센터";
  white-space:pre-line;
  display:block;
  margin:0 -20px;
  padding:58px 20px 124px;
  background-color:var(--primary);
  background-image:radial-gradient(rgba(255,255,255,.26) 1px, transparent 1px);
  background-size:20px 20px;
  color:#fff;
  text-align:center;
  font-size:42px;
  line-height:1.18;
  font-weight:950;
}
#counselorApp::after{
  content:"PC와 모바일 어디서든 교육 신청, 입장, 수강완료까지 한 번에 진행합니다.";
  position:absolute;
  top:186px;
  left:20px;
  right:20px;
  color:#bfdbfe;
  text-align:center;
  font-size:18px;
  line-height:1.6;
  pointer-events:none;
}
#counselorApp:has(#classroom:not(.hidden)),
#counselorApp:has(#survey:not(.hidden)),
#counselorApp:has(#complete:not(.hidden)){
  padding:0;
}
#counselorApp:has(#classroom:not(.hidden))::before,
#counselorApp:has(#classroom:not(.hidden))::after,
#counselorApp:has(#survey:not(.hidden))::before,
#counselorApp:has(#survey:not(.hidden))::after,
#counselorApp:has(#complete:not(.hidden))::before,
#counselorApp:has(#complete:not(.hidden))::after{
  display:none;
}
.card{
  position:relative;
  margin-top:20px;
  padding:28px;
  background:var(--surface);
  border:1px solid var(--line-soft);
  border-radius:18px;
  box-shadow:var(--shadow);
}
#apply,#entry,#applyComplete{
  width:min(760px,100%);
  margin:-82px auto 0;
  overflow:hidden;
  border-color:#eef2f7;
  box-shadow:var(--shadow-strong);
}
#apply::before,#entry::before{
  content:"Step 1  교육 신청";
  display:block;
  margin:-28px -28px 28px;
  padding:18px 28px;
  background:#f8fafc;
  border-bottom:1px solid var(--line);
  color:var(--primary);
  font-size:16px;
  font-weight:900;
}
#entry::before{content:"Step 2  교육 입장"}
#applyContent,#entryContent{
  grid-template-columns:1fr;
}
#applyContent>div:first-child,#entryContent>div:first-child{
  max-width:520px;
  width:100%;
  margin:0 auto;
}
#applyContent h2,#entryContent h2{
  text-align:center;
  font-size:26px;
}
#applyContent h2+.sub,#entryContent h2+.sub{
  margin-top:8px;
  text-align:center;
}
#applyContent .actions,#entryContent .actions{
  display:grid;
  grid-template-columns:1fr 1fr;
}
#applyContent .actions button,#entryContent .actions button{
  min-height:56px;
  font-size:16px;
}
#applyContent .notice,#entryContent .notice{
  max-width:560px;
  width:100%;
  margin:4px auto 0;
  background:#f8fbff;
  border-color:#dbeafe;
}
#applyComplete{
  max-width:680px;
}
#applyComplete .center{
  padding-top:18px;
}
.nav,.actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.actions{margin-top:18px}
.nav button{
  min-height:36px;
  padding:8px 12px;
  border:0;
  background:transparent;
  color:#6b7280;
  box-shadow:none;
}
.nav button:hover{
  background:#f3f4f6;
  color:#111827;
}
button{
  min-height:46px;
  border:1px solid transparent;
  border-radius:12px;
  padding:11px 18px;
  background:var(--primary);
  color:#fff;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .05s ease;
}
button:hover{background:var(--primary-strong)}
button:active{transform:translateY(1px)}
button.secondary{
  background:var(--surface);
  color:#6b7280;
  border-color:var(--line);
}
button.secondary:hover,button.outline:hover{
  background:var(--surface-soft);
  border-color:#c9d3df;
}
button.outline{
  background:var(--surface);
  color:var(--text);
  border-color:var(--line);
}
button.danger{background:var(--red)}
button:disabled{
  opacity:.45;
  cursor:not-allowed;
  transform:none;
}
input,select,textarea{
  width:100%;
  min-height:56px;
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px 16px;
  background:#f9fafb;
  color:var(--text);
  font:inherit;
  outline:none;
  transition:border-color .15s ease,box-shadow .15s ease;
}
input:focus,select:focus,textarea:focus{
  border-color:var(--primary);
  background:#fff;
  box-shadow:0 0 0 3px rgba(30,58,138,.16);
}
textarea{
  min-height:116px;
  resize:vertical;
}
label{
  display:block;
  margin-bottom:8px;
  color:#344054;
  font-size:14px;
  font-weight:800;
}
.form-row{margin-top:16px}
.grid{
  display:grid;
  gap:20px;
}
.grid.two{grid-template-columns:minmax(0,1.05fr) minmax(300px,.95fr)}
.grid.classroom{grid-template-columns:minmax(0,1.45fr) minmax(320px,.8fr)}
.notice{
  padding:18px;
  background:var(--surface-soft);
  border:1px solid var(--line-soft);
  border-radius:14px;
  color:#344054;
  font-size:14px;
  line-height:1.7;
}
.notice b{color:var(--text)}
.notice ul{
  margin:10px 0 0 18px;
  padding:0;
}
.pill{
  display:inline-flex;
  align-self:flex-start;
  width:max-content;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(30,58,138,.1);
  color:var(--primary);
  font-size:12px;
  font-weight:900;
}
.badge{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:4px 9px;
  border-radius:999px;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:12px;
  font-weight:900;
}
.badge.gray{background:#eef2f6;color:#475467}
.badge.red{background:var(--red-soft);color:var(--red)}
.badge.yellow{background:var(--amber-soft);color:var(--amber)}
.alert{
  margin-top:16px;
  padding:14px 15px;
  background:var(--red-soft);
  color:#912018;
  border:1px solid #ffd6d1;
  border-radius:12px;
  font-size:14px;
  line-height:1.6;
}
.alert.info{
  background:var(--blue-soft);
  color:#175cd3;
  border-color:#bfdbfe;
}
.hidden{display:none!important}
.info-list{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:18px;
}
.info{
  padding:14px;
  background:var(--surface-soft);
  border:1px solid var(--line-soft);
  border-radius:12px;
}
.info small{
  display:block;
  margin-bottom:6px;
  color:var(--muted);
  font-size:12px;
}
.info strong{
  display:block;
  font-size:16px;
}
.code-box{
  position:relative;
  max-width:360px;
  margin-left:auto;
  margin-right:auto;
  margin-top:18px;
  padding:28px;
  background:#fff;
  border:2px dashed var(--primary);
  color:#fff;
  border-radius:18px;
  text-align:center;
}
.code-box::before,.code-box::after{
  content:"";
  position:absolute;
  top:50%;
  width:22px;
  height:22px;
  background:#fff;
  border:2px solid var(--primary);
  border-radius:50%;
  transform:translateY(-50%);
}
.code-box::before{
  left:-13px;
  border-left-color:transparent;
  border-bottom-color:transparent;
  transform:translateY(-50%) rotate(45deg);
}
.code-box::after{
  right:-13px;
  border-right-color:transparent;
  border-top-color:transparent;
  transform:translateY(-50%) rotate(45deg);
}
.code-box small{
  display:block;
  margin-bottom:8px;
  color:#9ca3af;
  font-weight:900;
  letter-spacing:.12em;
}
.code-box strong{
  color:var(--primary);
  font-size:42px;
  letter-spacing:.18em;
}
.video-box{
  margin-top:18px;
  overflow:hidden;
  background:#111827;
  border-radius:0;
  aspect-ratio:16/9;
}
iframe{
  width:100%;
  height:100%;
  border:0;
}
.chat-panel{
  height:100%;
  min-height:540px;
  display:flex;
  flex-direction:column;
}
.chat-list{
  flex:1;
  overflow:auto;
  margin-top:16px;
  padding:12px;
  background:var(--surface-soft);
  border:1px solid var(--line-soft);
  border-radius:0;
}
.chat-item{
  margin-bottom:10px;
  padding:12px;
  background:#fff;
  border:1px solid var(--line-soft);
  border-radius:14px;
}
.chat-meta{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
  color:var(--muted);
  font-size:12px;
}
.chat-send{
  display:flex;
  gap:8px;
  margin-top:12px;
}
.chat-send input{flex:1}
.center{
  text-align:center;
  padding:36px 20px;
}
.complete-icon{
  width:56px;
  height:56px;
  margin:0 auto 16px;
  display:grid;
  place-items:center;
  background:#dcfce7;
  color:#16a34a;
  border-radius:50%;
  font-size:30px;
  font-weight:900;
}
.small-note{
  margin-top:10px;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}
.settings-grid{
  display:grid;
  grid-template-columns:minmax(280px,.9fr) minmax(0,1.1fr);
  gap:18px;
}
.settings-box{
  padding:18px;
  background:var(--surface-soft);
  border:1px solid var(--line-soft);
  border-radius:16px;
}
.training-card{
  margin-top:12px;
  padding:14px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
}
.training-card-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  margin-top:18px;
}
.stat{
  padding:16px;
  background:var(--surface);
  border:1px solid var(--line-soft);
  border-radius:16px;
  text-align:center;
}
.stat small{
  color:var(--muted);
  font-size:13px;
}
.stat strong{
  display:block;
  margin-top:8px;
  color:var(--primary);
  font-size:36px;
  line-height:1;
}
.table-wrap{
  overflow:auto;
  margin-top:16px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}
table{
  width:100%;
  min-width:1120px;
  border-collapse:collapse;
  font-size:14px;
}
th,td{
  padding:12px 14px;
  border-bottom:1px solid var(--line-soft);
  text-align:left;
  white-space:nowrap;
}
th{
  position:sticky;
  top:0;
  z-index:1;
  background:#f8fafc;
  color:#475467;
  font-size:12px;
  font-weight:900;
}
tr:hover td{background:#fbfcfd}
.admin-lock{
  max-width:460px;
  margin:58px auto 0;
}
#adminLogin,#adminApp{
  min-height:calc(100vh - 64px);
  padding:24px 20px 72px;
}
#adminLogin{
  display:grid;
  place-items:start center;
}
#adminLogin .admin-lock{
  width:min(460px,100%);
}
#adminLogin .admin-lock h2{
  text-align:center;
  font-size:26px;
}
#adminLogin .admin-lock h2::before{
  content:"";
  display:block;
  width:48px;
  height:48px;
  margin:0 auto 16px;
  border-radius:14px;
  background:var(--primary);
  box-shadow:0 12px 24px rgba(30,58,138,.24);
}
#adminLogin .admin-lock .sub{
  margin-top:8px;
  text-align:center;
}
#adminLogin .actions{
  display:block;
}
#adminLogin button{
  width:100%;
  min-height:56px;
  font-size:16px;
}
#adminApp>.card{
  max-width:1240px;
  margin:24px auto 0;
}
#classroom{
  min-height:calc(100vh - 64px);
  margin-top:0!important;
  gap:0;
  grid-template-columns:minmax(0,1fr) minmax(340px,380px);
  background:#111827;
}
#classroom .card{
  margin-top:0!important;
  border:0;
  border-radius:0;
  box-shadow:none;
}
#classroom>.card:first-child{
  display:flex;
  flex-direction:column;
  min-height:calc(100vh - 64px);
  padding:24px;
  background:#111827;
  color:#fff;
}
#classroom>.card:first-child .sub,
#classroom>.card:first-child .small-note{
  color:#9ca3af;
}
#classroom>.card:first-child button{
  background:rgba(255,255,255,.1);
  color:#fff;
  border-color:rgba(255,255,255,.18);
}
#classroom>.card:first-child button:hover{
  background:rgba(255,255,255,.18);
}
#classroom .video-box{
  flex:1;
  display:grid;
  place-items:center;
  min-height:420px;
  border:1px solid rgba(255,255,255,.1);
  background:#020617;
}
#classroom>.chat-panel{
  min-height:calc(100vh - 64px);
  padding:24px;
  background:#fff;
}
#survey,#complete{
  width:min(720px,calc(100% - 40px));
  margin:36px auto;
}
.loading{
  opacity:.7;
  pointer-events:none;
}
@media(max-width:860px){
  .wrap{padding:0}
  header{
    position:static;
    margin:0;
    padding:12px 16px;
    align-items:flex-start;
    flex-direction:column;
  }
  h1{font-size:20px}
  #counselorApp{
    padding:0 16px 48px;
  }
  #counselorApp::before{
    margin:0 -16px;
    padding:44px 18px 116px;
    font-size:32px;
  }
  #counselorApp::after{
    top:158px;
    left:28px;
    right:28px;
    font-size:15px;
  }
  #apply,#entry,#applyComplete{
    margin-top:-70px;
  }
  #apply::before,#entry::before{
    margin:-18px -18px 22px;
    padding:16px 18px;
  }
  #applyContent .actions,#entryContent .actions{
    grid-template-columns:1fr;
  }
  .card{padding:18px}
  .grid.two,.grid.classroom,.settings-grid{grid-template-columns:1fr}
  .info-list,.stats{grid-template-columns:1fr}
  .chat-send{flex-direction:column}
  #classroom{
    grid-template-columns:1fr;
  }
  #classroom>.card:first-child,
  #classroom>.chat-panel{
    min-height:auto;
  }
  #classroom .video-box{
    min-height:auto;
  }
}
