:root {
  --color-bg: #fff;
  --color-surface: #ffffff;
  --color-border: #e0e2e7;
  --color-text: #1f2328;
  --color-muted: #6b7280;
  --color-primary: #2f6feb;
  --color-primary-dark: #1f56c4;
  --color-danger: #d1453b;
  --color-success: #1f8a4c;
  --color-warning: #b8860b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family:sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 19px;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid #fff;
}
.site-header-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-weight: 700; font-size: 24px; color: var(--color-text); }
.brand:hover { text-decoration: none; }
.site-header nav a { margin-left: 16px; font-size: 18px; color: #000; }
.site-header nav a:hover { color: var(--color-primary); }

.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.container-wide {
  max-width: 1400px;
}

h1 { font-size: 30px; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 24px 0 12px; }

.card {
  background: #fcfcfc;
  border: 1px solid #efefef;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  font-size: 14px;
}
th, td {
  border-bottom: 1px solid var(--color-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}
th { color: var(--color-muted); font-weight: 600; background: #fafbfc; }
tr:last-child td { border-bottom: none; }
td.text-right { white-space: nowrap; }
td.text-right .btn-sm { margin-left: 6px; }
td.text-right .btn-sm:first-child { margin-left: 0; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-open { background: #e6f4ea; color: var(--color-success); }
.badge-upcoming { background: #eef1ff; color: #3b4bb8; }
.badge-closed { background: #eee; color: var(--color-muted); }
.badge-applied { background: #e6f4ea; color: var(--color-success); }
.badge-waiting { background: #fff4e0; color: var(--color-warning); }
.badge-completed { background: #e5f0ff; color: var(--color-primary-dark); }
.badge-cancelled { background: #fde8e7; color: var(--color-danger); }

.btn {
  display: inline-block;
  padding: 10px 25px;
  border-radius: 25px;
  border: 0px solid var(--color-primary);
  background: #38C275;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--color-primary-dark); text-decoration: none; }
.btn[disabled], .btn.btn-disabled {
  background: #d7d9dd; border-color: #d7d9dd; color: #8b8f97; cursor: not-allowed;
}
.btn-secondary { background: #e1e1e1; color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover { background: #f0f1f3; }
.btn-danger { background: var(--color-danger); border-color: var(--color-danger); }
.btn-danger:hover { background: #b23a32; }
.btn-sm { padding: 4px 10px; font-size: 13px; }

form .field { margin-bottom: 14px; }
label { display: block; font-size: 17px; font-weight: bold; color: rgb(85 85 85); margin-top: 20px; margin-bottom: 5px; }
input[type=text], input[type=tel], input[type=date], input[type=datetime-local],
input[type=number], input[type=password], select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 18px;
  background: #fff;
  color: var(--color-text);
}
.form-row { display: flex; gap: 16px; }
.form-row .field { flex: 1; }

.policy-box {
  height: 160px;
  overflow-y: auto;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fafbfc;
  font-size: 15px;
  color: var(--color-text);
  white-space: pre-wrap;
  margin-bottom: 8px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text);
}
.checkbox-label input[type=checkbox] { width: auto; }

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 30px;
  font-size: 17px;
}
.alert-success { background: #e6f4ea; color: var(--color-success); }
.alert-error { background: #fde8e7; color: var(--color-danger); }
.alert-info { background: #eef1ff; color: #3b4bb8; }

.muted { color: #099eda; font-size: 17px; }
.muted2 { color: #000; font-size: 15px; }
.text-right { text-align: right; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

.course-list { display: flex; flex-direction: column; gap: 12px; }
.course-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.course-item .info h3 { margin: 0 0 6px; font-size: 30px; }
.color_active { color: #00a84a; font-weight: 900; }
.course-item .meta { color: #575757; font-size: 19px; }
.course-item .meta strong { font-weight: 700; }

.seal-placeholder {
  width: 90px;
  height: 90px;
  border: 2px solid var(--color-danger);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-danger);
  font-size: 13px;
  text-align: center;
  opacity: 0.75;
}

.seal-image {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.certificate {
  background: #fff url('../image/수료증 디자인 양식.png') no-repeat center center;
  background-size: contain;
  padding: 150px 60px 80px;
  border: 1px solid var(--color-border);
  width: 900px;
  min-height: 1204px;
  box-sizing: border-box;
  margin: 0 auto;
}
.certificate .cert-no { text-align: left; font-size: 16px; color: var(--color-muted); letter-spacing: 1px; margin-left: 65px; }
.certificate h1 { text-align: center; font-size: 52px; letter-spacing: 8px; margin-top: 20px; margin-bottom: 40px; }
.certificate .cert-table { width: 620px; margin: 30px auto; background: transparent; }
.certificate .cert-table td { border: none; padding: 8px 4px; font-size: 25px; }
.certificate .cert-table td.label { color: rgb(15, 15, 15); width: 170px; }
.certificate .cert-footer { margin-top: 60px; text-align: center; font-size: 26px; }
.certificate .issuer-line { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 20px; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-box {
  background: var(--color-surface);
  border-radius: 10px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--color-muted);
  padding: 0;
}
.modal-close:hover { color: var(--color-text); }

@page {
  size: 9.375in 12.5417in;
  margin: 0;
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .container { max-width: none; padding: 0; }
  .certificate {
    border: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
    width: 900px;
    height: 1204px;
    min-height: 1204px;
    margin: 0;
  }
  .certificate .cert-table { max-width: 100%; }
}
