/* Halaman Proses Payroll terpadu, upload pintar, dan editor tabel. */

.proc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.proc-head h1 { margin: 4px 0 6px; }
.proc-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 13px; color: #6b778c; }
.proc-meta b { color: #17243b; font-weight: 700; }
.muted { color: #8391a7; font-size: 13px; }

/* Stepper */
.proc-stepper { position: static; z-index: 5; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 22px; padding: 10px; background: #f4f7fbee; backdrop-filter: blur(6px); border: 1px solid #e3e9f2; border-radius: 14px; }
.proc-stepper a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #5c6b82; text-decoration: none; min-width: 0; }
.proc-stepper a div { min-width: 0; }
.proc-stepper a:hover { background: #fff; text-decoration: none; }
.proc-stepper a > span { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: #e6ecf5; color: #6b7a92; font-weight: 800; font-size: 13px; }
.proc-stepper strong { display: block; font-size: 12.5px; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proc-stepper small { display: block; font-size: 10.5px; color: #93a0b3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proc-stepper a.current { background: #fff; color: #17243b; box-shadow: 0 4px 14px #1c36531a; }
.proc-stepper a.current > span { background: #2866e8; color: #fff; }
.proc-stepper a.done { color: #1d6b51; }
.proc-stepper a.done > span { background: #dff6ec; color: #15865e; font-size: 0; }
.proc-stepper a.done > span::after { content: "✓"; font-size: 14px; }

/* Section */
.proc-section { scroll-margin-top: 90px; background: #fff; border: 1px solid #e3e9f2; border-radius: 14px; padding: 22px 24px; margin: 0 0 18px; box-shadow: 0 5px 20px #1c365309; }
.proc-section-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.proc-section-head > div { flex: 1; min-width: 0; }
.proc-section-head h2 { margin: 2px 0 4px; font-size: 18px; }
.proc-section-head p { margin: 0; font-size: 13px; }
.proc-num { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: #eaf1ff; color: #2866e8; font-weight: 800; }
.proc-tip { margin: 0 0 16px; padding: 11px 14px; border-radius: 10px; background: #f3f7ff; border: 1px dashed #c7d8fb; color: #445877; font-size: 12.5px; line-height: 1.55; }
.placeholder { padding: 18px; border: 1px dashed #d8e1ee; border-radius: 10px; color: #8391a7; font-size: 13px; text-align: center; background: #fafcff; }

/* Kelompok input */
.input-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.input-group { border: 1px solid #e7edf5; border-radius: 12px; overflow: hidden; }
.input-group-title { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: #f8fafd; border-bottom: 1px solid #e7edf5; }
.input-group-title > span { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 6px; background: #2866e8; color: #fff; font-size: 11px; font-weight: 800; }
.input-group-title strong { display: block; font-size: 13.5px; color: #17243b; }
.input-group-title small { display: block; margin-top: 2px; font-size: 11.5px; color: #8391a7; line-height: 1.4; }
.input-list { list-style: none; margin: 0; padding: 0; }
.input-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid #f0f3f8; }
.input-row:first-child { border-top: 0; }
.input-row:hover { background: #fafcff; }
.input-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #d5dde9; }
.input-dot.filled { background: #18af88; box-shadow: 0 0 0 3px #e0f7ee; }
.input-main { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.input-main:hover strong { color: #2866e8; }
.input-main strong { display: block; font-size: 13px; color: #1f2f49; }
.input-main small { display: block; font-size: 11.5px; color: #8b97aa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.input-count { flex: none; font-size: 11px; font-weight: 700; color: #2d63c9; background: #eaf1ff; padding: 3px 8px; border-radius: 6px; }
.input-count.empty { color: #97a3b6; background: #f1f4f8; }
.input-actions { display: flex; gap: 6px; flex: none; }
.icon-only { min-width: 31px; padding-left: 8px; padding-right: 8px; }

/* Kesiapan & hitung */
.readiness { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 12px; border: 1px solid #e3e9f2; background: #fbfcfe; }
.readiness > div { flex: 1; min-width: 0; }
.readiness strong { display: block; font-size: 15px; color: #17243b; }
.readiness small { display: block; color: #7d8aa0; margin-top: 2px; }
.readiness ul { margin: 8px 0 0; padding-left: 18px; color: #a33b3b; font-size: 12.5px; }
.readiness ul.warn { color: #8a6a2a; }
.readiness-mark { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; font-size: 20px; font-weight: 800; }
.readiness.ok .readiness-mark { background: #def8ed; color: #15865e; }
.readiness.blocked .readiness-mark { background: #ffe9e6; color: #c2412d; }
.button-lg { padding: 13px 22px; font-size: 14px; min-height: 46px; border-radius: 10px; }

/* Hasil */
.result-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.result-kpis > div { padding: 13px 14px; border: 1px solid #e7edf5; border-radius: 11px; background: #fbfcfe; min-width: 0; }
.result-kpis small { display: block; font-size: 11px; color: #7d8aa0; }
.result-kpis strong { display: block; margin-top: 5px; font-size: 17px; color: #17243b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-kpis .accent { background: #eef4ff; border-color: #cfe0ff; }
.result-kpis .accent strong { color: #1d55c8; }
.result-kpis .warn strong { color: #b26a12; }
.issue-box { margin: 0 0 12px; border: 1px solid #f3dfb8; background: #fffaf0; border-radius: 10px; padding: 10px 14px; }
.issue-box summary { cursor: pointer; font-size: 13px; font-weight: 700; color: #7a5a1f; }
.issue-box table { margin-top: 10px; background: #fff; }
.review-form { margin-top: 12px; padding: 14px 16px; border: 1px solid #e3e9f2; border-radius: 12px; background: #fbfcfe; }
.review-form label { display: block; font-size: 12px; font-weight: 700; color: #4b5c77; }
.review-form textarea, .review-form input { width: 100%; margin-top: 6px; }
.review-form .hero-actions { margin: 12px 0 0; }
.review-form > button { margin-top: 12px; }
.approved-note { color: #15865e; font-size: 13.5px; }
.close-list { margin: 0 0 12px; padding-left: 18px; color: #4b5c77; font-size: 13px; line-height: 1.7; }

/* Laporan */
.report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.report-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid #e7edf5; border-radius: 11px; }
.report-card strong { font-size: 13.5px; color: #17243b; }
.report-card small { color: #8391a7; font-size: 11.5px; }
.report-card .counter { align-self: flex-start; margin-top: 4px; }
.report-actions { display: flex; gap: 6px; margin-top: 8px; }
.proc-history { margin: 6px 0 30px; padding: 12px 16px; border: 1px solid #e3e9f2; border-radius: 12px; background: #fff; }
.proc-history summary { cursor: pointer; font-weight: 700; font-size: 13px; color: #4b5c77; }
.proc-history table { margin-top: 10px; }

/* Upload pintar */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 34px 20px; border: 2px dashed #bcd0f5; border-radius: 14px; background: #f7faff; text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone:hover, .dropzone.drag { background: #eef4ff; border-color: #2866e8; }
.dropzone strong { font-size: 15px; color: #17243b; }
.dropzone small { color: #7d8aa0; }
.dropzone .dz-icon { font-size: 30px; color: #2866e8; }
.dropzone .dz-file { font-weight: 700; color: #1d55c8; }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.plan-table td, .plan-table th { vertical-align: top; }
.plan-table .num { text-align: right; white-space: nowrap; }
.plan-table select { min-width: 150px; }
.pill-ok { color: #15865e; font-weight: 700; }
.pill-bad { color: #c2412d; font-weight: 700; }
.ignored { color: #97a3b6; font-size: 11px; }
.error-list { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: #a33b3b; }

/* Editor tabel */
.sheet-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
.sheet-toolbar .inline-search { flex: 1; min-width: 220px; }
.sheet-wrap { overflow: auto; max-height: calc(100vh - 290px); border: 1px solid #e3e9f2; border-radius: 12px; background: #fff; }
.sheet-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 12px; }
.sheet-table th { position: sticky; top: 0; z-index: 2; white-space: nowrap; padding: 8px 8px; }
.sheet-table td { padding: 2px 3px; border-bottom: 1px solid #eef2f7; white-space: nowrap; }
.sheet-table td.ro { padding: 6px 8px; color: #33445f; background: #fafbfd; }
.sheet-table .key { position: sticky; left: 0; z-index: 1; background: #f7f9fc; font-weight: 700; box-shadow: 1px 0 0 #e3e9f2; }
.sheet-table th.key { z-index: 3; }
.sheet-table input { width: 100%; min-width: 110px; padding: 5px 7px; border: 1px solid transparent; border-radius: 5px; background: transparent; font-size: 12px; }
.sheet-table input:hover { border-color: #dfe7f1; background: #fff; }
.sheet-table input:focus { border-color: #8fb3f7; background: #fff; outline: none; box-shadow: 0 0 0 2px #dbe7ff; }
.sheet-table input.num { text-align: right; min-width: 100px; }
.sheet-table input.changed { background: #fff8e1; border-color: #f0c96a; }
.sheet-table tr.new-row td { background: #f6fbf8; }
.sheet-table tr.new-row td.key { background: #eef8f2; }
.sheet-table tr.to-delete td { background: #fff1f0; text-decoration: line-through; color: #b04a3c; }
.sheet-table .del { text-align: center; }
.save-bar { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 16px; border: 1px solid #e3e9f2; border-radius: 12px; background: #ffffffee; backdrop-filter: blur(6px); box-shadow: 0 -4px 18px #1c365312; }
.save-bar input { flex: 1; min-width: 180px; }
.save-bar .dirty-count { font-size: 12px; color: #8a6a2a; font-weight: 700; white-space: nowrap; }

@media (max-width: 1100px) {
  .input-groups { grid-template-columns: 1fr; }
  .result-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .proc-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proc-stepper small { display: none; }
  .proc-section { padding: 16px; }
  .proc-section-head { flex-wrap: wrap; }
  .readiness { flex-wrap: wrap; }
  .report-grid { grid-template-columns: 1fr; }
  .input-row { flex-wrap: wrap; }
  .input-main small { white-space: normal; }
  .proc-head { flex-direction: column; }
}

/* Pesan sistem sebagai toast supaya tetap terlihat saat halaman melompat ke bagian proses. */
.content > .message { position: fixed; right: 24px; bottom: 24px; z-index: 60; max-width: min(520px, calc(100vw - 48px)); margin: 0; padding: 14px 42px 14px 16px; border-radius: 12px; box-shadow: 0 12px 34px #0f1f3a33; font-size: 13px; line-height: 1.5; animation: toast-in .25s ease-out; }
.content > .message + .message { bottom: 96px; }
.content > .message.error { background: #fff1f0; color: #9f2f22; border-left: 4px solid #e0533e; }
.content > .message.success { background: #eafaf3; color: #155f45; border-left: 4px solid #18af88; }
.toast-close { position: absolute; top: 8px; right: 10px; min-height: 0; padding: 2px 6px; background: transparent; color: inherit; box-shadow: none; font-size: 16px; opacity: .6; }
.toast-close:hover { background: transparent; opacity: 1; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-toolbar .inline-search { display: flex; gap: 8px; }
.sheet-toolbar .inline-search input { flex: 1; min-width: 0; }
@media (max-width: 760px) {
  .proc-section-head > div { flex-basis: calc(100% - 50px); }
  .proc-section-head > .button, .proc-section-head > a.button { margin-left: 48px; }
  .input-actions { margin-left: 18px; }
}
@media (max-width: 760px) {
  .input-main { flex-basis: calc(100% - 20px); }
  .input-count { margin-left: 18px; }
  .input-actions { margin-left: auto; }
}
