:root {
  --bg: #eef8fc;
  --surface: #ffffff;
  --surface-soft: #f4faff;
  --surface-deep: #063f3c;
  --line: #d6e6ec;
  --line-strong: #b8d0da;
  --text: #12313a;
  --muted: #617984;
  --emerald: #008f7a;
  --emerald-dark: #006b5e;
  --emerald-soft: #ddf8f1;
  --gold: #f2b82f;
  --gold-dark: #8b5d00;
  --gold-soft: #fff4d3;
  --blue: #2f80ed;
  --blue-soft: #e5f1ff;
  --rose: #ed5b72;
  --rose-soft: #ffe8ed;
  --violet: #7357df;
  --violet-soft: #eeeaff;
  --green: #18a76d;
  --green-soft: #def7e9;
  --shadow: 0 18px 48px rgba(25, 92, 108, 0.13);
  --shadow-soft: 0 8px 24px rgba(25, 92, 108, 0.09);
  font-family: "Plus Jakarta Sans", "DM Sans", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, [tabindex="0"]:focus-visible {
  outline: 3px solid rgba(47, 128, 237, 0.24);
  outline-offset: 2px;
}
i[data-lucide] { width: 18px; height: 18px; stroke-width: 1.8; }

.app-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #064b48;
  color: #f5f2e9;
  border-right: 1px solid rgba(116, 225, 211, 0.28);
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 7px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(222, 192, 140, 0.72);
  border-radius: 8px;
  background: #087f75;
  color: #fff2ba;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 18px;
}
.brand-block div { display: flex; flex-direction: column; line-height: 1.2; }
.brand-block strong { font-size: 13px; font-weight: 700; }
.brand-block span:last-child { color: #9ea9a2; font-size: 12px; margin-top: 4px; }
.side-nav { display: grid; gap: 5px; }
.nav-item {
  position: relative;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #aeb8b1;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
}
.nav-item::after {
  content: "";
  position: absolute;
  right: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
}
.nav-item:hover { color: #ffffff; background: rgba(255, 255, 255, 0.055); }
.nav-item.active { color: #ffffff; background: rgba(113, 232, 217, 0.16); }
.nav-item.active::after { background: #ffd45c; box-shadow: 0 0 0 3px rgba(255, 212, 92, 0.16); }
.nav-item i { color: #8fa49a; }
.nav-item.active i { color: #7ee7d7; }
.label-guide { margin-top: 2px; }
.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 8px 12px;
  color: #7f8d86;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.side-heading i { width: 14px; height: 14px; }
.guide-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
}
.guide-row:hover { background: rgba(255, 255, 255, 0.04); }
.guide-row > span:last-child { display: flex; flex-direction: column; }
.guide-row b { color: #e9ece8; font-size: 11px; font-weight: 650; }
.guide-row small { color: #77877f; font-size: 9px; margin-top: 3px; }
.label-badge {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 26px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.label-t { color: #28633d; background: #e2f1e7; border-color: #cae4d3; }
.label-b { color: #79561f; background: #f8edda; border-color: #ead5b3; }
.label-m { color: #57457d; background: #eeeaf5; border-color: #dbd3eb; }
.label-a { color: #315f78; background: #e6f0f4; border-color: #d0e3ea; }
.source-note {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(126, 231, 215, 0.28);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: #9eaaa3;
}
.source-note i { color: #ffd45c; }
.source-note div { display: flex; flex-direction: column; min-width: 0; }
.source-note b { color: #f2f4f1; font-size: 10px; overflow: hidden; text-overflow: ellipsis; }
.source-note span { font-size: 9px; margin-top: 3px; }

.main-content {
  min-width: 0;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 34px 60px;
}
.topbar {
  position: relative;
  isolation: isolate;
  min-height: 236px;
  margin: 0 -34px;
  padding: 38px 40px 78px;
  background: #07857b url("assets/executive-topography.webp") center right / cover no-repeat;
  color: #ffffff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 91, 84, 0.32);
}
.topbar > div:first-child { max-width: 720px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--emerald);
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 1.6px;
}
.topbar .eyebrow { color: #ffe07a; }
h1, h2, h3 { letter-spacing: 0; margin: 0; }
h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 44px;
  line-height: 1.04;
  font-weight: 400;
}
h2 { font-size: 17px; line-height: 1.25; font-weight: 750; }
.subtitle { max-width: 620px; margin: 11px 0 0; color: #e1f7f3; font-size: 12px; line-height: 1.7; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.sync-status {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(4, 72, 68, 0.72);
  color: #effffc;
  font-size: 10px;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #65c68a;
  box-shadow: 0 0 0 3px rgba(101, 198, 138, 0.14);
}
.button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 750;
}
.button.primary { background: var(--emerald); color: #ffffff; }
.button.primary:hover { background: var(--emerald-dark); }
.button.secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.button.secondary:hover { border-color: var(--emerald); color: var(--emerald-dark); }
.topbar .button.secondary {
  border-color: rgba(255, 226, 118, 0.75);
  background: #ffd45c;
  color: #18312d;
}
.topbar .button.secondary:hover { border-color: #fff0aa; background: #ffe486; color: #18312d; }
.button.is-loading i { animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.metrics {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  gap: 10px;
  margin: -42px 0 22px;
}
.metric {
  position: relative;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  overflow: hidden;
}
.metric::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  background: var(--line);
}
.metric-primary { border-color: #008f7a; background: #07877c; color: #ffffff; }
.metric-primary::after { background: #ffd45c; }
.metric-icon {
  width: 38px;
  height: 38px;
  border: 1px solid #d4e7df;
  border-radius: 7px;
  background: var(--emerald-soft);
  color: var(--emerald);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.metric-primary .metric-icon { border-color: rgba(255, 255, 255, 0.34); background: rgba(255, 255, 255, 0.14); color: #fff0aa; }
.metric .icon-task { border-color: #cbe2d3; background: var(--green-soft); color: var(--green); }
.metric .icon-backlog { border-color: #ead5b3; background: var(--gold-soft); color: var(--gold-dark); }
.metric .icon-meeting { border-color: #ddd3ed; background: var(--violet-soft); color: var(--violet); }
.metric .icon-priority { border-color: #eed0d6; background: var(--rose-soft); color: var(--rose); }
.metric > div:last-child { min-width: 0; display: grid; }
.metric small { color: var(--muted); font-size: 9px; font-weight: 750; }
.metric-primary small, .metric-primary span { color: #d7f5ef; }
.metric strong { margin: 7px 0 3px; font-size: 25px; line-height: 1; font-weight: 760; }
.metric span:last-child { color: var(--muted); font-size: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
  gap: 14px;
  margin-bottom: 22px;
}
.insight-panel, .latest-panel {
  min-height: 235px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.latest-panel { border-top: 3px solid var(--rose); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading .muted { color: var(--muted); font-size: 9px; }
.section-heading > i { color: var(--gold-dark); }
.distribution-bars { display: grid; gap: 15px; margin-top: 22px; }
.bar-row { display: grid; grid-template-columns: 110px minmax(100px, 1fr) 42px; gap: 11px; align-items: center; }
.bar-label { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 700; }
.bar-track { height: 6px; border-radius: 3px; background: #e6f0f4; overflow: hidden; }
.bar-fill { height: 100%; min-width: 3px; border-radius: 3px; }
.bar-fill.t { background: #18a76d; }
.bar-fill.b { background: #f2b82f; }
.bar-fill.m { background: #7357df; }
.bar-fill.a { background: #2f80ed; }
.bar-value { text-align: right; font-size: 10px; font-weight: 800; }
.latest-list { display: grid; margin-top: 12px; }
.latest-item {
  position: relative;
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.latest-item:last-child { border-bottom: 0; }
.latest-item:hover p { color: var(--emerald-dark); }
.latest-marker { width: 8px; height: 8px; margin-top: 5px; border: 2px solid #f4d9de; border-radius: 50%; background: var(--rose); }
.latest-item p {
  margin: 0;
  font-size: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.latest-item span { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; }

.direction-section { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.direction-heading { padding: 20px 20px 16px; }
.view-toggle {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}
.icon-button {
  width: 35px;
  height: 33px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
}
.icon-button:hover, .icon-button.active { background: var(--surface); color: var(--emerald); box-shadow: 0 2px 7px rgba(28, 41, 34, 0.1); }

.filter-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px minmax(175px, 0.8fr) 150px 40px;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #eff8fc;
}
.search-field {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}
.search-field:focus-within { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(15, 109, 88, 0.08); }
.search-field i { width: 16px; color: var(--muted); }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
kbd { padding: 1px 5px; border: 1px solid #d7dbd6; border-radius: 4px; background: #eef0ed; color: #858d88; font-size: 8px; }
select, input[type="date"] {
  min-height: 40px;
  max-width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 10px;
}
select { padding: 0 30px 0 10px; }
select:disabled { color: var(--gold-dark); background: #fbf6ec; border-color: #e7d7ba; opacity: 1; }
input[type="date"] { width: 100%; padding: 0 10px; }
.reset-button { width: 40px; height: 40px; border: 1px solid var(--line-strong); background: var(--surface); }
.date-toolbar {
  display: grid;
  grid-template-columns: 176px 176px minmax(230px, 1fr);
  align-items: end;
  gap: 9px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fcff;
}
.date-field { display: grid; gap: 5px; min-width: 0; }
.date-field span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.date-presets { display: flex; gap: 6px; justify-content: flex-start; overflow-x: auto; padding-bottom: 1px; }
.date-presets button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.date-presets button:hover { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-dark); }
.subfilters {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}
.segmented {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  overflow-x: auto;
}
.segmented button {
  min-height: 31px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}
.segmented button.active { background: #07877c; color: #ffffff; font-weight: 750; box-shadow: 0 2px 8px rgba(0, 143, 122, 0.22); }
.compact-controls { display: flex; gap: 7px; }
.compact-controls select { min-height: 37px; }
.results-summary {
  min-height: 40px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.results-summary span:first-child { color: var(--text); font-weight: 800; }

.backlog-urgency-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 20px;
  border-bottom: 1px solid #e4d1ad;
  background: #fff8df;
}
.backlog-urgency-guide[hidden], .backlog-matrix[hidden] { display: none; }
.backlog-urgency-guide > div:first-child { display: grid; gap: 3px; }
.backlog-urgency-guide strong { font-size: 10px; }
.backlog-urgency-guide > div:first-child span { color: #75684f; font-size: 8px; line-height: 1.5; }
.urgency-scale { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.urgency-scale span, .urgency-pill {
  min-height: 23px;
  padding: 0 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}
.scale-critical, .urgency-kritis { color: #952f43; background: #f9e2e7; }
.scale-high, .urgency-tinggi { color: #9a5520; background: #fae9d9; }
.scale-medium, .urgency-menengah { color: #795d20; background: #f7f0d5; }
.scale-low, .urgency-rendah { color: #2b6741; background: #e1f0e6; }
.scale-park, .urgency-parkir { color: #59625d; background: #e9ece9; }
.backlog-matrix { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); background: #f6fbfe; }
.matrix-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.matrix-heading h3 { font-size: 14px; }
.matrix-heading > span { color: var(--muted); font-size: 8px; font-weight: 700; }
.matrix-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 13px 0 9px; }
.matrix-stat {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.matrix-stat span { color: var(--muted); font-size: 8px; font-weight: 700; }
.matrix-stat strong { font-size: 13px; }
.matrix-critical { border-color: #eac9d0; background: #fbf0f2; }
.matrix-fast { border-color: #c8d9e8; background: #eff5f9; }
.matrix-complex { border-color: #e7d3ad; background: #fbf6ec; }
.matrix-planned { border-color: #cae2d3; background: #f0f7f2; }
.matrix-chart-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: #ffffff; }
.backlog-matrix-chart { display: block; width: 100%; min-width: 720px; height: auto; }
.quadrant-bg { opacity: 0.72; }
.quadrant-bg.quadrant-fast { fill: #eff5f9; }
.quadrant-bg.quadrant-critical { fill: #fbf0f2; }
.quadrant-bg.quadrant-planned { fill: #f0f7f2; }
.quadrant-bg.quadrant-complex { fill: #fbf6ec; }
.matrix-grid line { stroke: #e0e4df; stroke-width: 1; }
.matrix-grid text { fill: #7d8680; font-size: 9px; text-anchor: middle; }
.matrix-grid text:nth-of-type(n+11) { text-anchor: end; }
.quadrant-labels text { fill: #69736d; font-size: 8px; font-weight: 800; }
.matrix-point { cursor: pointer; outline: none; }
.matrix-point circle { stroke: #ffffff; stroke-width: 2; opacity: 0.9; transition: 150ms ease; }
.matrix-point:hover circle, .matrix-point:focus circle { stroke: #18251f; stroke-width: 3; opacity: 1; }
.matrix-point-critical circle { fill: #ad4358; }
.matrix-point-fast circle { fill: #477da0; }
.matrix-point-complex circle { fill: #b47b2d; }
.matrix-point-planned circle { fill: #43855b; }
.matrix-point-label { fill: #37413b; font-size: 8px; font-weight: 700; paint-order: stroke; stroke: #ffffff; stroke-width: 3px; stroke-linejoin: round; }
.axis-title { fill: #52605a; font-size: 9px; font-weight: 800; text-anchor: middle; }
.matrix-axis-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--muted); font-size: 8px; font-weight: 700; }
.matrix-axis-note span { display: inline-flex; align-items: center; gap: 4px; }
.matrix-axis-note i { width: 12px; height: 12px; }

.direction-list { min-height: 300px; }
.direction-row {
  display: grid;
  grid-template-columns: 96px 108px minmax(135px, 0.72fr) minmax(270px, 1.6fr) 86px 84px 28px;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease;
}
.direction-row:hover { position: relative; z-index: 1; background: #effaff; box-shadow: inset 3px 0 var(--blue); }
.direction-row.completed { opacity: 0.58; }
.direction-row.completed .direction-text { text-decoration: line-through; }
.date-cell { display: grid; gap: 3px; }
.date-cell strong { font-size: 10px; }
.date-cell span { color: var(--muted); font-size: 8px; }
.label-cell .label-badge { min-width: 78px; }
.group-cell { min-width: 0; font-size: 9px; font-weight: 750; line-height: 1.4; }
.group-cell span { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; font-weight: 400; }
.direction-copy { min-width: 0; display: grid; gap: 5px; }
.direction-text {
  margin: 0;
  font-size: 10px;
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.backlog-preview, .urgency-preview {
  margin: 0;
  font-size: 8px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.backlog-preview { color: #74582a; }
.backlog-preview strong { color: #65491e; }
.urgency-preview { color: #655f52; }
.urgency-preview strong { color: #953147; }
.priority-pill, .source-pill, .status-pill {
  min-height: 25px;
  padding: 0 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}
.priority-Tinggi { color: var(--rose); background: var(--rose-soft); }
.priority-Sedang { color: #8b5b24; background: #f7ead8; }
.priority-Normal { color: var(--muted); background: #ecefec; }
.source-Excel { color: #2c6741; background: #e2f0e7; }
.source-WhatsApp { color: #315f78; background: #e4eef3; }
.status-pill { border: 0; color: var(--emerald-dark); background: var(--emerald-soft); }
.status-pill.done { color: var(--green); background: var(--green-soft); }
.row-arrow { color: #a2aaa5; }
.load-more-wrap { display: flex; justify-content: center; padding: 17px; }
.empty-state { min-height: 300px; padding: 40px; color: var(--muted); display: grid; place-items: center; text-align: center; }
.empty-state i { width: 34px; height: 34px; margin-bottom: 10px; color: var(--line-strong); }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 12px; }
.direction-list.timeline-view { padding: 7px 18px 15px 34px; }
.timeline-view .direction-row {
  position: relative;
  grid-template-columns: 90px 92px minmax(120px, 0.65fr) minmax(260px, 1.6fr) 80px 76px 26px;
  padding-left: 18px;
  border-left: 2px solid #d7dfda;
}
.timeline-view .direction-row::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 34px;
  width: 8px;
  height: 8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.detail-dialog {
  width: min(640px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid rgba(215, 183, 120, 0.32);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(9, 17, 12, 0.32);
  color: var(--text);
}
.detail-dialog::backdrop { background: rgba(9, 15, 12, 0.62); backdrop-filter: blur(5px); }
.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 23px;
  border-bottom: 1px solid rgba(215, 183, 120, 0.22);
  background: #067c73;
  color: #ffffff;
}
.dialog-header .eyebrow { color: #ffe07a; }
.dialog-header .icon-button { color: #c7d0cb; }
.dialog-content { padding: 23px; display: grid; gap: 20px; }
.dialog-text { margin: 0; font-size: 14px; line-height: 1.7; }
.backlog-detail { display: grid; gap: 14px; padding: 2px 0 2px 16px; border-left: 3px solid #d6b36d; }
.backlog-detail div { display: grid; gap: 5px; }
.backlog-detail span { color: var(--gold-dark); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.backlog-detail p { margin: 0; color: #433c2f; font-size: 11px; line-height: 1.65; }
.urgency-detail { padding: 13px !important; border: 1px solid #e4d1ad; border-radius: 6px; background: #fbf6ec; }
.urgency-detail-heading, .dependency-detail-heading { display: flex !important; align-items: center; justify-content: space-between; gap: 12px !important; }
.urgency-detail-heading strong, .dependency-detail-heading strong { font-size: 12px; white-space: nowrap; }
.urgency-meter { display: grid !important; grid-template-columns: repeat(10, 1fr); gap: 3px !important; }
.urgency-meter span { height: 6px; border-radius: 3px; background: #e5e7e4; }
.urgency-meter span.active { background: #b77b31; }
.urgency-kritis .urgency-meter span.active { background: #a94352; }
.urgency-detail small { color: #625b4d; font-size: 9px; line-height: 1.6; }
.dependency-detail { padding: 13px !important; border: 1px solid #c9dce7; border-radius: 6px; background: #eff5f8; }
.dependency-detail-heading strong { color: #315f78; }
.related-backlogs { display: grid; gap: 7px; }
.related-backlog {
  position: relative;
  width: 100%;
  padding: 11px 34px 11px 12px;
  border: 1px solid #e2d1b2;
  border-radius: 6px;
  background: #fcf8f0;
  color: var(--text);
  display: grid;
  gap: 4px;
  text-align: left;
}
.related-backlog:hover { border-color: var(--gold); background: #faf2e3; }
.related-backlog span { color: var(--text); font-size: 10px; font-weight: 700; line-height: 1.5; text-transform: none; }
.related-backlog small { color: #756a56; font-size: 8px; line-height: 1.5; }
.related-backlog i { position: absolute; right: 10px; top: 50%; width: 15px; height: 15px; color: var(--gold-dark); transform: translateY(-50%); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.detail-field { padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); }
.detail-field small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.detail-field strong { display: block; font-size: 10px; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 23px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.ai-assistant {
  margin: 24px 0;
  padding: 22px;
  border: 1px solid #b8ddd6;
  border-radius: 10px;
  background: linear-gradient(145deg, #ffffff 0%, #f0fbf8 100%);
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 20px;
}
.ai-intro { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: start; gap: 13px; }
.ai-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #087f75;
  color: #fff2ba;
}
.ai-intro h2 { font-size: 20px; }
.ai-intro p:not(.eyebrow) { max-width: 760px; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.ai-model { padding: 7px 9px; border: 1px solid #b8ddd6; border-radius: 999px; background: #e5f8f3; color: #006b5e; font-size: 9px; font-weight: 800; white-space: nowrap; }
.ai-quick-questions { display: flex; flex-wrap: wrap; gap: 7px; margin: 17px 0 12px 57px; }
.ai-quick-questions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #c7ddd9;
  border-radius: 999px;
  background: #ffffff;
  color: #315f5a;
  font-size: 10px;
  font-weight: 700;
}
.ai-quick-questions button:hover { border-color: var(--emerald); color: var(--emerald-dark); background: var(--emerald-soft); }
.ai-messages {
  min-height: 126px;
  max-height: 440px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7fbfc;
  display: grid;
  align-content: start;
  gap: 12px;
}
.ai-message { display: flex; align-items: flex-start; gap: 10px; max-width: 88%; }
.ai-message.user { margin-left: auto; flex-direction: row-reverse; }
.ai-avatar { flex: 0 0 32px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #087f75; color: #fff; font-size: 9px; font-weight: 800; }
.ai-message.user .ai-avatar { background: #315f78; }
.ai-message > div { padding: 10px 12px; border: 1px solid #d9e8eb; border-radius: 3px 10px 10px 10px; background: #ffffff; }
.ai-message.user > div { border-radius: 10px 3px 10px 10px; background: #e9f5f8; }
.ai-message strong { display: block; margin-bottom: 4px; color: var(--emerald-dark); font-size: 10px; }
.ai-message p { margin: 0; color: var(--text); font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-message.loading p::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 7px; border: 2px solid #acd4cd; border-top-color: var(--emerald); border-radius: 50%; vertical-align: -2px; animation: spin 800ms linear infinite; }
.ai-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; margin-top: 10px; }
.ai-form textarea { min-height: 52px; max-height: 150px; resize: vertical; padding: 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #ffffff; color: var(--text); font: inherit; font-size: 11px; line-height: 1.5; }
.ai-form textarea:focus-visible { outline: 3px solid rgba(47, 128, 237, 0.24); outline-offset: 2px; border-color: var(--emerald); }
.ai-form .button { min-width: 94px; min-height: 52px; }
.ai-disclaimer { margin: 8px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  padding: 11px 15px;
  border: 1px solid rgba(215, 183, 120, 0.28);
  border-radius: 6px;
  background: #067c73;
  color: #ffffff;
  box-shadow: var(--shadow);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: 200ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-primary { grid-column: span 1; }
  .direction-row { grid-template-columns: 84px 92px minmax(120px, 0.7fr) minmax(220px, 1.5fr) 82px 28px; }
  .source-pill { display: none; }
  .filter-toolbar { grid-template-columns: minmax(230px, 1fr) 140px minmax(160px, 0.8fr) 40px; }
  #priority-filter { display: none; }
  .date-toolbar { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .date-presets { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; padding: 14px 18px; gap: 13px; }
  .brand-block { padding: 0; border-bottom: 0; }
  .side-nav { grid-template-columns: repeat(4, 1fr); }
  .nav-item { justify-content: center; }
  .nav-item::after { right: auto; bottom: 2px; }
  .label-guide, .source-note { display: none; }
  .main-content { padding: 0 18px 46px; }
  .topbar { min-height: 220px; margin: 0 -18px; padding: 30px 26px 72px; }
  h1 { font-size: 38px; }
  .metrics { margin-top: -38px; }
  .insight-grid { grid-template-columns: 1fr; }
  .filter-toolbar { grid-template-columns: 1fr 1fr 1fr 40px; }
  .search-field { grid-column: 1 / -1; }
  .date-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .date-presets { grid-column: 1 / -1; }
  .subfilters { align-items: flex-start; flex-direction: column; }
  .compact-controls { width: 100%; }
  .compact-controls select { flex: 1; }
  .direction-row, .timeline-view .direction-row { grid-template-columns: 80px 86px minmax(120px, 0.6fr) minmax(220px, 1.4fr) 28px; }
  .priority-pill, .urgency-pill, .source-pill { display: none; }
}

@media (max-width: 640px) {
  .sidebar { padding: 12px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-block strong { font-size: 12px; }
  .side-nav { grid-template-columns: repeat(4, minmax(106px, 1fr)); overflow-x: auto; }
  .nav-item { min-height: 39px; font-size: 10px; }
  .main-content { padding: 0 12px 36px; }
  .topbar { min-height: 260px; margin: 0 -12px; padding: 26px 18px 74px; display: block; background-position: 62% center; }
  .topbar::before { background: rgba(8, 14, 11, 0.5); }
  h1 { font-size: 32px; }
  .subtitle { max-width: 92%; font-size: 10px; }
  .header-actions { margin-top: 18px; justify-content: space-between; }
  .sync-status { min-width: 0; white-space: normal; font-size: 9px; }
  .topbar .button.secondary span { display: none; }
  .topbar .button.secondary { width: 40px; padding: 0; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -40px; }
  .metric { min-height: 96px; padding: 12px; gap: 9px; }
  .metric-primary { grid-column: 1 / -1; }
  .metric-icon { width: 34px; height: 34px; }
  .metric strong { font-size: 21px; }
  .metric span:last-child { white-space: normal; }
  .insight-panel, .latest-panel { padding: 15px; }
  .bar-row { grid-template-columns: 92px minmax(80px, 1fr) 32px; }
  .filter-toolbar { grid-template-columns: 1fr 40px; padding: 12px; }
  #month-filter, #group-filter { grid-column: 1; }
  .date-toolbar { grid-template-columns: 1fr; padding: 12px; }
  .date-presets { grid-column: auto; }
  .date-presets button { flex: 1 0 auto; }
  .subfilters { padding: 11px 12px; }
  .compact-controls { display: grid; grid-template-columns: 1fr 1fr; }
  #sort-filter { grid-column: 1 / -1; }
  .results-summary { min-height: 52px; padding: 8px 12px; align-items: flex-start; flex-direction: column; justify-content: center; }
  .backlog-urgency-guide { align-items: flex-start; flex-direction: column; padding: 12px; }
  .urgency-scale { justify-content: flex-start; }
  .backlog-matrix { padding: 14px 12px 10px; }
  .matrix-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .direction-list {
    padding: 10px;
    background: #eff8fc;
  }
  .direction-row, .timeline-view .direction-row {
    grid-template-columns: minmax(0, 1fr) 32px;
    grid-template-rows: auto auto auto auto;
    align-items: start;
    min-height: 0;
    margin-bottom: 10px;
    gap: 8px 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(25, 92, 108, 0.06);
  }
  .direction-row:last-child, .timeline-view .direction-row:last-child { margin-bottom: 0; }
  .timeline-view .direction-row { padding-left: 14px; border-left: 1px solid var(--line); }
  .timeline-view .direction-row::before { display: none; }
  .date-cell {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  .date-cell strong { color: var(--text); }
  .date-cell span { margin-left: 0; }
  .label-cell {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
  }
  .label-cell .label-badge {
    min-width: 0;
    max-width: 100%;
    min-height: 28px;
    padding: 5px 10px;
    white-space: normal;
    text-align: left;
  }
  .group-cell {
    grid-column: 1;
    grid-row: 3;
    padding: 9px 10px;
    border-radius: 7px;
    background: var(--surface-soft);
    overflow-wrap: anywhere;
    line-height: 1.45;
  }
  .group-cell span {
    margin-top: 3px;
    color: var(--emerald-dark);
    font-weight: 700;
  }
  .direction-copy {
    grid-column: 1 / -1;
    grid-row: 4;
    padding-top: 3px;
    border-top: 1px solid #e8f0f3;
  }
  .direction-text, .backlog-preview, .urgency-preview { -webkit-line-clamp: 4; }
  .row-arrow {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    justify-self: end;
    width: 22px;
    height: 22px;
    padding: 3px;
    border-radius: 50%;
    background: #edf5f7;
    color: var(--emerald-dark);
  }
  .direction-list.timeline-view { padding: 10px; }
  .detail-grid { grid-template-columns: 1fr; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
  .ai-assistant { margin: 16px 0; padding: 14px 12px; }
  .ai-intro { grid-template-columns: 40px minmax(0, 1fr); }
  .ai-icon { width: 40px; height: 40px; }
  .ai-intro h2 { font-size: 18px; }
  .ai-model { grid-column: 2; justify-self: start; }
  .ai-quick-questions { margin: 14px 0 10px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .ai-quick-questions button { min-height: 44px; flex: 0 0 auto; font-size: 12px; }
  .ai-messages { min-height: 150px; max-height: 380px; padding: 10px; }
  .ai-message { max-width: 96%; }
  .ai-intro p:not(.eyebrow), .ai-avatar, .ai-message p, .ai-message strong, .ai-form textarea, .ai-disclaimer, .ai-model { font-size: 12px; }
  .ai-form { grid-template-columns: 1fr; }
  .ai-form textarea, .ai-form .button { min-height: 52px; }

  /* Batas aksesibilitas mobile: teks sekunder tetap terbaca dan target sentuh 44px. */
  :is(
    .nav-item, .eyebrow, .subtitle, .sync-status, .button,
    .metric small, .metric span:last-child, .section-heading .muted,
    .bar-label, .bar-value, .label-badge, .latest-item p, .latest-item span,
    .search-field input, kbd, select, input[type="date"], .date-field span,
    .date-presets button, .segmented button, .results-summary,
    .date-cell strong, .date-cell span, .group-cell, .group-cell span,
    .direction-text, .direction-context, .backlog-preview, .backlog-preview strong,
    .priority-pill, .source-pill, .status-pill
  ) { font-size: 12px; }
  :is(button, select, input[type="date"], .search-field, .sync-status) { min-height: 44px; }
  :is(.icon-button, .reset-button) { width: 44px; height: 44px; }
}
