:root {
  /* Rail & Crumb tokens — see DESIGN.md. Read every color through these, never a literal. */
  --accent: #2E56E8;
  --accent-soft: #E7ECFB;
  --ink: #1C2024;
  --ink-muted: #4E5563;
  --bg: #F3F4F7;
  --surface: #FFFFFF;
  --border: #DDE1E8;
  --error: #C4423A;
  --error-soft: #FBEAE8;

  --radius-nav: 8px;
  --radius-card: 12px;
  --radius-pill: 999px;

  --rail-width: 248px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --font-display: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
::selection { background: var(--accent-soft); color: var(--ink); }

button {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 4px;
}

a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Pin gate (unrelated to the shell — shown before it) ---- */
.pin-gate[hidden] { display: none; }
.pin-gate {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.pin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 36px 32px;
  width: 100%;
  max-width: 340px;
  text-align: center;
}
.pin-logo {
  width: 44px; height: 44px; margin: 0 auto 14px;
  border-radius: var(--radius-nav);
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
  font-family: var(--font-display);
}
.pin-card h1 { font-size: 19px; margin: 0 0 6px; }
.pin-card p { font-size: 14px; color: var(--ink-muted); margin: 0 0 18px; }
.pin-input-wrap {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-nav);
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--bg);
}
.pin-input-wrap input {
  flex: 1; border: none; background: transparent;
  padding: 11px 14px; font-size: 14px; color: var(--ink); min-width: 0;
  font-family: var(--font-body);
}
.pin-input-wrap input:focus { outline: none; }
.pin-input-wrap button {
  border: none; background: transparent; color: var(--accent);
  font-size: 12.5px; font-weight: 600; padding: 0 12px; cursor: pointer; white-space: nowrap;
}
.pin-submit {
  width: 100%; padding: 11px 0; border: none; border-radius: var(--radius-nav);
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: var(--font-body);
}
.pin-submit:hover { background: #2447c4; }
.pin-error { margin: 10px 0 0; font-size: 12.5px; color: var(--error); }

/* ---- Shell: fixed rail + breadcrumb topbar + scrolling content ---- */
.shell { display: flex; min-height: 100vh; }

.rail {
  width: var(--rail-width);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.rail-brand { display: flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-2); }
.brand-mark {
  width: 30px; height: 30px; border-radius: var(--radius-nav); background: var(--accent);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; flex-shrink: 0;
  font-family: var(--font-display);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 14px; font-weight: 800; font-family: var(--font-display); color: var(--ink); }
.brand-text span { font-size: 12px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-link {
  display: block;
  padding: 9px 10px;
  border-radius: var(--radius-nav);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  text-align: left;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rail-link:hover { background: var(--bg); }
.rail-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.rail-link[hidden] { display: none; }

.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.crumb-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  position: sticky; top: 0; z-index: 10;
}
.breadcrumb { font-size: 13px; color: var(--ink-muted); }
.breadcrumb strong { color: var(--ink); font-weight: 600; }

.content { flex: 1; padding: 32px 32px 64px; min-width: 0; }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .rail {
    width: 100%; height: auto; position: static;
    flex-direction: row; align-items: center; overflow-x: auto; overflow-y: visible;
    padding: 12px 16px; gap: var(--space-4); border-right: none; border-bottom: 1px solid var(--border);
  }
  .rail-nav { flex-direction: row; }
  .rail-link { white-space: nowrap; }
  .crumb-topbar { padding: 12px 16px; }
  .content { padding: 20px 16px 48px; }
}

/* ---- Legacy top-bar used by the standalone DSR playground (no rail — 3 sections,
   below the 3-section threshold DESIGN.md calls for a sidebar, so it gets the lighter
   pill-tab-row pattern instead; see .pill-tabs below) ---- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1400px; margin: 0 auto; padding: 16px 32px; display: flex; align-items: center; gap: var(--space-2); }
.wrap { max-width: 1400px; margin: 0 auto; padding: var(--space-6) var(--space-5) var(--space-7); }
@media (max-width: 860px) {
  .topbar-inner { padding: 12px 16px; }
  .wrap { padding: 20px 16px 48px; }
}

/* ---- Pill sub-tabs (DESIGN.md's "sub-tabs" component) — used standalone by the DSR
   playground, and for role filters inside a tab (Roster's Guru/Staff/Ortu/Murid). ---- */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 2px; }
.tab {
  padding: 9px 16px; border: 1px solid var(--border); background: var(--surface);
  color: var(--ink-muted); font-weight: 600; font-size: 13px; cursor: pointer;
  white-space: nowrap; flex-shrink: 0; border-radius: var(--radius-pill);
}
.tab:hover { background: var(--bg); }
.tab.active { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }
.tab-panel[hidden] { display: none; }

.search-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 26px; position: relative;
}
.search-card h1 { margin: 0 0 6px; font-size: 19px; }
.search-card .hint { margin: 0 0 16px; font-size: 14px; color: var(--ink-muted); max-width: 70ch; }

.search-form { display: flex; gap: 8px; position: relative; flex-wrap: wrap; }
.search-form input, .search-form select {
  flex: 1; min-width: 160px; padding: 10px 13px; border: 1px solid var(--border); border-radius: var(--radius-nav);
  font-size: 14px; background: var(--bg); color: var(--ink); font-family: var(--font-body);
}
.search-form input:focus, .search-form select:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.search-form > button {
  padding: 0 20px; border: none; border-radius: var(--radius-nav); background: var(--accent);
  color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; font-family: var(--font-body);
}
.search-form > button:hover { background: #2447c4; }
.search-form > button:disabled { opacity: 0.5; cursor: default; }

.org-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  max-height: 280px;
  overflow-y: auto;
  z-index: 5;
}
.org-suggestions[hidden] { display: none; }
.org-suggestions button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 10px 14px; font-size: 13.5px; color: var(--ink); cursor: pointer;
  border-bottom: 1px solid var(--border); font-family: var(--font-body);
}
.org-suggestions button:last-child { border-bottom: none; }
.org-suggestions button:hover { background: var(--bg); }

.stats-row { display: flex; gap: var(--space-2); margin-top: var(--space-4); flex-wrap: wrap; }
.stat-pill {
  border: 1px solid var(--border); border-radius: var(--radius-nav);
  padding: var(--space-2) var(--space-4); font-size: 12.5px; font-weight: 500;
  background: var(--surface); color: var(--ink-muted);
}
.stat-pill strong { display: block; font-size: 19px; font-weight: 800; color: var(--accent); font-family: var(--font-display); }

.result-section { margin-top: 22px; }
.result-summary { font-size: 13px; color: var(--ink-muted); margin-bottom: 12px; }
.result-summary b { color: var(--ink); }

.filter-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-row input {
  flex: 1; min-width: 180px; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-nav); font-size: 13.5px; background: var(--surface); color: var(--ink);
  font-family: var(--font-body);
}
.filter-row input:focus { outline: none; border-color: var(--accent); }
.role-tabs { display: flex; gap: 6px; }
.role-tab {
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-muted);
  padding: 8px 14px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.role-tab.active { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }

