/* ============================================================
   Tatalogam Assessment — tema visual
   Disamakan dengan Mockup Form Penilaian Investigator:
   biru #0054a4, lime #9cc814, navy #0b2a4a, Montserrat + Source Sans 3,
   kartu membulat, tombol pil, kepala/footer bergaris lime.
   ============================================================ */
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url('fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('fonts/sourcesans3-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --blue: #0054a4;
  --blue-dark: #003b7a;
  --lime: #9cc814;
  --lime-dark: #5f8a00;
  --navy: #0b2a4a;
  --bg: #eef3f9;

  --ink: #12263f;
  --ink-soft: #5a6f88;
  --line: #c4d3e6;
  --line-soft: #e3ebf4;
  --tint: #eaf2fc;
  --danger: #c0392b;
  --danger-tint: #fdeceb;

  /* alias lama — dipakai di JS/CSS laporan */
  --paper: var(--bg);
  --paper-raised: #ffffff;
  --steel: var(--blue);
  --steel-dark: var(--navy);
  --gold: var(--lime);
  --good: var(--lime-dark);
  --warn: var(--danger);
  --radius: 10px;
  --shadow: 0 8px 30px rgba(0, 60, 120, 0.10);
  --shadow-sm: 0 4px 16px rgba(0, 60, 120, 0.07);

  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; display: flex; flex-direction: column; }

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0;
  line-height: 1.2;
}
h1 { margin: 0 0 12px; }
h2 { font-size: 20px; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 0 0 10px; }
a { color: var(--blue); }
::selection { background: var(--lime); color: var(--navy); }

