/* ===== Cek Masa Kerja PNS — tombol + modal =====
   Simpan di: assets/masa-kerja.css
   Semua class berawalan "mk-" dan sengaja TIDAK memakai .btn / .lg-btn
   supaya tidak bentrok dengan style.css / login.css. */

/* ---------- Tombol pemicu ---------- */
.mk-trigger-wrap { margin-top: 18px; }
.mk-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px; color: #94a3b8; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase;
}
.mk-divider::before, .mk-divider::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }

button.mk-launch {
  all: unset;
  box-sizing: border-box;
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 14px;
  border: 1px solid #d6e2f0; border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f6f9fd);
  color: #172033; cursor: pointer; text-align: left;
  box-shadow: 0 1px 2px rgba(23, 89, 166, .06);
  transition: border-color .15s, box-shadow .15s, transform .15s, background .15s;
}
button.mk-launch:hover {
  border-color: #93b8e6; background: #f2f8ff;
  box-shadow: 0 4px 14px rgba(23, 89, 166, .14); transform: translateY(-1px);
}
button.mk-launch:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(23, 89, 166, .1); }
button.mk-launch:focus-visible { outline: 3px solid #bfdbfe; outline-offset: 2px; }

.mk-launch-icon {
  display: grid; place-items: center; flex: 0 0 40px;
  width: 40px; height: 40px; border-radius: 11px;
  background: #1759a6; color: #fff;
}
.mk-launch-icon svg { width: 22px; height: 22px; }
.mk-launch-text { flex: 1; min-width: 0; }
.mk-launch-text b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.mk-launch-text span { display: block; margin-top: 2px; font-size: 11.5px; color: #64748b; line-height: 1.35; }
.mk-launch-arrow {
  display: grid; place-items: center; flex: 0 0 28px;
  width: 28px; height: 28px; border-radius: 50%;
  background: #eaf2ff; color: #1759a6; transition: transform .15s, background .15s;
}
.mk-launch-arrow svg { width: 14px; height: 14px; }
button.mk-launch:hover .mk-launch-arrow { background: #1759a6; color: #fff; transform: translateX(2px); }

/* ---------- Modal ---------- */
.mk-modal {
  position: fixed; inset: 0; z-index: 2147483000;
  display: none; align-items: center; justify-content: center;
  padding: 18px; background: rgba(15, 23, 42, .58);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.mk-modal.is-open { display: flex; }

.mk-dialog {
  position: relative; width: min(100%, 520px); max-height: min(90vh, 820px); overflow: auto;
  border: 1px solid #dbe3ed; border-radius: 18px; background: #fff; color: #172033;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28); text-align: left;
  animation: mk-pop .18s ease-out;
}
@keyframes mk-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.mk-dialog-head {
  display: flex; align-items: center; gap: 12px; padding: 18px 20px;
  border-bottom: 1px solid #e7edf4; background: linear-gradient(135deg, #f8fbff, #fff);
}
.mk-icon {
  display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px;
  border-radius: 12px; background: #1759a6; color: #fff;
}
.mk-icon svg { width: 22px; height: 22px; }
.mk-heading { min-width: 0; flex: 1; }
.mk-heading strong, .mk-heading small { display: block; }
.mk-heading strong { font-size: 16px; line-height: 1.35; }
.mk-heading small { margin-top: 3px; font-size: 12px; color: #64748b; }
.mk-close {
  all: unset; box-sizing: border-box; display: grid; place-items: center; flex: 0 0 34px;
  width: 34px; height: 34px; border-radius: 9px; background: #eef2f7; color: #334155;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.mk-close:hover { background: #e2e8f0; }
.mk-close:focus-visible { outline: 3px solid #bfdbfe; }

.mk-body { padding: 4px 20px 20px; }
.mk-body label { display: block; margin-top: 14px; font-size: 12px; font-weight: 650; color: #334155; }
.mk-body label small { font-weight: 400; color: #64748b; }
.mk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mk-body input {
  width: 100%; min-width: 0; min-height: 42px; margin-top: 6px; padding: 9px 10px;
  border: 1px solid #cbd5e1; border-radius: 9px; box-sizing: border-box;
  font: inherit; font-size: 13px; background: #fff; color: #172033;
}
.mk-body input:focus { outline: 2px solid #bfdbfe; border-color: #3b82f6; }

/* Pemilih tanggal tanpa ketik: Tgl / Bulan / Tahun + pintasan */
.mk-field { margin-top: 14px; }
.mk-label { display: block; font-size: 12px; font-weight: 650; color: #334155; }
.mk-label small { font-weight: 400; color: #64748b; }
.mk-selects { display: grid; grid-template-columns: 68px minmax(0, 1.5fr) minmax(0, 1fr); gap: 8px; margin-top: 6px; }
.mk-dur { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.mk-selects select, .mk-dur select {
  width: 100%; min-width: 0; min-height: 42px; padding: 8px 8px; box-sizing: border-box;
  border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; color: #172033;
  font: inherit; font-size: 13px; cursor: pointer;
}
.mk-selects select:focus, .mk-dur select:focus { outline: 2px solid #bfdbfe; border-color: #3b82f6; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mk-chip {
  padding: 5px 11px; border: 1px solid #c9dcf3; border-radius: 999px; background: #eef5ff;
  color: #1759a6; font: inherit; font-size: 11.5px; font-weight: 650; cursor: pointer;
}
.mk-chip:hover { background: #dbeafe; }
.mk-chip.is-on { background: #1759a6; border-color: #1759a6; color: #fff; }

.mk-step { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 6px; align-items: center; margin-top: 6px; }
.mk-step button {
  min-height: 40px; padding: 0; border: 1px solid #d1dbe8; border-radius: 9px;
  background: #edf4ff; color: #1759a6; font: inherit; font-size: 19px; font-weight: 700; cursor: pointer;
}
.mk-step button:hover { background: #dbeafe; }
.mk-step input { margin-top: 0; text-align: center; font-weight: 700; padding: 6px 2px; }
.mk-step small { grid-column: 1 / -1; text-align: center; font-size: 11px; color: #64748b; }

.mk-actions { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 9px; margin-top: 20px; }
.mk-actions button { min-height: 42px; padding: 9px 12px; border-radius: 9px; cursor: pointer; font: inherit; font-weight: 700; }
.mk-btn-primary { border: 0; background: #1759a6; color: #fff; }
.mk-btn-primary:hover { background: #134b8c; }
.mk-btn-ghost { border: 1px solid #d1dbe8; background: #f1f5f9; color: #334155; }
.mk-btn-ghost:hover { background: #e2e8f0; }

.mk-error { margin-top: 12px; color: #b42318; font-size: 12px; line-height: 1.5; }
.mk-result { margin-top: 14px; padding: 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.mk-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mk-result-grid small, .mk-result-grid strong { display: block; }
.mk-result-grid small { font-size: 11px; color: #64748b; line-height: 1.4; }
.mk-result-grid strong { margin-top: 5px; font-size: 14px; overflow-wrap: anywhere; }
.mk-status { margin-top: 12px; padding: 11px; border-radius: 9px; font-size: 12px; line-height: 1.55; }
.mk-status.good { background: #e7f7ed; color: #116b39; }
.mk-status.bad { background: #fff0ef; color: #a21b13; }
.mk-error[hidden], .mk-result[hidden] { display: none; }

@media (max-width: 480px) {
  .mk-modal { padding: 10px; align-items: flex-end; }
  .mk-dialog { max-height: 92vh; border-radius: 18px 18px 12px 12px; }
  .mk-dialog-head { padding: 15px; }
  .mk-body { padding: 2px 15px 16px; }
  .mk-grid { gap: 8px; }
  .mk-actions { grid-template-columns: minmax(0, 1fr) 84px; }
}
@media (prefers-reduced-motion: reduce) { .mk-dialog { animation: none; } button.mk-launch, .mk-launch-arrow { transition: none; } }