.result-list { display: flex; flex-direction: column; gap: 8px; }
.result-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 12px 16px; display: flex; align-items: center; gap: 12px;
}
.result-card .avatar {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12.5px;
  display: flex; align-items: center; justify-content: center;
}
.result-card .info { flex: 1; min-width: 0; }
.result-card .title { font-size: 13.5px; font-weight: 600; margin: 0 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-card .meta { font-size: 12px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-card .badge {
  flex-shrink: 0; font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); color: var(--ink-muted);
}
.badge.murid { background: var(--bg); }
.badge.staff { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }

.load-more {
  display: block; width: 100%; margin-top: 14px; padding: 11px 0; border: 1px solid var(--border);
  border-radius: var(--radius-nav); background: var(--surface); color: var(--ink);
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font-body);
}
.load-more:hover { background: var(--bg); }
.load-more[hidden] { display: none; }

.empty-state, .error-state, .loading-state {
  margin-top: 22px; text-align: center; color: var(--ink-muted); font-size: 13.5px; padding: 30px 0;
}
.error-state { color: var(--error); }

.foot { text-align: center; font-size: 12px; color: var(--ink-muted); padding: 20px; }

@media (max-width: 520px) {
  .result-card { flex-wrap: wrap; }
  .filter-row { flex-direction: column; }
  .role-tabs { width: 100%; }
  .role-tab { flex: 1; text-align: center; }
}

.profile-section[hidden] { display: none; }
.profile-section { margin-top: var(--space-5); }
.profile-header { font-size: 13px; color: var(--ink-muted); margin-bottom: var(--space-3); }
.profile-header b { color: var(--ink); font-size: 14.5px; }

.export-toolbar { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin: var(--space-3) 0 var(--space-4); }
.export-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 12.5px; padding: 7px 14px; border-radius: var(--radius-nav); cursor: pointer;
}
.export-btn:hover { background: var(--bg); }
.export-status { font-size: 12.5px; color: var(--ink-muted); font-weight: 500; }
.export-status.error { color: var(--error); }

.section-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: var(--space-5); margin-bottom: var(--space-4);
}
.section-block h3 {
  margin: 0 0 var(--space-3); padding-bottom: var(--space-2); font-size: 15px; color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.section-block .note { font-size: 12.5px; color: var(--ink-muted); margin: -8px 0 12px; }

.section-block.is-metrics {
  background: none; border: none; padding: 0; margin-bottom: var(--space-6);
}
.section-block.is-metrics h3 { font-size: 12px; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-muted); border-bottom: none; padding-bottom: 0; }

.simple-table { width: 100%; border-collapse: collapse; font-size: 14px; font-family: var(--font-mono); }
.simple-table th {
  text-align: left; padding: 7px 10px; color: var(--ink-muted); font-weight: 600; border-bottom: 1px solid var(--border);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.02em; font-family: var(--font-body);
}
.simple-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.simple-table tr:last-child td { border-bottom: none; }
.simple-table td a { color: var(--accent); text-decoration: none; font-weight: 600; }
.simple-table td a:hover { text-decoration: underline; }
.table-scroll { overflow-x: auto; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }

.feedback-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.feedback-item:last-child { border-bottom: none; }
.feedback-item .prog { font-size: 12px; color: var(--ink-muted); margin-bottom: 3px; }
.feedback-item .text { font-size: 13.5px; }

