/* SLR workspace — gaya visual mengikuti dashboard.tamaproject.com
   (DM Sans + IBM Plex Mono, palet hijau TAMA, radius 3px, border 1px) */
:root {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #263b32;
  background: #f4f5f0;
  font-synthesis: none;
  font-optical-sizing: auto;
  --green: #254b3b;
  --muted: #718077;
  --line: #dfe5dc;
  --mono: "IBM Plex Mono", monospace;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 13px; }
button, input, select { font: inherit; }
button { cursor: pointer; color: inherit; border: 0; background: none; }
button:hover { background: #eaf0e5; }
a { color: inherit; text-decoration: none; }
h1, h2, p, ul { margin: 0; }
h1 { font-size: 32px; letter-spacing: -1.1px; font-weight: 550; line-height: 1.3; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.3px; }
small { font-size: 10px; }
strong { font-weight: 600; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid #ba8e3b; outline-offset: 3px;
}
.hidden { display: none !important; }

/* ---------- shell ---------- */
.app {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  grid-template-rows: 66px 1fr;
  min-height: 100vh;
}
.topbar {
  grid-column: 1/-1;
  display: flex; align-items: center; gap: 22px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; gap: 10px; align-items: center; width: 174px; flex-shrink: 0; }
.brand b { font-size: 22px; letter-spacing: 2px; line-height: 1.1; }
.brand b span { font-size: 8px; letter-spacing: 3.8px; display: block; }
.brand-mark { display: flex; align-items: center; justify-content: center; width: 36px; height: 38px; }
.top-divider { height: 21px; border-left: 1px solid var(--line); }
.top-context { color: #718077; font-size: 12px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.top-right > a { font-size: 12px; color: #4d6355; }
.top-right > a:hover { color: #254b3b; text-decoration: underline; }
.avatar {
  width: 29px; height: 29px; background: #ecf0e7; border: 1px solid #dfe5d9;
  display: grid; place-items: center; font-size: 9px; border-radius: 50%; letter-spacing: .5px;
}
.environment { font-size: 9px; letter-spacing: 1px; display: flex; gap: 7px; align-items: center; color: #7c7144; }
.environment i { width: 5px; height: 5px; border-radius: 50%; background: #b29a5c; }

/* ---------- sidebar ---------- */
.sidebar {
  background: #fbfcf8;
  border-right: 1px solid var(--line);
  padding: 27px 15px 24px;
  min-width: 0;
}
.sidebar-label {
  font-size: 9px; letter-spacing: 1.3px; font-weight: 600; color: #7b867e;
  margin: 0 13px 13px;
}
.filters { display: grid; gap: 17px; padding: 0 9px; }
.filters > label { font-size: 9px; letter-spacing: .7px; font-weight: 600; color: #80887c; display: block; }
.filters label select, .filters label input {
  margin-top: 7px; letter-spacing: 0; font-weight: 450;
}
input[type="search"], input[type="text"] {
  color: #304537; width: 100%;
  border: 1px solid #dbe2d7; background: #fff; border-radius: 3px;
  padding: 10px; font-size: 12px;
}
input[type="search"]::placeholder { color: #a9b2a4; }
select {
  width: 100%; color: #304537;
  border: 1px solid #dbe2d7; background: #fff; border-radius: 3px;
  padding: 10px 24px 10px 10px; font-size: 12px; text-overflow: ellipsis;
}
.filter-separator { height: 1px; background: var(--line); }
.shelf-actions { padding: 18px 9px 0; }
.shelf-actions button {
  font-size: 10px; border: 1px solid #dbe3d3; padding: 8px 10px; border-radius: 3px;
  color: #6d7c67; width: 100%;
}
.sidebar-note {
  margin: 26px 9px 0; padding-top: 18px; border-top: 1px solid var(--line);
}
.sidebar-note p { font-size: 11px; line-height: 1.7; color: #5f6f66; margin: 8px 0; }
.sidebar-note small { color: #8a9288; line-height: 1.7; display: block; }

/* ---------- main ---------- */
main { padding: 0 28px; min-width: 0; max-width: 2000px; width: 100%; margin: 0 auto; }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 10px; color: #929b90; height: 51px; }
.crumb-current { color: #53614f; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 10px 0 22px; }
.page-heading .eyebrow { color: #5d7a55; }
.page-heading h1 { margin: 6px 0; max-width: 20ch; }
.page-heading p { font-size: 12px; color: #7e897b; max-width: 72ch; line-height: 1.7; }
.eyebrow { font-size: 9px; letter-spacing: 1.3px; font-weight: 600; color: #7b867e; }
.period-stamp { text-align: right; flex-shrink: 0; }
.period-stamp > span { font-size: 8px; letter-spacing: 1.2px; color: #86917f; display: block; margin-bottom: 9px; }
.period-stamp strong { font-family: var(--mono); font-size: 19px; font-weight: 400; white-space: nowrap; }
.period-stamp strong span { color: #8c9886; }

/* ---------- kpi ---------- */
.kpis { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1.15fr; gap: 12px; margin-bottom: 24px; }
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  padding: 18px 17px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.kpi > span { font-size: 8px; letter-spacing: 1px; color: #7e897b; font-weight: 600; }
.kpi strong {
  font-family: var(--mono); font-size: clamp(19px, 1.8vw, 30px); font-weight: 400;
  letter-spacing: -1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kpi small { font-size: 9px; color: #8c9588; line-height: 1.6; }
.kpi.featured { background: #294b3b; border-color: #294b3b; color: #f9fbf4; }
.kpi.featured > span { color: #b7c8ae; }
.kpi.featured small { color: #b4c4ab; }

/* ---------- view bar ---------- */
.view-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid #dce2d6; margin-bottom: 19px;
}
.view-tabs { display: flex; gap: 22px; }
.view-tabs button { font-size: 11px; padding: 0 0 13px; color: #85907e; position: relative; white-space: nowrap; }
.view-tabs button[aria-selected="true"] { font-weight: 650; color: #315139; background: none; }
.view-tabs button[aria-selected="true"]:after {
  content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: #3c6347;
}
.scope { font-size: 10px; color: #8b9384; padding-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- panel ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 3px; min-width: 0; overflow: hidden; margin-bottom: 18px; }
.panel-heading {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 17px 18px 14px;
}
.panel-heading h2 { margin-top: 6px; font-size: 14px; }
.count {
  font-size: 9px; font-family: var(--mono); background: #edf1e7; color: #7f8c74;
  padding: 2px 5px; margin-left: 6px; vertical-align: middle;
}
.unit-tag { font-family: var(--mono); font-size: 8px; color: #8a9385; white-space: nowrap; }
.panel-foot {
  display: flex; align-items: center; gap: 7px; font-size: 9px; color: #8b9582;
  border-top: 1px solid #e8ece3; padding: 10px 16px;
}
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #64845b; flex-shrink: 0; }
.push { margin-left: auto; }
.export-buttons { display: flex; gap: 6px; align-items: center; color: #879579; font-size: 9px; flex-wrap: wrap; }
.export-buttons button { font-size: 9px; border: 1px solid #dbe3d3; padding: 6px 9px; border-radius: 3px; }

/* ---------- table ---------- */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 10px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid #eef0e9; vertical-align: top; }
thead th {
  font-size: 8px; letter-spacing: .7px; font-weight: 500; color: #87917e; background: #fbfcf8;
  white-space: nowrap; position: sticky; top: 0;
}
tbody td { color: #566354; }
tbody tr.row { cursor: pointer; }
tbody tr.row:hover { background: #f7faf3; }
tbody tr.row.open { background: #edf2e7; }
tbody tr.row.open td:first-child { border-left: 3px solid #3d6748; }
td.title-cell { max-width: 640px; }
td.title-cell b { display: block; font-size: 11.5px; font-weight: 550; color: #2b4436; line-height: 1.5; }
td.title-cell small { display: block; color: #8a9384; margin-top: 5px; line-height: 1.65; font-size: 10px; }
.num-cell {
  font-family: var(--mono); font-size: 11px; color: #40573f; white-space: nowrap;
  text-align: right; width: 54px; padding-right: 14px;
}
.num-cell b { font-weight: 500; }
.numeric { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
td.method-cell, td.theme-cell { max-width: 220px; }
.row-toggle { font-size: 9px; color: #5d7a55; white-space: nowrap; border: 1px solid #dbe3d3; padding: 5px 8px; border-radius: 3px; }
tr.detail-row td { background: #f7faf3; border-bottom: 1px solid #dde5d6; padding: 0; }
.expanded { padding: 18px 20px 20px; }
.expanded-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.badge {
  font-family: var(--mono); font-size: 8px; letter-spacing: .6px;
  background: #e8eee1; color: #4d6a4a; padding: 3px 6px; border-radius: 2px; border: 1px solid #dde5d4;
}
.badge.gold { background: #f7f5e9; border-color: #ebe6d4; color: #87774d; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; }
.detail-col { display: flex; flex-direction: column; gap: 13px; min-width: 0; }
.block { background: #fff; border: 1px solid #e5ebdf; border-radius: 3px; padding: 13px 14px; }
.block > .eyebrow { display: block; margin-bottom: 8px; color: #7f8c74; }
.block p { font-size: 11.5px; line-height: 1.85; color: #5d6a5a; }
.block ul { padding-left: 16px; }
.block li { font-size: 11.5px; line-height: 1.8; color: #5d6a5a; margin-bottom: 5px; }
.block.results p, .block.conclusions p { color: #3d5742; font-weight: 500; }
.block.gap { background: #f9f8f2; border-color: #ece7d7; }
.block.gap p { color: #6d6446; }
.mono-note { font-family: var(--mono); font-size: 10.5px; line-height: 1.8; color: #4a5b4a; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  font-size: 9px; padding: 4px 7px; border: 1px solid #e2e8db; border-radius: 2px;
  color: #6f7d68; background: #fbfcf8;
}
mark { background: #f6edc9; color: #6b5a23; padding: 0 1px; border-radius: 2px; }
.empty { padding: 34px; text-align: center; color: #8a947f; font-size: 11px; }

/* ---------- cards (TLDR) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; padding: 4px 16px 18px; }
.card {
  border: 1px solid var(--line); border-radius: 3px; padding: 14px 15px 15px; background: #fff;
  display: flex; flex-direction: column; gap: 9px; text-align: left; min-width: 0;
}
.card:hover { background: #f7faf3; border-color: #cfdac6; }
.card b { font-size: 12px; font-weight: 600; color: #2b4436; line-height: 1.5; }
.card p { font-size: 11.5px; line-height: 1.75; color: #66735f; }
.card .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }

/* ---------- bars ---------- */
.bars { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 9px; }
.bar { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr) 44px; gap: 10px; align-items: center; }
.bar span.label { font-size: 10.5px; color: #5f6f5c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .track { background: #eff3ea; height: 14px; border-radius: 2px; overflow: hidden; }
.bar .fill { height: 100%; background: #4f7550; }
.bar .fill.alt { background: #8ba079; }
.bar .fill.gold { background: #b99a52; }
.bar .val { font-family: var(--mono); font-size: 10px; color: #6b7a66; text-align: right; }
.secondary-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 17px; margin-bottom: 18px; }
footer {
  padding: 22px 0 25px; display: flex; justify-content: space-between; gap: 10px;
  font-size: 9px; color: #99a28e;
}
footer b { color: #78896a; letter-spacing: 1px; }

/* ---------- responsive ---------- */
@media (min-width: 1600px) {
  main { padding: 0 36px; }
}
@media (max-width: 1150px) {
  .app { grid-template-columns: 205px minmax(0, 1fr); }
  main { padding: 0 18px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .secondary-grid, .detail-grid { grid-template-columns: 1fr; }
  .top-context, .scope { display: none; }
  .page-heading h1 { font-size: 27px; }
}
@media (max-width: 760px) {
  .app { display: block; }
  .topbar { height: auto; padding: 12px 15px; gap: 12px; flex-wrap: wrap; position: static; }
  .brand { width: auto; }
  .brand b { font-size: 19px; }
  .top-divider, .top-right .avatar { display: none; }
  .filters { grid-template-columns: 1fr 1fr; display: grid; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 14px; }
  .sidebar-note, .filter-separator { display: none; }
  main { padding: 0 14px; }
  h1 { font-size: 24px; }
  .page-heading { flex-direction: column; gap: 12px; }
  .period-stamp { text-align: left; }
  .view-tabs { overflow-x: auto; width: 100%; gap: 15px; }
  .kpis { gap: 8px; }
  .kpi strong { font-size: 21px; }
  .cards { grid-template-columns: 1fr; padding: 4px 12px 16px; }
  .bar { grid-template-columns: minmax(0, 130px) minmax(0, 1fr) 40px; }
  footer { flex-wrap: wrap; line-height: 1.8; }
}
