/* Tema Otoklix: putih bersih, navy untuk teks & navigasi, oranye untuk aksi utama.
   Sengaja selalu terang (tidak mengikuti dark mode OS). */
:root {
  color-scheme: light;
  --chat-w: 520px;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f5f8;
  --border: #e3e6ec;
  --border-strong: #cfd4de;
  --text: #182033;
  --muted: #646d80;
  --navy: #0b2aa6;
  --navy-soft: #eef1fb;
  --orange: #ff571e;
  --orange-hover: #e94a14;
  --orange-soft: #fff1eb;
  --primary: var(--navy);
  --green: #157347; --green-bg: #e7f5ee;
  --blue: #0b2aa6; --blue-bg: #eef1fb;
  --amber: #9a5b00; --amber-bg: #fdf3e1;
  --red: #c4321b; --red-bg: #fdeceb;
  --gray-bg: #f0f2f5;
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; font-weight: 650; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 650; margin: 0 0 12px; }
h3 { font-size: 13px; font-weight: 650; margin: 18px 0 8px; color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.btn.sm svg.i { width: 14px; height: 14px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 60px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { height: 26px; width: auto; display: block; }
.brand .sep { width: 1px; height: 22px; background: var(--border-strong); }
.brand .product { font-weight: 600; font-size: 14px; color: var(--navy); letter-spacing: .01em; }
.topbar nav { display: flex; gap: 2px; height: 100%; }
.topbar nav a { display: flex; align-items: center; padding: 0 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.topbar nav a:hover { color: var(--text); text-decoration: none; }
.topbar nav a.active { color: var(--navy); border-bottom-color: var(--orange); }

main { max-width: 1200px; margin: 0 auto; padding: 28px; }
#banner:not(:empty) { max-width: 1200px; margin: 16px auto 0; padding: 0 28px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; max-width: 720px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.back:hover { color: var(--navy); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; } /* di dalam grid, jarak diatur oleh gap: semua kartu sejajar */
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; } /* kolom grid boleh menyempit, isi tidak meluber ke kolom sebelah */
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.section-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); }
.btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.btn.navy:hover { filter: brightness(1.12); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-bg); border-color: #f1c2bb; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.link { border: 0; background: none; padding: 0; height: auto; color: var(--navy); font-weight: 500; }
.btn.link:hover { text-decoration: underline; background: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--muted); line-height: 1; padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

label.field { display: block; margin-bottom: 18px; }
label.field > span { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
label.field > span .opt { font-weight: 400; color: var(--muted); }
label.field .hint, .hint { font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 5px; display: block; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea.input {
  width: 100%; height: 38px; padding: 0 11px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; }
textarea.input { height: auto; min-height: 132px; padding: 9px 11px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea.input:focus { outline: 3px solid rgba(11, 42, 166, .12); border-color: var(--navy); }
.switch { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; margin-bottom: 14px; }
.switch input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--navy); }

.dropzone { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 26px; text-align: center;
  cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--navy); background: var(--navy-soft); }