.portfolio-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4);
}
.portfolio-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  overflow: hidden; display: flex; flex-direction: column;
}
.portfolio-cover {
  aspect-ratio: 4 / 3; background-size: cover; background-position: center; background-color: var(--bg);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.portfolio-cover .file-tally {
  display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink-muted);
  font-size: 12px; font-weight: 700; text-align: center; padding: 0 var(--space-3);
}
.portfolio-cover .file-tally span { display: block; }
.portfolio-body { padding: var(--space-3) var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.portfolio-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.portfolio-badge {
  font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); color: var(--ink-muted);
}
.portfolio-badge.is-private { background: var(--error-soft); color: var(--error); border-color: var(--error-soft); }
.portfolio-badge.is-mandiri { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.portfolio-badge.ta { background: var(--bg); }
.portfolio-title {
  font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.portfolio-date { font-size: 11.5px; color: var(--ink-muted); margin-top: auto; padding-top: 2px; }

.cell-clamp {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  max-width: 320px;
}

.bar-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 8px; }
.bar-row .label { width: 90px; flex-shrink: 0; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bar-track { flex: 1; background: var(--bg); border-radius: 4px; overflow: hidden; height: 8px; }
.bar-row .bar-fill { background: var(--accent); height: 100%; }
.bar-row .value { width: 42px; text-align: right; flex-shrink: 0; font-weight: 700; }

.empty-note { font-size: 13px; color: var(--ink-muted); }

@media (max-width: 600px) {
  .stats-row .stat-pill { flex: 1 1 calc(50% - 5px); }
}

/* ---------- User Semesta ---------- */
.us-head-row { display: flex; justify-content: space-between; gap: var(--space-5); align-items: flex-start; flex-wrap: wrap; }
.us-head-actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.us-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-muted); }
.us-inline select, .us-filterbar input { height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-nav); background: var(--surface); font: inherit; font-size: 13px; color: var(--ink); }
.us-filterbar { margin: var(--space-3) 0; display: flex; gap: var(--space-3); align-items: center; }
.us-filterbar input { width: 280px; max-width: 100%; }
.us-meta { margin: var(--space-2) 0 0; font-size: 12px; color: var(--ink-muted); }
.us-sections { display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--space-4); }
.us-sections button { border: 1px solid var(--border); background: var(--surface); color: var(--ink-muted); border-radius: var(--radius-pill); padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.us-sections button:hover { border-color: var(--accent); color: var(--accent); }
.us-sections button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.us-progress { margin-top: var(--space-4); padding: var(--space-4); background: var(--accent-soft); border-radius: var(--radius-card); font-size: 13px; color: var(--ink); }
.us-progress p { margin: var(--space-2) 0 0; }
.us-progress-bar { height: 6px; background: #fff; border-radius: var(--radius-pill); overflow: hidden; }
.us-progress-bar span { display: block; height: 100%; background: var(--accent); transition: width .4s; }

.us-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-3); margin: var(--space-4) 0; }
.us-kpi { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius-card); padding: var(--space-3) var(--space-4); display: flex; flex-direction: column; gap: 2px; }
.us-kpi.is-teal { border-left-color: #1FA38A; } .us-kpi.is-amber { border-left-color: #F2A33A; } .us-kpi.is-coral { border-left-color: #E8674F; } .us-kpi.is-gray { border-left-color: #7A8394; }
.us-kpi-val { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.us-kpi-label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.us-kpi-hint { font-size: 11.5px; color: var(--ink-muted); }

.us-bars, .us-stacks { display: flex; flex-direction: column; gap: 7px; margin: var(--space-3) 0; }
.us-bar-row, .us-stack-row { display: grid; grid-template-columns: minmax(90px, 200px) 1fr minmax(70px, 130px); gap: var(--space-3); align-items: center; font-size: 12.5px; }
.us-bar-label { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.us-bar-track, .us-stack-track { height: 16px; background: #EEF0F5; border-radius: 4px; overflow: hidden; display: flex; }
.us-bar-fill { display: block; height: 100%; border-radius: 4px; min-width: 2px; }
.us-seg { display: block; height: 100%; font-size: 10px; font-weight: 700; color: #fff; text-align: center; line-height: 16px; overflow: hidden; text-shadow: 0 0 2px rgba(0,0,0,.25); }
.us-bar-val { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; text-align: right; white-space: nowrap; }
.us-bar-val em, .us-dim { font-style: normal; font-weight: 400; color: var(--ink-muted); font-size: 11.5px; }
.us-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-muted); margin-top: var(--space-2); }
.us-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.us-funnels { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: var(--space-4); }
.us-funnel { border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--space-3) var(--space-4); background: var(--surface); }
.us-funnel h4 { margin: 0 0 var(--space-2); font-size: 14px; } .us-funnel h4 em { font-style: normal; font-weight: 400; color: var(--ink-muted); font-size: 12px; }
.us-funnel .us-bar-row { grid-template-columns: minmax(110px, 150px) 1fr minmax(90px, 110px); }
.us-chip { display: inline-block; padding: 1px 8px; margin: 1px 4px 1px 0; background: var(--accent-soft); color: var(--accent); border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; }
.us-rank { display: inline-block; min-width: 22px; text-align: center; padding: 1px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 12px; }
.us-flag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: var(--radius-pill); background: #FFF1D6; color: #8A5A00; font-size: 10.5px; font-weight: 700; }
@media (max-width: 720px) { .us-bar-row, .us-stack-row { grid-template-columns: 90px 1fr 70px; } .us-funnels { grid-template-columns: 1fr; } }

.us-cols { display: flex; align-items: flex-end; gap: 6px; height: 190px; margin: var(--space-4) 0 var(--space-2); overflow-x: auto; padding-top: 18px; }
.us-col { flex: 1 0 34px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; position: relative; }
.us-col-bar { display: block; width: 100%; max-width: 44px; border-radius: 4px 4px 0 0; }
.us-col-val { font-size: 10px; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.us-col-label { font-size: 10.5px; color: var(--ink-muted); }
.us-col-sub { font-size: 10px; color: var(--ink-muted); line-height: 1.2; opacity: .85; }
.us-sub { margin: var(--space-4) 0 var(--space-2); font-size: 13px; font-weight: 700; color: var(--ink); }

.us-explain { background: var(--accent-soft); border-radius: var(--radius-card); padding: var(--space-3) var(--space-4); margin: var(--space-4) 0; font-size: 13px; color: var(--ink); }
.us-explain h4 { margin: 0 0 var(--space-2); font-size: 14px; } .us-explain ul { margin: 0 0 var(--space-2); padding-left: 18px; } .us-explain li { margin-bottom: 4px; } .us-explain p { margin: 0; }
.us-pct { position: relative; display: inline-block; min-width: 120px; height: 20px; background: #EEF0F5; border-radius: 4px; overflow: hidden; vertical-align: middle; }
.us-pct i { position: absolute; left: 0; top: 0; bottom: 0; opacity: .35; }
.us-pct b { position: relative; display: block; text-align: right; padding: 0 6px; line-height: 20px; font-size: 12px; font-variant-numeric: tabular-nums; }

.us-tree { margin: var(--space-3) 0; }
.us-node-row { display: grid; grid-template-columns: 18px 130px minmax(160px, 1fr) 110px 170px 70px; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; font-size: 12.5px; }
.us-node-row.is-open-able { cursor: pointer; } .us-node-row.is-open-able:hover { background: var(--accent-soft); }
.us-node-kids { margin-left: 22px; border-left: 2px solid var(--border); padding-left: 6px; }
.us-node-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .us-node-n, .us-node-ge { color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.us-caret { color: var(--ink-muted); text-align: center; }
.us-lvl { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; color: #fff; white-space: nowrap; text-align: center; }
.us-lvl-framework { background: #1C3FC0; } .us-lvl-cluster { background: #F2A33A; } .us-lvl-element { background: #1FA38A; } .us-lvl-dimension { background: #8B5CF6; } .us-lvl-bo { background: #7A8394; }
.us-hier { line-height: 2.1; margin: var(--space-2) 0; } .us-hier em { color: var(--ink-muted); font-style: normal; font-size: 12px; }
.us-label-group { margin: var(--space-3) 0; } .us-label-group h4 { margin: 0 0 6px; font-size: 13px; } .us-label-group h4 em { font-style: normal; color: var(--ink-muted); font-weight: 400; }
@media (max-width: 900px) { .us-node-row { grid-template-columns: 16px 1fr 90px; } .us-lvl, .us-node-ge, .us-node-n { display: none; } }

.us-talent { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-5); margin-top: var(--space-3); }
.us-talent-col h4 { margin: 0 0 var(--space-2); padding-bottom: 6px; border-bottom: 3px solid; font-size: 14px; }
.us-talent .us-bar-row { grid-template-columns: minmax(110px, 140px) 1fr minmax(120px, 190px); }

.crumb-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.copy-link-btn { border: 1px solid var(--border); background: var(--surface); color: var(--ink-muted); border-radius: var(--radius-pill); padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.copy-link-btn:hover { border-color: var(--accent); color: var(--accent); }

.us-ministack { display: inline-flex; width: 130px; height: 12px; border-radius: 3px; overflow: hidden; background: #EEF0F5; vertical-align: middle; }
.us-ministack i { display: block; height: 100%; }

.us-period { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); }
.us-period-label { font-size: 12.5px; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; }
.us-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.us-chip-btn { border: 1px solid var(--border); background: var(--surface); color: var(--ink-muted); border-radius: var(--radius-pill); padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.us-chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.us-chip-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.us-period-custom { display: inline-flex; align-items: center; gap: 6px; }
.us-period-custom input { height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius-nav); font: inherit; font-size: 13px; background: var(--surface); color: var(--ink); }
.us-period-banner { margin-bottom: var(--space-3); padding: 9px 14px; border-radius: var(--radius-card); background: #E6F6F1; border: 1px solid #BFE6DA; font-size: 12.5px; color: var(--ink); }
.us-period-banner.is-snapshot { background: #FFF6E0; border-color: #F3DDA5; }
.us-period-custom[hidden] { display: none; }

.us-check { gap: 5px; cursor: pointer; } .us-check input { width: 15px; height: 15px; }
.us-delta { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 700; color: var(--ink-muted); }
.us-delta em { font-style: normal; font-weight: 400; } .us-delta.is-good { color: #14805F; } .us-delta.is-bad { color: #C4423A; }
.us-sev { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.us-sev-0 { background: #E6F6F1; color: #14805F; } .us-sev-1 { background: #FFF1D6; color: #8A5A00; } .us-sev-2 { background: #FBEAE8; color: #B0342C; }
.us-heatmap { border-collapse: collapse; font-size: 12px; width: 100%; } .us-heatmap th { padding: 6px 8px; text-align: center; color: var(--ink-muted); font-weight: 600; white-space: nowrap; }
.us-heatmap td { padding: 5px 6px; text-align: center; border: 2px solid var(--surface); min-width: 46px; } .us-heatmap td:first-child { text-align: left; white-space: nowrap; }
.us-hm { font-variant-numeric: tabular-nums; } .us-hm-off { background: #F3F4F7; }
.us-sc-head h3 { margin: var(--space-3) 0 4px; font-size: 20px; } .us-sc-head p { margin: 0 0 var(--space-2); }
.us-sc-group { margin-top: var(--space-4); } .us-sc-group h4 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); }
.us-mini { display: inline-block; margin-left: 5px; padding: 0 6px; border: 1px solid var(--border); border-radius: 999px; font-size: 10.5px; font-weight: 600; text-decoration: none; color: var(--ink-muted); }
.us-mini:hover { border-color: var(--accent); color: var(--accent); } .us-orglink { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--border); } .us-orglink:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- User Semesta: header ringkas (sebelumnya memakai ±1/2 layar) ---------- */
.us-head.search-card { padding: 10px 16px 12px; margin-bottom: var(--space-3); }
@media (min-height: 820px) { .us-head.search-card { position: sticky; top: 0; z-index: 30; box-shadow: 0 4px 14px -10px rgba(28, 32, 36, .35); } }
.us-head-row { align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.us-head-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.us-head h1 { margin: 0; font-size: 18px; line-height: 1.2; cursor: help; }
.us-head .us-meta { margin: 0; font-size: 11.5px; }
.us-head-actions { gap: 8px; }
.us-head .us-inline select { height: 30px; }
.us-head .export-btn { padding: 5px 12px; font-size: 12.5px; }
.us-head .us-period { margin-top: 8px; gap: 8px 10px; }
.us-head .us-period-label { font-size: 11px; }
.us-head .us-chip-btn { padding: 3px 10px; font-size: 12px; }
.us-head .us-period-custom input { height: 28px; }
.us-period-info { flex: 1 1 260px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default; }
.us-head .us-sections { margin-top: 8px; gap: 5px; }
.us-head .us-sections button { padding: 4px 11px; font-size: 12.5px; }
.us-head .us-progress { margin-top: 8px; padding: 8px 12px; }
.us-period-banner { padding: 6px 12px; font-size: 12px; margin-bottom: var(--space-2); }
.us-head .us-sections { gap: 4px; }
.us-head .us-sections button { padding: 3px 9px; font-size: 12px; }

/* ---------- User Semesta: navigasi bertingkat + baris filter ---------- */
.us-head .us-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.us-field { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .03em; }
.us-field select { height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius-nav); background: var(--surface); font: inherit; font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink); }
.us-filters .us-check { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-muted); cursor: pointer; }
.us-groups { display: inline-flex; gap: 2px; margin-top: 10px; padding: 3px; background: #E9EBF2; border-radius: 10px; max-width: 100%; overflow-x: auto; }
.us-groups button { border: none; background: transparent; color: var(--ink-muted); padding: 5px 16px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.us-groups button:hover { color: var(--ink); } .us-groups button.active { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(28, 32, 36, .15); }
.us-head .us-sections { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.us-head .us-sections button[hidden] { display: none !important; }
.us-head .us-progress { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 5px 10px; font-size: 12px; background: var(--accent-soft); border-radius: 8px; }
.us-head .us-progress[hidden] { display: none; }
.us-mini-bar { display: inline-block; width: 90px; height: 5px; background: #fff; border-radius: 999px; overflow: hidden; flex: none; } .us-mini-bar span { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.us-meta.is-stale { color: #B0342C; font-weight: 600; }

/* ---------- Cetak / Simpan PDF (User Semesta) ---------- */
.us-print-meta { display: none; }
@page { size: A4 landscape; margin: 10mm; }
@media print {
  html, body { background: #fff !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rail, .crumb-topbar, .us-head-actions, .us-filters, .us-groups, .us-sections, .us-progress, #us_errorState, .us-searchbox, .us-filterbar, .us-rangebar, footer, .footer { display: none !important; }
  .shell { display: block !important; }
  .content, main { margin: 0 !important; padding: 0 !important; max-width: none !important; width: 100% !important; overflow: visible !important; height: auto !important; }
  .us-head { position: static !important; box-shadow: none !important; border: none !important; padding: 0 0 6px !important; }
  .us-head .us-print-meta:not([hidden]) { display: block !important; margin-top: 4px; font-size: 11px; color: #333; line-height: 1.5; }
  .search-card, .section-block, .us-kpi, .card { box-shadow: none !important; }
  .section-block, .us-kpis, .us-kpi { break-inside: avoid; }
  .section-block table { break-inside: auto; font-size: 10px; }
  .section-block tr { break-inside: avoid; }
  .section-block thead { display: table-header-group; }
  .table-scroll { overflow: visible !important; max-height: none !important; }
  .simple-table { width: 100% !important; table-layout: auto; }
  a { color: inherit !important; text-decoration: none !important; }
}

.us-node-id { margin-left: 8px; font-style: normal; font-size: 11px; font-weight: 600; color: var(--ink-muted); background: #E9EBF2; border-radius: 6px; padding: 1px 6px; vertical-align: 1px; }

.us-explain.us-warn { background: #FFF4E5; border-color: #F2C27B; } .us-explain.us-warn h4 { color: #8A4B00; }

.us-subhead { font-size: 14px; font-weight: 700; margin: var(--space-4) 0 0; color: var(--ink); }

.us-statusbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.us-chipcheck { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13px; cursor: pointer; }
.us-chipcheck:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.us-chipcheck b { font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.us-pst { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #E9EBF2; color: #4B5563; }
.us-pst-3 { background: #DDF3EC; color: #0F766E; } .us-pst-2 { background: #FDEFD2; color: #92580A; } .us-pst-1 { background: #E1E6FB; color: #2437B4; } .us-pst-4 { background: #ECEDEF; color: #6B7280; }

/* ---------- Toolbar filter: lebih rapi & nyaman ---------- */
.us-head .us-filters { padding: 10px 0 2px; gap: 10px 16px; }
.us-statusfilter { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; margin-top: 2px; border-top: 1px dashed var(--border); }
.us-statusfilter[hidden] { display: none; }
.us-field-label { font-size: 12px; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .03em; margin-right: 2px; }
.us-chipcheck input { accent-color: var(--accent); margin: 0; }
.us-chipcheck { transition: background .15s, border-color .15s; }
.us-chipcheck:hover { border-color: var(--accent); }
.us-linkbtn { border: none; background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 2px 6px; }
.us-linkbtn:hover { text-decoration: underline; }
.us-statushint { flex-basis: 100%; font-size: 12px; line-height: 1.4; }
.us-head .us-sections { gap: 6px 8px; padding-top: 2px; }
.us-head .us-sections button { padding: 5px 14px; }
.us-subhead { margin: var(--space-5, 24px) 0 4px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.us-kpis { gap: 12px; }
.us-kpi { padding: 12px 16px; }
@media (min-height: 900px) { .us-head.search-card { position: sticky; top: 0; z-index: 30; } }
@media (max-width: 720px) { .us-statusfilter, .us-head .us-filters { gap: 8px; } .us-chipcheck { font-size: 12px; padding: 3px 10px; } }

/* filter tepat di atas data (di bawah tab) + checkbox chip proporsional */
.us-chipcheck input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; flex: none; padding: 0; margin: 0; }
.us-head .us-filters { margin-top: 10px; background: #F7F8FB; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.us-statusfilter { border-top: 1px dashed var(--border); }

.us-fgroup { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-right: 14px; }

.us-node-nobo { margin-left: 8px; font-style: normal; font-size: 11px; font-weight: 600; color: #8A4B00; background: #FFF4E5; border-radius: 6px; padding: 1px 6px; vertical-align: 1px; white-space: nowrap; }
.us-node-more { margin: 4px 0 6px 56px; font-size: 12px; color: var(--ink-muted); font-style: italic; }

.us-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 10px 0 4px; }
.us-flow-step { position: relative; } .us-flow-step .us-kpis { display: block; margin: 0; } .us-flow-step .us-kpi { height: 100%; }
.us-flow-n { position: absolute; top: -8px; left: -6px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
@media (max-width: 1100px) { .us-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* =====================================================================
   Mobile (≤720px): filter ringkas + above the fold.
   Tujuan: data pertama terlihat tanpa scroll; filter aktif selalu terbaca
   (bar ringkasan menempel di atas) dan panel filter baru dibuka bila perlu.
   ===================================================================== */
.us-filter-toggle, .us-filter-done { display: none; }
@media (max-width: 720px) {
  /* shell: strip rail + topbar dipadatkan, topbar tidak lagi sticky (bar filter yang sticky) */
  .rail { padding: 6px 12px; gap: 12px; }
  .rail-brand { padding: 0; } .brand-text span { display: none; } .brand-mark { width: 28px; height: 28px; }
  .rail-link { padding: 8px 12px; }
  .crumb-topbar { position: static; padding: 6px 12px; min-height: 0; }
  .breadcrumb { font-size: 12px; } .copy-link-btn { padding: 5px 10px; font-size: 12px; }
  .content { padding: 10px 12px 40px; }

  /* kartu header: judul + data per, aksi dalam satu baris */
  .us-head.search-card { position: static; padding: 12px 12px 10px; border-radius: 10px; }
  .us-head-row { display: block; }
  .us-head-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
  .us-head-title h1 { font-size: 19px; line-height: 1.15; margin: 0; }
  .us-head .us-meta { font-size: 11.5px; }
  .us-head-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
  .us-head .export-btn { min-height: 40px; padding: 6px 4px; font-size: 13px; width: 100%; }
  .us-m-hide { display: none; }

  /* tab: satu baris geser horizontal, target sentuh ≥40px */
  .us-groups { display: flex; width: 100%; max-width: 100%; margin-top: 10px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .us-groups::-webkit-scrollbar, .us-head .us-sections::-webkit-scrollbar { display: none; }
  .us-groups button { flex: 1 0 auto; min-height: 38px; padding: 6px 14px; }
  .us-head .us-sections { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-top: 8px; padding-bottom: 2px; gap: 6px; scroll-snap-type: x proximity; }
  .us-head .us-sections button { flex: 0 0 auto; min-height: 40px; padding: 6px 14px; scroll-snap-align: start; }

  /* bar ringkasan filter: sticky di atas konten, membuka/menutup panel */
  .us-filter-toggle {
    display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 10px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer;
  }
  .us-filter-toggle:focus-visible, .us-filter-done:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .us-filter-label { font-weight: 700; flex: none; }
  .us-filter-summary { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-muted); }
  .us-filter-count { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
  .us-chev { flex: none; transition: transform .18s ease-out; color: var(--ink-muted); }
  .us-head.filters-open .us-chev { transform: rotate(180deg); }
  .us-head.filters-open .us-filter-toggle { border-color: var(--accent); background: var(--accent-soft); }

  /* panel filter: tertutup default; terbuka = grid 2 kolom ringkas, kontrol ≥44px */
  .us-head .us-filters { display: none; margin-top: 8px; padding: 12px; gap: 10px; }
  .us-head.filters-open .us-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
  .us-filters > * { min-width: 0; }
  .us-field { display: flex; flex-direction: column; align-items: stretch; gap: 4px; font-size: 11.5px; }
  .us-field select, .us-filters select, .us-filters input[type="date"] { width: 100%; min-height: 44px; font-size: 16px; }
  .us-period-custom { display: grid !important; grid-column: 1 / -1; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
  .us-period-custom[hidden] { display: none !important; }
  .us-period-custom .export-btn { grid-column: 1 / -1; }
  .us-filters .us-check { min-height: 44px; font-size: 13px; display: flex; align-items: center; gap: 8px; line-height: 1.25; }
  .us-filters .us-check input { width: 20px; height: 20px; flex: none; }
  .us-period-info { display: none; }
  .us-statusfilter { grid-column: 1 / -1; flex: none; flex-basis: auto; display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding-top: 12px; }
  .us-statusfilter[hidden] { display: none; }
  .us-fgroup { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; align-items: center; }
  .us-chipcheck { min-height: 40px; padding: 4px 12px; font-size: 13px; }
  .us-chipcheck input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; }
  .us-statushint { display: none; }
  .us-filter-done { display: block; grid-column: 1 / -1; width: 100%; min-height: 44px; border: none; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }

  /* bar ringkasan menempel di atas saat membaca data */
  .us-head.search-card { overflow: visible; }
  .us-filter-toggle { position: sticky; top: 6px; z-index: 25; background: var(--surface); }
  .us-head.filters-open .us-filter-toggle { background: var(--accent-soft); }

  /* konten: KPI lebih rapat, 2 kolom, angka tidak raksasa */
  .us-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
  .us-kpi { padding: 10px 12px; }
  .us-kpi-val { font-size: 22px; }
  .us-kpi-label, .us-kpi b { font-size: 13px; }
  .us-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .us-flow-step:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .us-explain { padding: 10px 12px; font-size: 13px; }
  .section-block { padding: 12px; }
  .section-block h3 { font-size: 15px; }
  .error-state, .loading-state, .us-progress { font-size: 13px; }
  /* banner periode: ringkas (2 baris) supaya KPI pertama lebih dekat ke atas */
  .us-period-banner { font-size: 12px; line-height: 1.4; padding: 8px 10px; margin: 8px 0; }
}

/* ---------- Bantuan: ikon info, popover cara baca + logika + SQL ---------- */
.us-info { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 6px; padding: 0; border: none; border-radius: 50%; background: transparent; color: var(--ink-muted); cursor: pointer; vertical-align: -4px; flex: none; }
.us-info:hover, .us-info[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); }
.us-info:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.us-kpi-label .us-info { width: 20px; height: 20px; margin-left: 4px; vertical-align: -5px; }
.us-sechelp { display: flex; align-items: center; gap: 4px; margin: 10px 0 2px; font-size: 12.5px; color: var(--ink-muted); }
.us-sechelp .us-info { margin-left: 0; }
.us-pop { position: absolute; z-index: 80; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 28px -14px rgba(28, 32, 36, .45); max-height: min(70vh, 640px); display: flex; flex-direction: column; font-size: 13px; color: var(--ink); }
.us-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.us-pop-head b { font-family: var(--font-display); font-size: 14px; }
.us-pop-x { border: none; background: none; font-size: 22px; line-height: 1; color: var(--ink-muted); cursor: pointer; width: 32px; height: 32px; border-radius: 8px; }
.us-pop-x:hover { background: var(--bg); }
.us-pop-body { padding: 8px 12px 10px; overflow: auto; }
.us-pop-body h5 { margin: 12px 0 3px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-muted); }
.us-pop-body h5.is-warn { color: #8A4B00; }
.us-pop-body p { margin: 0; line-height: 1.5; }
.us-pop-src { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.us-pop-sqlbtn { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-family: var(--font-mono, monospace); font-size: 12px; cursor: pointer; }
.us-pop-sqlbtn:hover, .us-pop-sqlbtn.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.us-pop-sql { margin-top: 8px; }
.us-sql-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; font-size: 12px; }
.us-sql-copy { margin-left: auto; }
.us-sql { margin: 0; padding: 10px; max-height: 260px; overflow: auto; background: #F7F8FB; border: 1px solid var(--border); border-radius: 8px; font-family: var(--font-mono, monospace); font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.us-pop-foot { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); }
.us-pop-note { font-size: 11.5px; }
@media (max-width: 720px) {
  .us-pop { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto !important; max-height: 78vh; border-radius: 14px 14px 0 0; border-bottom: none; }
  .us-info { width: 32px; height: 32px; } .us-kpi-label .us-info { width: 28px; height: 28px; margin: -4px -2px -4px 2px; }
  .us-pop-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .us-pop-note { display: none; }
}
@media print { .us-info, .us-sechelp, .us-pop { display: none !important; } }

/* ---- Siblings ---- */
.sib-table tbody { border-top: 2px solid var(--border); }
.sib-table td { vertical-align: top; }
.sib-sub { display: block; font-size: 11.5px; color: var(--ink-muted); }
.sib-tag { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--ink-muted); white-space: nowrap; }
.sib-tag.is-dr { background: #e6f4ef; color: #0f6b52; border-color: #cfe9df; }
.sib-tag.is-inklusi { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }

/* ---- Tab Inklusi ---- */
.ink-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-4); }
.ink-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--space-4) var(--space-5); }
.ink-card h4 { margin: 0 0 var(--space-3); font-size: 13px; color: var(--ink-muted); font-weight: 600; }
.ink-donut-wrap { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.ink-donut { position: relative; width: 150px; height: 150px; flex: none; }
.ink-donut svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.ink-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--font-display); }
.ink-donut-center strong { font-size: 26px; font-weight: 800; line-height: 1; }
.ink-donut-center span { font-size: 11.5px; color: var(--ink-muted); margin-top: 3px; }
.ink-legend { display: flex; flex-direction: column; gap: 6px; font-size: 13px; flex: 1; min-width: 160px; }
.ink-legend button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; }
.ink-legend button:hover, .ink-legend button.is-on { background: var(--bg); }
.ink-legend i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.ink-legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.ink-legend em { font-style: normal; color: var(--ink-muted); font-size: 11.5px; min-width: 38px; text-align: right; }
.ink-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--bg); min-width: 90px; }
.ink-bar > span { display: block; height: 100%; }
.ink-row { display: grid; grid-template-columns: minmax(120px, 190px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.ink-row .ink-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-muted); font-size: 12px; }
.ink-c-ok { background: #1FA38A; } .ink-c-no { background: #E8674F; } .ink-c-blue { background: var(--accent); } .ink-c-amber { background: #F2A33A; } .ink-c-gray { background: #9AA3B2; } .ink-c-purple { background: #7A5BD0; }
.ink-sibline { display: block; font-size: 11.5px; color: var(--ink-muted); }
.ink-tag { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-pill); white-space: nowrap; border: 1px solid var(--border); }
.ink-tag.ok { background: #e6f4ef; color: #0f6b52; border-color: #cfe9df; } .ink-tag.no { background: var(--error-soft); color: var(--error); border-color: #f3cfca; }
.ink-hub-bar { min-width: 140px; }
@media print { .search-card, .export-toolbar, #inklusiTabBtn { display: none !important; } }

.sib-table .sib-tag { white-space: normal; display: inline-block; }

/* Inklusi: header sticky (judul -> tab -> filter -> download/copy) */
.ink-head { padding: 10px 16px 12px; margin-bottom: var(--space-4); }
.ink-head h1 { margin: 0 0 8px; font-size: 18px; cursor: help; }
.ink-head .ink-subtabs { margin-bottom: 10px; }
.ink-head .export-toolbar { margin: 10px 0 0; }
.ink-head .search-form { margin: 0; }
@media (min-width: 721px) { .ink-head { position: sticky; top: 0; z-index: 30; box-shadow: 0 4px 14px -10px rgba(28, 32, 36, .35); } }

.ink-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-top: 10px; }
.ink-actions .export-toolbar { margin: 0; }
.ink-head .ink-subtabs { margin-bottom: 8px; }
.ink-head .search-form select, .ink-head .search-form input { height: 38px; }
.ink-head .export-status { margin: 6px 0 0; }

.ink-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--space-3); }
.ink-act { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.ink-act:hover, .ink-act:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.ink-act b { font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1.1; }
.ink-act span { font-size: 13px; font-weight: 600; color: var(--ink); }
.ink-act em { font-style: normal; font-size: 11.5px; color: var(--ink-muted); }
.ink-bars { display: flex; flex-direction: column; gap: 5px; }
.ink-bar-row { display: grid; grid-template-columns: minmax(90px, 40%) 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; }
.ink-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ink-bar-track { height: 12px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.ink-bar-track > span { display: block; height: 100%; border-radius: 6px; }
.ink-bar-row .ink-num { font-size: 11.5px; color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ink-chip { display: inline-flex; gap: 8px; align-items: center; background: var(--accent-soft); color: var(--accent); padding: 5px 12px; border-radius: var(--radius-pill); font-size: 12.5px; margin-bottom: var(--space-3); }
.ink-chip button { all: unset; cursor: pointer; font-weight: 700; }
.ink-head .search-form input, .ink-head .search-form select { min-width: 0; flex: 1 1 120px; padding: 6px 10px; font-size: 13px; text-overflow: ellipsis; }
.ink-head .search-form input { flex: 1.3 1 150px; }

/* Inklusi: keluarga & KK */
.ink-name { color: var(--accent); font-weight: 600; text-decoration: none; } .ink-name:hover { text-decoration: underline; }
.ink-kkno { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; letter-spacing: .02em; } .ink-kkno.bad { color: var(--error); }
.ink-kkimg { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; background: #f5f7fa; } .ink-kkimg.big { width: 100%; max-width: 420px; height: auto; max-height: 300px; object-fit: contain; }
.ink-dialog { border: none; border-radius: 12px; padding: 0; width: min(980px, 96vw); max-height: 92vh; box-shadow: 0 20px 60px rgba(17, 24, 39, .25); color: #111; background: #fff; }
.ink-dialog::backdrop { background: rgba(17, 24, 39, .45); }
.ink-dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; z-index: 1; }
.ink-dlg-head h3 { margin: 0; font-size: 18px; } .ink-dlg-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-muted); }
.ink-dlg-x { border: 1px solid var(--border); background: #fff; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 14px; }
.ink-dlg-body { padding: 4px 20px 20px; overflow: auto; max-height: calc(92vh - 70px); }
.ink-dlg-body section { margin-top: 16px; } .ink-dlg-body h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-muted); }
.ink-dlg-kk { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; } .ink-dlg-kk > div:first-child { flex: 1 1 260px; } .ink-dlg-foto { flex: 1 1 280px; }
.ink-kvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
.ink-kv { display: flex; flex-direction: column; gap: 1px; font-size: 13px; } .ink-kv span { font-size: 11.5px; color: var(--ink-muted); } .ink-kv b { font-weight: 600; word-break: break-word; }
.ink-par th:first-child { font-weight: 700; }
.ink-where { font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; } .ink-where.ok { background: #e6f4ef; color: #0f6b52; border-color: #cfe9df; } .ink-where.blue { background: #eaf0ff; color: #2E56E8; border-color: #d3deff; } .ink-where.warn { background: #fff4e0; color: #a4640a; border-color: #f6dfb6; }
.ink-sibline { margin-bottom: 3px; } .ink-miss { color: var(--error); font-style: italic; }
.ink-tag.warn { background: #fff4e0; color: #a4640a; border-color: #f6dfb6; }
.ink-kkfilter { margin: 0 0 10px; font-size: 13px; } .ink-kkfilter select { margin-left: 6px; }
.ink-kkact { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; } .ink-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.ink-kkrows { display: flex; flex-direction: column; gap: 6px; } .ink-kkrow { display: grid; grid-template-columns: minmax(180px, 2fr) 150px 140px 150px 32px; gap: 6px; align-items: center; }
.ink-kkrow input, .ink-kkrow select { padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13px; min-width: 0; }
@media (max-width: 760px) { .ink-kkrow { grid-template-columns: 1fr 1fr; } }
.ink-issues { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; background: #fafbfd; }
.ink-issues-head { font-size: 13px; margin-bottom: 8px; } .ink-linkbtn { border: none; background: none; color: var(--accent); cursor: pointer; font: inherit; font-size: 12.5px; text-decoration: underline; }
.ink-chips { display: flex; flex-wrap: wrap; gap: 6px; } .ink-chipbtn { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer; color: #333; } .ink-chipbtn b { margin-left: 4px; color: var(--accent); }
.ink-chipbtn:hover { border-color: var(--accent); } .ink-chipbtn.is-on { background: var(--accent); color: #fff; border-color: var(--accent); } .ink-chipbtn.is-on b { color: #fff; } .ink-chip-ok b { color: #0f6b52; }
.ink-cta { margin: 10px 0 0; padding-left: 18px; font-size: 12.5px; } .ink-cta li { margin-bottom: 3px; } .ink-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }

/* Peserta Program: search + filter bar */
.pp-filterbar { flex-wrap: wrap; }
.pp-filterbar select { height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-nav); background: var(--surface); font: inherit; font-size: 13px; color: var(--ink); }
.pp-filterbar .export-btn { height: 34px; }
.simple-table th.pp-sort:hover { color: var(--ink); }
.is-metrics .note { margin: var(--space-4) 0 0; line-height: 1.5; }
#pp_count { margin: var(--space-3) 0 var(--space-2); }
.pp-filterbar { margin-bottom: var(--space-2); }
.pp-filterbar input { flex: 1 1 260px; }
.pp-scroll { max-height: 70vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.pp-table { font-family: var(--font-body); font-size: 13px; }
.pp-table th { position: sticky; top: 0; z-index: 1; background: var(--surface); box-shadow: 0 1px 0 var(--border); white-space: nowrap; }
.pp-table td { padding: 8px 10px; vertical-align: middle; }
.pp-table tbody tr:hover td { background: rgba(0, 0, 0, 0.025); }
.pp-name { font-weight: 600; min-width: 150px; }
.pp-email { color: var(--ink-muted); word-break: break-all; min-width: 200px; }
.pp-date { white-space: nowrap; color: var(--ink-muted); font-size: 12px; }
.pp-num { white-space: nowrap; }
.pp-pct { display: inline-flex; align-items: center; gap: 8px; }
.pp-pct b { min-width: 44px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pp-bar { width: 56px; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.08); overflow: hidden; display: inline-block; }
.pp-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.pp-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: rgba(0, 0, 0, 0.06); color: var(--ink-muted); }
.pp-status-active { background: rgba(35, 166, 133, 0.14); color: #167a60; }
.pp-table td, .pp-table td b { font-family: var(--font-body); }
.pp-bar { width: 44px; }
.pp-pct { gap: 6px; }
.pp-pct b { min-width: 40px; }
.pp-email { min-width: 170px; word-break: normal; overflow-wrap: anywhere; }
.pp-table th, .pp-table td { padding-left: 8px; padding-right: 8px; }
.pp-email { min-width: 0; max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; overflow-wrap: normal; }
.pp-name { min-width: 0; }
.pp-bar { width: 32px; }
.pp-pct { gap: 5px; }
.pp-pct b { min-width: 36px; }
.pp-table th, .pp-table td { padding-left: 6px; padding-right: 6px; }
.pp-email { max-width: 200px; }
.pp-table td:last-child { white-space: nowrap; }

/* Sidebar lipat/buka (desktop) */
.rail { transition: width 0.2s ease, padding 0.2s ease; }
.shell.rail-collapsed .rail { width: 0; padding-left: 0; padding-right: 0; border-right-width: 0; overflow: hidden; }
.rail-toggle { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-right: var(--space-3); flex-shrink: 0; border: 1px solid var(--border); border-radius: var(--radius-nav); background: var(--surface); color: var(--ink-muted); cursor: pointer; }
.rail-toggle:hover { background: var(--bg); color: var(--ink); }
.crumb-topbar .breadcrumb { margin-right: auto; }
@media (max-width: 860px) { .rail-toggle { display: none; } }
@media print { .rail-toggle { display: none !important; } }

/* ---- Rekap Penilaian: Analitik (koordinator & akademik) ---- */
.dash-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin-bottom: 12px; }
.dash-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-muted); font-weight: 600; }
.dash-filters select, .dash-filters input { min-width: 170px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface, #fff); font: inherit; font-weight: 400; color: var(--ink, #111); }
.dash-search { position: relative; margin-bottom: 14px; }
.dash-search input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: var(--surface, #fff); }
.dash-sugg { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 4px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, .12); overflow: hidden; }
.dash-sugg a { display: block; padding: 9px 12px; color: var(--ink, #111); text-decoration: none; border-bottom: 1px solid var(--border); font-size: 14px; }
.dash-sugg a:hover { background: var(--accent-soft); }
.dash-sugg b { display: inline-block; min-width: 58px; color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.dash-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; background: #fff; color: var(--ink, #111); text-decoration: none; }
.dash-kpi:hover { background: var(--accent-soft); }
.dash-kpi span { font-size: 12px; color: var(--ink-muted); font-weight: 600; }
.dash-kpi strong { font-size: 24px; font-weight: 800; font-family: var(--font-display, inherit); line-height: 1.15; }
.dash-kpi em { font-style: normal; font-size: 12px; color: var(--ink-muted); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-card { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 14px 16px; min-width: 0; }
.dash-card h3 { margin: 0 0 4px; font-size: 15px; }
.dash-card .hint { margin: 0 0 10px; font-size: 12px; }
.dash-row { display: grid; grid-template-columns: minmax(120px, 42%) 1fr auto; gap: 4px 10px; align-items: center; padding: 6px 4px; color: var(--ink, #111); text-decoration: none; border-radius: 8px; font-size: 13px; }
.dash-row:hover, .dash-stack:hover { background: var(--accent-soft); }
.dash-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: none; }
.dash-bar { display: block; height: 10px; border-radius: 6px; background: #eef1f6; overflow: hidden; }
.dash-bar i { display: block; height: 100%; border-radius: 6px; }
.dash-bar.stack { display: flex; }
.dash-bar.stack a { display: block; height: 100%; }
.dash-val { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.dash-sub { grid-column: 2 / 4; font-size: 11px; color: var(--ink-muted); margin-top: -2px; }
.dash-stack { display: grid; grid-template-columns: minmax(90px, 26%) 1fr auto; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 8px; font-size: 13px; }

/* Rekap Penilaian: menu subtab menempel (sticky) di bawah topbar saat halaman di-scroll */
#rekap_subtabs, #rekapekskul_subtabs { position: sticky; top: var(--crumb-h, 70px); z-index: 9; background: var(--surface); margin: -26px -26px 14px; padding: 12px 26px 10px; border-bottom: 1px solid var(--border); border-radius: var(--radius-card) var(--radius-card) 0 0; }

/* Rekap Penilaian: judul kolom tabel menempel (sticky). Wadah tabel punya scroll sendiri (vertikal + horizontal) supaya sticky berfungsi bersama scroll ke samping. */
#rekap_table .table-scroll, #rekapekskul_table .table-scroll { max-height: 75vh; overflow: auto; }
#rekap_table .simple-table thead th, #rekapekskul_table .simple-table thead th { position: sticky; top: 0; z-index: 3; background: var(--surface); box-shadow: 0 1px 0 var(--border); }

/* Penanda akun yang sedang login + tombol Keluar (di topbar, hanya mount ber-akun) */
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.whoami { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-muted); padding-left: 10px; border-left: 1px solid var(--border); }
.whoami strong { color: var(--ink); font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) { .whoami-label { display: none; } .whoami strong { max-width: 130px; } }

/* Produk Organisasi: kartu judul ringkas (judul + ikon info + tombol 1 baris; keterangan = tooltip / buka-tutup), judul kolom tabel menempel (sticky) */
#tab-productorgs .po-card { padding: 12px 20px; }
#tab-productorgs .po-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#tab-productorgs .po-head h1 { margin: 0; display: flex; align-items: center; gap: 8px; }
#tab-productorgs .po-info { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--ink-muted); font-size: 13px; line-height: 1; cursor: pointer; }
#tab-productorgs .po-info:hover, #tab-productorgs .po-info[aria-expanded="true"] { color: var(--ink); border-color: var(--ink-muted); }
#tab-productorgs .po-card .hint { margin: 10px 0 0; }
#tab-productorgs .po-note { margin: 10px 0 0; font-size: 13px; color: var(--ink-muted); }
#tab-productorgs .table-scroll { max-height: 70vh; overflow: auto; }
#tab-productorgs .simple-table thead th { position: sticky; top: 0; z-index: 3; background: var(--surface); box-shadow: 0 1px 0 var(--border); white-space: nowrap; }
#tab-productorgs .po-sheet { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
#tab-productorgs .po-sheet-link { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
#tab-productorgs .po-sheet-link:hover { text-decoration: underline; }
#tab-productorgs .po-sheet-status { font-size: 13px; color: var(--ink-muted); }
#tab-productorgs .po-sheet-status.error { color: #b42318; }

/* =====================================================================
   Navigasi mobile (≤860px)
   Desktop tetap: rail vertikal (bisa dilipat). Mobile: rail berubah jadi
   drawer geser dari kiri + tombol hamburger di bilah atas yang menempel,
   jadi menu tetap terjangkau tanpa memakan ruang layar.
   ===================================================================== */
.rail-close { display: none; }
.nav-scrim { display: none; }
.cl-mini { display: none; }
body.nav-locked { overflow: hidden; }

/* Identitas akun di kaki rail — hanya di drawer mobile (di desktop sudah ada di bilah atas) */
.rail-foot {
  display: none;
  margin-top: auto;
  flex-direction: column; gap: 2px;
  padding: var(--space-3) var(--space-2) 0;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--ink-muted); min-width: 0;
}
.rail-foot[hidden] { display: none; }
.rail-foot-label { font-size: 11.5px; }
.rail-foot strong { font-size: 12.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-logout {
  margin-top: var(--space-2); min-height: 34px; width: 100%;
  border: 1px solid var(--border); border-radius: var(--radius-nav);
  background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.rail-logout:hover { background: var(--bg); }

@media (max-width: 520px) {
  /* tombol salin tautan jadi ikon saja supaya bilah atas tidak sesak */
  .cl-full { display: none; }
  .cl-mini { display: inline; }
}

@media (max-width: 860px) {
  /* ---- bilah atas: hamburger + judul halaman, menempel saat di-scroll ---- */
  .crumb-topbar {
    position: sticky; top: 0; z-index: 40;
    padding: 8px 12px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
    gap: 10px; min-height: 0;
  }
  .rail-toggle {
    display: inline-flex; width: 40px; height: 40px; margin-right: 0;
    border-radius: 10px; color: var(--ink); background: var(--surface);
  }
  .crumb-topbar .breadcrumb {
    font-size: 12.5px; min-width: 0; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
  }
  .crumb-topbar .breadcrumb strong { font-size: 14px; }
  .crumb-app, .crumb-sep { display: none; }
  .topbar-right { gap: 6px; flex-wrap: nowrap; }
  #whoami { display: none; } /* identitas + Keluar tampil di dalam drawer */
  .copy-link-btn { padding: 9px 11px; font-size: 13px; }

  /* ---- rail: drawer geser ---- */
  .rail {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: min(84vw, 320px);
    height: 100vh; height: 100dvh;
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    flex-direction: column; align-items: stretch; gap: 10px;
    overflow: hidden; overscroll-behavior: contain;
    border-right: 1px solid var(--border); border-bottom: none;
    background: var(--surface);
    box-shadow: 0 24px 60px -24px rgba(15, 23, 42, .5);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform .26s cubic-bezier(.33, .8, .2, 1), visibility .26s;
    z-index: 60;
  }
  /* jaga-jaga: state "rail dilipat" dari desktop tidak boleh ikut menyusutkan drawer */
  .shell.rail-collapsed .rail {
    width: min(84vw, 320px);
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    border-right-width: 1px; overflow: hidden;
  }
  .shell.nav-open .rail { transform: none; visibility: visible; }

  .rail-close {
    display: inline-flex; position: absolute; top: 12px; right: 10px;
    align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 10px;
    color: var(--ink-muted); cursor: pointer;
  }
  .rail-close:hover { background: var(--bg); color: var(--ink); }

  .rail-brand { padding: 4px 6px 10px; gap: 10px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
  .brand-text strong { font-size: 15px; }
  .brand-text span { display: block; font-size: 12px; }

  /* menu: satu kolom, target sentuh minimal 44px; hanya daftar ini yang men-scroll,
     brand di atas dan identitas akun di bawah tetap terlihat */
  .rail-nav {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    flex-direction: column; gap: 2px; margin: 0 -2px; padding: 0 2px;
  }
  .rail-link {
    display: flex; align-items: center;
    min-height: 44px; padding: 0 12px;
    font-size: 14px; border-radius: 10px;
    white-space: nowrap; text-overflow: ellipsis;
  }
  .rail-link.active { box-shadow: inset 3px 0 0 var(--accent); }

  .rail-foot { display: flex; flex: 0 0 auto; padding: 12px 6px 0; }
  .rail-logout { min-height: 42px; font-size: 13px; }

  /* lapisan gelap di belakang drawer */
  .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(15, 23, 42, .42);
    -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px);
    opacity: 0; pointer-events: none; transition: opacity .22s ease-out;
  }
  .shell.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
}