/* ---------- Header + hero (halaman peserta) ---------- */
.site-header { background: #fff; border-bottom: 4px solid var(--lime); position: relative; z-index: 3; animation: fadeDown .6s var(--ease) backwards; }
.site-header-inner { max-width: 920px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.site-header img { height: 60px; width: auto; display: block; }
.site-header .divider { width: 1px; height: 36px; background: #d5dfec; }
.site-header .site-title { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }

.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  padding: 60px 20px 118px;
  transition: padding .6s var(--ease);
}
.hero.is-compact { padding: 38px 20px 100px; }
.hero-shape { position: absolute; right: -20px; top: 0; width: 520px; max-width: 80%; height: auto; opacity: .95; pointer-events: none; animation: shapeIn 1s .1s var(--ease) backwards; }
.hero-shape .s-lime { transform-origin: right bottom; animation: floaty 9s ease-in-out infinite; }
.hero-inner { position: relative; max-width: 920px; margin: 0 auto; }
.hero-badge {
  display: inline-block; background: var(--lime); color: var(--navy);
  font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.hero h1 { color: #fff; font-size: clamp(28px, 5vw, 44px); line-height: 1.1; margin: 16px 0 12px; max-width: 640px; transition: font-size .4s var(--ease); }
.hero.is-compact h1 { font-size: clamp(24px, 4vw, 32px); margin-top: 12px; }
.hero p { margin: 0; max-width: 560px; font-size: 18px; color: #d6e6f7; white-space: pre-line; }
.hero.is-compact p { font-size: 16px; }
.hero-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.hero-chips span { border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 14px; }
.hero.is-compact .hero-chips { display: none; }
.hero-content > * { animation: fadeUp .6s var(--ease) backwards; }
.hero-content > *:nth-child(2) { animation-delay: .06s; }
.hero-content > *:nth-child(3) { animation-delay: .12s; }
.hero-content > *:nth-child(4) { animation-delay: .18s; }

.hero-progress { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease), opacity .4s ease, margin .4s ease; margin-top: 0; }
.hero.has-progress .hero-progress { max-height: 40px; opacity: 1; margin-top: 22px; }
.hero-progress .track { height: 8px; border-radius: 999px; background: rgba(255,255,255,.2); overflow: hidden; }
.hero-progress .fill { height: 100%; width: 0; border-radius: 999px; background: var(--lime); transition: width .8s var(--ease); position: relative; overflow: hidden; }
.hero-progress .fill::after, .progressbar > div::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%);
  transform: translateX(-100%); animation: shine 2.6s 1s ease-in-out infinite;
}

.page {
  position: relative; z-index: 2; flex: 1; width: 100%;
  max-width: 920px; margin: -68px auto 0; padding: 0 20px 70px;
}
#app { display: flex; flex-direction: column; gap: 18px; transition: opacity .18s ease, transform .18s ease; }
#app.is-leaving { opacity: 0; transform: translateY(-8px); pointer-events: none; }
#app > * { animation: fadeUp .55s var(--ease) backwards; }
#app > *:nth-child(2) { animation-delay: .07s; }
#app > *:nth-child(3) { animation-delay: .14s; }
#app > *:nth-child(4) { animation-delay: .21s; }
#app > *:nth-child(n+5) { animation-delay: .28s; }

.site-footer {
  background: var(--navy); color: #b9cde4; padding: 26px 20px; text-align: center;
  font-size: 13px; border-top: 4px solid var(--lime); margin-top: auto;
}

/* ---------- Kartu & judul bagian ---------- */
.card {
  background: #fff; border-radius: 18px; padding: 28px; border: 0;
  box-shadow: var(--shadow);
  transition: box-shadow .3s ease, transform .3s var(--ease);
}
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.sec-head h2 { margin: 0; }
.sec-num {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; background: var(--blue); color: #fff;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800;
  transition: background .3s ease, color .3s ease, transform .3s var(--ease);
}
.sec-num.is-done { background: var(--lime); color: var(--navy); }
.sec-note { margin: -8px 0 8px 48px; color: var(--ink-soft); font-size: 14px; }
.instruction { margin: 0 0 6px; padding: 10px 14px; border-left: 4px solid var(--lime); background: #f6faff; border-radius: 0 10px 10px 0; color: var(--ink-soft); font-size: 14.5px; white-space: pre-line; }

.step-label { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; font-weight: 600; }

/* ---------- Form ---------- */
label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.req { color: var(--danger); }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=search], input[type=password], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
input::placeholder, textarea::placeholder { color: #8da1b8; }
input:hover, select:hover, textarea:hover { border-color: #9fb8d6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 84, 164, .13); }
button:focus-visible, a:focus-visible, .likert-opt:focus-visible, .disc-mark:focus-visible { outline: 3px solid rgba(0, 84, 164, .4); outline-offset: 2px; }
textarea { resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%230054a4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); width: 18px; height: 18px; }

.field { margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .field { margin-bottom: 0; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.error-msg {
  color: #a52a1d; font-size: 14px; font-weight: 600; margin: 14px 0 0;
  background: var(--danger-tint); border-left: 4px solid var(--danger); border-radius: 0 10px 10px 0; padding: 10px 14px;
  animation: shake .45s ease backwards;
}
.ok-msg { color: #3d5a00; background: #e9f5c9; border-left: 4px solid var(--lime); border-radius: 0 10px 10px 0; padding: 10px 14px; font-size: 14px; font-weight: 600; margin: 14px 0 0; animation: fadeUp .35s var(--ease) backwards; }

/* ---------- Tombol ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 14px 30px; border-radius: 999px; border: 0;
  background: var(--blue); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 15px; line-height: 1.2;
  cursor: pointer; text-decoration: none;
  transition: background .2s ease, transform .2s var(--ease), box-shadow .25s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 84, 164, .28); }
.btn:active { transform: translateY(0); box-shadow: none; transition-duration: .05s; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn[disabled]:hover { background: var(--blue); }

.btn-arrow::after {
  content: '→'; flex: 0 0 auto; width: 26px; height: 26px; margin: -4px -14px -4px 0; border-radius: 50%;
  background: var(--lime); color: var(--navy); display: grid; place-items: center; font-size: 15px; font-family: var(--font-body); font-weight: 700;
  transition: transform .3s var(--ease);
}
.btn-arrow:hover:not([disabled])::after { transform: translateX(4px); }

.btn-ghost { background: #fff; color: var(--blue); border: 1.5px solid #b9cfe8; padding: 12px 24px; font-size: 14px; }
.btn-ghost:hover { background: var(--tint); border-color: var(--blue); box-shadow: 0 6px 16px rgba(0, 84, 164, .12); }
.btn-ghost[disabled]:hover { background: #fff; border-color: #b9cfe8; }

.btn-sm { padding: 7px 14px; font-family: var(--font-body); font-weight: 700; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn-ghost.btn-sm { padding: 6px 12px; }
.btn-danger, .btn-ghost.btn-danger { color: var(--danger); border-color: #efc4bf; background: transparent; }
.btn-danger:hover, .btn-ghost.btn-danger:hover { background: var(--danger-tint); border-color: var(--danger); box-shadow: none; }

.btn-row { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; gap: 12px; flex-wrap: wrap; }
.btn-row .btn-ghost { flex: 0 0 auto; }

/* ---------- Skala Likert ---------- */
.likert-item { padding: 18px 0; border-top: 1px solid var(--line-soft); animation: fadeUp .5s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 45ms + .1s); }
.instruction + .likert-item { border-top: 0; }
.likert-text { font-size: 16.5px; font-weight: 600; margin-bottom: 14px; }
.likert-scale { display: flex; gap: 8px; }
.likert-opt {
  flex: 1; display: grid; place-items: center; text-align: center;
  min-height: 46px; padding: 8px 4px;
  border: 1.5px solid #b9cfe8; border-radius: 999px; cursor: pointer; user-select: none;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink); background: #fff;
  transition: background .2s ease, border-color .2s ease, transform .2s var(--ease), box-shadow .2s ease, color .2s ease;
}
.likert-opt:hover { border-color: var(--blue); background: #f2f7fd; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0, 84, 164, .12); }
.likert-opt:active { transform: scale(.96); }
.likert-opt.selected { border-color: var(--lime); background: var(--lime); color: var(--navy); font-weight: 800; animation: pop .35s var(--ease); box-shadow: 0 6px 14px rgba(156, 200, 20, .35); }
.likert-scale-labels { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; }

/* ---------- DISC ---------- */
.disc-instructions { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 14px; }
.disc-block { padding: 8px 16px; margin-bottom: 14px; border: 1.5px solid var(--line-soft); border-radius: 14px; background: #f9fbfe; animation: fadeUp .5s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 60ms + .1s); transition: border-color .3s ease, background .3s ease; }
.disc-block.is-complete { border-color: #cfe58a; background: #fbfef2; }
.disc-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px 72px; align-items: center; padding: 8px 0; border-radius: 8px; transition: background .2s ease; }
.disc-row + .disc-row { border-top: 1px dashed #d5e0ee; }
.disc-word { font-size: 16px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; padding-right: 8px; }
.disc-mark {
  width: 38px; height: 38px; border: 1.5px solid #b9cfe8; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; justify-self: center; cursor: pointer;
  font-family: var(--font-display); font-weight: 800; font-size: 12px; color: var(--ink-soft); background: #fff;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s var(--ease), box-shadow .2s ease;
}
.disc-mark:hover { border-color: var(--blue); transform: scale(1.1); }
.disc-mark.selected-most { background: var(--lime); border-color: var(--lime); color: var(--navy); animation: pop .35s var(--ease); box-shadow: 0 4px 12px rgba(156, 200, 20, .45); }
.disc-mark.selected-least { background: var(--danger); border-color: var(--danger); color: #fff; animation: pop .35s var(--ease); box-shadow: 0 4px 12px rgba(192, 57, 43, .3); }
.disc-head { display: grid; grid-template-columns: minmax(0, 1fr) 72px 72px; font-family: var(--font-display); font-weight: 700; font-size: 12px; line-height: 1.25; color: var(--blue); margin-bottom: 8px; align-items: end; text-transform: uppercase; letter-spacing: .04em; }
.disc-head span { text-align: center; }

/* ---------- Progress ---------- */
.progressbar { height: 8px; background: #dde7f3; border-radius: 999px; margin: 14px 0 0; overflow: hidden; }
.progressbar > div { position: relative; overflow: hidden; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), #3a86d1); transition: width .9s var(--ease); }
.hub-item.is-done .progressbar > div { background: var(--lime); }

/* ---------- Kode lanjutan & menu tes ---------- */
.resume-toggle {
  align-self: center; color: var(--blue); font-weight: 700; font-size: 14px; cursor: pointer; padding: 6px 10px;
  border: 0; background: none; font-family: inherit; text-decoration: underline; text-underline-offset: 3px; transition: color .2s ease;
}
.resume-toggle:hover { color: var(--blue-dark); }
.resume-card { animation: fadeUp .4s var(--ease) backwards; }

.resume-code-box { width: 100%; padding: 24px 20px; text-align: center; background: #f6faff; border: 2px dashed #8fb0d6; border-radius: 14px; }
.resume-code-label { font-family: var(--font-display); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin-bottom: 6px; }
.resume-code-value { font-family: 'SF Mono', Consolas, monospace; font-size: clamp(24px, 6vw, 32px); font-weight: 700; letter-spacing: .1em; color: var(--blue); margin-bottom: 14px; }
.resume-code-note { font-size: 13.5px; color: var(--ink-soft); margin: 14px 0 0; }
.resume-code-box .btn { margin: 4px; }

.hub-item { display: flex; align-items: center; gap: 18px; position: relative; overflow: hidden; }
.hub-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--blue); transition: background .3s ease; }
.hub-item:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(0, 60, 120, .16); }
.hub-item.is-done::before { background: var(--lime); }
.hub-info { flex: 1; min-width: 0; }
.hub-info h3 { margin: 0 0 6px; font-size: 19px; }
.hub-status { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.hub-item.is-done .hub-status { color: var(--lime-dark); }
.hub-item .btn { flex: 0 0 auto; }
@media (max-width: 640px) { .hub-item { flex-wrap: wrap; } .hub-item .btn { width: 100%; } }
.hub-text, .hub-intro { white-space: pre-line; }
.hub-intro { color: var(--ink-soft); max-width: 62ch; margin: 0; }
.hub-summary { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 6px; }
.hub-submit { text-align: center; }
.hub-submit p { margin-top: 0; color: var(--ink-soft); }
.hub-submit .btn { margin-top: 4px; }

.center-note { text-align: center; color: var(--ink-soft); font-size: 14px; margin-top: 18px; }
.loading { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-weight: 600; }
.loading::before { content: ''; width: 22px; height: 22px; border: 3px solid #cfdcec; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }

/* Halaman selesai */
.done-card { text-align: center; padding: 56px 28px; }
.done-check { width: 84px; height: 84px; margin: 0 auto 22px; display: block; }
.done-check circle { fill: none; stroke: var(--lime); stroke-width: 5; stroke-dasharray: 252; stroke-dashoffset: 252; animation: draw .8s .1s var(--ease) forwards; transform-origin: center; transform: rotate(-90deg); }
.done-check path { fill: none; stroke: var(--blue); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s .8s var(--ease) forwards; }
.done-card p { color: var(--ink-soft); max-width: 52ch; margin: 0 auto; }

/* ============================================================
   Panel admin
   ============================================================ */
.admin-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; width: 100%; }
.sidebar {
  background: var(--navy); color: #fff; display: flex; flex-direction: column;
  border-right: 4px solid var(--lime); position: sticky; top: 0; height: 100vh; align-self: start; overflow-y: auto;
  animation: slideRight .6s var(--ease) backwards;
}
.sb-brand { background: #fff; padding: 14px 20px; display: flex; align-items: center; gap: 12px; }
.sb-brand img { height: 56px; width: auto; display: block; }
.sb-brand .sb-label { font-family: var(--font-display); font-weight: 800; font-size: 12px; line-height: 1.25; color: var(--blue); text-transform: uppercase; letter-spacing: .04em; }
.sidebar nav { position: relative; padding: 18px 12px; display: flex; flex-direction: column; gap: 6px; }
.nav-pill { position: absolute; left: 0; top: 0; width: 0; height: 0; background: var(--lime); border-radius: 10px; z-index: 0; opacity: 0; transition: transform .4s var(--ease), width .4s var(--ease), height .4s var(--ease), opacity .3s ease; pointer-events: none; }
.sidebar nav a {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; color: #c5d7ec; text-decoration: none; border-radius: 10px;
  transition: color .25s ease, background .25s ease, transform .25s var(--ease);
  animation: slideRight .5s var(--ease) backwards;
}
.sidebar nav a:nth-of-type(1) { animation-delay: .10s; } .sidebar nav a:nth-of-type(2) { animation-delay: .17s; }
.sidebar nav a:nth-of-type(3) { animation-delay: .24s; } .sidebar nav a:nth-of-type(4) { animation-delay: .31s; }
.sidebar nav a svg { flex: 0 0 auto; transition: transform .3s var(--ease); }
.sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar nav a:hover svg { transform: scale(1.12); }
.sidebar nav a.active { color: var(--navy); background: transparent; }
.sidebar nav a.active:hover { background: transparent; }
.sb-foot { margin-top: auto; padding: 16px 12px 20px; display: flex; flex-direction: column; gap: 8px; animation: fadeUp .6s .4s var(--ease) backwards; }
.sb-who { padding: 0 4px 6px; font-size: 13px; color: #9fb6d1; line-height: 1.35; }
.sb-who #who-name { color: #fff; font-weight: 700; font-size: 14px; }
.sb-link {
  display: block; text-align: center; font: inherit; font-weight: 700; font-size: 13px; color: #fff; text-decoration: none; cursor: pointer;
  background: transparent; border: 1px solid rgba(255,255,255,.35); border-radius: 9px; padding: 9px 14px;
  transition: background .2s ease, border-color .2s ease, transform .2s var(--ease);
}
.sb-link:hover { background: rgba(255,255,255,.1); border-color: #fff; transform: translateY(-1px); }
.sb-link.is-quiet { color: #c5d7ec; border-color: rgba(255,255,255,.2); }

.main-panel { min-width: 0; padding: 28px 32px 56px; }
.main-panel > * { animation: fadeUp .5s var(--ease) backwards; }
.main-panel > *:nth-child(2) { animation-delay: .07s; }
.main-panel > *:nth-child(3) { animation-delay: .14s; }
.main-panel > *:nth-child(n+4) { animation-delay: .21s; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.panel-head h2 { margin: 0; font-size: 26px; }
.panel-head .panel-sub { margin: 2px 0 0; color: var(--ink-soft); font-size: 15px; }
.panel-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.panel-tools input { width: 300px; max-width: 100%; padding: 10px 14px; font-size: 15px; }

.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm); border-top: 4px solid var(--blue); animation: fadeUp .55s var(--ease) backwards; transition: transform .3s var(--ease), box-shadow .3s ease; }
.stat-card:nth-child(1) { animation-delay: .05s; } .stat-card:nth-child(2) { animation-delay: .12s; border-top-color: #c0392b; }
.stat-card:nth-child(3) { animation-delay: .19s; border-top-color: #e0a030; } .stat-card:nth-child(4) { animation-delay: .26s; border-top-color: var(--lime); }
.stat-card:nth-child(5) { animation-delay: .33s; border-top-color: #4a90d9; }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0, 60, 120, .14); }
.stat-card .num { font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-card .lbl { font-size: 13px; color: var(--ink-soft); font-weight: 600; margin-top: 2px; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.chart-grid .card { padding: 22px; border-radius: 16px; }
.chart-grid .card:hover { transform: translateY(-3px); }
.chart-grid h3 { color: var(--blue); font-size: 15px; margin-bottom: 14px; }

.table-wrap { overflow-x: auto; background: #fff; border-radius: 14px; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th { background: var(--blue); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; border-bottom: 0; }
tbody tr { animation: fadeUp .4s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 35ms); transition: background .2s ease; }
tbody tr:nth-child(even) td { background: #f8fafd; }
tbody tr:hover td { background: var(--tint); }
tr:last-child td { border-bottom: none; }
td strong { font-weight: 700; }
.row-actions { display: flex; gap: 8px; }

.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.badge-D { background: #fdeceb; color: #a52a1d; }
.badge-I { background: #fdf0d9; color: #8a5200; }
.badge-S { background: #e9f5c9; color: #3d5a00; }
.badge-C { background: #dcebfb; color: #0b4a8f; }
.empty-state { text-align: center; padding: 56px 20px; color: var(--ink-soft); background: #fff; border-radius: 14px; margin-top: 14px; box-shadow: var(--shadow-sm); }

/* Tab */
.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn {
  padding: 9px 18px; border-radius: 999px; border: 1.5px solid #b9cfe8; background: #fff; color: var(--blue);
  font-family: var(--font-display); font-weight: 700; font-size: 13px; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s var(--ease), box-shadow .2s ease;
}
.tab-btn:hover { transform: translateY(-1px); border-color: var(--blue); background: var(--tint); }
.tab-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 14px rgba(0, 84, 164, .25); }
.main-panel .card { margin-bottom: 18px; }
.main-panel .card h3 { color: var(--blue); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50; padding: 40px 20px; overflow-y: auto;
  background: rgba(11, 42, 74, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  animation: fadeIn .25s ease backwards;
}
.modal-overlay.closing { animation: fadeOut .2s ease both; }
.modal-overlay.closing .modal-box { animation: modalOut .2s ease both; }
.modal-box {
  background: #fff; border-radius: 18px; border-top: 8px solid var(--blue); max-width: 800px; width: 100%; padding: 32px; position: relative;
  box-shadow: 0 30px 70px rgba(11, 42, 74, .35);
  animation: modalIn .4s var(--ease) backwards;
}
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--tint); color: var(--blue);
  font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center;
  transition: background .2s ease, transform .3s var(--ease);
}
.modal-close:hover { background: var(--blue); color: #fff; transform: rotate(90deg); }
.modal-box h2 { padding-right: 40px; }
.report-section { margin-bottom: 24px; }
.report-section h3 { font-size: 17px; margin-bottom: 10px; }
#report-tab-panel > *, #tab-panel > * { animation: fadeUp .4s var(--ease) backwards; }
#report-tab-panel > *:nth-child(2), #tab-panel > *:nth-child(2) { animation-delay: .06s; }
#report-tab-panel > *:nth-child(n+3), #tab-panel > *:nth-child(n+3) { animation-delay: .12s; }
.modal-box .tabs { margin-bottom: 22px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
.modal-box .tab-btn { white-space: nowrap; flex-shrink: 0; }
.modal-box .btn-row { flex-wrap: wrap; }
.modal-box .btn-row > div { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#print-scope { min-width: 190px; padding: 10px 38px 10px 14px; font-size: 14px; width: auto; }
.trait-bar-row { margin-bottom: 12px; }
.trait-bar-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.trait-bar-track { height: 8px; background: #dde7f3; border-radius: 999px; overflow: hidden; }
.trait-bar-fill { height: 100%; background: var(--blue); border-radius: 999px; }

/* Kelola pertanyaan */
.bf-field-row { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.bf-field-row:last-child { border-bottom: none; }
.bf-field-main { display: grid; grid-template-columns: 1fr 170px auto 40px; gap: 8px; align-items: center; }
.bf-required-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; margin: 0; }
.bf-required-label input { width: 18px; margin: 0; }
.bf-options-wrap { margin-top: 10px; }
.bf-del { width: 40px; height: 40px; padding: 0; color: var(--danger); border-color: #efc4bf; font-size: 20px; line-height: 1; }
.bf-del:hover { background: var(--danger-tint); border-color: var(--danger); }

/* ---------- Login ---------- */
.login-shell {
  position: relative; overflow: hidden; min-height: 100vh; width: 100%; padding: 24px 20px 90px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
}
.login-shell .hero-shape { top: auto; bottom: 0; right: -30px; width: 620px; transform-origin: bottom right; }
.login-card { position: relative; width: 100%; max-width: 420px; background: #fff; border-radius: 18px; padding: 34px 32px 32px; box-shadow: 0 30px 70px rgba(0, 20, 50, .35); border-top: 6px solid var(--lime); animation: modalIn .7s var(--ease) backwards; }
.login-card > * { animation: fadeUp .6s var(--ease) backwards; }
.login-card > *:nth-child(2) { animation-delay: .08s; } .login-card > *:nth-child(3) { animation-delay: .14s; }
.login-card > *:nth-child(4) { animation-delay: .2s; } .login-card > *:nth-child(5) { animation-delay: .26s; } .login-card > *:nth-child(n+6) { animation-delay: .32s; }
.login-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.login-logo img { height: 64px; width: auto; }
.login-logo .l-title { font-family: var(--font-display); font-weight: 800; font-size: 13px; line-height: 1.3; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); }
.login-card h1 { font-size: 22px; margin: 0 0 4px; }
.login-card .sub { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 24px; }
.login-shell .site-footer { position: absolute; left: 0; right: 0; bottom: 0; }
.login-card .btn { width: 100%; margin-top: 8px; }

@media (max-width: 960px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .chart-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 4px solid var(--lime); animation-name: fadeDown; }
  .sidebar nav { flex-direction: row; overflow-x: auto; padding: 12px; }
  .sidebar nav a { white-space: nowrap; }
  .sb-foot { flex-direction: row; align-items: center; margin-top: 0; padding: 0 12px 14px; flex-wrap: wrap; }
  .sb-who { flex: 1 1 100%; }
  .sb-link { flex: 1; }
  .main-panel { padding: 20px 16px 48px; }
  .bf-field-main { grid-template-columns: 1fr; }
  .bf-del { width: 100%; }
  .panel-tools input { width: 100%; }
}
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 40px 20px 104px; }
  .hero p { font-size: 16px; }
  .card { padding: 22px 18px; }
  .disc-row, .disc-head { grid-template-columns: minmax(0, 1fr) 58px 58px; }
  .likert-scale { gap: 6px; }
  .site-header img { height: 48px; }
  .site-header .site-title { font-size: 11px; }
  .btn-row .btn { flex: 1 1 auto; }
  .modal-box { padding: 24px 18px; }
  .modal-box .btn-row { flex-direction: column; align-items: stretch; }
  .modal-box .btn-row > div { flex-direction: column; align-items: stretch; }
  #print-scope, .modal-box .btn-row .btn { width: 100%; }
}

/* ---------- Keyframes ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes slideRight { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes modalOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes pop { 0% { transform: scale(.88); } 55% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes shake { 0% { opacity: 0; transform: translateX(0); } 20% { opacity: 1; transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } 100% { opacity: 1; transform: none; } }
@keyframes shine { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
@keyframes shapeIn { from { opacity: 0; transform: translateX(60px); } to { opacity: .95; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-8px, -6px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ---------- Cetak / Export PDF hasil kandidat ---------- */
/* #print-area disusun terpisah dari tampilan layar (bukan menyalin modal),
   supaya hasil PDF ringkas, rapi, dan tidak ikut mencetak elemen UI layar. */
#print-area {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 190mm;
}

@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
  }
  .no-print { display: none !important; }
}
@page { size: A4 portrait; margin: 14mm 14mm; }

#print-area, #print-area * {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
#print-area {
  font-family: Georgia, 'Times New Roman', serif;
  color: #12263f;
  font-size: 11px;
  line-height: 1.5;
}
.pr-header {
  border-bottom: 3px solid #9cc814;
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.pr-company {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #5a6f88;
}
.pr-doc-title {
  font-family: Arial, sans-serif;
  font-size: 19px;
  font-weight: 700;
  margin-top: 2px;
}
.pr-info-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 11px; border: 1px solid #b9cfe8; }
.pr-info-table td { padding: 5px 8px; vertical-align: top; border: 1px solid #b9cfe8; }
.pr-info-label { color: #5a6f88; width: 15%; white-space: nowrap; font-family: Arial, sans-serif; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.04em; background: #f1f6fc; font-weight: 700; }
.pr-section { margin-bottom: 16px; page-break-inside: avoid; }
.pr-h {
  font-family: Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: #0054a4;
  border-bottom: 1px solid #d5dfec;
  padding-bottom: 4px;
  margin-bottom: 8px;
}
.pr-h-sub { font-weight: 400; color: #5a6f88; font-size: 11px; }
.pr-score-table { width: 100%; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 11px; border: 1px solid #b9cfe8; }
.pr-score-table th {
  text-align: left;
  padding: 5px 8px;
  background: #0054a4;
  color: #fff;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  border: 1px solid #0054a4;
}
.pr-score-table td { padding: 6px 8px; vertical-align: middle; border: 1px solid #d5dfec; }
.pr-score-table tbody tr:nth-child(even) { background: #f8fafd; }
.pr-dim { width: 24%; font-weight: 600; }
.pr-bar-cell { width: 38%; }
.pr-bar-track { height: 7px; background: #dde7f3; border-radius: 3px; overflow: hidden; }
.pr-bar-fill { height: 100%; }
.pr-score { width: 15%; text-align: right; font-variant-numeric: tabular-nums; }
.pr-level { width: 23%; text-align: right; color: #5a6f88; }
.pr-p { margin: 0 0 8px; font-size: 11px; line-height: 1.55; text-align: justify; }
.pr-two-col { display: flex; gap: 16px; }
.pr-two-col > div { flex: 1; border: 1px solid #d5dfec; border-radius: 3px; padding: 10px 12px; }
.pr-two-col .pr-h { border-bottom: none; margin-bottom: 6px; padding-bottom: 0; }
.pr-list { margin: 0 0 6px; padding-left: 16px; font-size: 11px; }
.pr-list li { margin-bottom: 2px; }
.pr-note { font-size: 9.5px; color: #5a6f88; margin: 0; font-family: Arial, sans-serif; }
.pr-footer {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #d5dfec;
  font-family: Arial, sans-serif;
  font-size: 8.5px;
  color: #5a6f88;
  line-height: 1.5;
}

/* ============================================================
   Kartu domain Big Five (gaya "ringkasan psikolog") — dipakai
   di modal layar (report-section) & laporan cetak (pr-section).
   ============================================================ */
.bfd-sub, .pr-note { color: var(--ink-soft); font-size: 12.5px; }
.bfd-dim {
  border: 1.5px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}
.bfd-dh {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--soft, #f1f6fc); padding: 8px 14px; border-bottom: 1.5px solid var(--line);
}
.bfd-name { font-weight: 700; font-size: 15px; font-family: var(--font-display); }
.bfd-name small { font-weight: 400; color: var(--ink-soft); font-size: 12px; margin-left: 6px; font-family: var(--font-body); }
.bfd-badge { padding: 2px 12px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.bfd-high { background: #e2f3ec; color: #0f6b4f; }
.bfd-mid  { background: #fbf0d9; color: #8a5a00; }
.bfd-low  { background: #f8e4e4; color: #8f2f2f; }
.bfd-db { padding: 10px 14px 12px; }
.bfd-desc { margin: 0 0 10px; font-size: 14px; }
.bfd-pc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bfd-box { padding: 7px 10px; border-radius: 6px; font-size: 13px; border-left: 4px solid; }
.bfd-box b { display: block; font-size: 12px; margin-bottom: 1px; }
.bfd-plus { background: #e2f3ec; border-color: #0f6b4f; }
.bfd-plus b { color: #0f6b4f; }
.bfd-warn { background: #fbf0d9; border-color: #c98a1a; }
.bfd-warn b { color: #8a5a00; }
.bfd-fac {
  margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 12px;
}
.bfd-fac span { color: var(--ink-soft); }
.bfd-fac b { color: var(--ink); }
.bfd-fac em { display: block; font-style: normal; font-size: 11px; }
@media (max-width: 600px) { .bfd-pc, .bfd-fac { grid-template-columns: 1fr; } }

/* ============================================================
   Profil DISC — grafik 3-garis (Publik/Tekanan/Asli), tabel skor,
   dan blok pola per grafik.
   ============================================================ */
.dsc-grid, .pr-dsc-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 640px) { .dsc-grid, .pr-dsc-grid { grid-template-columns: 1fr; } }
.dsc-chartbox, .dsc-tablebox { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.dsc-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.dsc-fig { margin: 0; border: 1px solid var(--line); border-top: 3px solid; border-radius: 8px; padding: 8px 10px; break-inside: avoid; }
.dsc-fig figcaption { font-size: 13px; margin-bottom: 4px; }
.pr-dsc-table { margin-bottom: 8px; }
@media screen and (max-width: 760px) { .dsc-trio { grid-template-columns: 1fr; } }
.dsc-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; margin-top: 6px; color: var(--ink-soft); }
.dsc-legend b { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.dsc-table, .pr-score-table.dsc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dsc-table th, .dsc-table td { border-bottom: 1px solid var(--line); padding: 6px; text-align: center; }
.dsc-table th:first-child, .dsc-table td:first-child { text-align: left; font-weight: 700; }
.dsc-prof, .pr-dsc-profiles .dsc-prof {
  border-left: 4px solid; padding: 4px 0 4px 12px; margin-bottom: 10px;
}
.dsc-prof h4 { margin: 0; font-size: 15px; font-family: var(--font-display); font-weight: 600; }
.dsc-prof-sub { margin: 2px 0 4px; font-size: 12px; color: var(--ink-soft); }

/* Ringkasan kekuatan/area pengembangan — dipakai di layar & cetak */
.chip-list { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; border: 1px solid var(--line); border-radius: 99px; padding: 3px 12px; background: var(--paper-raised); }
.chip.warn { border-color: var(--warn); color: var(--warn); }

/* ============================================================
   Tes Tipe Kepribadian (Jungian) — "spec sheet" 4-sumbu garis ukur,
   posisi kiri-kanan tetap (E/S/F/J kiri, I/N/T/P kanan); dipakai
   di modal layar (report-section) & laporan cetak (.pr-jng).
   ============================================================ */
.jng-result { display: flex; align-items: baseline; gap: 14px; margin-bottom: 4px; }
.jng-code { font-size: 28px; font-weight: 700; color: var(--ink); font-family: var(--font-display); }
.jng-label { font-size: 15px; font-weight: 600; color: var(--ink); }
.jng-desc { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin: 4px 0 20px; max-width: 60ch; }
.jng-axes { margin-bottom: 18px; }
.jng-axis { margin-bottom: 16px; }
.jng-heads { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 6px; }
.jng-pole { display: flex; align-items: baseline; gap: 6px; }
.jng-pole .jng-pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.jng-pole.jng-dom .jng-pct { color: var(--warn); }
.jng-pole.jng-dom .jng-name { color: var(--ink); font-weight: 600; }
.jng-pole.jng-rec .jng-pct { color: var(--ink-soft); font-weight: 500; }
.jng-pole.jng-rec .jng-name { color: var(--ink-soft); }
.jng-line { position: relative; height: 18px; }
.jng-rule { position: absolute; top: 8px; left: 0; right: 0; height: 1px; background: var(--line); }
.jng-fill { position: absolute; top: 8px; left: 0; height: 2px; background: var(--warn); }
.jng-tick { position: absolute; top: 5px; width: 1px; height: 8px; background: var(--line); }
.jng-tick-end { background: var(--ink-soft); }
.jng-marker {
  position: absolute; top: -1px; width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--warn);
  transform: translateX(-5px);
}
.jng-foot { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-soft); margin-top: 2px; }
.jng-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.jng-col { padding: 10px 14px; border-radius: 6px; font-size: 12px; border-left: 4px solid; }
.jng-col b { display: block; font-size: 12px; margin-bottom: 4px; }
.jng-col ul { margin: 0; padding-left: 15px; }
.jng-col li { margin-bottom: 2px; }
.jng-plus { background: #e2f3ec; border-color: #0f6b4f; }
.jng-plus b { color: #0f6b4f; }
.jng-warn { background: #fbf0d9; border-color: #c98a1a; }
.jng-warn b { color: #8a5a00; }
.jng-fit { padding: 10px 14px; border-radius: 6px; background: var(--soft, #f1f6fc); font-size: 12px; }
.jng-fit b { display: block; font-size: 12px; margin-bottom: 4px; }
.jng-fit p { margin: 0; }
.jng-badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; background: #e3eefb; color: #0054a4; }
@media (max-width: 600px) { .jng-cols { grid-template-columns: 1fr; } }

/* ---- Versi cetak: lebih padat, warna disederhanakan untuk hemat tinta ---- */
@media print {
  .bfd-dim { break-inside: avoid; margin-bottom: 8px; }
  .bfd-dh { padding: 5px 12px; }
  .bfd-name { font-size: 12.5px; }
  .bfd-name small { font-size: 10.5px; }
  .bfd-sub { font-size: 10.5px; }
  .bfd-db { padding: 7px 12px 8px; }
  .bfd-desc { margin-bottom: 6px; font-size: 11px; }
  .bfd-box { padding: 4px 8px; font-size: 11px; }
  .bfd-fac { margin-top: 6px; padding-top: 5px; font-size: 11px; }
  .bfd-fac em { font-size: 10.5px; }
  .dsc-grid, .pr-dsc-grid { gap: 8px; }
  .dsc-chartbox, .dsc-tablebox { border-color: #b9cfe8; padding: 6px 8px; }
  .dsc-prof { break-inside: avoid; margin-bottom: 6px; padding-left: 10px; }
  .dsc-prof h4 { font-size: 12px; }
  .dsc-prof-sub { font-size: 10px; }
  .chip { font-size: 10.5px; padding: 2px 9px; }
  .pr-bfd .bfd-dh { background: #f1f6fc; }

  .pr-jng .jng-code { font-size: 20px; }
  .pr-jng .jng-label { font-size: 12.5px; }
  .pr-jng .jng-desc { font-size: 11px; margin-bottom: 14px; }
  .pr-jng .jng-heads { font-size: 11px; }
  .pr-jng .jng-foot { font-size: 9px; }
  .pr-jng .jng-axis { margin-bottom: 12px; break-inside: avoid; }
  .pr-jng .jng-cols { gap: 10px; margin-bottom: 10px; }
  .pr-jng .jng-col, .pr-jng .jng-col b { font-size: 10.5px; }
  .pr-jng .jng-fit, .pr-jng .jng-fit b { font-size: 10.5px; }
}


/* ============================================================
   CETAK A4 — ukuran teks dibuat terbaca di kertas (pakai pt, bukan px).
   Dahulu teks cetak 9–11px (~7–8pt) sehingga terlalu kecil di A4.
   Acuan sekarang: isi 10.5pt, keterangan >= 9pt, judul 13–20pt.
   Blok ini sengaja diletakkan paling akhir agar menimpa aturan lama.
   ============================================================ */
@media print {
  #print-area { font-size: 10.5pt; line-height: 1.5; }
  .pr-company { font-size: 10pt; }
  .pr-doc-title { font-size: 20pt; }
  .pr-info-table { font-size: 10pt; margin-bottom: 14px; }
  .pr-info-label { font-size: 8.5pt; }
  .pr-h { font-size: 13pt; margin-bottom: 8px; break-after: avoid; }
  .pr-h-sub { font-size: 10.5pt; }
  .pr-p { font-size: 10.5pt; line-height: 1.55; }
  .pr-list { font-size: 10.5pt; }
  .pr-note, .bfd-sub { font-size: 9pt; }
  .pr-footer { font-size: 8.5pt; }
  .pr-score-table { font-size: 10pt; }

  /* Section boleh menyambung ke halaman berikutnya; kartu di dalamnya tetap utuh */
  .pr-section { break-inside: auto; page-break-inside: auto; }
  .pr-two-col { break-inside: avoid; page-break-inside: avoid; }

  /* Big Five */
  .bfd-dim { break-inside: avoid; margin-bottom: 10px; }
  .bfd-dh { padding: 6px 12px; }
  .bfd-name { font-size: 13pt; }
  .bfd-name small { font-size: 10pt; }
  .bfd-badge { font-size: 10pt; }
  .bfd-db { padding: 8px 12px 10px; }
  .bfd-desc { font-size: 10.5pt; margin-bottom: 6px; }
  .bfd-box { font-size: 10pt; padding: 5px 9px; }
  .bfd-box b { font-size: 10pt; }
  .bfd-fac { font-size: 10pt; margin-top: 7px; padding-top: 6px; }
  .bfd-fac em { font-size: 9.5pt; }

  /* DISC */
  .dsc-table, .pr-score-table.dsc-table { font-size: 10pt; }
  .dsc-legend { font-size: 9.5pt; }
  .dsc-prof { break-inside: avoid; margin-bottom: 8px; }
  .dsc-prof h4 { font-size: 11.5pt; }
  .dsc-prof-sub { font-size: 9.5pt; }
  .chip { font-size: 9.5pt; padding: 2px 10px; }

  /* Tipe Kepribadian (Jungian) */
  .pr-jng .jng-code { font-size: 22pt; }
  .pr-jng .jng-label { font-size: 12pt; }
  .pr-jng .jng-desc { font-size: 10.5pt; margin-bottom: 14px; max-width: none; }
  .pr-jng .jng-heads { font-size: 10.5pt; }
  .pr-jng .jng-foot { font-size: 8.5pt; }
  .pr-jng .jng-axis { margin-bottom: 12px; break-inside: avoid; }
  .pr-jng .jng-col, .pr-jng .jng-col b { font-size: 10pt; }
  .pr-jng .jng-fit, .pr-jng .jng-fit b { font-size: 10pt; }
  .pr-jng .jng-fit, .pr-jng .jng-cols, .pr-footer { break-inside: avoid; page-break-inside: avoid; }
  .pr-dsc-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* ============================================================
   CETAK — putih polos (hemat tinta) & 1 tes = 1 halaman A4
   ============================================================ */
@media print {
  html, body, #print-area { background: #fff !important; }

  /* Semua latar berwarna -> putih; pembeda cukup lewat garis/teks berwarna */
  .pr-header, .pr-info-table, .pr-info-label, .pr-section, .pr-two-col > div,
  .pr-score-table th, .pr-score-table td, .pr-score-table tbody tr,
  .bfd-dim, .bfd-dh, .bfd-db, .bfd-box, .bfd-plus, .bfd-warn, .bfd-fac,
  .bfd-badge, .bfd-high, .bfd-mid, .bfd-low,
  .dsc-chartbox, .dsc-tablebox, .dsc-table th, .dsc-table td, .dsc-prof,
  .chip, .chip.warn, .jng-col, .jng-plus, .jng-warn, .jng-fit, .jng-badge,
  .pr-bfd .bfd-dh { background: #fff !important; }
  .bfd-badge { border: 1px solid currentColor; }
  .bfd-box { border-top: 1px solid #d5dfec; border-right: 1px solid #d5dfec; border-bottom: 1px solid #d5dfec; }
  .jng-col, .jng-fit { border-top: 1px solid #d5dfec; border-right: 1px solid #d5dfec; border-bottom: 1px solid #d5dfec; }
  .jng-fit { border-left: 4px solid #b9cfe8; }

  /* 1 tes = 1 halaman */
  .pr-page { break-after: page; page-break-after: always; break-inside: avoid; }
  .pr-page-last { break-after: auto; page-break-after: auto; }
  .pr-section { break-inside: avoid; page-break-inside: avoid; }

  /* Penjelasan diperbesar (ruang tersedia karena tiap tes punya 1 halaman) */
  .bfd-desc { font-size: 11.5pt; }
  .bfd-box, .bfd-box b { font-size: 10.5pt; }
  .bfd-fac { font-size: 10.5pt; }
  .bfd-fac em { font-size: 10pt; }
  .pr-p, .pr-list { font-size: 11.5pt; }
  .pr-note, .bfd-sub { font-size: 10pt; }
  .dsc-prof h4 { font-size: 12.5pt; }
  .dsc-prof-sub { font-size: 10.5pt; }
  .chip { font-size: 10.5pt; }
  .dsc-table, .pr-score-table.dsc-table { font-size: 11pt; }
  .pr-jng .jng-desc { font-size: 12pt; }
  .pr-jng .jng-heads { font-size: 11.5pt; }
  .pr-jng .jng-col, .pr-jng .jng-col b, .pr-jng .jng-fit, .pr-jng .jng-fit b { font-size: 11pt; }
  .pr-jng .jng-axis { margin-bottom: 16px; }
  .pr-footer { font-size: 9pt; }
}

/* Penyesuaian ukuran per halaman (ruang masih lega, jadi penjelasan diperbesar lagi) */
@media print {
  .jng-col b, .jng-fit b, .bfd-box b, .bfd-fac span, .bfd-fac b { background: #fff !important; }

  /* Hal. 1 — Big Five */
  .bfd-desc { font-size: 12pt; }
  .bfd-box, .bfd-box b { font-size: 11pt; }
  .bfd-fac { font-size: 10.5pt; }
  .bfd-fac em { font-size: 10pt; }

  /* Hal. 2 — DISC + ringkasan */
  .pr-page .pr-h { font-size: 14pt; }
  .pr-dsc-grid { grid-template-columns: 1.25fr 1fr; gap: 14px; margin-bottom: 14px; }
  .dsc-table, .pr-score-table.dsc-table { font-size: 12pt; }
  .dsc-table th, .dsc-table td { padding: 8px 6px; }
  .dsc-legend { font-size: 10.5pt; }
  .dsc-prof { margin-bottom: 12px; }
  .dsc-prof h4 { font-size: 13.5pt; }
  .dsc-prof-sub { font-size: 11.5pt; }
  .chip { font-size: 11.5pt; padding: 3px 11px; }
  .pr-p, .pr-list { font-size: 12.5pt; line-height: 1.6; }
  .pr-two-col { gap: 14px; margin-top: 4px; }
  .pr-two-col > div { padding: 12px 14px; }
  .pr-two-col .pr-h { font-size: 14pt; }
  .pr-note { font-size: 11pt; }
  .pr-section { margin-bottom: 18px; }

  /* Hal. 3 — Tipe Kepribadian */
  .pr-jng .jng-code { font-size: 30pt; }
  .pr-jng .jng-label { font-size: 15pt; }
  .pr-jng .jng-desc { font-size: 13pt; margin-bottom: 22px; }
  .pr-jng .jng-heads { font-size: 13pt; }
  .pr-jng .jng-foot { font-size: 10pt; }
  .pr-jng .jng-axis { margin-bottom: 24px; }
  .pr-jng .jng-line { height: 22px; }
  .pr-jng .jng-col, .pr-jng .jng-col b, .pr-jng .jng-fit, .pr-jng .jng-fit b { font-size: 12.5pt; }
  .pr-jng .jng-col, .pr-jng .jng-fit { padding: 12px 16px; }
  .pr-jng .jng-cols { gap: 14px; margin-bottom: 14px; }
  .pr-footer { font-size: 10pt; margin-top: 28px; }
}


/* Penanda dimensi MBTI/OEJTS yang dekat titik tengah (skor 22-26) */
.jng-border { margin-top: 4px; font-size: 11px; font-weight: 600; color: #8a5a00; }
.jng-note { margin: -8px 0 16px; padding: 8px 12px; border-left: 4px solid #c98a1a; background: #fbf0d9; border-radius: 6px; font-size: 12px; line-height: 1.5; color: #5c3d00; max-width: 64ch; }
@media print {
  .pr-jng .jng-border { font-size: 9pt; }
  .pr-jng .jng-note { font-size: 9.5pt; max-width: none; break-inside: avoid; }
}

/* Hal. 1 (header + Big Five) dulu hampir penuh 100%, sehingga di HP/font berbeda isi meluber
   dan seluruh Big Five pindah ke halaman 2 (halaman 1 jadi hanya data diri).
   Blok ini sengaja ditaruh paling akhir untuk memberi ruang cadangan >= 10%. */
@media print {
  .pr-header { padding-bottom: 4px; margin-bottom: 8px; }
  .pr-doc-title { font-size: 17pt; }
  .pr-info-table { margin-bottom: 8px; }
  .pr-info-table td { padding: 3px 8px; }
  .bfd-dim { margin-bottom: 6px; }
  .bfd-dh { padding: 4px 12px; }
  .bfd-db { padding: 5px 12px 6px; }
  .bfd-desc { font-size: 10.5pt; margin-bottom: 4px; line-height: 1.4; }
  .bfd-box, .bfd-box b { font-size: 10pt; }
  .bfd-box { padding: 3px 9px; }
  .bfd-fac { font-size: 9.5pt; margin-top: 4px; padding-top: 4px; }
  .bfd-fac em { font-size: 9pt; }
}

/* ---------- Penyesuaian laporan/cetak untuk tema Tatalogam ---------- */
.pr-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pr-header .pr-logo { height: 44px; width: auto; display: block; }
.pr-header .pr-head-text { flex: 1; min-width: 0; }
.bfd-name small, .jng-pole .jng-name { font-family: var(--font-body); }
.jng-code { color: var(--blue); }
@media print {
  /* kepala tabel tadinya putih-di-atas-putih saat cetak (latar dipaksa putih) */
  .pr-score-table th, .dsc-table th { color: #0b2a4a !important; border-bottom: 2px solid #0054a4 !important; }
  .pr-header .pr-logo { height: 10mm; }
  * { animation: none !important; }
}

/* ---------- Tambahan halaman peserta ---------- */
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }
.likert-item.is-missing, .disc-block.is-missing { background: #fff8f7; box-shadow: inset 4px 0 0 var(--danger); border-radius: 10px; padding-left: 18px; padding-right: 18px; animation: shakeX .45s ease; }
.disc-block.is-missing { border-color: #efc4bf; }
@keyframes shakeX { 20% { transform: translateX(-5px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.resume-code-box { box-shadow: var(--shadow-sm); }
@media (max-width: 640px) { .btn-group { width: 100%; } .btn-group .btn { flex: 1; } }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast {
  max-width: min(420px, calc(100vw - 40px)); background: var(--navy); color: #fff; font-weight: 600; font-size: 14.5px; line-height: 1.4;
  padding: 13px 18px; border-radius: 12px; border-left: 5px solid var(--lime); box-shadow: 0 14px 34px rgba(11, 42, 74, .35);
  animation: toastIn .4s var(--ease) backwards; transition: opacity .3s ease, transform .3s ease;
}
.toast.is-error { border-left-color: #ff7a6b; }
.toast.is-out { opacity: 0; transform: translateX(16px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .toast-wrap { left: 16px; right: 16px; align-items: stretch; } .toast { max-width: none; } }

/* Cetak: huruf laporan tetap seperti semula (serif + Arial) supaya tata letak 1 tes = 1 halaman tidak bergeser */
@media print {
  .bfd-name, .dsc-prof h4, .jng-code { font-family: Georgia, 'Times New Roman', serif; }
  .bfd-name small, .jng-pole .jng-name { font-family: Georgia, 'Times New Roman', serif; }
  .pr-header { gap: 10px; }
}

/* Cetak: sembunyikan seluruh panel admin (bukan sekadar transparan) agar tidak menambah halaman kosong,
   dan skala laporan 0.8 supaya tiap tes tetap muat 1 halaman A4 seperti rancangan awal. */
@media print {
  body > *:not(#print-area):not(script) { display: none !important; }
  body { display: block !important; background: #fff !important; }
  #print-area { zoom: .8; }
}

/* DISC: kolom judul "Paling / Paling Tidak" sejajar tepat di atas tombol M / L
   (blok punya padding 16px + border 1.5px, judul harus ikut masuk sebesar itu) */
.disc-head { padding-inline: 17.5px; }
.disc-head span { text-align: center; text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.disc-mark { font-size: 12px; }
