:root {
  --navy: #17365D;
  --navy-2: #244B78;
  --navy-3: #EAF0F7;
  --ink: #1F2937;
  --muted: #6B7280;
  --line: #D9E1EA;
  --bg: #F4F6F8;
  --white: #FFFFFF;
  --green: #15803D;
  --green-bg: #DCFCE7;
  --amber: #B45309;
  --amber-bg: #FEF3C7;
  --red: #B91C1C;
  --red-bg: #FEE2E2;
  --blue: #1D4ED8;
  --blue-bg: #DBEAFE;
  --gray-bg: #EEF1F4;
  --shadow: 0 8px 28px rgba(23, 54, 93, .09);
}

* { box-sizing: border-box; }
.hidden { display:none !important; }
.app-shell { min-height:100vh; }
.login-screen {
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px;
  background:
    radial-gradient(circle at 12% 14%, rgba(255,255,255,.13), transparent 30%),
    linear-gradient(135deg, #102B4E 0%, #17365D 52%, #274F7D 100%);
}
.login-layout {
  width:min(1040px, 100%);
  display:grid;
  grid-template-columns:1.1fr .8fr;
  align-items:center;
  gap:70px;
}
.login-brand { color:#FFF; }
.login-brand .eyebrow { margin-bottom:18px; }
.login-brand h1 { margin:0; font-size:44px; line-height:1.2; letter-spacing:-1.2px; }
.login-brand > p { margin:24px 0; color:#D8E3EF; line-height:1.8; font-size:16px; }
.login-feature-list { display:grid; gap:10px; color:#D8E3EF; }
.login-feature-list span { display:flex; align-items:center; gap:10px; }
.login-feature-list span::before { content:'✓'; width:22px; height:22px; display:grid; place-items:center; border-radius:50%; background:rgba(255,255,255,.15); font-weight:900; }
.login-card {
  background:#FFF;
  padding:34px;
  border-radius:16px;
  box-shadow:0 28px 80px rgba(5,18,35,.32);
  display:grid;
  gap:18px;
}
.login-card h2 { margin:0; font-size:28px; color:var(--navy); }
.login-card > .muted { margin:-10px 0 2px; }
.login-button { width:100%; padding:13px; font-size:15px; }
.login-help { margin:0; text-align:center; color:var(--muted); font-size:11px; line-height:1.6; }
.login-error { margin:0; padding:10px 12px; border-radius:8px; background:var(--red-bg); color:var(--red); font-size:12px; font-weight:700; }
.password-field { display:flex; gap:7px; margin-top:7px; }
.password-field input { margin-top:0; }
.password-toggle { flex:0 0 auto; border:1px solid #C9D2DD; background:#F8FAFC; color:var(--navy); border-radius:8px; padding:0 11px; font-size:12px; font-weight:800; }
.account-actions { display:flex; gap:7px; margin-left:8px; }
.topbar-btn { border:1px solid rgba(255,255,255,.3); background:rgba(255,255,255,.08); color:#FFF; border-radius:7px; padding:7px 10px; font-size:11px; font-weight:800; }
.topbar-btn:hover { background:rgba(255,255,255,.17); }
.topbar-btn.logout { border-color:rgba(254,202,202,.5); color:#FEE2E2; }
.field-help { display:block; margin-top:6px; color:var(--muted); font-size:11px; font-weight:400; }
.security-notice { margin:0; padding:11px 13px; border-radius:8px; background:var(--amber-bg); color:var(--amber); line-height:1.6; font-size:12px; font-weight:700; }
.credential-box { display:grid; grid-template-columns:120px 1fr; gap:8px 14px; padding:16px; background:#F3F6F9; border:1px solid var(--line); border-radius:10px; }
.credential-box span { color:var(--muted); }
.credential-box strong { font-family:Consolas, monospace; font-size:16px; color:var(--navy); word-break:break-all; }
#newUserPasswordFields { display:grid; gap:15px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", Arial, sans-serif;
  font-size: 14px;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  min-height: 82px;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.topbar h1 { margin: 2px 0 0; font-size: 22px; letter-spacing: -.4px; }
.eyebrow, .section-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.eyebrow { color: #BFD0E4; }
.section-kicker { color: var(--navy-2); margin-bottom: 5px; }
.user-box { display: flex; align-items: center; gap: 10px; }
.user-box span { display:block; color:#CFD9E5; font-size:12px; margin-top:2px; }
.user-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  font-weight: 800;
}

.nav-tabs {
  background: var(--white);
  display: flex;
  gap: 4px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav-tab {
  border: 0;
  background: transparent;
  padding: 15px 17px 13px;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 3px solid transparent;
}
.nav-tab:hover { color: var(--navy); }
.nav-tab.active { color: var(--navy); border-color: var(--navy); }

.container { max-width: 1480px; margin: 0 auto; padding: 26px 28px 50px; }
.view { display: none; }
.view.active { display: block; }
.section-heading {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; margin-bottom: 18px;
}
.section-heading h2 { margin: 0; font-size: 26px; letter-spacing: -.5px; }
.section-heading p { margin: 7px 0 0; color: var(--muted); }

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.kpi-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 16px;
  box-shadow: 0 5px 18px rgba(23,54,93,.06);
}
.kpi-card span { display:block; color: var(--muted); font-size:12px; }
.kpi-card strong { display:block; margin-top:7px; font-size:25px; color:var(--navy); }
.kpi-card.alert strong { color: var(--red); }

.pace-panel { margin-bottom:14px; }
.pace-heading { align-items:flex-start; }
.pace-heading p { margin:6px 0 0; }
.pace-badge {
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:999px; padding:7px 11px; font-size:12px; font-weight:900; white-space:nowrap;
}
.pace-neutral, .pace-ontrack { background:var(--blue-bg); color:var(--blue); }
.pace-ahead { background:var(--green-bg); color:var(--green); }
.pace-behind { background:var(--red-bg); color:var(--red); }
.pace-summary-grid {
  display:grid; grid-template-columns:repeat(4, minmax(150px, 1fr)); gap:10px; margin:17px 0 14px;
}
.pace-stat { border:1px solid var(--line); border-radius:10px; padding:13px 14px; background:#F9FBFD; }
.pace-stat span { display:block; color:var(--muted); font-size:12px; }
.pace-stat strong { display:block; margin-top:6px; color:var(--navy); font-size:23px; }
.pace-stat.recommended strong { color:var(--blue); }
.pace-stat.behind strong, .negative-gap { color:var(--red) !important; }
.positive-gap { color:var(--green) !important; }
.neutral-gap { color:var(--navy) !important; }
.dual-progress-list { display:grid; gap:10px; }
.dual-progress-label { display:flex; align-items:center; justify-content:space-between; margin-bottom:5px; font-size:12px; }
.progress-track.compact { height:10px; margin:0; }
.actual-fill { background:linear-gradient(90deg, var(--navy), #4D79A8); }
.recommended-fill { background:repeating-linear-gradient(135deg, #7A93AE 0, #7A93AE 8px, #A8BACD 8px, #A8BACD 16px); }
.pace-note { margin:12px 0 0; color:var(--muted); font-size:11px; }
.milestone-panel { margin-bottom:14px; }
.milestone-comparison { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; margin-top:15px; }
.milestone-row { border:1px solid var(--line); border-radius:10px; padding:13px; background:#FCFDFE; }
.milestone-title { display:flex; align-items:center; gap:9px; margin-bottom:11px; }
.milestone-title strong, .milestone-title span { display:block; }
.milestone-title span { color:var(--muted); font-size:11px; margin-top:3px; }
.milestone-number {
  width:28px; height:28px; flex:0 0 28px; display:grid !important; place-items:center;
  margin:0 !important; border-radius:8px; background:var(--navy-3); color:var(--navy) !important; font-weight:900;
}
.milestone-bars { display:grid; gap:7px; }
.milestone-bar-line { display:grid; grid-template-columns:34px 1fr 38px; align-items:center; gap:7px; font-size:11px; }
.milestone-bar-line > span { color:var(--muted); }
.milestone-bar-line > strong { text-align:right; color:var(--navy); }
.mini-track { height:7px; background:#E7ECF1; border-radius:999px; overflow:hidden; }
.mini-fill { height:100%; border-radius:999px; }
.actual-mini { background:var(--navy-2); }
.recommended-mini { background:#91A7BE; }

.dashboard-progress { margin-bottom: 14px; }
.panel-title-row { display:flex; align-items:center; justify-content:space-between; gap:15px; }
.panel-title-row h3 { margin:0; font-size:17px; }
.dashboard-progress h3 { font-size:30px; color:var(--navy); margin:2px 0; }
.muted { color:var(--muted); font-size:12px; }
.progress-track {
  height: 12px;
  background: #E7ECF1;
  border-radius: 999px;
  overflow: hidden;
  margin: 13px 0;
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy), #4D79A8);
  transition: width .35s ease;
}
.stage-legend { display:grid; grid-template-columns:repeat(5, 1fr); gap:8px; }
.stage-item {
  background: var(--gray-bg);
  border-radius: 8px;
  padding: 9px 10px;
  display:flex;
  justify-content:space-between;
  gap:8px;
  font-size:12px;
}
.stage-item strong { color:var(--navy); }

.dashboard-grid { display:grid; grid-template-columns: 1.1fr .9fr; gap:14px; }
.category-row { margin-top: 17px; }
.category-label { display:flex; justify-content:space-between; gap:12px; margin-bottom:7px; }
.category-mini-track { height:8px; background:#E7ECF1; border-radius:999px; overflow:hidden; }
.category-mini-fill { height:100%; background:var(--navy-2); border-radius:999px; }
.attention-item {
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  border-bottom:1px solid #EEF1F4;
  padding: 12px 0;
}
.attention-item:last-child { border-bottom:0; }
.attention-main strong { display:block; font-size:13px; }
.attention-main span { display:block; color:var(--muted); font-size:11px; margin-top:4px; }

.btn {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 10px 15px;
  font-weight: 800;
}
.btn.primary { background: var(--navy); color:var(--white); }
.btn.primary:hover { background:#0F2D50; }
.btn.secondary { background:var(--white); color:var(--navy); border-color:var(--line); }
.btn.secondary:hover { background:var(--navy-3); }
.btn.danger { background:var(--red-bg); color:var(--red); border-color:#FECACA; }
.text-btn { border:0; background:none; color:var(--navy); font-weight:800; padding:4px; }
.icon-btn { border:0; background:none; color:var(--muted); font-size:25px; line-height:1; }

.filter-bar {
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
  box-shadow:none;
}
.filter-bar input[type="search"] { flex:1; min-width:230px; }
input, select, textarea {
  width:100%;
  border:1px solid #C9D2DD;
  border-radius:8px;
  background:var(--white);
  color:var(--ink);
  padding:10px 11px;
  outline:none;
}
input:focus, select:focus, textarea:focus {
  border-color:var(--navy-2);
  box-shadow:0 0 0 3px rgba(36,75,120,.1);
}
textarea { resize:vertical; }
label { display:block; color:#374151; font-weight:700; }
label input, label select, label textarea { margin-top:7px; font-weight:400; }
.check-label, .switch-label { display:flex; align-items:center; gap:7px; white-space:nowrap; font-weight:700; }
.check-label input, .switch-label input { width:auto; margin:0; }

.table-panel { padding:0; overflow:hidden; }
.table-meta { padding:13px 16px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; }
.table-meta span { color:var(--muted); font-size:12px; }
.table-wrap { width:100%; overflow:auto; }
table { width:100%; border-collapse:collapse; min-width:920px; }
th {
  background:#EFF3F7;
  color:#405166;
  font-size:12px;
  padding:11px 12px;
  text-align:left;
  border-bottom:1px solid var(--line);
  white-space:nowrap;
}
td {
  padding:12px;
  border-bottom:1px solid #EEF1F4;
  vertical-align:middle;
}
tbody tr:hover { background:#F8FAFC; }
tbody tr.clickable { cursor:pointer; }
.align-right { text-align:right; }
.table-actions { display:flex; justify-content:flex-end; gap:6px; }
.mini-btn {
  border:1px solid var(--line);
  background:var(--white);
  border-radius:6px;
  padding:6px 9px;
  font-size:12px;
  font-weight:800;
  color:var(--navy);
}
.mini-btn.danger { color:var(--red); background:var(--red-bg); }
.mini-btn.restore { color:var(--green); background:var(--green-bg); }
.deleted-row { opacity:.58; background:#FAFAFA; text-decoration-color:#9CA3AF; }

.status-pill, .priority-pill, .role-pill {
  display:inline-flex; align-items:center; justify-content:center;
  padding:5px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
.status-0 { background:#ECEFF3; color:#566371; }
.status-1 { background:#E8F0FA; color:#315B87; }
.status-2 { background:#FEF3C7; color:#92400E; }
.status-3 { background:#DFF2F1; color:#0F766E; }
.status-4 { background:#DCFCE7; color:#166534; }
.priority-high { background:var(--red-bg); color:var(--red); }
.priority-normal { background:var(--blue-bg); color:var(--blue); }
.priority-low { background:#F3F4F6; color:#6B7280; }
.role-pill { background:var(--navy-3); color:var(--navy); }

.overdue-date { color:var(--red); font-weight:800; }
.empty-state { color:var(--muted); text-align:center; padding:35px 10px; }

.modal-backdrop {
  position:fixed; inset:0;
  background:rgba(15,23,42,.48);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:100;
}
.modal-backdrop.open { display:flex; }
.modal {
  width:min(620px, 100%);
  max-height:92vh;
  overflow:auto;
  background:var(--white);
  border-radius:14px;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
}
.modal-wide { width:min(860px,100%); }
.modal.hidden { display:none; }
.modal-header, .modal-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:17px 20px; }
.modal-header { border-bottom:1px solid var(--line); }
.modal-footer { border-top:1px solid var(--line); justify-content:flex-end; }
.modal-header h3 { margin:0; font-size:20px; }
.modal-body { padding:20px; display:grid; gap:15px; }
.form-grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
.span-2 { grid-column:span 2; }
.task-meta-box {
  background:#F3F6F9;
  border:1px solid var(--line);
  border-radius:9px;
  padding:12px;
  color:#526172;
  line-height:1.6;
}

.loading-overlay {
  position:fixed; inset:0; z-index:200;
  background:rgba(244,246,248,.94);
  display:flex; align-items:center; justify-content:center;
}
.loading-overlay.hidden { display:none; }
.loading-card {
  display:flex; flex-direction:column; align-items:center; gap:8px;
  background:var(--white); border:1px solid var(--line);
  border-radius:13px; box-shadow:var(--shadow); padding:24px 30px;
}
.loading-card span { color:var(--muted); font-size:12px; }
.spinner {
  width:34px; height:34px;
  border:4px solid #DDE5EE;
  border-top-color:var(--navy);
  border-radius:50%;
  animation:spin .8s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }

.toast {
  position:fixed; right:22px; bottom:22px; z-index:300;
  max-width:380px;
  padding:12px 16px;
  border-radius:9px;
  background:#111827;
  color:#FFF;
  box-shadow:var(--shadow);
  opacity:0;
  transform:translateY(10px);
  pointer-events:none;
  transition:.2s;
}
.toast.show { opacity:1; transform:translateY(0); }
.toast.error { background:var(--red); }

@media (max-width:1100px) {
  .kpi-grid { grid-template-columns:repeat(3,1fr); }
  .dashboard-grid { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  .login-screen { padding:18px; }
  .login-layout { grid-template-columns:1fr; gap:24px; }
  .login-brand { display:none; }
  .login-card { padding:25px 20px; }
  .topbar { padding:14px 16px; }
  .topbar h1 { font-size:18px; }
  .user-info { display:none; }
  .account-actions { margin-left:0; }
  .topbar-btn:first-child { display:none; }
  .nav-tabs { padding:0 8px; overflow:auto; }
  .nav-tab { padding:13px 11px 11px; white-space:nowrap; }
  .container { padding:20px 12px 40px; }
  .section-heading { align-items:flex-start; flex-direction:column; }
  .kpi-grid { grid-template-columns:repeat(2,1fr); }
  .stage-legend { grid-template-columns:1fr; }
  .filter-bar { flex-wrap:wrap; }
  .filter-bar input[type="search"] { flex-basis:100%; }
  .form-grid { grid-template-columns:1fr; }
  .span-2 { grid-column:span 1; }
}
@media (max-width: 920px) {
  .pace-summary-grid { grid-template-columns:repeat(2, 1fr); }
  .milestone-comparison { grid-template-columns:1fr; }
}
@media (max-width: 560px) {
  .pace-summary-grid { grid-template-columns:1fr 1fr; }
}


/* v2.0.0 Cloudflare · 업무 참고자료 */
.file-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.reference-files-box {
  border: 1px solid #e4e7ec;
  background: #f9fafb;
  border-radius: 14px;
  padding: 16px;
}

.reference-files-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.reference-files-heading strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}

.reference-file-list {
  display: grid;
  gap: 8px;
}

.reference-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #eaecf0;
  border-radius: 10px;
  background: #fff;
}

.reference-file-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.reference-file-main > div {
  min-width: 0;
}

.reference-file-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.reference-file-main span:not(.reference-kind) {
  display: block;
  margin-top: 2px;
  color: #667085;
  font-size: 11px;
}

.reference-kind {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 4px 7px;
  border-radius: 7px;
  background: #eef2f6;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
}

.reference-kind.kind-매뉴얼 { background: #eef4ff; color: #3538cd; }
.reference-kind.kind-예시 { background: #ecfdf3; color: #027a48; }

.reference-file-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reference-file-actions a {
  text-decoration: none;
}

.reference-upload-box {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eaecf0;
}

.empty-state.compact {
  padding: 14px 8px;
  font-size: 12px;
}

@media (max-width: 720px) {
  .reference-file-item {
    align-items: flex-start;
    flex-direction: column;
  }
  .reference-file-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .reference-upload-box {
    grid-template-columns: 1fr;
  }
}

/* v2.1.0 · 교육 참가자별 관리 */
.participant-context-bar {
  border-bottom: 1px solid var(--line, #e5e7eb);
  background: #fff;
}
.participant-context-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.participant-context-inner > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.participant-context-inner select {
  min-width: 240px;
  max-width: 360px;
}
.danger-switch {
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #f1c7c7;
  border-radius: 10px;
  background: #fffafa;
}
.danger-switch small { color: #7a5353; }
@media (max-width: 720px) {
  .participant-context-inner { align-items: stretch; flex-direction: column; padding: 10px 16px; }
  .participant-context-inner select { max-width: none; width: 100%; }
}