.dropzone .big { font-size: 14px; font-weight: 600; color: var(--text); }
.dropzone svg.i { width: 22px; height: 22px; color: var(--navy); margin-bottom: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); font-weight: 500; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 20px; }
.badge.strong { background: var(--green-bg); color: var(--green); }
.badge.recommended { background: var(--blue-bg); color: var(--blue); }
.badge.consider { background: var(--amber-bg); color: var(--amber); }
.badge.not_recommended { background: var(--red-bg); color: var(--red); }
.badge.gray { background: var(--gray-bg); color: var(--muted); }
.badge.met { background: var(--green-bg); color: var(--green); }
.badge.partial { background: var(--amber-bg); color: var(--amber); }
.badge.not_met { background: var(--red-bg); color: var(--red); }
.badge.unclear { background: var(--gray-bg); color: var(--muted); }
.badge.critical { background: var(--red-bg); color: var(--red); }
.badge.high { background: var(--gray-bg); color: var(--muted); }
.badge.custom { background: var(--orange-soft); color: #c2410c; font-weight: 600; }
.tag { display: inline-block; padding: 2px 8px; margin: 2px 4px 2px 0; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; }

/* daftar screening */
.screening-card { display: flex; flex-direction: column; cursor: pointer; transition: border-color .15s; padding: 18px 20px; }
.screening-card:hover { border-color: var(--navy); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card-head .badge { flex: none; margin-top: 1px; }
.screening-card .title { flex: 1; min-width: 0; overflow-wrap: anywhere;  font-weight: 650; font-size: 15px; }
.screening-card .meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; margin-bottom: 16px; }
.stats-row { display: flex; gap: 0; margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; }
.stat { flex: 1; }
.stat + .stat { border-left: 1px solid var(--border); padding-left: 14px; }
.stat .n { font-size: 18px; font-weight: 650; }
.stat .l { font-size: 12px; color: var(--muted); }
.top-cand { margin-top: 12px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-cand b { color: var(--text); font-weight: 600; }

.empty { text-align: center; padding: 56px 20px; }
.empty .big { font-size: 16px; font-weight: 650; margin-bottom: 6px; }

/* langkah 1-2-3 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.steps > .step { padding: 18px 20px; min-width: 0; }
.steps > .step + .step { border-left: 1px solid var(--border); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } .steps > .step + .step { border-left: 0; border-top: 1px solid var(--border); } }
.step-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); margin-bottom: 2px; }
.step h2 { margin-bottom: 10px; }
.step .figure { font-size: 13.5px; margin: 6px 0 10px; }
.step .figure b { font-size: 15px; }

.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: 10px 0 6px; }
.progress > div { height: 100%; background: var(--navy); transition: width .4s; }

ul.clean { margin: 0; padding-left: 18px; }
ul.clean li { margin: 3px 0; }

/* tabel ranking */
table.rank { width: 100%; border-collapse: collapse; }
table.rank th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
table.rank th:first-child { border-top-left-radius: 6px; } table.rank th:last-child { border-top-right-radius: 6px; }
table.rank td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.rank tbody tr { cursor: pointer; }
table.rank tbody tr:hover { background: #fafbfd; }
.rank-num { font-weight: 650; font-size: 15px; width: 36px; color: var(--muted); }
.rank-num.top { color: var(--orange); }
.cand-name { font-weight: 600; }
.score-cell { min-width: 110px; }
.score-val { font-weight: 650; font-size: 16px; font-variant-numeric: tabular-nums; }
.bar { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin-top: 5px; }
.bar > div { height: 100%; border-radius: 2px; }
.summary-cell { color: var(--text); font-size: 13px; min-width: 260px; max-width: 460px; }
.cand-cell { min-width: 200px; }
.cand-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
ul.points { list-style: none; margin: 0; padding: 0; }
ul.points li { position: relative; padding-left: 18px; margin: 0 0 3px; line-height: 1.4; }
ul.points li::before { position: absolute; left: 0; top: 0; font-weight: 700; font-size: 12px; }
ul.points li.plus::before { content: "✓"; color: var(--green); }
ul.points li.minus::before { content: "!"; color: var(--amber); left: 3px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; }
.table-wrap table.rank tbody tr:last-child td { border-bottom: 0; }

.toolbar { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .filters { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar input[type=search] { width: 220px; height: 30px; font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--border); }
.chip { height: 34px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted);
  font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.active { border-bottom-color: var(--navy); color: var(--navy); font-weight: 600; }
.chip .n { color: var(--muted); font-weight: 400; margin-left: 2px; }

.weights-grid { display: grid; grid-template-columns: 1fr 70px; gap: 8px 12px; align-items: center; font-size: 13px; }
.weights-grid input[type=number] { height: 30px; text-align: right; }

.cv-list { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 6px; margin-top: 10px; }
.cv-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
.cv-item:last-child { border-bottom: 0; }
.cv-item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; border: 1px solid transparent; }
.alert.warn { background: var(--amber-bg); color: var(--amber); border-color: #f3dcae; }
.alert.error { background: var(--red-bg); color: var(--red); border-color: #f4c7c0; }
.alert.info { background: var(--navy-soft); color: var(--navy); border-color: #d5dcf5; }

details.crit > summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
details.crit > summary::-webkit-details-marker { display: none; }
details.crit > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
details.crit[open] > summary::before { transform: rotate(45deg); }
.crit-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--border); }
.crit-item:last-child { border-bottom: 0; }
.crit-item .id { font-weight: 600; color: var(--muted); width: 30px; flex: none; font-size: 12px; padding-top: 1px; font-variant-numeric: tabular-nums; }
.crit-item .txt { flex: 1; }
.crit-item select { width: auto; height: 28px; font-size: 12px; padding: 0 6px; }

/* requirement tambahan */
.custom-box { border: 1px solid var(--border); border-left: 3px solid var(--orange); border-radius: 6px; padding: 14px 16px; background: #fffaf7; margin-bottom: 16px; }
.custom-box h3 { margin: 0 0 4px; }
.custom-pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; margin-top: 8px; }

/* drawer kandidat */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(24, 32, 51, .32); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(760px, 100%); background: var(--surface); overflow-y: auto; padding: 28px; box-shadow: -8px 0 24px rgba(24, 32, 51, .12); }
.drawer-close { position: absolute; right: 16px; top: 16px; }
.dim-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 4px 12px; margin-bottom: 12px; }
.dim-row .lbl { font-weight: 600; font-size: 13px; }
.dim-row .val { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.dim-row .bar { grid-column: 1 / -1; }
.dim-row .reason { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.kv { display: grid; grid-template-columns: minmax(110px, 150px) minmax(0, 1fr); gap: 6px 12px; font-size: 13px; }
.kv > div { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.kv .k { color: var(--muted); }
.hero { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; padding-right: 32px; }
.score-box { width: 84px; height: 84px; flex: none; border-radius: 8px; border: 1px solid var(--border); display: grid; place-items: center; text-align: center; }
.score-box .v { font-size: 28px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.score-box .l { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.summary-box { background: var(--surface-2); border-radius: 6px; padding: 12px 14px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 16px; border-radius: 6px; z-index: 100; box-shadow: 0 6px 20px rgba(0,0,0,.18); max-width: 90vw; font-size: 13.5px; }
.toast.error { background: #a8281a; }

.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.overlay { position: fixed; inset: 0; background: rgba(24, 32, 51, .3); display: grid; place-items: center; z-index: 60; }
.overlay .box { background: var(--surface); padding: 24px 28px; border-radius: 8px; text-align: center; max-width: 380px; border: 1px solid var(--border); }
.overlay .spinner { width: 28px; height: 28px; border-width: 3px; color: var(--navy); margin-bottom: 12px; }

/* chat */
.chat-fab { position: fixed; right: 24px; bottom: 24px; z-index: 40; height: 40px; padding: 0 16px; border-radius: 6px; border: 0; display: inline-flex; align-items: center; gap: 8px;
  background: var(--navy); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px rgba(11, 42, 166, .25); }
.chat-fab:hover { filter: brightness(1.12); }
.chat-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--chat-w), 100%); z-index: 45; background: var(--surface);
  border-left: 1px solid var(--border); display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(24, 32, 51, .08); }
body.chat-open main { margin-right: min(var(--chat-w), 100%); }
@media (max-width: 1100px) { body.chat-open main { margin-right: auto; } }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat-head .muted { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-empty { margin: auto 0; }
.suggest { display: block; width: 100%; text-align: left; margin: 0; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--border);
  background: none; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.suggest:last-child { border-bottom: 0; }
.suggest:hover { background: var(--surface-2); color: var(--navy); }
.suggest-list { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.msg { display: flex; flex-direction: column; }
.msg.user { align-items: flex-end; }
.msg.ai { align-items: flex-start; }
.msg .bubble { max-width: 92%; padding: 9px 13px; border-radius: 8px; font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--navy); color: #fff; }
.msg.ai .bubble { background: var(--surface-2); border: 1px solid var(--border); }
.bubble.md p { margin: 0 0 8px; } .bubble.md p:last-child { margin-bottom: 0; }
.bubble.md ul, .bubble.md ol { margin: 4px 0 8px; padding-left: 20px; } .bubble.md li { margin: 2px 0; }
.bubble.md h4 { margin: 10px 0 6px; font-size: 14px; }
.bubble.md code { background: var(--surface); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.bubble.md pre { background: var(--surface); padding: 10px; border-radius: 6px; overflow-x: auto; white-space: pre-wrap; }
.md-table { overflow-x: auto; margin: 8px 0 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.md-table table { border-collapse: collapse; font-size: 12.5px; line-height: 1.5; min-width: 100%; }
/* kata tidak dipotong di tengah; kolom punya lebar minimum, tabel boleh digeser ke samping bila perlu */
.md-table th, .md-table td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top;
  overflow-wrap: normal; word-break: normal; hyphens: none; min-width: 150px; max-width: 320px; }
.md-table th:last-child, .md-table td:last-child { border-right: 0; }
.md-table tr:last-child td { border-bottom: 0; }
.md-table th:first-child, .md-table td:first-child { min-width: 96px; max-width: 150px; font-weight: 600; }
.md-table th { background: var(--surface-2); font-weight: 600; white-space: normal; }
.md-table tbody tr:nth-child(even) td { background: #fafbfd; }
.msg.ai .bubble.md { max-width: 100%; width: 100%; }
body.chat-wide { --chat-w: 820px; }

.copy-btn { margin-top: 4px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; padding: 2px 4px; }
.copy-btn:hover { color: var(--text); }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; max-height: 140px; min-height: 40px; padding: 9px 11px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; }
.chat-input textarea:focus { outline: 3px solid rgba(11, 42, 166, .12); border-color: var(--navy); }
.chat-input .btn { height: 40px; }
.typing span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.caret { display: inline-block; width: 7px; height: 14px; background: var(--muted); margin-left: 2px; vertical-align: -2px; animation: blink 1s infinite; }

code.path { word-break: break-all; display: block; background: var(--surface-2); border: 1px solid var(--border); padding: 8px 10px; border-radius: 6px; font-size: 12px; }

/* teks panjang tanpa spasi (URL, email, nama file) dipotong ke baris baru, tidak menabrak elemen lain */
.crit-item .txt, .summary-cell, .cand-name, .dim-row .reason, .dim-row .lbl, .alert { min-width: 0; overflow-wrap: anywhere; }

/* label skill / key skills berisi frasa panjang: boleh turun baris, tidak melebar keluar panel */
.drawer-panel .badge, #critcard .badge, .tag { white-space: normal; overflow-wrap: anywhere; max-width: 100%; line-height: 1.45; text-align: left; }
.drawer-panel .badge { padding: 2px 8px; }
.drawer-panel { overflow-x: hidden; }
.drawer-panel .grid > div, .drawer-panel .kv, .drawer-panel ul { min-width: 0; overflow-wrap: anywhere; }

/* file yang diblokir demi keamanan */
details.blocked { margin-top: 10px; border: 1px solid #f4c7c0; background: var(--red-bg); border-radius: 6px; padding: 8px 10px; }
details.blocked > summary { cursor: pointer; color: var(--red); font-weight: 600; font-size: 13px; }
.blocked-item { display: flex; flex-direction: column; padding: 5px 0; border-top: 1px solid #f4d3cd; font-size: 12.5px; overflow-wrap: anywhere; }
.blocked-item span { color: var(--red); }
.card h2 svg.i { color: var(--navy); }

/* tab di panel kandidat */
.dtabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin: 4px 0 18px; }
.dtabs button { height: 38px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; }
.dtabs button:hover { color: var(--text); }
.dtabs button.active { color: var(--navy); border-bottom-color: var(--orange); font-weight: 600; }
.dtabs .n:not(:empty) { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--navy-soft); color: var(--navy); font-size: 11px; line-height: 18px; text-align: center; }
input[type=date] { width: 100%; height: 38px; padding: 0 11px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; }

/* catatan interview */
.iv-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.iv-list:empty { display: none; }
.iv-item { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font: inherit; cursor: pointer; text-align: left; min-width: 150px; }
.iv-item:hover { border-color: var(--border-strong); }
.iv-item.active { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.iv-item .t { font-weight: 600; font-size: 13px; }
.iv-item .d { font-size: 11.5px; color: var(--muted); }
.iv-add { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px dashed var(--border-strong); border-radius: 6px; background: none; color: var(--navy); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.iv-add:hover { background: var(--navy-soft); }
.iv-empty { text-align: center; padding: 36px 20px; border: 1px dashed var(--border-strong); border-radius: 8px; }
.iv-meta { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 12px; }
.iv-meta .field { margin-bottom: 14px; }
@media (max-width: 640px) { .iv-meta { grid-template-columns: 1fr; } }
.pm { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
@media (max-width: 640px) { .pm { grid-template-columns: 1fr; } }
.pm-col { border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; min-width: 0; }
.pm-col.plus { border-top: 3px solid var(--green); }
.pm-col.minus { border-top: 3px solid var(--orange); }
.pm-head { font-weight: 600; font-size: 13px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.pm-sign { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; font-weight: 700; font-size: 13px; line-height: 1; }
.pm-col.plus .pm-sign, .pm-sign.plus { background: var(--green-bg); color: var(--green); }
.pm-col.minus .pm-sign, .pm-sign.minus { background: var(--orange-soft); color: #c2410c; }
.pm-items { list-style: none; margin: 0 0 6px; padding: 0; }
.pm-items li { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--border); font-size: 13px; overflow-wrap: anywhere; }
.pm-items li span { min-width: 0; }
.pm-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.pm-x:hover { color: var(--red); }
input.pm-in { height: 32px; font-size: 13px; border-style: dashed; }
textarea.iv-notes { min-height: 220px; font-size: 13.5px; }
.iv-guide { margin: 0 0 14px; border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; background: var(--surface-2); }
.iv-guide summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.iv-guide summary .muted { font-weight: 400; }
.iv-q { display: block; width: 100%; text-align: left; margin-top: 6px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer; overflow-wrap: anywhere; }
.iv-q:hover { border-color: var(--navy); }
.iv-q .k { display: inline-block; margin-right: 6px; color: var(--navy); font-weight: 600; font-size: 11.5px; }
.iv-assess { display: flex; flex-wrap: wrap; gap: 18px 28px; margin-bottom: 16px; }
.iv-assess .lbl { font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.stars, .seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden; }
.stars button, .seg button { height: 32px; min-width: 34px; padding: 0 10px; border: 0; border-left: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.stars button:first-child, .seg button:first-child { border-left: 0; }
.stars button:hover, .seg button:hover { background: var(--surface-2); color: var(--text); }
.stars button.on { background: var(--navy); color: #fff; }
.seg button.on[data-dec="lanjut"] { background: var(--green); color: #fff; }
.seg button.on[data-dec="pertimbangkan"] { background: #c98400; color: #fff; }
.seg button.on[data-dec="tidak_lanjut"] { background: var(--red); color: #fff; }
.seg button.on[data-dec=""] { background: var(--gray-bg); color: var(--text); }
.iv-actions { padding-top: 14px; border-top: 1px solid var(--border); }
.polished { margin-top: 18px; border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; background: #fbfcfe; }
.pol-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.pol-title { font-weight: 650; font-size: 15px; }
.pol-rec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding: 10px 12px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
.pol-sum { margin: 12px 0 4px; }
.pol-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .pol-2 { grid-template-columns: 1fr; } }
.pol-sec { margin-top: 12px; min-width: 0; overflow-wrap: anywhere; }
.pol-sec h4 { margin: 0 0 6px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.comp-row { display: grid; grid-template-columns: minmax(120px, 170px) 84px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; align-items: start; }
.comp-row:last-child { border-bottom: 0; }
.comp-row .a { font-weight: 600; }
.comp-row .e { color: var(--muted); overflow-wrap: anywhere; }
.dots { display: flex; gap: 3px; padding-top: 4px; }
.dots i { width: 12px; height: 8px; border-radius: 2px; background: var(--border); }
.dots i.on { background: var(--navy); }
.pol-omit { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--border); }
.badge.iv-tag { font-weight: 600; }

/* Google Drive */
.drive-form { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); }
.drive-form input { height: 32px; font-size: 13px; }

/* login & menu pengguna */
.topbar-right { display: flex; align-items: center; gap: 16px; height: 100%; }
body.auth-screen .topbar-right { display: none; }
body.auth-screen .topbar { display: none; }
body.auth-screen, html:has(body.auth-screen) { background: var(--surface-2); min-height: 100vh; }
.auth-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 24px 0; }
.auth-card { width: min(400px, 100%); border: 1px solid var(--border); border-radius: 10px; padding: 28px 28px 24px; background: var(--surface); }
.auth-logo { height: 30px; display: block; margin-bottom: 18px; }
.auth-card h1 { font-size: 19px; }
.usermenu { position: relative; }
.um-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 3px 12px 3px 3px; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; }
.um-btn:hover { border-color: var(--border-strong); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.um-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.um-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(24, 32, 51, .12); padding: 6px; z-index: 30; }
.um-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.um-menu a, .um-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 6px; font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; }
.um-menu a:hover, .um-menu button:hover { background: var(--surface-2); text-decoration: none; }
.um-menu #logout { color: var(--red); }
@media (max-width: 700px) { .um-name { display: none; } .um-btn { padding: 3px; } }

/* admin */
.admin-tabs { display: flex; border-bottom: 1px solid var(--border); margin: -4px 0 20px; }
.admin-tabs a { padding: 10px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tabs a:hover { color: var(--text); text-decoration: none; }
.admin-tabs a.active { color: var(--navy); border-bottom-color: var(--orange); font-weight: 600; }
.admin-grid { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); align-items: start; }
@media (max-width: 960px) { .admin-grid { grid-template-columns: 1fr; } }
table.users-table tbody tr { cursor: default; }
table.users-table td { vertical-align: middle; }

/* role user: hanya melihat, catatan interview, Tanya AI (server tetap menolak aksi lain) */
body.role-user #rename, body.role-user #del, body.role-user #changefpk, body.role-user #editcustom,
body.role-user #savew, body.role-user #reanalyze, body.role-user .custom-box, body.role-user #pickfolder,
body.role-user #pickdrive, body.role-user #pickfiles, body.role-user #rescan, body.role-user #clearcvs,
body.role-user [data-delcv], body.role-user #run, body.role-user #rerun, body.role-user #runstale,
body.role-user #stop, body.role-user #retryfpk, body.role-user #chatclear,
body.role-user #driveform, body.role-user .admin-hint,
body.role-user #critcard .weights-grid + .row, body.role-user #critcard .weights-grid + .row + .muted { display: none !important; }
body.role-user #critcard input, body.role-user #critcard select { pointer-events: none; background: var(--surface-2); }
.iv-editor.readonly input, .iv-editor.readonly textarea, .iv-editor.readonly select { background: var(--surface-2); }
.iv-editor.readonly .pm-in { display: none; }

/* dialog bagikan */
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(24, 32, 51, .32); display: grid; place-items: center; padding: 16px; }
.modal-box { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 10px; border: 1px solid var(--border); padding: 20px 22px; box-shadow: 0 12px 32px rgba(24, 32, 51, .18); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.share-list { border: 1px solid var(--border); border-radius: 6px; max-height: 320px; overflow: auto; }
.share-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.share-item:last-child { border-bottom: 0; }
.share-item:hover { background: var(--surface-2); }
.share-item input { width: 16px; height: 16px; accent-color: var(--navy); }
.share-item .who { display: flex; flex-direction: column; min-width: 0; }
.share-item.off { opacity: .55; }

/* keputusan akhir rekrutmen */
.badge.hired { background: var(--green); color: #fff; }
.badge.hired svg.i { width: 12px; height: 12px; stroke-width: 2.6; vertical-align: -1px; }
.badge.backup { background: #fff4d6; color: #8a5a00; border: 1px solid #f0d58c; }
.outcome { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 10px 14px; margin-bottom: 12px; border: 1px solid #cfe9db; background: #f3fbf6; border-radius: 6px; font-size: 13.5px; }
.outcome > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.outcome a { font-weight: 600; }
.decision { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); }
.decision .lbl { font-weight: 600; font-size: 13px; }
.decision input { flex: 1 1 220px; height: 32px; font-size: 13px; }
.decision .fdmeta { flex-basis: 100%; }
.seg button.on[data-fd="diterima"] { background: var(--green); color: #fff; }
.seg button.on[data-fd="cadangan"] { background: #c98400; color: #fff; }
.seg button.on[data-fd="tidak_lolos"] { background: var(--red); color: #fff; }
.seg button.on[data-fd=""] { background: var(--gray-bg); color: var(--text); }

/* Panel kandidat + Tanya AI berdampingan (tidak tumpang tindih) */
body.chat-open .drawer-backdrop { right: min(var(--chat-w), 100%); }
body.chat-open .drawer-panel { right: min(var(--chat-w), 100%); width: min(760px, calc(100vw - var(--chat-w) - 120px));
  border-right: 1px solid var(--border); box-shadow: -8px 0 24px rgba(24, 32, 51, .10); }
.chat-head .chat-back { margin-bottom: 6px; padding: 0; height: auto; }
/* Tanya AI penuh sampai atas; menu di top bar bergeser ke kiri panel agar tetap bisa diklik */
body.chat-open .topbar { padding-right: calc(28px + min(var(--chat-w), 100%)); }
@media (max-width: 1100px) { body.chat-open .topbar { padding-right: 28px; } }

/* pratinjau data yang dikirim ke AI */
pre.ai-preview { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 55vh; overflow: auto; margin: 12px 0 0; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; font-size: 12.5px; line-height: 1.55; }
mark.pii { background: var(--navy-soft); color: var(--navy); border-radius: 3px; padding: 0 3px; font-weight: 600; }
