@font-face { font-family: "Nunito Sans"; src: url("assets/fonts/NunitoSans-Regular.ttf") format("truetype"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("assets/fonts/NunitoSans-Bold.ttf") format("truetype"); font-weight: 800 900; font-style: normal; font-display: swap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:root { --sticky-height: 78px; }
body { padding-bottom: calc(var(--sticky-height) + 28px); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #ffb400; outline-offset: 3px; }
.control-strip { grid-template-columns: minmax(210px, .72fr) minmax(430px, 1.6fr) auto; }
.control-strip:has(.department-switch:not([hidden])) { grid-template-columns: minmax(210px, .72fr) minmax(300px, 1.1fr) minmax(360px, 1.5fr) auto; }
.scope-segmented { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.department-segmented { display: flex; flex-wrap: wrap; align-items: stretch; }
.department-segmented button { flex: 1 1 132px; padding-inline: 10px; line-height: 1.2; }
.role-segmented { display: flex; flex-wrap: wrap; align-items: stretch; }
.role-segmented button { flex: 1 1 128px; padding-inline: 10px; line-height: 1.2; }
.role-segmented:has(button:only-child) { display: grid; grid-template-columns: minmax(0, 1fr); }
.role-segmented:has(button:only-child) button { width: 100%; max-width: none; }

.workflow-steps {
  position: sticky;
  top: 102px;
  z-index: 18;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
  padding: 10px;
  border: 1px solid #ffffffb0;
  border-radius: 18px;
  background: rgba(237, 241, 243, .94);
  box-shadow: 5px 5px 12px #cbd5db, -5px -5px 12px #fff;
  backdrop-filter: blur(14px);
}
.workflow-steps button {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  gap: 1px 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  color: #526979;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.workflow-steps button > span { grid-row: 1 / 3; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #dce5e9; color: #526979; font-weight: 900; }
.workflow-steps b { color: #17374d; font-size: 13px; }
.workflow-steps small { font-size: 10px; }
.workflow-steps button.active { background: #fffbe0; box-shadow: inset 2px 2px 5px #dedbc8, inset -2px -2px 5px #fff; }
.workflow-steps button.active > span { color: #fff; background: #2994b2; box-shadow: 2px 3px 6px #bccbd1; }
.workflow-steps button.complete:not(.active) > span { color: #17374d; background: #ffb400; }
.workflow-steps button.complete:not(.active) > span::after { content: "✓"; position: absolute; }
.workflow-steps button.complete:not(.active) > span { color: transparent; position: relative; }
.workflow-steps button.complete:not(.active) > span::after { color: #17374d; }

body[data-workflow-step="1"] .score-panel,
body[data-workflow-step="1"] .dream-panel,
body[data-workflow-step="2"] .kpi-panel,
body[data-workflow-step="2"] .dream-panel,
body[data-workflow-step="3"] .workspace { display: none; }
body[data-workflow-step="1"] .workspace,
body[data-workflow-step="2"] .workspace { grid-template-columns: minmax(0, 1fr); }
body[data-workflow-step="2"] .score-panel { width: min(100%, 760px); margin-inline: auto; }
body[data-workflow-step="3"] .dream-panel { margin-top: 24px; }

.sticky-summary {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(760px, calc(100% - 28px));
  min-height: var(--sticky-height);
  padding: 11px 12px 11px 18px;
  border: 1px solid #ffffffd0;
  border-radius: 18px;
  background: rgba(237, 241, 243, .95);
  box-shadow: 8px 8px 20px #9eafb7aa, -5px -5px 16px #ffffffdd;
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}
.sticky-summary > div { display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: baseline; }
.sticky-summary small { grid-column: 1 / -1; color: #526979; font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.sticky-summary strong { color: #17647a; font-size: 20px; }
.sticky-summary span { color: #526979; font-size: 12px; }
.sticky-summary .button { flex: 0 0 auto; }

.scenario-panel { margin-top: 26px; padding: 20px; border: 1px solid #ffffffb0; border-radius: 18px; background: var(--paper); box-shadow: 4px 4px 10px #cbd5db, -4px -4px 10px #fff; }
.scenario-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.scenario-heading h3 { margin: 3px 0 0; }
.scenario-panel > p { margin: 8px 0 16px; color: #526979; font-size: 13px; }
.scenario-actions { display: flex; gap: 8px; }
.scenario-actions .button { padding: 8px 11px; font-size: 11px; }
.scenario-save-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.scenario-save-row input { min-height: 43px; padding: 0 13px; border: 1px solid #cfdae1; border-radius: 11px; color: #17374d; background: var(--paper); box-shadow: inset 2px 2px 5px #cbd5db, inset -2px -2px 5px #fff; }
.scenario-list { display: grid; gap: 9px; margin-top: 16px; }
.scenario-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 13px; border-radius: 13px; background: var(--paper); box-shadow: 3px 3px 8px #cbd5db, -3px -3px 8px #fff; }
.scenario-card > div:first-child { display: grid; gap: 2px; }
.scenario-card small { color: #526979; font-size: 9px; }
.scenario-card strong { overflow-wrap: anywhere; }
.scenario-card span { color: #526979; font-size: 11px; }
.scenario-delta { padding: 5px 8px; border-radius: 8px; font-size: 11px; }
.scenario-delta.up { color: #1f724b; background: #dcf1e4; }
.scenario-delta.down { color: #9b3d38; background: #fae1df; }
.scenario-delta.neutral { color: #526979; background: #dfe7ea; }
.scenario-card-actions { display: flex; gap: 6px; }
.scenario-card-actions button { min-height: 32px; padding: 5px 9px; border: 0; border-radius: 8px; color: #17647a; background: var(--paper); box-shadow: 2px 2px 5px #cbd5db, -2px -2px 5px #fff; cursor: pointer; font-weight: 800; }
.scenario-empty { padding: 16px; border-radius: 12px; color: #526979; background: #fffbe0; box-shadow: inset 2px 2px 5px #dedbc8, inset -2px -2px 5px #fff; font-size: 12px; }
.privacy-note { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 16px; padding: 12px 14px; border-left: 3px solid #2994b2; border-radius: 9px; color: #526979; background: #e5eff1; font-size: 11px; line-height: 1.5; }
.privacy-note strong { color: #17374d; }
.source-control small { display: block; margin-top: 3px; color: #526979; font-size: 10px; }
.swipe-hint { display: none; color: #526979; font-size: 10px; font-weight: 800; }

.kpi-name { display: flex; align-items: flex-start; gap: 7px; }
.kpi-help-button { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; color: #17647a; background: #e1eef1; box-shadow: 2px 2px 5px #c6d1d6, -2px -2px 5px #fff; cursor: help; font-size: 13px; font-weight: 900; }
.kpi-help-dialog dl { display: grid; gap: 8px; margin: 18px 0; }
.kpi-help-dialog dl > div { display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid #d0dce2; }
.kpi-help-dialog dt { color: #526979; font-size: 12px; }
.kpi-help-dialog dd { margin: 0; font-weight: 750; }
.kpi-help-dialog > p { padding: 12px; border-radius: 11px; background: #fffbe0; color: #526979; font-size: 12px; line-height: 1.55; }

.import-preview-dialog > p { color: #526979; }
.import-summary { margin: 14px 0; padding: 12px 14px; border-radius: 11px; font-size: 12px; font-weight: 800; }
.import-summary.ready { color: #1f724b; background: #dcf1e4; }
.import-summary.has-warning { color: #8c6200; background: #fff1bd; }
.import-role-list { display: grid; gap: 8px; }
.import-role-list article { display: grid; grid-template-columns: 80px 1fr; gap: 2px 10px; padding: 10px 12px; border-radius: 11px; background: #edf1f3; box-shadow: inset 2px 2px 5px #cbd5db, inset -2px -2px 5px #fff; }
.import-role-list small { grid-column: 1 / -1; color: #526979; }
.import-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 13px 0; }
.import-metrics span { display: grid; gap: 2px; padding: 10px; border-radius: 11px; color: #526979; background: #edf1f3; box-shadow: inset 2px 2px 5px #cbd5db, inset -2px -2px 5px #fff; font-size: 10px; text-align: center; }
.import-metrics b { color: #17647a; font-size: 18px; }
.import-metrics .warn b { color: #9a6a00; }

.kpi-search-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; margin: 16px 0 12px; padding: 8px 11px; border: 1px solid #ffffffb8; border-radius: 13px; background: #edf1f3; box-shadow: inset 2px 2px 6px #cbd5db, inset -2px -2px 6px #fff; }
.kpi-search-bar label { display: grid; place-items: center; width: 28px; height: 28px; color: #17647a; font-size: 20px; font-weight: 900; }
.kpi-search-bar input { width: 100%; min-width: 0; height: 38px; padding: 0 8px; border: 0; outline: 0; color: #17374d; background: transparent; font-weight: 700; }
.kpi-search-bar input::placeholder { color: #718995; }
.kpi-search-bar small { color: #526979; font-size: 10px; font-weight: 900; white-space: nowrap; }
.kpi-search-empty { margin-bottom: 12px; padding: 14px; border-radius: 12px; color: #8c6200; background: #fff1bd; font-size: 12px; text-align: center; }

.pending-changes-dialog > p, .onboarding-intro { color: #526979; line-height: 1.55; }
.onboarding-dialog { overflow: hidden; }
.onboarding-brand { display: flex; align-items: center; gap: 14px; }
.onboarding-brand img { width: 60px; height: 60px; border-radius: 16px; box-shadow: 4px 4px 10px #bdc9ce, -4px -4px 10px #fff; }
.onboarding-brand h2 { margin: 3px 0 0; color: #17374d; font-size: 23px; letter-spacing: -.025em; }
.onboarding-intro { margin: 16px 0; font-size: 13px; }
.onboarding-steps { display: grid; gap: 9px; }
.onboarding-steps article { display: grid; grid-template-columns: 38px 1fr; gap: 11px; align-items: center; padding: 11px 12px; border-radius: 13px; background: #edf1f3; box-shadow: 3px 3px 7px #cbd5db, -3px -3px 7px #fff; }
.onboarding-steps article > b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fffbe0; background: #2994b2; }
.onboarding-steps article > div { display: grid; gap: 2px; }
.onboarding-steps strong { color: #17374d; font-size: 13px; }
.onboarding-steps span { color: #526979; font-size: 11px; line-height: 1.35; }

.connection-status { position: fixed; z-index: 60; top: 104px; right: 18px; max-width: min(360px, calc(100% - 36px)); padding: 10px 13px; border-radius: 11px; color: #17374d; background: #fff1bd; box-shadow: 4px 4px 10px #bdc7ca; font-size: 12px; font-weight: 800; }
.connection-status button { margin-left: 6px; border: 0; color: #17647a; background: transparent; cursor: pointer; font-weight: 900; text-decoration: underline; }

@media (max-width: 1200px) {
  .control-strip { grid-template-columns: 1fr 1.6fr; }
  .control-strip:has(.department-switch:not([hidden])) { grid-template-columns: 1fr 1fr; }
  .control-strip > .button { align-self: end; justify-self: end; }
}

@media (max-width: 680px) {
  :root { --sticky-height: 72px; }
  .control-strip { grid-template-columns: 1fr; }
  .control-strip:has(.department-switch:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .scope-switch, .department-switch, .role-switch { grid-column: 1 / -1; min-width: 0; }
  .control-strip > .button { justify-self: stretch; }
  .scope-segmented { gap: 5px; padding: 5px; }
  .scope-segmented button { min-width: 0; padding: 9px 4px; font-size: 10px; line-height: 1.15; }
  .department-segmented, .role-segmented {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    padding: 5px 5px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #2994b2 transparent;
  }
  .department-segmented button, .role-segmented button {
    flex: 0 0 auto;
    width: auto;
    min-width: 132px;
    max-width: 210px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 11px;
    scroll-snap-align: start;
  }
  .department-segmented button.active, .role-segmented button.active { min-width: 150px; }
  .swipe-hint { display: block; margin: 5px 4px 0; }
  .role-segmented:has(button:only-child) + .swipe-hint { display: none; }
  .role-segmented:has(button:only-child) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 5px;
    overflow: hidden;
  }
  .role-segmented:has(button:only-child) button { width: 100%; min-width: 0; max-width: none; }
  .source-control { padding: 11px 13px; }
  .source-control strong { font-size: 11px; line-height: 1.35; }
  .source-control small { font-size: 10px; }
  .table-heading { gap: 12px; }
  .table-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; justify-content: stretch; }
  .table-actions .save-target-button { grid-column: 1 / -1; width: 100%; min-height: 42px; }
  .target-save-state, .weight-status { display: grid; place-items: center; min-width: 0; padding: 8px 6px; text-align: center; white-space: normal; }
  .table-wrap { overflow: visible; border: 0; }
  .table-wrap table, .table-wrap tbody { display: block !important; width: 100%; min-width: 0; }
  .table-wrap thead { display: none; }
  .table-wrap tbody { display: grid; gap: 13px; }
  .table-wrap tbody tr {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 7px;
    padding: 13px;
    border: 1px solid #ffffffc9;
    border-radius: 16px;
    background: #edf1f3;
    box-shadow: 5px 5px 11px #cbd5db, -5px -5px 11px #fff;
  }
  .table-wrap tbody td {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 4px;
    min-width: 0;
    padding: 0;
    border: 0;
    text-align: left;
  }
  .table-wrap td::before { content: attr(data-label); color: #526979; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
  .table-wrap td[data-label="KPI"] { grid-column: 1 / -1; grid-row: 1; padding-bottom: 8px; border-bottom: 1px solid #cfdae1; }
  .table-wrap td[data-label="KPI"]::before { display: none; }
  .table-wrap td[data-label="Target"] { grid-column: 1 / 3; grid-row: 2; }
  .table-wrap td[data-label="Realisasi"] { grid-column: 3 / 5; grid-row: 2; }
  .table-wrap td[data-label="Bobot"] { grid-column: 1; grid-row: 3; }
  .table-wrap td[data-label="Pencapaian"] { grid-column: 2; grid-row: 3; }
  .table-wrap td[data-label="Indeks"] { grid-column: 3; grid-row: 3; }
  .table-wrap td[data-label="Nilai"] { grid-column: 4; grid-row: 3; }
  .table-wrap td[data-label="Bobot"],
  .table-wrap td[data-label="Pencapaian"],
  .table-wrap td[data-label="Indeks"],
  .table-wrap td[data-label="Nilai"] { align-content: start; }
  .kpi-name { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
  .target-cell { min-width: 0; }
  .target-input, .realization-input { width: 100%; min-width: 0; height: 44px; text-align: left; font-size: 12px; padding-inline: 8px; }
  .saved-target-note { overflow-wrap: anywhere; }
  .index-pill { min-width: 32px; height: 28px; }
  .legend { gap: 9px 13px; }
  .workflow-steps { top: 78px; gap: 4px; padding: 6px; border-radius: 14px; }
  .workflow-steps button { display: flex; justify-content: center; min-height: 46px; padding: 6px; text-align: center; }
  .workflow-steps button > span { width: 29px; height: 29px; }
  .workflow-steps b { font-size: 10px; }
  .workflow-steps small { display: none; }
  .sticky-summary { bottom: 7px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; width: calc(100% - 16px); min-height: 66px; padding: 8px 8px 8px 13px; border-radius: 15px; }
  .sticky-summary > div { min-width: 0; }
  .sticky-summary strong { font-size: 17px; }
  .sticky-summary span { font-size: 10px; }
  .sticky-summary .button { min-height: 44px; max-width: none; padding: 9px 10px; font-size: 10px; }
  .sticky-summary #stickySaveTargetsButton:not([hidden]) { grid-column: 2; }
  .sticky-summary #stickySaveTargetsButton:not([hidden]) + #stickyNextButton { display: none; }
  .kpi-help-button { width: 44px; height: 44px; margin-top: -7px; margin-right: -4px; }
  .scenario-heading { align-items: stretch; flex-direction: column; }
  .scenario-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .scenario-save-row { grid-template-columns: 1fr; }
  .scenario-card { grid-template-columns: minmax(0, 1fr) auto; }
  .scenario-card-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .dream-kpi-actions { flex-wrap: wrap; }
  #autoRecommendDream { width: 100%; }
  .kpi-search-bar { position: sticky; z-index: 12; top: 139px; }
  .import-metrics { grid-template-columns: 1fr; }
  .onboarding-brand { align-items: flex-start; }
  .onboarding-brand img { width: 52px; height: 52px; }
  .onboarding-brand h2 { font-size: 20px; }
  .onboarding-dialog .dialog-actions, .pending-changes-dialog .dialog-actions { display: grid; grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .workflow-steps, .sticky-summary { scroll-behavior: auto; backdrop-filter: none; }
}
