/* =========================================================
   SINTA-PU — Design System (Sistem Informasi Pengadaan Terpadu)
   Lightweight, dependency-free UI
   ========================================================= */

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-3: #f0f2f6;
  --border: #e7e9ef;
  --border-strong: #d7dbe4;
  --text: #14181f;
  --text-2: #4b5566;
  --muted: #7d8798;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0ff;
  --accent-contrast: #ffffff;

  --tone-indigo: #4f46e5;
  --tone-indigo-bg: #eef0ff;
  --tone-emerald: #0b8a5d;
  --tone-emerald-bg: #e5f7ef;
  --tone-amber: #a9660b;
  --tone-amber-bg: #fcf2df;
  --tone-sky: #0369a1;
  --tone-sky-bg: #e8f3fc;
  --tone-rose: #c93b3b;
  --tone-rose-bg: #fceded;
  --tone-violet: #7c3aed;
  --tone-violet-bg: #f3edff;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .05), 0 1px 2px rgba(16, 24, 40, .03);
  --shadow-md: 0 12px 32px -16px rgba(16, 24, 40, .22);
  --shadow-lg: 0 24px 64px -20px rgba(16, 24, 40, .28);

  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 252px;
  --sidebar-w-collapsed: 82px;
  --topbar-h: 64px;
  --ring: 0 0 0 3px rgba(79, 70, 229, .16);
}

[data-theme="dark"] {
  --bg: #0c0e12;
  --surface: #12151b;
  --surface-2: #171b22;
  --surface-3: #1d222b;
  --border: #232833;
  --border-strong: #2f3643;
  --text: #e9ecf1;
  --text-2: #adb6c4;
  --muted: #828c9c;

  --accent: #7c7cf8;
  --accent-hover: #8f8fff;
  --accent-soft: rgba(124, 124, 248, .14);
  --accent-contrast: #0b0d12;

  --tone-indigo: #a6a6ff;
  --tone-indigo-bg: rgba(124, 124, 248, .14);
  --tone-emerald: #4fdc9f;
  --tone-emerald-bg: rgba(16, 185, 129, .12);
  --tone-amber: #f0c46a;
  --tone-amber-bg: rgba(245, 158, 11, .12);
  --tone-sky: #7ec8f6;
  --tone-sky-bg: rgba(56, 189, 248, .12);
  --tone-rose: #f29393;
  --tone-rose-bg: rgba(244, 63, 94, .12);
  --tone-violet: #c4a5ff;
  --tone-violet-bg: rgba(139, 92, 246, .14);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .24);
  --shadow-md: 0 16px 40px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 28px 70px -20px rgba(0, 0, 0, .8);
  --ring: 0 0 0 3px rgba(124, 124, 248, .22);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(79, 70, 229, .055), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[data-theme="dark"] body {
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(124, 124, 248, .09), transparent 70%),
    var(--bg);
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

::selection { background: var(--accent-soft); color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border: 2px solid transparent; background-clip: content-box; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.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;
}
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ---------- Shell ---------- */
.app { display: flex; min-height: 100vh; }
.main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.view {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px 28px 52px;
  flex: 1;
}
.page { animation: pageIn .3s cubic-bezier(.2, .8, .2, 1) both; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: var(--sidebar-w);
  height: 100vh;
  flex: none;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transition: width .24s cubic-bezier(.2, .8, .2, 1), transform .24s cubic-bezier(.2, .8, .2, 1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 8px 20px;
  border-radius: 10px;
  overflow: hidden;
}
.brand-mark {
  width: 37px;
  height: 37px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #6366f1, #4338ca);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(79, 70, 229, .55);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
.brand-text strong { font-size: 15px; font-weight: 650; letter-spacing: -.02em; }
.brand-text small { font-size: 10.5px; color: var(--muted); letter-spacing: .02em; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 22px; overflow-y: auto; overflow-x: hidden; padding: 2px 2px 8px; flex: 1; }
.nav-group { display: flex; flex-direction: column; gap: 3px; }
.nav-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 10px 8px;
  white-space: nowrap;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background .15s ease, color .15s ease;
}
.nav-item .icon { width: 17.5px; height: 17.5px; color: var(--muted); transition: color .15s ease; }
.nav-item span { white-space: nowrap; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item:hover .icon { color: var(--text-2); }
.nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.nav-item.is-active .icon { color: var(--accent); }
.nav-item.is-active::after {
  content: "";
  position: absolute;
  right: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.nav-badge {
  margin-left: auto;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 17px;
  min-width: 19px;
  padding: 0 5px;
  text-align: center;
  border-radius: 6px;
  color: var(--tone-indigo);
  background: var(--tone-indigo-bg);
}
.nav-item.is-active .nav-badge { background: var(--surface); }
.nav-item.nav-parent::after { display: none; }
.nav-parent-wrap { display: flex; flex-direction: column; }
.nav-parent-row { position: relative; display: flex; }
.nav-parent-row .nav-item { padding-right: 38px; }
.nav-sub-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.nav-sub-toggle:hover { color: var(--text); background: var(--surface-3); }
.nav-sub-toggle .icon {
  width: 13px;
  height: 13px;
  transition: transform .18s ease;
}
.nav-sub-toggle.is-open .icon { transform: rotate(180deg); }
.nav-item.is-active + .nav-sub-toggle { color: var(--accent); }
.nav-sub {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 3px 0 4px 17px;
  padding-left: 15px;
  border-left: 1px solid var(--border);
}
.nav-sub[hidden] { display: none; }
.nav-subitem {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  transition: background .15s ease, color .15s ease;
}
.nav-subitem:hover { color: var(--text); background: var(--surface-3); }
.nav-subitem.is-active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.nav-subitem > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 6px;
}
.nav-subitem .nav-badge {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  font-weight: 650;
  line-height: 16px;
  min-width: 18px;
  padding: 0 5px;
  text-align: center;
  border-radius: 5px;
  flex: none;
  transition: background .15s ease, color .15s ease, opacity .15s ease;
}
.nav-subitem .nav-badge.is-zero {
  color: var(--muted);
  background: var(--surface-3);
  opacity: 0.8;
}
.nav-subitem:hover .nav-badge.is-zero {
  background: var(--surface-2);
  color: var(--text-2);
}
.nav-subitem.is-active .nav-badge {
  background: var(--surface);
  color: var(--accent);
}
.nav-subitem.is-active .nav-badge.is-zero {
  background: var(--surface);
  color: var(--muted);
  opacity: 0.9;
}

.sidebar-foot { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.side-card {
  position: relative;
  padding: 14px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 100% at 100% 0%, var(--accent-soft), transparent 65%),
    var(--surface-2);
  overflow: hidden;
}
.side-card-icon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-contrast);
  margin-bottom: 9px;
}
.side-card-icon .icon { width: 15px; height: 15px; }
.side-card strong { display: block; font-size: 12.5px; font-weight: 650; }
.side-card p { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin: 3px 0 10px; }
.side-card .btn { width: 100%; justify-content: center; }
.side-collapse {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.side-collapse:hover { background: var(--surface-3); color: var(--text); }
.side-collapse .icon { width: 16px; height: 16px; }

/* Collapsed */
.app.is-collapsed .sidebar { width: var(--sidebar-w-collapsed); padding-left: 12px; padding-right: 12px; }
.app.is-collapsed .brand { padding-left: 9px; padding-right: 0; }
.app.is-collapsed .brand-text,
.app.is-collapsed .nav-item span,
.app.is-collapsed .nav-badge,
.app.is-collapsed .side-card,
.app.is-collapsed .side-collapse span { display: none; }
.app.is-collapsed .nav-label { font-size: 0; padding: 0; margin: 4px 8px; height: 1px; background: var(--border); }
.app.is-collapsed .nav-item { justify-content: center; padding: 9px; }
.app.is-collapsed .nav-item.is-active::after { display: none; }
.app.is-collapsed .nav-sub,
.app.is-collapsed .nav-sub-toggle { display: none; }
.app.is-collapsed .side-collapse { justify-content: center; }
.app.is-collapsed .nav-item[data-tip]::before {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-3px);
  padding: 5px 9px;
  background: var(--text);
  color: var(--surface);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  border-radius: 7px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
  z-index: 60;
}
.app.is-collapsed .nav-item[data-tip]:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.app.is-collapsed .nav-sub { display: none; }
.app.is-collapsed .nav-sub-toggle { display: none; }

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 18, .5);
  backdrop-filter: blur(2px);
  z-index: 35;
  animation: fadeIn .2s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.topbar-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-2);
}
.topbar-title .sep { width: 13px; height: 13px; color: var(--muted); opacity: .7; }
.topbar-root { color: var(--muted); font-weight: 500; }
#topbarPage { color: var(--text); }

.topbar .menu-btn { display: none; }

.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 30vw);
  height: 36px;
  margin-left: 14px;
  margin-right: auto;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  box-shadow: var(--shadow-xs);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-2); }
.search-trigger .icon { width: 16px; height: 16px; }
.search-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-trigger kbd { margin-left: auto; }
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  line-height: 1;
  white-space: nowrap;
}

.topbar-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: var(--text-2);
  transition: background .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .icon { width: 18px; height: 18px; }

.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tone-rose);
  box-shadow: 0 0 0 2px var(--bg);
}

.popover-wrap { position: relative; }
.popover {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 55;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: popIn .16s ease both;
}
.pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
}
.pop-head strong { font-size: 13px; font-weight: 650; }
.link-btn { font-size: 11.5px; font-weight: 600; color: var(--accent); border-radius: 4px; }
.link-btn:hover { text-decoration: underline; }

.notif-list { max-height: 320px; overflow-y: auto; }
.notif-item {
  display: flex;
  gap: 10px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--border);
  transition: background .15s ease;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item:last-child { border-bottom: 0; }
.notif-item.is-unread { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.notif-icon {
  width: 30px; height: 30px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--tone-indigo-bg);
  color: var(--tone-indigo);
}
.notif-icon .icon { width: 15px; height: 15px; }
.notif-icon.tone-emerald { background: var(--tone-emerald-bg); color: var(--tone-emerald); }
.notif-icon.tone-amber { background: var(--tone-amber-bg); color: var(--tone-amber); }
.notif-body { min-width: 0; }
.notif-body strong { display: block; font-size: 12px; font-weight: 600; line-height: 1.35; }
.notif-body p { font-size: 11.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.notif-body time { display: block; font-size: 10.5px; color: var(--muted); margin-top: 4px; opacity: .85; }
.pop-foot { padding: 9px 15px; border-top: 1px solid var(--border); text-align: center; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin-left: 4px;
  padding: 3px 7px 3px 4px;
  border-radius: 10px;
  transition: background .15s ease;
}
.user-chip:hover { background: var(--surface-3); }
.user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; min-width: 0; }
.user-meta strong { font-size: 12px; font-weight: 600; white-space: nowrap; }
.user-meta small { font-size: 10.5px; color: var(--muted); }
.user-chip .chev { width: 13px; height: 13px; color: var(--muted); margin-left: 1px; }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: none;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .01em;
  background: var(--tone-indigo-bg);
  color: var(--tone-indigo);
}
.av-2 { background: var(--tone-emerald-bg); color: var(--tone-emerald); }
.av-3 { background: var(--tone-amber-bg); color: var(--tone-amber); }
.av-4 { background: var(--tone-rose-bg); color: var(--tone-rose); }
.av-5 { background: var(--tone-sky-bg); color: var(--tone-sky); }

.user-pop { width: 234px; }
.user-pop-head { padding: 13px 14px 11px; border-bottom: 1px solid var(--border); }
.user-pop-head strong { display: block; font-size: 12.5px; font-weight: 650; }
.user-pop-head small { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.pop-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  text-align: left;
}
.pop-item .icon { width: 16px; height: 16px; color: var(--muted); }
.pop-item:hover { background: var(--surface-2); color: var(--text); }
.pop-item.danger { color: var(--tone-rose); }
.pop-item.danger .icon { color: var(--tone-rose); }
.pop-item.danger:hover { background: var(--tone-rose-bg); }
.pop-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ---------- Page header ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head h1 {
  font-size: 23px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -.035em;
}
.page-head .page-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.page-head .page-sub strong { color: var(--text-2); font-weight: 600; }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}
.date-chip .icon { width: 15px; height: 15px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 15.5px; height: 15.5px; }
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 1px 2px rgba(30, 27, 120, .18), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-soft {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
  box-shadow: var(--shadow-xs);
}
.btn-soft:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-2); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-dark { background: var(--text); color: var(--surface); }
.btn-dark:hover { opacity: .88; }
.btn-danger { background: var(--tone-rose-bg); color: var(--tone-rose); }
.btn-danger:hover { background: color-mix(in srgb, var(--tone-rose) 18%, var(--surface)); }
.btn-sm { height: 28px; padding: 0 9px; font-size: 11.5px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 0;
}
.card-head.with-border { padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 14px; font-weight: 650; letter-spacing: -.015em; }
.card-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  padding: 3px 4px;
  border-radius: 5px;
  white-space: nowrap;
}
.card-link .icon { width: 13px; height: 13px; }
.card-link:hover { background: var(--accent-soft); }

/* ---------- Stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.stat {
  position: relative;
  padding: 17px 18px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.stat:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-label { font-size: 12px; font-weight: 500; color: var(--muted); }
.stat-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--tone-indigo-bg);
  color: var(--tone-indigo);
  flex: none;
}
.stat-icon .icon { width: 16px; height: 16px; }
.stat-icon.tone-emerald { background: var(--tone-emerald-bg); color: var(--tone-emerald); }
.stat-icon.tone-amber { background: var(--tone-amber-bg); color: var(--tone-amber); }
.stat-icon.tone-sky { background: var(--tone-sky-bg); color: var(--tone-sky); }
.stat-icon.tone-rose { background: var(--tone-rose-bg); color: var(--tone-rose); }
.stat-value {
  margin-top: 11px;
  font-size: 25px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.stat-value small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: -.01em; }
.stat-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  min-height: 30px;
}
.stat-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 650;
  background: var(--tone-emerald-bg);
  color: var(--tone-emerald);
  font-variant-numeric: tabular-nums;
}
.delta .icon { width: 11px; height: 11px; stroke-width: 2.4; }
.delta.down { background: var(--tone-rose-bg); color: var(--tone-rose); }
.stat-meta small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.stat-spark { width: 78px; height: 30px; flex: none; overflow: visible; opacity: .95; }

/* ---------- Dashboard layout ---------- */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(0, 1fr);
  gap: 15px;
  margin-top: 15px;
}
.dash-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Chart */
.chart-card { min-width: 0; }
.chart-card .card-head { padding-bottom: 2px; }
.chart-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.legend { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; padding: 0 20px; margin-top: 13px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); font-weight: 500; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.legend-dot.emerald { background: var(--tone-emerald); }
.legend-dot.amber { background: var(--tone-amber); }
.legend-dot.sky { background: var(--tone-sky); }
.legend-dot.violet { background: var(--tone-violet); }

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: var(--surface-3);
}
.segmented button {
  height: 25px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--muted);
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.segmented button:hover { color: var(--text-2); }
.segmented button.is-active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .1);
}
[data-theme="dark"] .segmented button.is-active { background: var(--border-strong); color: var(--text); }

.chart-wrap { position: relative; padding: 8px 12px 4px 8px; touch-action: pan-y; }
.chart-wrap svg { width: 100%; display: block; overflow: visible; }
.chart-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--text);
  color: var(--surface);
  font-size: 11px;
  line-height: 1.45;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%);
  transition: opacity .1s ease;
}
.chart-tooltip.is-visible { opacity: 1; }
.chart-tooltip strong { display: block; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.chart-tooltip span { display: block; opacity: .65; font-size: 10.5px; margin-bottom: 1px; }

.chart-axis { display: flex; justify-content: space-between; padding: 3px 20px 16px; font-size: 10.5px; color: var(--muted); }
.chart-empty { padding: 40px; text-align: center; color: var(--muted); font-size: 12px; }

/* Donut */
.donut-card .card-head { padding-bottom: 0; }
.donut-wrap { position: relative; width: 176px; max-width: 100%; margin: 12px auto 4px; }
.donut-wrap svg { width: 100%; height: auto; }
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  line-height: 1.2;
}
.donut-center strong { font-size: 23px; font-weight: 650; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.donut-center span { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.donut-legend { padding: 4px 20px 18px; display: flex; flex-direction: column; }
.donut-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12px; }
.donut-row .legend-dot { width: 8px; height: 8px; }
.donut-row .donut-name { color: var(--text-2); }
.donut-row .donut-pct { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.donut-row .donut-count { color: var(--muted); font-size: 10.5px; width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

/* Product list */
.product-list { padding: 6px 20px 12px; }
.product-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.product-row:last-child { border-bottom: 0; padding-bottom: 4px; }
.product-thumb {
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
  background: var(--tone-indigo-bg);
  color: var(--tone-indigo);
}
.product-thumb.thumb-1 { background: var(--tone-amber-bg); color: var(--tone-amber); }
.product-thumb.thumb-2 { background: var(--tone-emerald-bg); color: var(--tone-emerald); }
.product-thumb.thumb-3 { background: var(--tone-sky-bg); color: var(--tone-sky); }
.product-main { min-width: 0; flex: 1; }
.product-main strong { display: block; font-size: 12px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-main span { font-size: 10.5px; color: var(--muted); }
.product-sales { text-align: right; flex: none; }
.product-sales strong { display: block; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.product-sales span { font-size: 10.5px; color: var(--muted); }

/* ---------- Tables ---------- */
.table-card { overflow: hidden; }
.penyedia-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  overflow-x: auto;
  scrollbar-width: thin;
}
.penyedia-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 550;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.penyedia-tab:hover { color: var(--text); background: var(--surface-3); }
.penyedia-tab.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.penyedia-tab .icon { width: 15px; height: 15px; }
.penyedia-tab-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.penyedia-tab.is-active .penyedia-tab-count { background: var(--accent-soft); color: var(--accent); }
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}
.table-toolbar .input, .table-toolbar .select {
  height: 32px;
  font-size: 12px;
  border-radius: 7px;
}
.table-toolbar .field .input { padding-left: 29px; }
.table-toolbar .field > .icon { left: 9px; width: 14px; height: 14px; }
.field { position: relative; display: flex; align-items: center; }
.field > .icon {
  position: absolute;
  left: 10px;
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}
.input, .select {
  height: 35px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  padding: 0 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.input::placeholder { color: var(--muted); opacity: .9; }
.input:hover, .select:hover { border-color: var(--border-strong); }
.input:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.field .input { padding-left: 31px; }
.field-search { width: 250px; max-width: 100%; }
.select-wrap { position: relative; display: inline-flex; }
.select-wrap .select { appearance: none; padding-right: 29px; cursor: pointer; min-width: 126px; }
.select-wrap > .icon {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: var(--muted);
  pointer-events: none;
}
.toolbar-count { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; padding-left: 4px; }
.penyedia-single-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}
.penyedia-single-note .icon { width: 13px; height: 13px; color: var(--tone-indigo); }
.table-wrap { width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 12px; }
table.data th {
  padding: 6px 10px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  vertical-align: middle;
}
table.data th.num, table.data td.num { text-align: right; }
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--text-2); }
.sort-ind { display: inline-flex; vertical-align: -2px; margin-left: 3px; color: var(--accent); }
.sort-ind .icon { width: 12px; height: 12px; stroke-width: 2; }
.sort-ind.idle { color: var(--border-strong); }
table.data td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.3;
}
table.data tbody tr { transition: background .12s ease; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr.clickable:hover { background: var(--surface-2); }
table.data td .strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; }
table.data td .sub { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; line-height: 1.2; }
table.data th.actions, table.data td.actions { text-align: right; width: 86px; padding: 5px 8px; }
table.data td.cell-wrap { min-width: 220px; white-space: normal; line-height: 1.32; }
.cell-id { font-size: 11.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.25; }
.cell-id .sub { font-weight: 400; line-height: 1.2; }
.code-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.25;
}
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.row-action {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.row-action:hover { background: var(--surface-3); color: var(--text); }
.row-action.danger:hover { background: var(--tone-rose-bg); color: var(--tone-rose); }
.row-action .icon { width: 14px; height: 14px; }
.row-actions .btn-sm {
  height: 28px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.kop-preview { display: inline-flex; padding: 0; border: 0; background: none; cursor: pointer; }
.kop-preview img {
  width: 54px;
  height: 32px;
  object-fit: contain;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.kop-preview:hover img { border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.kop-empty { font-size: 10.5px; color: var(--muted); }

.person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.person .avatar { width: 28px; height: 28px; border-radius: 8px; font-size: 9.5px; }
.person-meta { min-width: 0; line-height: 1.3; }
.person-meta strong { display: block; font-size: 12px; font-weight: 550; color: var(--text); max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.person-meta span { display: block; font-size: 10.5px; color: var(--muted); max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.entity { display: flex; align-items: center; gap: 9px; min-width: 0; }
.entity .product-thumb { width: 30px; height: 30px; border-radius: 8px; font-size: 9.5px; }
.entity-meta { min-width: 0; line-height: 1.3; }
.entity-meta strong { display: block; font-size: 12px; font-weight: 550; color: var(--text); max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.entity-meta span { display: block; font-size: 10.5px; color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Master data: Data Pegawai ---------- */
.av-1 { background: var(--tone-indigo-bg); color: var(--tone-indigo); }
.pegawai-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pegawai-avatar {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-3);
}
span.pegawai-avatar {
  display: grid;
  place-items: center;
  border: 0;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .02em;
}
.pegawai-meta { min-width: 0; line-height: 1.3; }
.pegawai-meta strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pegawai-meta span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pegawai-empty { font-size: 11px; color: var(--muted); }

.pegawai-photo-field {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.pegawai-photo-preview {
  width: 84px;
  height: 84px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--tone-indigo-bg);
  color: var(--tone-indigo);
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--border);
}
.pegawai-photo-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.pegawai-photo-preview span { font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.pegawai-photo-actions { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pegawai-photo-buttons { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pegawai-photo-actions .hint { font-size: 10.5px; color: var(--muted); line-height: 1.45; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--text-2);
}
.badge::before { content: ""; width: 4.5px; height: 4.5px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge-green { background: var(--tone-emerald-bg); color: var(--tone-emerald); }
.badge-blue { background: var(--tone-sky-bg); color: var(--tone-sky); }
.badge-violet { background: var(--tone-indigo-bg); color: var(--tone-indigo); }
.badge-amber { background: var(--tone-amber-bg); color: var(--tone-amber); }
.badge-red { background: var(--tone-rose-bg); color: var(--tone-rose); }
.badge-gray { background: var(--surface-3); color: var(--muted); }

.empty-state { padding: 46px 20px; text-align: center; }
.empty-state .icon { width: 34px; height: 34px; color: var(--muted); margin: 0 auto 10px; opacity: .55; }
.empty-state strong { display: block; font-size: 13px; font-weight: 600; }
.empty-state p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.empty-state .btn { margin-top: 14px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
}
.pager-info { font-size: 11.5px; color: var(--muted); }
.pager-info strong { color: var(--text-2); font-weight: 600; }
.pager-btns { display: flex; align-items: center; gap: 3px; }
.page-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--text-2);
  display: inline-grid;
  place-items: center;
  transition: background .15s ease, color .15s ease;
}
.page-btn .icon { width: 13px; height: 13px; }
.page-btn:hover:not([disabled]):not(.is-active) { background: var(--surface-3); color: var(--text); }
.page-btn.is-active { background: var(--accent); color: var(--accent-contrast); font-weight: 650; }
.page-btn[disabled] { opacity: .35; cursor: not-allowed; }
.pager-ellipsis { padding: 0 3px; color: var(--muted); font-size: 11px; }

/* ---------- Quick stats ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}
@media (min-width: 1241px) {
  .quick-grid.quick-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .quick-grid.quick-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-grid.quick-grid-7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quick-grid.quick-grid-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quick-grid.quick-grid-9 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-grid.quick-grid-10 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.quick-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow-xs);
}
.quick-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--tone-indigo-bg);
  color: var(--tone-indigo);
  flex: none;
}
.quick-icon .icon { width: 17px; height: 17px; }
.quick-icon.tone-emerald { background: var(--tone-emerald-bg); color: var(--tone-emerald); }
.quick-icon.tone-amber { background: var(--tone-amber-bg); color: var(--tone-amber); }
.quick-icon.tone-sky { background: var(--tone-sky-bg); color: var(--tone-sky); }
.quick-icon.tone-rose { background: var(--tone-rose-bg); color: var(--tone-rose); }
.quick-icon.tone-violet { background: var(--tone-violet-bg); color: var(--tone-violet); }
.quick-meta { min-width: 0; }
.quick-meta span { display: block; font-size: 10.5px; color: var(--muted); }
.quick-meta strong { display: block; font-size: 16px; font-weight: 650; letter-spacing: -.02em; margin-top: 1px; font-variant-numeric: tabular-nums; }
.quick-meta strong small { font-size: 11px; color: var(--muted); font-weight: 500; }

/* ---------- Procurement module hub ---------- */
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 176px;
  padding: 19px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.module-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.module-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.module-icon .icon { width: 18px; height: 18px; }
.module-icon.tone-emerald { background: var(--tone-emerald-bg); color: var(--tone-emerald); }
.module-icon.tone-amber { background: var(--tone-amber-bg); color: var(--tone-amber); }
.module-icon.tone-sky { background: var(--tone-sky-bg); color: var(--tone-sky); }
.module-icon.tone-rose { background: var(--tone-rose-bg); color: var(--tone-rose); }
.module-icon.tone-violet { background: var(--tone-indigo-bg); color: var(--tone-indigo); }
.module-card strong { display: block; margin-top: 15px; font-size: 13.5px; font-weight: 650; letter-spacing: -.015em; }
.module-card p { margin: 4px 0 15px; color: var(--muted); font-size: 11.5px; line-height: 1.5; max-width: 290px; }
.module-card .module-count {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}
.module-card .module-count.has-data { background: var(--accent-soft); color: var(--accent); }
.module-card .module-arrow {
  position: absolute;
  top: 20px;
  right: 18px;
  width: 16px;
  height: 16px;
  color: var(--border-strong);
  transition: color .16s ease, transform .16s ease;
}
.module-card:hover .module-arrow { color: var(--accent); transform: translateX(2px); }

.module-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 54px 24px 50px;
}
.module-empty-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}
.module-empty-icon .icon { width: 24px; height: 24px; }
.module-empty-icon.tone-emerald { background: var(--tone-emerald-bg); color: var(--tone-emerald); }
.module-empty-icon.tone-amber { background: var(--tone-amber-bg); color: var(--tone-amber); }
.module-empty-icon.tone-sky { background: var(--tone-sky-bg); color: var(--tone-sky); }
.module-empty-icon.tone-rose { background: var(--tone-rose-bg); color: var(--tone-rose); }
.module-empty-icon.tone-violet { background: var(--tone-indigo-bg); color: var(--tone-indigo); }
.module-empty h2 { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.module-empty .badge + h2 { margin-top: 10px; }
.module-empty p { max-width: 440px; margin-top: 6px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.module-empty .btn { margin-top: 17px; }
.module-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 17px; }
.module-empty-actions .btn { margin-top: 0; }

/* ---------- DIPA & RKAKL ---------- */
.dipa-list { display: flex; flex-direction: column; gap: 15px; }
.dipa-card { overflow: hidden; }
.dipa-card .card-head { align-items: center; }
.dipa-card .card-title { font-size: 15px; }
.dipa-card .card-head .page-actions { flex-wrap: wrap; justify-content: flex-end; }
.dipa-empty { padding: 30px 20px 32px; }
.dipa-empty > .icon { width: 20px; height: 20px; color: var(--muted); margin-bottom: 10px; }
.dipa-empty strong { display: block; font-size: 13px; }
.dipa-empty p { margin-top: 4px; }
.dipa-empty .btn { margin-top: 13px; }
.module-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 17px; }
.module-tags span {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 500;
}

/* ---------- Analytics ---------- */
.analytics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-top: 15px; }
.span-2 { grid-column: span 2; }

.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 214px; padding: 8px 20px 0; position: relative; }
.bar-chart::before {
  content: "";
  position: absolute;
  inset: 8px 20px 26px;
  background-image: linear-gradient(to top, var(--border) 1px, transparent 1px);
  background-size: 100% 25%;
  opacity: .6;
  pointer-events: none;
}
.bar-col {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  cursor: default;
}
.bar-fill {
  width: 100%;
  max-width: 34px;
  min-height: 4px;
  border-radius: 5px 5px 2px 2px;
  background: color-mix(in srgb, var(--accent) 28%, var(--surface));
  transition: background .15s ease, transform .15s ease, height .4s cubic-bezier(.2, .8, .2, 1);
  transform-origin: bottom;
  position: relative;
  z-index: 1;
}
.bar-col:hover .bar-fill { background: var(--accent); }
.bar-col.is-peak .bar-fill { background: var(--accent); opacity: .85; }
.bar-col.is-peak:hover .bar-fill { background: var(--accent-hover); opacity: 1; }
.bar-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  padding: 5px 8px;
  background: var(--text);
  color: var(--surface);
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 4;
}
.bar-col:hover .bar-tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.bar-label { position: absolute; bottom: -20px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.bar-chart-wrap { padding-bottom: 30px; }

.source-list { padding: 12px 20px 18px; display: flex; flex-direction: column; gap: 13px; }
.source-row { display: flex; flex-direction: column; gap: 6px; }
.source-top { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.source-top .legend-dot { width: 7px; height: 7px; }
.source-top span { color: var(--text-2); }
.source-top strong { margin-left: auto; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.source-top small { color: var(--muted); font-size: 10.5px; width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; background: var(--tone-indigo); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.meter-fill.emerald { background: var(--tone-emerald); }
.meter-fill.amber { background: var(--tone-amber); }
.meter-fill.sky { background: var(--tone-sky); }
.meter-fill.violet { background: var(--tone-violet); }
.meter-fill.muted { background: var(--muted); }

.funnel { padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 7px; }
.funnel-step { display: flex; flex-direction: column; gap: 4px; }
.funnel-bar {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
  min-width: 76px;
  margin: 0 auto;
  transition: filter .15s ease;
}
.funnel-bar span { color: var(--tone-indigo); opacity: .75; font-weight: 500; font-variant-numeric: tabular-nums; }
.funnel-step:hover .funnel-bar { filter: saturate(1.25); }
.funnel-step:nth-child(2) .funnel-bar { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); }
.funnel-step:nth-child(3) .funnel-bar { background: color-mix(in srgb, var(--accent) 19%, var(--surface)); }
.funnel-step:nth-child(4) .funnel-bar { background: color-mix(in srgb, var(--accent) 27%, var(--surface)); }
.funnel-step:nth-child(5) .funnel-bar { background: var(--accent); color: var(--accent-contrast); }
.funnel-step:nth-child(5) .funnel-bar span { color: var(--accent-contrast); opacity: .8; }

.cat-list { padding: 10px 20px 18px; display: flex; flex-direction: column; gap: 11px; }
.cat-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.cat-rank {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  flex: none;
}
.cat-name { color: var(--text-2); width: 88px; flex: none; }
.cat-meter { flex: 1; }
.cat-val { width: 34px; text-align: right; font-size: 11px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- Settings ---------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 15px; align-items: start; }
.settings-col { display: flex; flex-direction: column; gap: 15px; }
.form-card .card-head { padding-bottom: 15px; }
.form-body { padding: 18px 20px 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.form-row.full { grid-column: 1 / -1; }
.form-row label { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.form-row .hint { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.form-row .input, .form-row .select { height: 37px; font-size: 12.5px; }
.form-row textarea.input { height: auto; min-height: 74px; padding: 9px 10px; resize: vertical; line-height: 1.5; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ---------- Upload KOP/header surat ---------- */
.kop-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 17px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.kop-drop:hover { border-color: var(--accent); background: var(--surface-3); }
.kop-drop:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.kop-drop-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--tone-indigo-bg);
  color: var(--tone-indigo);
  margin-bottom: 2px;
}
.kop-drop-icon .icon { width: 16px; height: 16px; }
.kop-drop strong { font-size: 12px; font-weight: 600; color: var(--text); }
.kop-drop .hint { font-size: 10.5px; color: var(--muted); }
.kop-preview-box {
  margin-top: 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.kop-preview-box img {
  display: block;
  width: 100%;
  max-height: 190px;
  object-fit: contain;
  padding: 8px;
  background: #fff;
}
.kop-preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-top: 1px solid var(--border);
}
.kop-preview-meta span {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kop-preview-meta .btn { flex: none; }
.kop-full {
  max-height: 62vh;
  overflow: auto;
  padding: 10px;
  border-radius: 10px;
  background: var(--surface-2);
  text-align: center;
}
.kop-full img {
  max-width: 100%;
  height: auto;
  padding: 8px;
  border-radius: 7px;
  background: #fff;
}
.kop-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  font-size: 11px;
  color: var(--muted);
}
.kop-meta .icon { width: 13px; height: 13px; flex: none; }
.file-preview-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.file-preview-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  background: var(--tone-violet-bg);
  color: var(--tone-violet);
}
.file-preview-icon .icon { width: 18px; height: 18px; }
.file-preview-meta { min-width: 0; flex: 1; }
.file-preview-meta strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-preview-meta span { display: block; margin-top: 1px; font-size: 10.5px; color: var(--muted); }
.file-preview-box .btn { flex: none; }
.file-name {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.profile-top { display: flex; align-items: center; gap: 14px; padding-bottom: 17px; margin-bottom: 17px; border-bottom: 1px solid var(--border); }
.avatar-lg {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--tone-indigo-bg);
  color: var(--tone-indigo);
  font-size: 17px;
  font-weight: 650;
  flex: none;
}
.profile-top strong { display: block; font-size: 13px; font-weight: 650; }
.profile-top p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.profile-top .btn { margin-left: auto; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: 0; padding-bottom: 0; }
.setting-row:first-child { padding-top: 0; }
.setting-text strong { display: block; font-size: 12.5px; font-weight: 550; }
.setting-text p { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.4; max-width: 280px; }
.switch { position: relative; width: 36px; height: 21px; flex: none; display: inline-flex; }
.switch input {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 99px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: transform .18s cubic-bezier(.2, .8, .2, 1);
}
.switch input:checked { background: var(--accent); border-color: var(--accent); }
.switch input:checked::after { transform: translateX(15px); }
.switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.theme-choice { display: flex; gap: 8px; }
.theme-opt {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 550;
  color: var(--text-2);
  transition: border-color .15s ease, background .15s ease;
}
.theme-opt:hover { border-color: var(--border-strong); }
.theme-opt .theme-preview {
  width: 34px; height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  overflow: hidden;
  flex: none;
  background: #f4f5f8;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
}
.theme-preview i { display: block; height: 3px; border-radius: 2px; background: #c9cedb; }
.theme-preview i:first-child { width: 60%; background: #7c7cf8; }
.theme-opt[data-theme-choice="dark"] .theme-preview { background: #1a1e26; border-color: #333a47; }
.theme-opt[data-theme-choice="dark"] .theme-preview i { background: #3b4250; }
.theme-opt[data-theme-choice="dark"] .theme-preview i:first-child { background: #7c7cf8; }
.theme-opt.is-selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.theme-opt.is-selected::after {
  content: "";
  width: 14px; height: 14px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--accent-soft), inset 0 0 0 5px var(--accent);
}
.theme-opt .icon { width: 15px; height: 15px; }

/* ---------- Settings tabs & session timeout ---------- */
.settings-tabs { margin-bottom: 16px; }
.settings-tabs .penyedia-tab { flex: none; }
.settings-tabs .penyedia-tab .icon { width: 15px; height: 15px; }
.settings-empty-card { min-height: 360px; display: flex; align-items: center; justify-content: center; }
.settings-empty-card .empty-state { max-width: 460px; }

/* ---------- Hak akses ---------- */
.access-layout { display: flex; flex-direction: column; gap: 15px; }
.access-card .card-head { flex-wrap: wrap; }
.access-role-card .form-body { padding-top: 16px; }
.access-role-card .form-actions { justify-content: flex-end; }
.access-role-table { min-width: 520px; }
.access-role-table td .sub { max-width: 520px; }
.access-role-empty { min-height: 300px; }
.access-save-hint { margin-right: auto; font-size: 10.5px; color: var(--muted); line-height: 1.4; }
.access-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.access-count {
  padding: 4px 9px;
  border-radius: 99px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.access-table { min-width: 680px; }
.access-table th.access-action-col { width: 72px; padding: 7px 8px; text-align: center; }
.access-action-code { display: block; font-size: 12px; font-weight: 700; line-height: 1.1; letter-spacing: 0; color: var(--text); }
.access-action-name { display: block; margin-top: 2px; font-size: 8.5px; font-weight: 500; letter-spacing: .03em; text-transform: none; color: var(--muted); }
.access-table td { padding: 8px 16px; }
.access-action-cell { width: 72px; padding: 6px 8px !important; text-align: center; }
.access-action-cell[data-action="create"] { --access-tone: var(--tone-emerald); }
.access-action-cell[data-action="read"] { --access-tone: var(--tone-sky); }
.access-action-cell[data-action="update"] { --access-tone: var(--tone-amber); }
.access-action-cell[data-action="delete"] { --access-tone: var(--tone-rose); }
.access-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .12s ease;
}
.access-check:hover { background: var(--surface-3); }
.access-check input { width: 16px; height: 16px; accent-color: var(--access-tone, var(--accent)); cursor: pointer; }
.access-group-row td { padding: 0; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.access-group-head { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 9px 16px; }
.access-group-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; flex: none; }
.access-group-icon .icon { width: 14px; height: 14px; }
.access-group-icon.tone-indigo { background: var(--tone-indigo-bg); color: var(--tone-indigo); }
.access-group-icon.tone-violet { background: var(--tone-violet-bg); color: var(--tone-violet); }
.access-group-icon.tone-sky { background: var(--tone-sky-bg); color: var(--tone-sky); }
.access-group-icon.tone-emerald { background: var(--tone-emerald-bg); color: var(--tone-emerald); }
.access-group-icon.tone-amber { background: var(--tone-amber-bg); color: var(--tone-amber); }
.access-group-icon.tone-rose { background: var(--tone-rose-bg); color: var(--tone-rose); }
.access-group-copy { display: flex; flex-direction: column; min-width: 0; }
.access-group-copy strong { font-size: 11.5px; font-weight: 650; color: var(--text); }
.access-group-copy span { margin-top: 1px; font-size: 9.5px; color: var(--muted); }
.access-group-check { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 10.5px; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.access-group-check input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.access-module-row:hover { background: var(--surface-2); }
.access-module-cell { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.access-module-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; background: var(--surface-3); color: var(--muted); flex: none; }
.access-module-icon .icon { width: 14px; height: 14px; }
.access-module-cell > div { min-width: 0; }
.access-module-cell strong { display: block; font-size: 12px; font-weight: 600; color: var(--text); }
.access-module-cell span { display: block; margin-top: 1px; font-size: 10px; line-height: 1.35; color: var(--muted); white-space: normal; }

.session-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 15px; align-items: start; }
.session-body { padding: 18px 20px 20px; }
.session-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 99px;
  background: var(--tone-emerald-bg);
  color: var(--tone-emerald);
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}
.session-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 16%, transparent);
  animation: sessionPulse 2s ease-in-out infinite;
}
.session-state[data-status="idle"] { background: var(--tone-amber-bg); color: var(--tone-amber); }
.session-state[data-status="expired"] { background: var(--tone-rose-bg); color: var(--tone-rose); }
.session-state[data-status="expired"] i { animation: none; }
@keyframes sessionPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.8); }
}

.session-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.session-orb {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--tone-emerald-bg);
  color: var(--tone-emerald);
  flex: none;
  transition: background .2s ease, color .2s ease;
}
.session-orb .icon { width: 20px; height: 20px; }
.session-card[data-status="idle"] .session-orb { background: var(--tone-amber-bg); color: var(--tone-amber); }
.session-card[data-status="expired"] .session-orb { background: var(--tone-rose-bg); color: var(--tone-rose); }
.session-hero-copy strong { display: block; font-size: 14px; font-weight: 650; letter-spacing: -.015em; }
.session-hero-copy p { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }

.session-meter {
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}
.session-meter-head, .session-meter-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.session-meter-head span { font-size: 11.5px; color: var(--muted); }
.session-meter-head strong { font-size: 19px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.session-track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 9px 0 7px; }
#sessionProgress {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tone-emerald);
  transition: width .3s linear, background .2s ease;
}
#sessionProgress[data-status="idle"] { background: var(--tone-amber); }
#sessionProgress[data-warning="true"] { background: var(--tone-rose); }
.session-meter-foot { font-size: 10.5px; color: var(--muted); }

.session-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.session-fact { padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.session-fact span {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .045em;
  font-weight: 650;
}
.session-fact strong { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

.session-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 10px 11px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.5;
}
.session-note .icon { width: 14px; height: 14px; color: var(--accent); margin-top: 1px; flex: none; }
.session-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.session-action-hint { font-size: 10.5px; color: var(--muted); }

.session-form-fields { display: flex; flex-direction: column; gap: 15px; }
.session-save-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  font-size: 10.5px;
  color: var(--tone-emerald);
  font-weight: 600;
}
.session-save-hint .icon { width: 13px; height: 13px; }
.session-flow-card .session-flow { padding: 8px 20px 20px; }
.session-flow-step { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.session-flow-step:last-child { border-bottom: 0; padding-bottom: 0; }
.session-flow-step > span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  flex: none;
}
.session-flow-step strong { display: block; font-size: 12px; font-weight: 600; }
.session-flow-step p { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.45; }

/* =========================================================
   Modern Login & Auth Layer — SINTA PU
   ========================================================= */
/* Strict Layer Enforcements (Prevent invisible overlay freeze) */
.auth-layer:not(.is-open),
.session-layer:not(.is-open),
.drawer-layer:not(.is-open),
.modal-layer:not(.is-open),
.palette-layer:not(.is-open),
.auth-layer[hidden],
.session-layer[hidden],
.drawer-layer[hidden],
.modal-layer[hidden],
.palette-layer[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  z-index: -9999 !important;
}

.auth-layer.is-open,
.session-layer.is-open {
  display: flex !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 1000 !important;
}

.drawer-layer.is-open {
  display: block !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 70 !important;
}

.modal-layer.is-open {
  display: flex !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 75 !important;
}

.palette-layer.is-open {
  display: flex !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 80 !important;
}

.auth-layer.session-layer {
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.auth-scrim {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1100px 700px at 15% 15%, rgba(59, 130, 246, 0.22), transparent 70%),
    radial-gradient(1000px 650px at 85% 85%, rgba(99, 102, 241, 0.20), transparent 70%),
    radial-gradient(700px 500px at 50% 50%, rgba(16, 185, 129, 0.08), transparent 70%),
    rgba(10, 14, 23, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.28s ease;
  z-index: 1;
}
.auth-layer.is-open .auth-scrim {
  opacity: 1;
}

.auth-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1060px;
  margin: auto;
  display: flex;
  justify-content: center;
}

.auth-card {
  position: relative;
  width: 100%;
  min-height: 620px;
  max-height: min(94vh, 760px);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 32px 80px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-layer.is-open .auth-card {
  opacity: 1;
  transform: none;
}

[data-theme="light"] .auth-card {
  border-color: rgba(226, 232, 240, 0.85);
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* --- Hero Left Column --- */
.auth-hero {
  position: relative;
  background: linear-gradient(155deg, #09101f 0%, #111a36 45%, #0c182e 100%);
  color: #ffffff;
  padding: 38px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  user-select: none;
}

.auth-hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
}
.auth-hero-glow.glow-1 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.32) 0%, transparent 70%);
  top: -120px;
  right: -80px;
}
.auth-hero-glow.glow-2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22) 0%, transparent 70%);
  bottom: -90px;
  left: -80px;
}

.auth-hero-top {
  position: relative;
  z-index: 2;
}

.auth-gov-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: #e2e8f0;
  margin-bottom: 22px;
  backdrop-filter: blur(8px);
}

.auth-pulse-dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: authPulse 2s infinite;
}

@keyframes authPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.auth-brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.auth-logo-crest {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px -6px rgba(245, 158, 11, 0.35);
  flex: none;
}
.auth-logo-crest .icon {
  width: 32px;
  height: 32px;
}

.auth-brand-title {
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-brand-tagline {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
  line-height: 1.45;
  max-width: 320px;
}

/* Feature cards in hero */
.auth-features-list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 8px 0 20px;
}

.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}
.auth-feature-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(3px);
}

.auth-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
}
.auth-feature-icon .icon {
  width: 18px;
  height: 18px;
}
.auth-feature-icon.tone-indigo {
  background: rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
}
.auth-feature-icon.tone-emerald {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}
.auth-feature-icon.tone-sky {
  background: rgba(14, 165, 233, 0.22);
  color: #7dd3fc;
}

.auth-feature-info strong {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  color: #f8fafc;
}
.auth-feature-info p {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.45;
}

.auth-hero-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 14px;
}

.auth-secure-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #64748b;
}
.auth-secure-badge .icon {
  width: 15px;
  height: 15px;
  color: #10b981;
}

/* --- Form Right Column --- */
.auth-panel {
  padding: 34px 34px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  background: var(--surface);
  color: var(--text);
}

.auth-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.auth-mobile-logo {
  display: none;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.auth-mobile-logo .icon {
  width: 28px;
  height: 28px;
}

.auth-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.auth-header {
  margin-bottom: 16px;
}
.auth-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  display: block;
  margin-bottom: 3px;
}
.auth-title {
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 0 0 5px;
  color: var(--text);
  line-height: 1.25;
}
.auth-subtitle {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* Status Alert banner */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--tone-amber-bg);
  border: 1px solid var(--border);
  color: var(--tone-amber);
  margin-bottom: 16px;
  font-size: 12px;
}
.auth-alert[hidden] {
  display: none !important;
}
.auth-alert .icon {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 1px;
}
.auth-alert-content strong {
  display: block;
  font-weight: 650;
  line-height: 1.2;
}
.auth-alert-content p {
  margin: 2px 0 0;
  color: var(--text-2);
  line-height: 1.4;
}

/* Role Segmented Pills */
.auth-role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-3);
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.auth-role-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  font-family: inherit;
}
.auth-role-tab .icon {
  width: 15px;
  height: 15px;
}
.auth-role-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
  font-weight: 650;
}

/* Inputs & Form Groups */
.auth-group {
  margin-bottom: 13px;
}
.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 5px;
}
.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.auth-link-forgot {
  background: none;
  border: none;
  padding: 0;
  font-size: 11.5px;
  color: var(--accent);
  cursor: pointer;
  font-weight: 550;
  font-family: inherit;
}
.auth-link-forgot:hover {
  text-decoration: underline;
}

.auth-input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
  display: grid;
  place-items: center;
}
.auth-input-icon .icon {
  width: 16px;
  height: 16px;
}

.auth-input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text);
  transition: all 0.18s ease;
}
.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3.5px var(--accent-soft);
}
.auth-input.is-error {
  border-color: var(--tone-rose);
  background: var(--tone-rose-bg);
}

.auth-toggle-pass {
  position: absolute;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}
.auth-toggle-pass:hover {
  color: var(--text);
  background: var(--surface-3);
}
.auth-toggle-pass .icon {
  width: 16px;
  height: 16px;
}

.auth-options {
  margin: 12px 0 16px;
}
.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-2);
  user-select: none;
}
.auth-checkbox input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* Submit Button */
.auth-btn-submit {
  height: 44px;
  font-size: 13.5px;
  font-weight: 650;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #3730a3 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.42);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.auth-btn-submit:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 12px 26px -4px rgba(79, 70, 229, 0.55);
}
.auth-btn-submit:active {
  transform: translateY(0);
}
.auth-btn-submit .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}
.auth-btn-submit:hover .icon {
  transform: translateX(3px);
}
.auth-btn-submit.is-loading {
  opacity: 0.8;
  pointer-events: none;
}

.chip-avatar {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 750;
  flex: none;
}
.chip-avatar.is-admin {
  background: var(--tone-indigo-bg);
  color: var(--tone-indigo);
}
.chip-avatar.is-ppk {
  background: var(--tone-amber-bg);
  color: var(--tone-amber);
}
.chip-avatar.is-penyedia {
  background: var(--tone-emerald-bg);
  color: var(--tone-emerald);
}

.chip-meta strong {
  display: block;
  font-size: 11px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.2;
}
.chip-meta small {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.2;
}

/* Footer info */
.auth-panel-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.auth-foot-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.auth-foot-item .icon {
  width: 13px;
  height: 13px;
  color: #10b981;
}
.auth-foot-dot {
  color: var(--border-strong);
}

/* Responsive Styles */
@media (max-width: 920px) {
  .auth-card {
    grid-template-columns: 1fr;
    max-height: 94vh;
    min-height: auto;
    overflow-y: auto;
  }
  .auth-hero {
    display: none;
  }
  .auth-mobile-logo {
    display: flex;
  }
  .auth-panel {
    padding: 26px 22px 18px;
  }
  .auth-demo-chips {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .auth-layer.session-layer {
    padding: 12px;
  }
  .auth-card {
    border-radius: 18px;
  }
  .auth-panel {
    padding: 20px 16px 14px;
  }
  .auth-title {
    font-size: 20px;
  }
}

/* ---------- Drawer ---------- */
.drawer-layer { position: fixed; inset: 0; z-index: 70; }
.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(9, 11, 16, .48);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .22s ease;
}
.drawer-layer.is-open .drawer-scrim { opacity: 1; }
.drawer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(440px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.drawer-layer.is-open .drawer { transform: none; }
.drawer > #drawerContent { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--border);
}
.drawer-head .eyebrow { font-size: 10px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.drawer-head h2 { font-size: 16px; font-weight: 650; letter-spacing: -.02em; margin-top: 2px; }
.drawer-head p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.icon-close {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  color: var(--muted);
  flex: none;
}
.icon-close:hover { background: var(--surface-3); color: var(--text); }
.icon-close .icon { width: 16px; height: 16px; }
.drawer-body { padding: 18px 20px 24px; overflow-y: auto; flex: 1; min-height: 0; }

.order-hero {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
}
.order-hero .avatar { width: 38px; height: 38px; border-radius: 10px; font-size: 12px; }
.order-hero strong { display: block; font-size: 13px; font-weight: 600; }
.order-hero span { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.order-hero .badge { margin-left: auto; }

.detail-section { margin-top: 20px; }
.detail-section h3 {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}
.detail-list { display: flex; flex-direction: column; gap: 8px; }
.detail-row { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; }
.detail-row span { color: var(--muted); }
.detail-row strong { font-weight: 550; color: var(--text-2); text-align: right; }
.order-items { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.order-item { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-bottom: 1px solid var(--border); }
.order-item:last-child { border-bottom: 0; }
.order-thumb {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--tone-indigo-bg);
  color: var(--tone-indigo);
  font-size: 10px;
  font-weight: 700;
  flex: none;
}
.order-item-main { min-width: 0; flex: 1; }
.order-item-main strong { display: block; font-size: 11.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-item-main span { font-size: 10.5px; color: var(--muted); }
.order-item-price { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-box { padding: 12px 13px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 7px; }
.price-row { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.price-row strong { color: var(--text-2); font-weight: 550; font-variant-numeric: tabular-nums; }
.price-total { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px dashed var(--border-strong); font-size: 12px; font-weight: 600; color: var(--text); }
.price-total strong { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }

.timeline { position: relative; padding-left: 19px; display: flex; flex-direction: column; gap: 14px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 8px; width: 1px; background: var(--border); }
.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-strong);
}
.timeline-item.done::before { background: var(--accent); border-color: var(--accent); }
.timeline-item strong { display: block; font-size: 11.5px; font-weight: 550; color: var(--text-2); }
.timeline-item span { font-size: 10.5px; color: var(--muted); }

.drawer-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.drawer-foot .btn { flex: 1; }
.status-select { width: 100%; }

/* ---------- Modal ---------- */
.modal-layer { position: fixed; inset: 0; z-index: 75; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-scrim { position: absolute; inset: 0; background: rgba(9, 11, 16, .5); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s ease; }
.modal-layer.is-open .modal-scrim { opacity: 1; }
.modal {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px) scale(.98);
  transition: opacity .18s ease, transform .18s ease;
}
.modal-layer.is-open .modal { opacity: 1; transform: none; }
.modal.modal-wide { width: min(600px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 17px 20px 0; }
.modal-head h2 { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.modal-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.modal-body { padding: 16px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; }
.confirm-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4px 6px 8px;
}
.confirm-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--tone-rose-bg);
  color: var(--tone-rose);
  margin-bottom: 13px;
}
.confirm-icon .icon { width: 21px; height: 21px; }
.confirm-body strong { font-size: 13.5px; font-weight: 650; }
.confirm-body p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.55; max-width: 320px; }
.confirm-body b { color: var(--text-2); font-weight: 600; }
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.amount-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
}
.amount-preview strong { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- Data barang: import, copy, print ---------- */
.file-input { height: auto; padding: 7px 10px; }
.import-template-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
}
.import-template-row strong { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.import-template-row .hint { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.import-empty {
  margin-top: 14px;
  padding: 22px 16px;
  border: 1px dashed var(--border);
  border-radius: 11px;
  text-align: center;
  color: var(--muted);
}
.import-empty .icon { width: 24px; height: 24px; color: var(--border-strong); margin-bottom: 6px; }
.import-empty strong { display: block; font-size: 12px; color: var(--text-2); }
.import-empty p { margin-top: 3px; font-size: 11px; }
.import-preview { margin-top: 14px; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.import-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.import-preview-head strong { display: block; font-size: 11.5px; font-weight: 650; }
.import-preview-head .hint { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.import-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.import-stat { padding: 7px 8px; border-radius: 8px; background: var(--surface-2); }
.import-stat span { display: block; font-size: 9.5px; color: var(--muted); }
.import-stat strong { display: block; font-size: 13px; font-weight: 650; margin-top: 1px; font-variant-numeric: tabular-nums; }
.import-table-wrap { max-height: 230px; overflow: auto; }
.import-table-wrap table.data th, .import-table-wrap table.data td { padding: 8px 10px; font-size: 11px; }
.import-table-wrap table.data th { font-size: 9.5px; }
.import-more { padding: 8px 12px; font-size: 10.5px; color: var(--muted); border-top: 1px solid var(--border); }
.import-alert {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--tone-rose-bg);
  color: var(--tone-rose);
}
.import-alert .icon { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.import-alert strong { display: block; font-size: 11.5px; font-weight: 650; }
.import-alert p { margin-top: 2px; font-size: 11px; line-height: 1.45; }
.copy-summary {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.copy-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); }
.copy-summary-row + .copy-summary-row { margin-top: 5px; }
.copy-summary-row strong { color: var(--text-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.print-note {
  display: flex;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.print-note .icon { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.print-note strong { display: block; font-size: 11.5px; font-weight: 650; }
.print-note p { margin-top: 2px; font-size: 11px; line-height: 1.45; color: var(--text-2); }

/* ---------- Command palette ---------- */
.palette-layer { position: fixed; inset: 0; z-index: 80; padding: 11vh 16px 16px; display: flex; justify-content: center; align-items: flex-start; }
.palette-scrim { position: absolute; inset: 0; background: rgba(8, 10, 15, .5); backdrop-filter: blur(4px); animation: fadeIn .16s ease both; }
.palette {
  position: relative;
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: popIn .18s cubic-bezier(.2, .8, .2, 1) both;
}
.palette-search { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--border); }
.palette-search > .icon { width: 18px; height: 18px; color: var(--muted); flex: none; }
.palette-search input { flex: 1; min-width: 0; height: 24px; border: 0; outline: 0; background: transparent; font-size: 14px; }
.palette-search input::placeholder { color: var(--muted); }
.palette-list { max-height: min(340px, 48vh); overflow-y: auto; padding: 7px; }
.palette-group { padding: 8px 9px 4px; font-size: 9.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  text-align: left;
  cursor: pointer;
}
.palette-item .icon { width: 16px; height: 16px; color: var(--muted); }
.palette-item .palette-desc { margin-left: auto; font-size: 10.5px; color: var(--muted); padding-left: 10px; }
.palette-item:hover, .palette-item.is-active { background: var(--accent-soft); color: var(--accent); }
.palette-item:hover .icon, .palette-item.is-active .icon { color: var(--accent); }
.palette-item:hover .palette-desc, .palette-item.is-active .palette-desc { color: var(--accent); opacity: .8; }
.palette-empty { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 12px; }
.palette-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
}
.palette-foot span { display: inline-flex; align-items: center; gap: 4px; }
.palette-foot kbd { height: 17px; min-width: 17px; font-size: 9.5px; }
.palette-brand { margin-left: auto; font-weight: 600; letter-spacing: .02em; }
.palette-brand em { font-style: normal; opacity: .55; font-weight: 400; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(340px, calc(100vw - 36px)); }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .22s cubic-bezier(.2, .8, .2, 1) both;
}
.toast.is-out { animation: toastOut .2s ease both; }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px) scale(.98); } }
.toast-icon {
  width: 26px; height: 26px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--tone-emerald-bg);
  color: var(--tone-emerald);
}
.toast-icon .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.toast-icon.tone-indigo { background: var(--tone-indigo-bg); color: var(--tone-indigo); }
.toast-icon.tone-rose { background: var(--tone-rose-bg); color: var(--tone-rose); }
.toast-msg { font-size: 11.5px; line-height: 1.45; color: var(--text-2); padding-top: 1px; }
.toast-msg strong { display: block; font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 1px; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--border); }
.tone-emerald { color: var(--tone-emerald) !important; }
.tone-rose { color: var(--tone-rose) !important; }

/* ---------- Print document ---------- */
.print-root { display: none; }
.print-doc {
  background: #fff;
  color: #111827;
  font-family: "Segoe UI", Arial, sans-serif;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.print-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid #312e81;
}
.print-brand { display: flex; align-items: center; gap: 10px; }
.print-brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #312e81;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}
.print-brand strong { display: block; font-size: 14px; letter-spacing: -.02em; }
.print-brand span { display: block; font-size: 9.5px; color: #64748b; margin-top: 1px; }
.print-title { text-align: right; }
.print-title h1 { font-size: 23px; line-height: 1.1; font-weight: 700; letter-spacing: -.035em; }
.print-title p { margin-top: 3px; font-size: 11px; color: #64748b; font-weight: 600; }
.print-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 13px 0 12px;
  font-size: 9.5px;
  color: #64748b;
}
.print-summary { display: flex; gap: 10px; margin-bottom: 15px; }
.print-summary-card {
  min-width: 150px;
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.print-summary-card span { display: block; font-size: 9px; color: #64748b; text-transform: uppercase; letter-spacing: .05em; }
.print-summary-card strong { display: block; margin-top: 2px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.print-table { width: 100%; border-collapse: collapse; }
.print-table th {
  padding: 8px 9px;
  background: #312e81;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.print-table td {
  padding: 7px 9px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 10.5px;
  color: #334155;
  vertical-align: top;
}
.print-table tbody tr:nth-child(even) { background: #f8fafc; }
.print-table tbody tr:last-child td { border-bottom: 1px solid #cbd5e1; }
.print-table td strong { color: #111827; font-weight: 600; }
.print-table th.num, .print-table td.num { text-align: right; }
.print-table tfoot td {
  padding-top: 9px;
  border-bottom: 0;
  border-top: 2px solid #312e81;
  color: #111827;
  font-size: 10.5px;
  font-weight: 700;
}
.print-foot {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
  font-size: 8.5px;
  color: #94a3b8;
}

/* ---------- Pengadaan Barang: print preview & documents ---------- */
.modal.modal-print-pengadaan {
  width: min(1360px, 100%);
  height: min(900px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-print-pengadaan .modal-head {
  flex: none;
  padding: 18px 22px 13px;
  border-bottom: 1px solid var(--border);
}
.pengadaan-print-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}
.pengadaan-print-aside {
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
}
.pengadaan-print-kicker {
  padding: 0 4px 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pengadaan-print-formats { display: flex; flex-direction: column; gap: 5px; }
.pengadaan-print-format {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pengadaan-print-format:hover { background: var(--surface-3); color: var(--text); }
.pengadaan-print-format.is-active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--accent);
}
.pengadaan-print-format-icon {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
}
.pengadaan-print-format.is-active .pengadaan-print-format-icon {
  background: var(--surface);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 26%, transparent);
}
.pengadaan-print-format-icon .icon { width: 15px; height: 15px; }
.pengadaan-print-format strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}
.pengadaan-print-format small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.3;
}
.pengadaan-print-format.is-active small { color: color-mix(in srgb, var(--accent) 70%, var(--text)); }
.pengadaan-print-format-arrow { width: 14px; height: 14px; flex: none; margin-left: auto; opacity: .35; }
.pengadaan-print-summary {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.pengadaan-print-summary-head { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.pengadaan-print-summary > strong { display: block; color: var(--text); font-size: 11.5px; line-height: 1.4; }
.pengadaan-print-summary-number {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
  word-break: break-word;
}
.pengadaan-print-summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9.5px;
}
.pengadaan-print-summary-row b { color: var(--text-2); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.pengadaan-print-warning {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  padding: 9px;
  border-radius: 9px;
  background: var(--tone-amber-bg);
  color: var(--tone-amber);
  font-size: 9.5px;
  line-height: 1.4;
}
.pengadaan-print-warning .icon { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.pengadaan-print-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pengadaan-print-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.pengadaan-print-toolbar > div { min-width: 0; }
.pengadaan-print-toolbar strong { display: block; color: var(--text); font-size: 12px; font-weight: 650; line-height: 1.3; }
.pengadaan-print-toolbar span:not(.badge) { display: block; color: var(--muted); font-size: 10px; line-height: 1.3; margin-top: 1px; }
.pengadaan-print-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 16px;
  background: #dfe3ea;
}
[data-theme="dark"] .pengadaan-print-stage { background: #171b23; }
.pengadaan-preview-scaler { position: relative; flex: none; margin: 0 auto; }
#pengadaanPrintPaper { width: 210mm; }
.pengadaan-print-foot,
.modal-foot-print {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.pengadaan-print-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  max-width: 440px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.pengadaan-print-hint .icon { width: 14px; height: 14px; flex: none; }
.pengadaan-print-foot .btn,
.modal-foot-print .btn { flex: none; }

/* Live input on printed document preview (SPD Romawi II) */
.spd-live-input {
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.spd-live-input:focus {
  border-color: #2563eb !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
}
.spd-live-input:hover:not(:focus) {
  border-color: #64748b !important;
  background: #f1f5f9 !important;
}
.spd-live-input::placeholder {
  color: #94a3b8;
  letter-spacing: 0.5px;
}

/* A4 document sheet */
.pdoc {
  box-sizing: border-box;
  width: 210mm;
  min-height: 297mm;
  padding: 16mm 18mm 13mm;
  background: #fff;
  color: #111827;
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 10.5pt;
  line-height: 1.45;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
}
.pdoc *, .pdoc *::before, .pdoc *::after { box-sizing: border-box; }
.pdoc-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 210mm;
}
.pdoc-stack > .pdoc { flex: none; }
.pdoc-stack > .pdoc:not(:last-child) {
  break-after: page;
  page-break-after: always;
}
.pdoc-hps-cover {
  display: flex;
  flex-direction: column;
  padding: 36px 18mm 16mm;
  break-after: page;
  page-break-after: always;
}
.pdoc-cover-kop { flex: none; }
.pdoc-vendor-kop-image { margin-bottom: 4mm; }
.pdoc-cover-kop img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 48mm;
  object-fit: contain;
}
.pdoc-cover-kop.is-text .pdoc-rule { margin-bottom: 0; }
.pdoc-cover-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 28mm;
  text-align: center;
}
.pdoc-cover-hps,
.pdoc-cover-title {
  font-size: 20pt;
  font-weight: 700;
  line-height: 1.14;
}
.pdoc-cover-number {
  margin: 0;
  font-size: 12pt;
  line-height: 1.35;
}
.pdoc-cover-paket {
  margin-top: 30mm;
  font-size: 12pt;
  line-height: 1.35;
}
.pdoc-cover-pengadaan {
  margin-top: 4px;
  font-size: 14pt;
  font-weight: 700;
  line-height: 1.28;
  overflow-wrap: anywhere;
}
.pdoc-cover-kegiatan {
  margin-top: 4px;
  margin-bottom: 10mm;
  font-size: 14pt;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.pdoc-cover-officials {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  font-size: 12pt;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.pdoc-cover-year {
  margin-top: 20px;
  margin-bottom: 10mm;
  font-size: 14pt;
  font-weight: 700;
  line-height: 1.35;
}
.pdoc-kop { text-align: center; line-height: 1.28; }
.pdoc-kop .is-ministry { font-size: 10.5pt; font-weight: 700; }
.pdoc-kop .is-balai { margin-top: 1px; font-size: 13pt; font-weight: 700; }
.pdoc-kop .is-satker { margin-top: 1px; font-size: 11.5pt; font-weight: 700; }
.pdoc-kop-address { margin-top: 2px; color: #334155; font-size: 8.5pt; }
.pdoc-rule {
  height: 3px;
  margin: 7px 0 14px;
  border-top: 2.5px solid #111827;
  border-bottom: .7px solid #111827;
}
.pdoc-vendor-kop { text-align: center; line-height: 1.35; }
.pdoc-vendor-kop strong { display: block; font-size: 13pt; font-weight: 700; text-transform: uppercase; }
.pdoc-vendor-kop span { display: block; color: #334155; font-size: 8.5pt; }

/* Standardized header top boundary (batas atas) for all print documents with letterhead */
.pdoc.pdoc-hps-cover,
.pdoc.pdoc-hps,
.pdoc.pdoc-letter-page,
.pdoc.pdoc-delivery,
.pdoc.pdoc-invoice {
  padding-top: 36px !important;
}

.pdoc-kop,
.pdoc-cover-kop,
.pdoc-vendor-kop {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.pdoc-cover-kop img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 48mm;
  object-fit: contain;
  margin-top: 0 !important;
}
.pdoc-title { margin: 4px 0 14px; text-align: center; }
.pdoc-title > span {
  color: #475569;
  font-size: 8pt;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.pdoc-title h1 {
  margin: 2px 0 4px;
  font-size: 14.5pt;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.pdoc-title-hps {
  margin: 2px 0 0;
  font-size: 14.5pt;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
  line-height: 1.25;
}
.pdoc .pdoc-title p { margin: 1px 0; font-size: 9.5pt; text-align: center; }
.pdoc-info {
  margin: 0 0 12px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.pdoc-info-row { display: grid; grid-template-columns: 130px 1fr; border-bottom: 1px solid #edf1f6; }
.pdoc-info-row:last-child { border-bottom: 0; }
.pdoc-info-row span {
  padding: 5px 8px;
  border-right: 1px solid #edf1f6;
  background: #f8fafc;
  color: #64748b;
  font-size: 8.8pt;
  font-weight: 600;
}
.pdoc-info-row strong { padding: 5px 8px; font-size: 9.2pt; font-weight: 500; }
.pdoc-table-box {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #ffffff;
}
.pdoc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8.5pt;
  margin: 0;
  background: #ffffff;
  border: none;
}
.pdoc-table thead tr {
  background-color: #0b1727;
  color: #ffffff;
}
.pdoc-table thead th {
  padding: 8px 6px;
  font-weight: 700;
  font-size: 8pt;
  letter-spacing: 0.5px;
  text-align: center;
  border: none;
  border-right: 1px solid #1e293b;
  color: #ffffff;
  background-color: #0b1727;
  vertical-align: middle;
  text-transform: uppercase;
}
.pdoc-table thead th:last-child {
  border-right: none;
}
.pdoc-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}
.pdoc-table tbody tr:last-child {
  border-bottom: none;
}
.pdoc-table tbody td {
  padding: 7px 6px;
  vertical-align: middle;
  color: #1e293b;
  border: none;
  border-right: 1px solid #e2e8f0;
  font-size: 8.5pt;
  line-height: 1.35;
  background: #ffffff;
}
.pdoc-table tbody tr:nth-child(even) td {
  background: #ffffff;
}
.pdoc-table tbody td:last-child {
  border-right: none;
}
.pdoc-table .pdoc-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pdoc-table thead th.pdoc-num {
  text-align: right;
}
.pdoc-table .pdoc-center {
  text-align: center;
}
.pdoc-table .pdoc-col-no {
  width: 38px;
}
.pdoc-table .pdoc-empty {
  padding: 16px;
  color: #64748b;
  text-align: center;
}
.pdoc-totals {
  width: 58%;
  margin: 0 0 12px auto;
  border: 1px solid #cbd5e1;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.pdoc-totals td {
  padding: 6px 9px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 8.5pt;
}
.pdoc-totals tr:last-child td { border-bottom: 0; }
.pdoc-totals tr.is-strong td {
  background: #0b1727;
  color: #ffffff;
  font-weight: 700;
}
.pdoc-totals tr.is-strong td:first-child { color: #f8fafc; }
.pdoc-totals .pdoc-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pdoc-terbilang { margin: 0 0 5px; font-size: 9pt; line-height: 1.45; text-align: justify; }
.pdoc-note { margin: 0 0 8px; color: #475569; font-size: 8.2pt; line-height: 1.45; text-align: justify; }
.pdoc-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 6px;
  border-top: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 7.5pt;
}
.pdoc-signatures {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  break-inside: avoid;
  page-break-inside: avoid;
}
.pdoc-hps .pdoc-title { margin-top: 10mm; }
.pdoc-hps .pdoc-signatures { margin-top: 48px; }
.pdoc-letter .pdoc-signatures { margin-top: calc(18px + 2.5cm); }
.pdoc-delivery .pdoc-signatures { margin-top: calc(18px + 2cm); }
.pdoc-invoice .pdoc-signatures { margin-top: calc(18px + 2cm); }
.pdoc-signatures.is-single { justify-content: flex-end; }
.pdoc-signatures.is-single .pdoc-sign { flex: 0 0 38%; }
.pdoc-letter .pdoc-sign { font-size: 10.5pt; }
.pdoc-letter .pdoc-sign strong,
.pdoc-letter .pdoc-sign-note { font-size: 10.5pt; }
.pdoc-sign { flex: 1; min-width: 0; text-align: center; font-size: 8.8pt; line-height: 1.35; }
.pdoc-sign-date { display: block; min-height: 14px; margin-bottom: 3px; font-size: 8.8pt; }
.pdoc-sign-role { display: block; min-height: 13px; }
.pdoc-sign-org { display: block; min-height: 13px; }
.pdoc-sign-space { height: 42px; }
.pdoc-hps .pdoc-sign-space { height: 74px; }
.pdoc-delivery .pdoc-sign-space { height: calc(42px + 1cm); }
.pdoc-invoice .pdoc-sign-space { height: calc(42px + 1cm); }
.pdoc-materai {
  display: block;
  width: 58px;
  height: 30px;
  margin: 4px auto 8px;
  padding-top: 4px;
  border: 1px dashed #475569;
  color: #475569;
  font-size: 6.5pt;
  line-height: 1.25;
}
.pdoc-sign strong { display: block; font-size: 9.2pt; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.pdoc-sign strong.is-indent { text-indent: 2ch; }
.pdoc-sign-note { display: block; margin-top: 2px; color: #475569; font-size: 8pt; overflow-wrap: anywhere; }
.pdoc-letter-date { margin: 0 0 12px; text-align: right; font-size: 9.5pt; }
.pdoc-letter .pdoc-cover-kop { margin-bottom: calc(8mm - 14px); }
.pdoc-letter-page { padding-top: 36px; break-after: page; page-break-after: always; }
.pdoc-break { break-before: page; page-break-before: always; }
.pdoc-letter-meta { margin: 0 0 12px; font-size: 9.5pt; border-collapse: collapse; }
.pdoc-letter-meta td { padding: 1px 0; vertical-align: top; }
.pdoc-letter-meta td:first-child { width: 65px; }
.pdoc-letter-meta td:nth-child(2) { width: 10px; }
.pdoc-recipient { margin: 0 0 12px; line-height: 1.45; }
.pdoc-recipient span, .pdoc-recipient strong { display: block; }
.pdoc-recipient span:first-child { font-size: 9.5pt; }
.pdoc p { margin: 0 0 8px; text-align: justify; }
.pdoc-tembusan { display: flex; flex-direction: column; gap: 1px; margin-top: 10px; font-size: 10.5pt; }
.pdoc-billto {
  margin-bottom: 10px;
  padding: 6px 10px;
  border-left: 3px solid #334155;
  font-size: 9pt;
}
.pdoc-billto span, .pdoc-billto strong { display: block; }
.pdoc-payment {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fafbff;
  font-size: 8.8pt;
}
.pdoc-payment > strong { display: block; margin-bottom: 4px; color: #1e1b4b; }
.pdoc-payment div { display: grid; grid-template-columns: 100px 1fr; gap: 6px; }
.pdoc-payment div span { color: #64748b; }
/* Faktur / Invoice Harmonized Typography */
.pdoc-invoice {
  font-size: 9.5pt;
  line-height: 1.45;
}
.pdoc-invoice .pdoc-title {
  margin: 4px 0 12px;
}
.pdoc-invoice .pdoc-title h1 {
  font-size: 14.5pt;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.pdoc-invoice .pdoc-title p {
  font-size: 9.5pt;
  margin: 2px 0 0;
}
.pdoc-invoice .pdoc-info {
  margin-bottom: 10px;
}
.pdoc-invoice .pdoc-info-row span,
.pdoc-invoice .pdoc-info-row strong {
  font-size: 9.5pt;
  padding: 4.5px 8px;
}
.pdoc-invoice .pdoc-table {
  margin-bottom: 0;
}
.pdoc-invoice .pdoc-totals {
  margin-bottom: 10px;
}
.pdoc-invoice .pdoc-totals td {
  font-size: 9.5pt;
  padding: 5px 9px;
}
.pdoc-invoice .pdoc-terbilang {
  font-size: 9.5pt;
  margin: 0 0 8px;
}
.pdoc-invoice .pdoc-payment {
  font-size: 9.5pt;
  margin: 8px 0 10px;
  padding: 7px 10px;
}
.pdoc-invoice .pdoc-payment > strong {
  font-size: 9.5pt;
}
.pdoc-invoice .pdoc-payment div {
  font-size: 9.5pt;
}
.pdoc-invoice .pdoc-payment div span,
.pdoc-invoice .pdoc-payment div b {
  font-size: 9.5pt;
}
.pdoc-invoice .pdoc-note {
  font-size: 9.5pt;
  margin: 0 0 8px;
}
.pdoc-invoice .pdoc-signatures {
  margin-top: calc(18px + 2cm);
}
.pdoc-invoice .pdoc-sign {
  font-size: 9.5pt;
}
.pdoc-invoice .pdoc-sign-date,
.pdoc-invoice .pdoc-sign-role,
.pdoc-invoice .pdoc-sign-org {
  font-size: 9.5pt;
}
.pdoc-invoice .pdoc-sign-space {
  height: calc(42px + 1cm);
}
.pdoc-invoice .pdoc-sign strong {
  font-size: 9.5pt;
}
.pdoc-invoice .pdoc-sign-note {
  font-size: 9.5pt;
}
.pdoc-acceptance { display: flex; flex-wrap: wrap; gap: 18px 30px; margin: 6px 0 8px; font-size: 9pt; }
.pdoc-receipt-box {
  margin: 0 0 12px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.pdoc-receipt-row { display: grid; grid-template-columns: 135px 1fr; min-height: 40px; border-bottom: 1px solid #edf1f6; }
.pdoc-receipt-row:last-child { border-bottom: 0; }
.pdoc-receipt-row span {
  padding: 8px 9px;
  border-right: 1px solid #edf1f6;
  background: #f8fafc;
  color: #475569;
  font-size: 9pt;
  font-weight: 600;
}
.pdoc-receipt-row strong { padding: 8px 9px; font-size: 9.2pt; font-weight: 500; overflow-wrap: anywhere; }
.pdoc-receipt-row .is-words { font-style: italic; font-weight: 600; }
.pdoc-receipt-row.is-amount { background: #eef2ff; }
.pdoc-receipt-row.is-amount span { background: #eef2ff; color: #1e1b4b; }
.pdoc-receipt-row.is-amount strong { color: #1e1b4b; font-size: 12pt; font-weight: 700; }

/* Kuitansi LS & UP Modern Styling */
.pdoc-kuitansi-ls,
.pdoc-kuitansi-up {
  font-size: 9.5pt;
  line-height: 1.45;
  color: #111827;
}
.pdoc-kuitansi-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 0;
}
.pdoc-kuitansi-meta-col {
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  font-size: 9pt;
}
.pdoc-kuitansi-row {
  display: grid;
  grid-template-columns: 100px 8px 1fr;
  align-items: center;
  padding: 4px 7px;
  border-bottom: 1px solid #edf1f6;
  font-size: 9pt;
  color: #111827;
}
.pdoc-kuitansi-row:last-child {
  border-bottom: 0;
}
.pdoc-kuitansi-label {
  color: #111827;
  font-weight: 600;
  font-size: 9pt;
  white-space: nowrap;
}
.pdoc-kuitansi-colon {
  color: #111827;
  text-align: center;
  font-weight: 600;
  font-size: 9pt;
}
.pdoc-kuitansi-val {
  font-weight: 500;
  color: #111827;
  font-size: 9pt;
  word-break: break-word;
}
/* Kata "KUITANSI / BUKTI PEMBAYARAN" turunkan 1cm */
.pdoc-kuitansi-ls .pdoc-title,
.pdoc-kuitansi-up .pdoc-title {
  margin: calc(10px + 1cm) 0 14px;
  text-align: center;
}
.pdoc-kuitansi-ls .pdoc-title h1,
.pdoc-kuitansi-up .pdoc-title h1 {
  font-size: 14.5pt;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: #111827;
  margin-bottom: 2px;
}
.pdoc-kuitansi-ls .pdoc-title p,
.pdoc-kuitansi-up .pdoc-title p {
  font-size: 9.5pt;
  color: #111827;
  margin: 2px 0 0;
}
.pdoc-kuitansi-ls .pdoc-receipt-box,
.pdoc-kuitansi-up .pdoc-receipt-box {
  margin: 0 0 14px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.pdoc-kuitansi-ls .pdoc-receipt-row,
.pdoc-kuitansi-up .pdoc-receipt-row {
  display: grid;
  grid-template-columns: 145px 12px 1fr;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid #edf1f6;
  padding: 0;
  font-size: 9.5pt;
  color: #111827;
}
.pdoc-kuitansi-ls .pdoc-receipt-row:last-child,
.pdoc-kuitansi-up .pdoc-receipt-row:last-child {
  border-bottom: 0;
}
.pdoc-kuitansi-ls .pdoc-receipt-label,
.pdoc-kuitansi-up .pdoc-receipt-label {
  padding: 7px 9px;
  background: #f8fafc;
  color: #111827;
  font-size: 9.5pt;
  font-weight: 600;
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid #edf1f6;
}
.pdoc-kuitansi-ls .pdoc-receipt-colon,
.pdoc-kuitansi-up .pdoc-receipt-colon {
  padding: 7px 0;
  text-align: center;
  color: #111827;
  font-weight: 600;
  font-size: 9.5pt;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdoc-kuitansi-ls .pdoc-receipt-value,
.pdoc-kuitansi-up .pdoc-receipt-value {
  padding: 7px 10px;
  font-size: 9.5pt;
  line-height: 1.45;
  color: #111827;
  word-break: break-word;
}
.pdoc-kuitansi-ls .pdoc-receipt-row.is-amount,
.pdoc-kuitansi-up .pdoc-receipt-row.is-amount {
  background: #fff;
}
.pdoc-kuitansi-ls .pdoc-receipt-row.is-amount .pdoc-receipt-label,
.pdoc-kuitansi-up .pdoc-receipt-row.is-amount .pdoc-receipt-label {
  background: #f8fafc;
  color: #111827;
}
.pdoc-kuitansi-ls .pdoc-receipt-row.is-amount .pdoc-receipt-value,
.pdoc-kuitansi-up .pdoc-receipt-row.is-amount .pdoc-receipt-value {
  font-size: 9.5pt;
  font-weight: 700;
  color: #111827;
}
.pdoc-kuitansi-ls .pdoc-receipt-row.is-words .pdoc-receipt-value,
.pdoc-kuitansi-up .pdoc-receipt-row.is-words .pdoc-receipt-value {
  font-size: 9.5pt;
  font-weight: 600;
  color: #111827;
}
.pdoc-kuitansi-ls .pdoc-receipt-row.is-words .pdoc-receipt-value {
  font-style: italic;
}
.pdoc-kuitansi-up .pdoc-receipt-row.is-words .pdoc-receipt-value {
  font-style: normal;
}
.pdoc-kuitansi-up .pdoc-sign-statement {
  font-style: normal;
}
/* Baris penandatangan turunkan 2cm */
.pdoc-kuitansi-signatures {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: calc(16px + 2cm);
}
.pdoc-kuitansi-sign-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}
.pdoc-kuitansi-sign-row.is-three-col {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.pdoc-kuitansi-sign-row .pdoc-sign {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  font-size: 9.5pt;
  line-height: 1.35;
  color: #111827;
  text-align: center;
}
.pdoc-kuitansi-sign-row .pdoc-sign-top {
  display: flex;
  flex-direction: column;
}
.pdoc-kuitansi-sign-row.is-three-col .pdoc-sign-top {
  min-height: 118px;
}
.pdoc-kuitansi-sign-row:not(.is-three-col) .pdoc-sign-top {
  min-height: 102px;
}
.pdoc-kuitansi-sign-row .pdoc-sign-date {
  font-size: 9.5pt;
  min-height: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  line-height: 1.25;
  margin-bottom: 2px;
  color: #111827;
}
.pdoc-kuitansi-sign-row .pdoc-sign-role {
  font-size: 9.5pt;
  font-weight: 600;
  color: #111827;
}
.pdoc-kuitansi-sign-row .pdoc-sign-org {
  font-size: 9.5pt;
  font-weight: 500;
  color: #111827;
}
.pdoc-kuitansi-sign-row .pdoc-sign-suborg {
  font-size: 9.5pt;
  color: #111827;
}
.pdoc-kuitansi-sign-row .pdoc-sign-statement {
  display: block;
  font-size: 9.5pt;
  font-style: italic;
  color: #111827;
  margin-bottom: 2px;
}
.pdoc-kuitansi-sign-row .pdoc-sign-space {
  flex: 1 1 auto;
  min-height: calc(48px + 1.5cm);
  height: calc(48px + 1.5cm);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Kuitansi Pembayaran UP: nama penandatangan PPK, Bendahara, Penyedia naikkan 0.5cm (dari 2.5cm menjadi 2cm) */
.pdoc-kuitansi-up .pdoc-kuitansi-sign-row.is-three-col .pdoc-sign-space {
  min-height: calc(48px + 2cm);
  height: calc(48px + 2cm);
}
.pdoc-kuitansi-sign-row .pdoc-materai {
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.pdoc-kuitansi-sign-row .pdoc-sign-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.pdoc-kuitansi-sign-row .pdoc-sign strong,
.pdoc-kuitansi-sign-row .pdoc-sign-bottom strong {
  display: block;
  font-size: 9.5pt;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: #111827;
  margin-top: auto;
}
.pdoc-kuitansi-sign-row .pdoc-sign-note,
.pdoc-kuitansi-sign-row .pdoc-sign-bottom .pdoc-sign-note {
  display: block;
  font-size: 9.5pt;
  color: #111827;
  margin-top: 2px;
}
/* Penandatangan Pejabat Pemeriksa Hasil Pekerjaan layout center & turunkan 1cm */
.pdoc-kuitansi-sign-row.is-second-row {
  display: flex;
  justify-content: center;
  margin-top: 1cm;
}
.pdoc-kuitansi-sign-row.is-second-row .pdoc-sign {
  flex: 0 0 54%;
  max-width: 380px;
  margin: 0 auto;
}


@media (max-width: 980px) {
  .pengadaan-print-layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .pengadaan-print-aside {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .pengadaan-print-kicker { display: none; }
  .pengadaan-print-formats { flex: 1; flex-direction: row; overflow-x: auto; padding-bottom: 3px; }
  .pengadaan-print-format { flex: none; min-width: 180px; }
  .pengadaan-print-summary { display: none; }
  .pengadaan-print-warning { flex: none; max-width: 230px; margin-top: 0; }
}
@media (max-width: 720px) {
  .modal.modal-print-pengadaan { width: 100%; height: calc(100vh - 16px); }
  .modal-print-pengadaan .modal-head { padding: 15px 16px 11px; }
  .pengadaan-print-aside { padding: 9px 10px; }
  .pengadaan-print-format { min-width: 158px; padding: 7px; }
  .pengadaan-print-format small { display: none; }
  .pengadaan-print-warning { max-width: 180px; font-size: 8.5px; }
  .pengadaan-print-toolbar { padding: 9px 12px; }
  .pengadaan-print-stage { padding: 10px; }
  .pengadaan-print-foot,
  .modal-foot-print { flex-wrap: wrap; padding: 10px 12px; gap: 7px; }
  .pengadaan-print-hint { flex-basis: 100%; order: 3; max-width: none; }
  .pengadaan-print-foot .btn { flex: 1; }
}

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body.is-printing { background: #fff !important; }
  body.is-printing > *:not(.print-root) { display: none !important; }
  body.is-printing .print-root { display: block !important; }
  .print-table thead { display: table-header-group; }
  .print-table tr { break-inside: avoid; }
}

@media print {
  body.is-printing-pengadaan .pdoc {
    width: auto;
    min-height: 0;
    padding: 0;
    box-shadow: none;
  }
  body.is-printing-pengadaan .pdoc-stack { display: block; width: auto; }
  body.is-printing-pengadaan .pdoc-stack > .pdoc:not(:last-child) {
    break-after: page;
    page-break-after: always;
  }
  body.is-printing-pengadaan .pdoc.pdoc-hps-cover { min-height: 273mm; }
  body.is-printing-pengadaan .spd-screen-only { display: none !important; }
  body.is-printing-pengadaan .spd-live-input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  body.is-printing-pengadaan .pdoc-table-box,
  body.is-printing-pengadaan .hon-pay-table-box {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body.is-printing-pengadaan .pdoc-nominatif-wrap {
    margin: 14px 0 16px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0 !important;
    overflow: visible !important;
    box-shadow: none !important;
    display: block !important;
  }
  body.is-printing-pengadaan .pdoc-nominatif-tbl {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important;
  }
  body.is-printing-pengadaan .pdoc-nominatif-tbl thead {
    display: table-header-group !important;
  }
  body.is-printing-pengadaan .pdoc-nominatif-tbl thead tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  body.is-printing-pengadaan .pdoc-nominatif-tbl thead th {
    background-color: #0b1727 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body.is-printing-pengadaan .pdoc-nominatif-tbl tbody tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  body.is-printing-pengadaan .pdoc-nominatif-tbl tfoot {
    display: table-row-group !important;
  }
  body.is-printing-pengadaan .pdoc-nominatif-tbl tfoot tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    background-color: #0b1727 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body.is-printing-pengadaan .pdoc-nominatif-terbilang,
  body.is-printing-pengadaan .pdoc-nominatif-signatures {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  body.is-printing-pengadaan .pdoc-portrait {
    width: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
  }
  body.is-printing-pengadaan .kendali-card,
  body.is-printing-pengadaan .kendali-tbl-wrap {
    border-radius: 0 !important;
    overflow: visible !important;
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
  }
  body.is-printing-pengadaan .kendali-tbl thead th {
    background-color: #0b1727 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body.is-printing-pengadaan .pdoc-table {
    border-collapse: collapse !important;
    font-size: 8.5pt !important;
  }
  body.is-printing-pengadaan .pdoc-table thead tr {
    background-color: #0b1727 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body.is-printing-pengadaan .pdoc-table thead th {
    background-color: #0b1727 !important;
    color: #ffffff !important;
    border-right: 1px solid #1e293b !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body.is-printing-pengadaan .pdoc-table thead th:last-child {
    border-right: none !important;
  }
  body.is-printing-pengadaan .pdoc-table tbody tr {
    border-bottom: 1px solid #e2e8f0 !important;
  }
  body.is-printing-pengadaan .pdoc-table tbody td {
    border-right: 1px solid #e2e8f0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
    background: #ffffff !important;
  }
  body.is-printing-pengadaan .pdoc-table tbody tr:last-child td {
    border-bottom: none !important;
  }
  body.is-printing-pengadaan .pdoc-table tbody td:last-child {
    border-right: none !important;
  }
  body.is-printing-pengadaan .pdoc-totals tr.is-strong td {
    background-color: #0b1727 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body.is-printing-pengadaan .pdoc-kop,
  body.is-printing-pengadaan .pdoc-vendor-kop,
  body.is-printing-pengadaan .pdoc-vendor-kop-image,
  body.is-printing-pengadaan .pdoc-title,
  body.is-printing-pengadaan .pdoc-info,
  body.is-printing-pengadaan .pdoc-info-row,
  body.is-printing-pengadaan .pdoc-totals,
  body.is-printing-pengadaan .pdoc-totals tr,
  body.is-printing-pengadaan .pdoc-terbilang,
  body.is-printing-pengadaan .pdoc-note,
  body.is-printing-pengadaan .pdoc-receipt-box,
  body.is-printing-pengadaan .pdoc-receipt-row,
  body.is-printing-pengadaan .pdoc-payment,
  body.is-printing-pengadaan .pdoc-signatures,
  body.is-printing-pengadaan .pdoc-sign { break-inside: avoid; page-break-inside: avoid; }
  body.is-printing-pengadaan .pdoc-title,
  body.is-printing-pengadaan .pdoc-title > span,
  body.is-printing-pengadaan .pdoc-title-hps,
  body.is-printing-pengadaan .pdoc-title h1 { break-after: avoid; page-break-after: avoid; }
  body.is-printing-pengadaan .pdoc p { orphans: 3; widows: 3; }
  body.is-printing-pengadaan .pdoc-table tr { break-inside: avoid; page-break-inside: avoid; }
  body.is-printing-pengadaan .pdoc-table thead { display: table-header-group; }
  body.is-printing-pengadaan .pdoc-table tfoot { display: table-footer-group; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-grid.equal { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .app.nav-open .sidebar { transform: none; }
  .topbar .menu-btn { display: grid; }
  .side-collapse { display: none; }
  .app.is-collapsed .sidebar { width: var(--sidebar-w); padding-left: 14px; padding-right: 14px; }
  .app.is-collapsed .brand-text,
  .app.is-collapsed .nav-item span,
  .app.is-collapsed .nav-badge,
  .app.is-collapsed .side-card { display: revert; }
  .app.is-collapsed .brand { padding-left: 8px; }
  .app.is-collapsed .nav-label { font-size: 10px; padding: 0 10px 8px; height: auto; background: none; margin: 0; }
  .app.is-collapsed .nav-item { justify-content: flex-start; padding: 8px 10px; }
  .app.is-collapsed .nav-item.is-active::after { display: block; }
  .app.is-collapsed .nav-item[data-tip]::before { display: none; }
  .app.is-collapsed .nav-sub { display: flex; }
  .app.is-collapsed .nav-sub[hidden] { display: none; }
  .app.is-collapsed .nav-sub-toggle { display: grid; }
  .side-card { display: none; }
  .topbar { padding: 0 20px; }
  .view { padding: 22px 20px 44px; }
}
@media (max-width: 780px) {
  .search-trigger { width: 36px; padding: 0; justify-content: center; margin-left: auto; margin-right: 4px; border-color: transparent; background: transparent; box-shadow: none; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .search-trigger:hover { background: var(--surface-3); }
  .user-meta, .user-chip .chev { display: none; }
  .user-chip { padding: 3px; }
  .topbar-title .topbar-root, .topbar-title .sep { display: none; }
  .analytics-grid { grid-template-columns: 1fr; }
  .toasts { right: 12px; bottom: 12px; }
}
@media (max-width: 640px) {
  .view { padding: 18px 15px 40px; }
  .topbar { padding: 0 14px; gap: 6px; height: 58px; }
  .search-trigger { margin-right: 0; }
  .topbar-actions { gap: 1px; }
  .page-head { align-items: flex-start; margin-bottom: 18px; }
  .page-head h1 { font-size: 20px; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 16px;
    align-items: center;
    column-gap: 12px;
    min-height: 0;
    padding: 14px 15px;
  }
  .module-icon { grid-row: 1 / span 2; align-self: start; }
  .module-card strong { grid-column: 2; grid-row: 1; margin-top: 0; font-size: 13px; }
  .module-card p { grid-column: 2 / 4; grid-row: 2; margin: 2px 0 8px; line-height: 1.45; }
  .module-card .module-count { grid-column: 2; grid-row: 3; margin-top: 0; justify-self: start; }
  .module-card .module-arrow { position: static; grid-column: 3; grid-row: 1; justify-self: end; align-self: center; }
  .page-actions { width: 100%; }
  .date-chip { display: none; }
  .stat-grid, .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 21px; }
  .stat-spark { display: none; }
  .card-head { padding: 15px 15px 0; }
  .donut-card .donut-wrap { margin-top: 6px; }
  .legend { padding: 0 15px; }
  .donut-legend, .product-list, .source-list, .funnel, .cat-list { padding-left: 15px; padding-right: 15px; }
  .chart-wrap { padding-left: 4px; padding-right: 4px; }
  .table-toolbar { padding: 11px 12px; }
  .field-search { width: 100%; flex: 1 1 100%; }
  .toolbar-count { margin-left: 0; width: 100%; padding-left: 2px; }
  .pager { padding: 11px 12px; }
  .pager-info { width: 100%; }
  .pager-btns { margin-left: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .import-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { gap: 12px; }
  .profile-top { flex-wrap: wrap; }
  .profile-top .btn { margin-left: 0; }
  .drawer { width: 100%; }
  .drawer-head, .drawer-body, .drawer-foot { padding-left: 16px; padding-right: 16px; }
  .modal-layer { padding: 12px; align-items: flex-end; }
  .modal { max-height: calc(100vh - 24px); border-radius: 16px; }
  .popover { width: min(320px, calc(100vw - 28px)); }
  .user-pop { width: 226px; }
  .bar-chart { gap: 3px; padding-left: 15px; padding-right: 15px; }
  .bar-chart::before { left: 15px; right: 15px; }
  .bar-label { font-size: 9px; }
}
@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-stat { align-items: flex-start; padding: 13px; gap: 9px; }
  .quick-icon { width: 32px; height: 32px; }
  .quick-meta strong { font-size: 15px; }
  .stat-value { font-size: 23px; }
  .stat-spark { display: block; }
  .user-chip { display: none; }
  .page-actions .btn { flex: 1; }
  .theme-choice { flex-direction: column; }
}
@media (max-height: 900px) and (min-width: 1024px) {
  .side-card { display: none; }
}

/* ---------- Penyedia workspace ---------- */
.penyedia-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 310px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.penyedia-vendor-panel { min-width: 0; overflow: hidden; }
.penyedia-vendor-head { padding: 15px 15px 9px; }
.penyedia-vendor-head .card-title { font-size: 13px; }
.penyedia-vendor-head .card-sub { font-size: 10.5px; margin-top: 2px; }
.penyedia-vendor-search { display: flex; align-items: center; gap: 6px; padding: 0 12px 10px; }
.penyedia-vendor-search .field-search { flex: 1; width: auto; min-width: 0; }
.penyedia-vendor-search .input { width: 100%; height: 33px; }
.penyedia-vendor-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 8px 10px;
  max-height: calc(100vh - 265px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.penyedia-vendor-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.penyedia-vendor-item:hover { background: var(--surface-2); }
.penyedia-vendor-item.is-active { background: var(--tone-indigo-bg); border-color: transparent; }
.penyedia-vendor-avatar {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex: none;
  border-radius: 9px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
}
.penyedia-vendor-item.is-active .penyedia-vendor-avatar { background: var(--surface); color: var(--tone-indigo); }
.penyedia-vendor-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.penyedia-vendor-meta strong, .penyedia-vendor-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.penyedia-vendor-meta strong { font-size: 11.5px; font-weight: 600; }
.penyedia-vendor-meta span { font-size: 10px; color: var(--muted); }
.penyedia-vendor-count {
  flex: none;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.penyedia-vendor-item.is-active .penyedia-vendor-count { background: var(--surface); color: var(--tone-indigo); }
.penyedia-vendor-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 26px 12px;
  color: var(--muted);
}
.penyedia-vendor-empty > .icon { width: 28px; height: 28px; opacity: .5; margin-bottom: 2px; }
.penyedia-vendor-empty strong { font-size: 12px; color: var(--text-2); }
.penyedia-vendor-empty p { font-size: 10.5px; margin: 0 0 8px; }
.penyedia-detail-card { min-width: 0; }
.penyedia-detail-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.penyedia-detail-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  background: var(--tone-indigo-bg);
  color: var(--tone-indigo);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}
.penyedia-detail-meta { min-width: 0; flex: 1; }
.penyedia-detail-meta h2 {
  font-size: 14.5px;
  font-weight: 650;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.penyedia-detail-meta p {
  font-size: 10.5px;
  color: var(--muted);
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.penyedia-detail-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.penyedia-detail-card > .penyedia-tabs { margin: 13px 16px 0; }
.penyedia-profile-tab { padding: 15px 16px 16px; }
.penyedia-profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.penyedia-profile-stat {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.penyedia-profile-stat span { display: block; font-size: 10px; color: var(--muted); }
.penyedia-profile-stat strong { display: block; margin-top: 2px; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.penyedia-profile-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 13px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.5;
}
.penyedia-profile-note .icon { width: 15px; height: 15px; flex: none; color: var(--tone-indigo); margin-top: 1px; }
table.data.penyedia-profile-table th {
  width: 230px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  white-space: normal;
}
table.data.penyedia-profile-table td { white-space: normal; line-height: 1.5; }
table.data.penyedia-profile-table tbody tr:last-child th { border-bottom: 0; }
.penyedia-detail-empty { padding: 60px 20px; }

@media (max-width: 1080px) {
  .penyedia-workspace { grid-template-columns: 1fr; }
  .penyedia-vendor-list { max-height: 250px; }
}
@media (max-width: 640px) {
  .penyedia-detail-head { flex-wrap: wrap; }
  .penyedia-detail-actions { width: 100%; margin-left: 0; }
  .penyedia-detail-actions .btn { flex: 1; }
  .penyedia-profile-stats { grid-template-columns: 1fr; }
  table.data.penyedia-profile-table th { width: 140px; }
  .penyedia-vendor-search { flex-wrap: wrap; }
  .penyedia-vendor-search .btn { width: 100%; }
  .access-head-actions { justify-content: flex-start; }
  .access-role-card .form-actions { flex-wrap: wrap; }
  .access-save-hint { width: 100%; }
}

/* ---------- Accessibility ---------- */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Data RKAKL ---------- */
.rkakl-page-note { margin-top: 7px; }
.rkakl-scope-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.rkakl-scope-note .icon { width: 14px; height: 14px; color: var(--tone-sky); flex: none; }
.rkakl-scope-note strong { color: var(--text-2); font-weight: 600; }
.rkakl-list { display: flex; flex-direction: column; gap: 10px; }
.rkakl-row-card {
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.rkakl-row-card.is-open { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.rkakl-row-main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 15px;
}
.rkakl-row-identity { flex: 1 1 auto; min-width: 0; }
.rkakl-row-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.rkakl-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  max-width: 100%;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.rkakl-tag .icon { width: 12px; height: 12px; color: var(--muted); flex: none; }
.rkakl-tag strong { color: var(--text-2); font-weight: 650; }
.rkakl-tag-ta {
  border-color: color-mix(in srgb, var(--accent) 16%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: .02em;
}
.rkakl-tag-ppk strong {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.rkakl-tag-code {
  min-width: 0;
  border-color: color-mix(in srgb, var(--tone-amber) 22%, transparent);
  background: var(--tone-amber-bg);
  color: var(--tone-amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9.5px;
  letter-spacing: .01em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rkakl-row-title {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -.005em;
  overflow-wrap: anywhere;
}
.rkakl-row-side { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.rkakl-stat-group { display: flex; gap: 6px; }
.rkakl-stat-chip {
  min-width: 120px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.rkakl-stat-chip span {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: .035em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}
.rkakl-stat-chip strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rkakl-stat-chip.is-total {
  border-color: color-mix(in srgb, var(--tone-sky) 18%, transparent);
  background: var(--tone-sky-bg);
}
.rkakl-stat-chip.is-total strong { color: var(--tone-sky); }
.rkakl-stat-chip.is-blokir {
  border-color: color-mix(in srgb, var(--tone-rose) 22%, transparent);
  background: var(--tone-rose-bg);
}
.rkakl-stat-chip.is-blokir strong { color: var(--tone-rose); }
.rkakl-stat-chip.is-bersih {
  border-color: color-mix(in srgb, var(--tone-sky) 22%, transparent);
  background: var(--tone-sky-bg);
}
.rkakl-stat-chip.is-bersih strong { color: var(--tone-sky); }
.rkakl-stat-chip.is-sisa {
  border-color: color-mix(in srgb, var(--tone-emerald) 30%, transparent);
  background: var(--tone-emerald-bg);
}
.rkakl-stat-chip.is-sisa strong { color: var(--tone-emerald); }
.rkakl-account-amounts .is-sisa strong { color: var(--tone-emerald); }
.rkakl-account-amounts .is-over strong { color: var(--tone-rose); }
.text-emerald { color: var(--tone-emerald) !important; }
.badge-emerald {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 600;
}
.rkakl-row-actions { display: flex; align-items: center; gap: 4px; }
.rkakl-icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text-2);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.rkakl-icon-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
  color: var(--text);
}
.rkakl-icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.rkakl-icon-btn * { pointer-events: none; }
.rkakl-icon-btn .icon { width: 14px; height: 14px; }
.rkakl-icon-btn.is-add {
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
}
.rkakl-icon-btn.is-add:hover { border-color: color-mix(in srgb, var(--accent) 34%, transparent); }
.rkakl-icon-btn.is-danger { color: var(--tone-rose); }
.rkakl-icon-btn.is-danger:hover {
  border-color: color-mix(in srgb, var(--tone-rose) 26%, transparent);
  background: var(--tone-rose-bg);
  color: var(--tone-rose);
}
.rkakl-chevron .icon { transition: transform .18s ease; }
.rkakl-row-card.is-open .rkakl-chevron .icon { transform: rotate(180deg); }
.rkakl-row-card.is-open [data-rkakl-toggle]:not(.rkakl-chevron) {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}
.rkakl-row-detail {
  padding: 13px 15px 15px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.rkakl-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.rkakl-detail-heading strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.rkakl-detail-heading span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.rkakl-detail-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 340px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: right;
}
.rkakl-detail-list { display: flex; flex-direction: column; gap: 8px; }
.rkakl-detail-account {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  transition: transform .15s ease, box-shadow .15s ease;
}
.rkakl-detail-account[data-account-tone="indigo"],
.rkakl-detail-account:nth-child(8n+1) {
  background: linear-gradient(135deg, #eef2ff 0%, #f7f9ff 100%);
  border-color: #c7d2fe;
  border-left-color: #4f46e5;
}
.rkakl-detail-account[data-account-tone="indigo"] .rkakl-detail-code,
.rkakl-detail-account:nth-child(8n+1) .rkakl-detail-code {
  background: #e0e7ff;
  color: #3730a3;
}
.rkakl-detail-account[data-account-tone="emerald"],
.rkakl-detail-account:nth-child(8n+2) {
  background: linear-gradient(135deg, #ecfdf5 0%, #f5fcf9 100%);
  border-color: #a7f3d0;
  border-left-color: #059669;
}
.rkakl-detail-account[data-account-tone="emerald"] .rkakl-detail-code,
.rkakl-detail-account:nth-child(8n+2) .rkakl-detail-code {
  background: #d1fae5;
  color: #065f46;
}
.rkakl-detail-account[data-account-tone="amber"],
.rkakl-detail-account:nth-child(8n+3) {
  background: linear-gradient(135deg, #fffbeb 0%, #fffdf6 100%);
  border-color: #fde68a;
  border-left-color: #d97706;
}
.rkakl-detail-account[data-account-tone="amber"] .rkakl-detail-code,
.rkakl-detail-account:nth-child(8n+3) .rkakl-detail-code {
  background: #fef3c7;
  color: #92400e;
}
.rkakl-detail-account[data-account-tone="sky"],
.rkakl-detail-account:nth-child(8n+4) {
  background: linear-gradient(135deg, #f0f9ff 0%, #f7fcff 100%);
  border-color: #bae6fd;
  border-left-color: #0284c7;
}
.rkakl-detail-account[data-account-tone="sky"] .rkakl-detail-code,
.rkakl-detail-account:nth-child(8n+4) .rkakl-detail-code {
  background: #e0f2fe;
  color: #075985;
}
.rkakl-detail-account[data-account-tone="violet"],
.rkakl-detail-account:nth-child(8n+5) {
  background: linear-gradient(135deg, #f5f3ff 0%, #faf8ff 100%);
  border-color: #ddd6fe;
  border-left-color: #7c3aed;
}
.rkakl-detail-account[data-account-tone="violet"] .rkakl-detail-code,
.rkakl-detail-account:nth-child(8n+5) .rkakl-detail-code {
  background: #ede9fe;
  color: #5b21b6;
}
.rkakl-detail-account[data-account-tone="rose"],
.rkakl-detail-account:nth-child(8n+6) {
  background: linear-gradient(135deg, #fff1f2 0%, #fff8f9 100%);
  border-color: #fecdd3;
  border-left-color: #e11d48;
}
.rkakl-detail-account[data-account-tone="rose"] .rkakl-detail-code,
.rkakl-detail-account:nth-child(8n+6) .rkakl-detail-code {
  background: #ffe4e6;
  color: #9f1239;
}
.rkakl-detail-account[data-account-tone="teal"],
.rkakl-detail-account:nth-child(8n+7) {
  background: linear-gradient(135deg, #f0fdfa 0%, #f6fefc 100%);
  border-color: #99f6e4;
  border-left-color: #0d9488;
}
.rkakl-detail-account[data-account-tone="teal"] .rkakl-detail-code,
.rkakl-detail-account:nth-child(8n+7) .rkakl-detail-code {
  background: #ccfbf1;
  color: #115e59;
}
.rkakl-detail-account[data-account-tone="orange"],
.rkakl-detail-account:nth-child(8n+8) {
  background: linear-gradient(135deg, #fff7ed 0%, #fffbf6 100%);
  border-color: #fed7aa;
  border-left-color: #ea580c;
}
.rkakl-detail-account[data-account-tone="orange"] .rkakl-detail-code,
.rkakl-detail-account:nth-child(8n+8) .rkakl-detail-code {
  background: #ffedd5;
  color: #9a3412;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="indigo"],
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+1) {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.16) 0%, rgba(79, 70, 229, 0.06) 100%);
  border-color: rgba(129, 140, 248, 0.34);
  border-left-color: #818cf8;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="indigo"] .rkakl-detail-code,
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+1) .rkakl-detail-code {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="emerald"],
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+2) {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(16, 185, 129, 0.06) 100%);
  border-color: rgba(52, 211, 153, 0.34);
  border-left-color: #34d399;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="emerald"] .rkakl-detail-code,
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+2) .rkakl-detail-code {
  background: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="amber"],
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+3) {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(245, 158, 11, 0.06) 100%);
  border-color: rgba(251, 191, 36, 0.34);
  border-left-color: #fbbf24;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="amber"] .rkakl-detail-code,
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+3) .rkakl-detail-code {
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="sky"],
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+4) {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16) 0%, rgba(14, 165, 233, 0.06) 100%);
  border-color: rgba(56, 189, 248, 0.34);
  border-left-color: #38bdf8;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="sky"] .rkakl-detail-code,
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+4) .rkakl-detail-code {
  background: rgba(14, 165, 233, 0.25);
  color: #bae6fd;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="violet"],
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+5) {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.16) 0%, rgba(139, 92, 246, 0.06) 100%);
  border-color: rgba(167, 139, 250, 0.34);
  border-left-color: #a78bfa;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="violet"] .rkakl-detail-code,
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+5) .rkakl-detail-code {
  background: rgba(139, 92, 246, 0.25);
  color: #ddd6fe;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="rose"],
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+6) {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.16) 0%, rgba(244, 63, 94, 0.06) 100%);
  border-color: rgba(251, 113, 133, 0.34);
  border-left-color: #fb7185;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="rose"] .rkakl-detail-code,
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+6) .rkakl-detail-code {
  background: rgba(244, 63, 94, 0.25);
  color: #fecdd3;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="teal"],
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+7) {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16) 0%, rgba(20, 184, 166, 0.06) 100%);
  border-color: rgba(45, 212, 191, 0.34);
  border-left-color: #2dd4bf;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="teal"] .rkakl-detail-code,
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+7) .rkakl-detail-code {
  background: rgba(20, 184, 166, 0.25);
  color: #99f6e4;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="orange"],
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+8) {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.16) 0%, rgba(249, 115, 22, 0.06) 100%);
  border-color: rgba(251, 146, 60, 0.34);
  border-left-color: #fb923c;
}
[data-theme="dark"] .rkakl-detail-account[data-account-tone="orange"] .rkakl-detail-code,
[data-theme="dark"] .rkakl-detail-account:nth-child(8n+8) .rkakl-detail-code {
  background: rgba(249, 115, 22, 0.25);
  color: #fed7aa;
}
.rkakl-detail-account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.rkakl-detail-identity {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.rkakl-detail-code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--text-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9.5px;
  font-weight: 650;
}
.rkakl-detail-name {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.rkakl-account-amounts {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  flex: 0 0 auto;
}
.rkakl-account-amounts > div { min-width: 84px; text-align: right; }
.rkakl-account-amounts span {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: .035em;
  line-height: 1.3;
  text-transform: uppercase;
}
.rkakl-account-amounts strong {
  display: block;
  margin-top: 2px;
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rkakl-account-amounts .is-blokir strong { color: var(--tone-rose); }
.rkakl-account-amounts .is-bersih strong { color: var(--tone-emerald); }
.rkakl-account-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.rkakl-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}
.rkakl-meta-tag em { font-style: normal; color: var(--muted); }
.rkakl-meta-tag strong {
  max-width: 230px;
  overflow: hidden;
  color: var(--text-2);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rkakl-account-progress { margin-top: 9px; }
.rkakl-progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9.5px;
}
.rkakl-progress-top strong {
  color: var(--text-2);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.rkakl-progress-percent {
  color: var(--text-2);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rkakl-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3, #f1f5f9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
}
.rkakl-progress-track > span,
.rkakl-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tone-emerald, #10b981);
  transition: width .4s cubic-bezier(0.4, 0, 0.2, 1);
}
.rkakl-account-progress[data-status="empty"] .rkakl-progress-track > span {
  background: transparent;
}
.rkakl-account-progress[data-status="transaksi"] .rkakl-progress-track > span,
.rkakl-account-progress[data-status="equal"] .rkakl-progress-track > span {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}
.rkakl-account-progress[data-status="near-limit"] .rkakl-progress-track > span,
.rkakl-account-progress[data-status="under"] .rkakl-progress-track > span {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}
.rkakl-account-progress[data-status="over"] .rkakl-progress-track > span {
  background: linear-gradient(90deg, #f43f5e 0%, #e11d48 100%);
}
.rkakl-progress-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
}
.rkakl-rpd-mini {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.rkakl-rpd-mini-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9.5px;
}
.rkakl-rpd-mini-head strong {
  color: var(--text-2);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.rkakl-rpd-mini-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
}
.rkakl-rpd-mini-cell {
  min-width: 0;
  padding: 4px 5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
}
.rkakl-rpd-mini-cell span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.rkakl-rpd-mini-cell strong {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: var(--text-2);
  font-size: 9px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rkakl-row-detail .rkakl-inline-empty { margin: 0; padding: 18px 12px; }
.rkakl-inline-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  margin: 14px 16px;
  padding: 22px 15px;
  border: 1px dashed var(--border-strong);
  border-radius: 11px;
  color: var(--muted);
}
.rkakl-inline-empty > .icon { width: 20px; height: 20px; color: var(--tone-sky); }
.rkakl-inline-empty strong { color: var(--text-2); font-size: 12px; font-weight: 600; }
.rkakl-inline-empty p { max-width: 430px; margin-bottom: 4px; font-size: 10.5px; line-height: 1.5; }
.rkakl-master-hint { max-width: 430px; margin-top: 8px; color: var(--muted); font-size: 10.5px; line-height: 1.5; }

.modal.modal-rkakl { width: min(1080px, 100%); }
/* RKAKL Transaction Lock and Rules */
.rkakl-header-locked-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  color: var(--text);
}
.rkakl-header-locked-banner .banner-icon {
  color: #f59e0b;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.rkakl-header-locked-banner strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: #b45309;
  margin-bottom: 2px;
}
.rkakl-header-locked-banner p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}
.rkakl-account-trans-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.45;
}
.rkakl-account-trans-notice .rkakl-notice-icon {
  color: #3b82f6;
  flex-shrink: 0;
  display: flex;
  margin-top: 1px;
}
.rkakl-account-trans-notice strong {
  color: var(--text);
}
.rkakl-account-trans-notice p {
  margin: 2px 0 0;
  color: var(--muted);
}
.rkakl-trans-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-weight: 600;
}
.rkakl-min-anggaran-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #b45309;
}
.rkakl-anggaran-error {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #e11d48;
  font-weight: 600;
}
.rkakl-akun-has-trans {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.02);
}
.rkakl-modal-body { display: flex; flex-direction: column; gap: 18px; }
.rkakl-form-section { min-width: 0; }
.rkakl-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}
.rkakl-section-head h3 { font-size: 12.5px; font-weight: 650; letter-spacing: -.01em; }
.rkakl-section-head p { margin-top: 2px; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.rkakl-akun-list { display: flex; flex-direction: column; gap: 13px; }
.rkakl-akun-card {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.rkakl-akun-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.rkakl-akun-head strong { display: block; color: var(--text-2); font-size: 11.5px; font-weight: 650; }
.rkakl-akun-head .sub { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.rkakl-remove-akun { color: var(--tone-rose) !important; }
.rkakl-akun-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rkakl-readonly { position: relative; }
.rkakl-readonly .input { background: var(--surface-3); color: var(--text-2); cursor: default; opacity: 1; -webkit-text-fill-color: var(--text-2); }
.rkakl-readonly .hint { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.rkakl-rpd {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
}
.rkakl-rpd-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.rkakl-rpd-head strong { display: block; color: var(--text-2); font-size: 11.5px; font-weight: 650; }
.rkakl-rpd-head p { margin-top: 2px; color: var(--muted); font-size: 10px; }
.rkakl-rpd-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rkakl-rpd-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}
.rkakl-rpd-field { min-width: 0; }
.rkakl-rpd-field label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
}
.rkakl-rpd-field .input { height: 30px; padding: 0 7px; font-size: 11px; }
.rkakl-rpd-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}
.rkakl-rpd-total strong { color: var(--text-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.rkakl-rpd-status { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.rkakl-rpd-info[data-status="equal"] { border-color: color-mix(in srgb, var(--tone-emerald) 32%, transparent); background: var(--tone-emerald-bg); }
.rkakl-rpd-info[data-status="under"] { border-color: color-mix(in srgb, var(--tone-amber) 32%, transparent); background: var(--tone-amber-bg); }
.rkakl-rpd-info[data-status="over"] { border-color: color-mix(in srgb, var(--tone-rose) 32%, transparent); background: var(--tone-rose-bg); }

@media (max-width: 1100px) {
  .rkakl-row-main { flex-wrap: wrap; }
  .rkakl-row-identity { flex: 1 1 100%; }
  .rkakl-row-side { width: 100%; justify-content: space-between; }
  .rkakl-rpd-mini-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .rkakl-akun-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rkakl-rpd-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .rkakl-row-side { flex-direction: column; align-items: stretch; gap: 9px; }
  .rkakl-stat-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .rkakl-stat-chip { min-width: 0; }
  .rkakl-stat-chip span { font-size: 8px; }
  .rkakl-stat-chip strong { font-size: 10.5px; }
  .rkakl-row-actions { justify-content: flex-end; }
  .rkakl-detail-head { flex-direction: column; }
  .rkakl-detail-status { justify-content: flex-start; max-width: none; text-align: left; }
  .rkakl-detail-account-head { flex-direction: column; gap: 8px; }
  .rkakl-account-amounts { width: 100%; justify-content: space-between; gap: 8px; }
  .rkakl-account-amounts > div { flex: 1 1 0; min-width: 0; text-align: left; }
  .rkakl-rpd-mini-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .rkakl-row-main { padding: 12px; }
  .rkakl-row-detail { padding: 12px; }
  .rkakl-row-title { font-size: 12.5px; }
  .rkakl-tag-ppk strong { max-width: 130px; }
  .rkakl-akun-grid { grid-template-columns: 1fr; }
  .rkakl-rpd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rkakl-akun-head, .rkakl-rpd-head { flex-direction: column; }
  .rkakl-rpd-actions { width: 100%; justify-content: stretch; }
  .rkakl-rpd-actions .btn { flex: 1 1 auto; }
  .rkakl-rpd-info { align-items: flex-start; flex-direction: column; }
  .modal.modal-rkakl { width: 100%; }
  .rkakl-modal-body { padding: 14px; }
}

@media (max-width: 520px) {
  .rkakl-stat-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rkakl-stat-chip.is-bersih { grid-column: 1 / -1; }
  .rkakl-tag-code { flex: 1 0 100%; width: 100%; }
  .rkakl-account-amounts { flex-wrap: wrap; }
  .rkakl-account-amounts > div { flex: 1 1 30%; }
  .rkakl-rpd-mini-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 400px) {
  .rkakl-rpd-mini-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rkakl-account-amounts > div { flex-basis: 100%; }
}

/* ---------- Pengadaan Barang ---------- */
.modal.modal-pengadaan { width: min(1320px, 100%); }
.pengadaan-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 22px;
}
.pengadaan-section {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}
.pengadaan-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}
.pengadaan-section-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -.01em;
}
.pengadaan-section-head p {
  max-width: 620px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}
.pengadaan-section-head > .btn { flex: none; }

.pengadaan-number-row { display: flex; align-items: center; gap: 7px; }
.pengadaan-number-row .input {
  flex: 1;
  font-weight: 650;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
.pengadaan-number-row .input[readonly] {
  background: var(--surface-2);
  color: var(--text-2);
}
.pengadaan-number-row .btn { height: 37px; flex: none; }

.pengadaan-date-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.pengadaan-rkakl-summary {
  margin-top: 9px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
}
.pengadaan-rkakl-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.pengadaan-rkakl-empty .icon { width: 17px; height: 17px; color: var(--tone-indigo); flex: none; }
.pengadaan-rkakl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pengadaan-rkakl-head > div { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pengadaan-rkakl-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}
.pengadaan-rkakl-item {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}
.pengadaan-rkakl-item.is-wide { grid-column: span 3; }
.pengadaan-rkakl-item > span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.pengadaan-rkakl-item > strong {
  display: block;
  margin-top: 3px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.pengadaan-rkakl-item.is-sisa {
  border-color: color-mix(in srgb, var(--tone-emerald) 30%, transparent);
  background: var(--tone-emerald-bg);
}
.pengadaan-rkakl-item.is-sisa > strong { color: var(--tone-emerald); }
.pengadaan-rkakl-item.is-sisa.is-over {
  border-color: color-mix(in srgb, var(--tone-rose) 35%, transparent);
  background: var(--tone-rose-bg);
}
.pengadaan-rkakl-item.is-sisa.is-over > strong { color: var(--tone-rose); }
.pengadaan-rkakl-item > small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.pengadaan-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
}
.pengadaan-check input { width: 14px; height: 14px; accent-color: var(--accent); }

.pengadaan-items-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}
.pengadaan-items-table { min-width: 1100px; }
.pengadaan-items-table th { padding: 7px 9px; font-size: 9px; }
.pengadaan-items-table td { padding: 7px 8px; }
.pengadaan-items-table th.pengadaan-group-hps {
  border-left: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--tone-indigo);
}
.pengadaan-items-table th.pengadaan-group-penawaran {
  border-left: 1px solid var(--border);
  background: var(--tone-emerald-bg);
  color: var(--tone-emerald);
}
.pengadaan-items-table .pengadaan-col-no { width: 38px; text-align: center; }
.pengadaan-items-table td.pengadaan-item-no { text-align: center; }
.pengadaan-row-no {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.pengadaan-items-table .select,
.pengadaan-items-table .input { height: 31px; font-size: 11px; }
.pengadaan-item-name .select { min-width: 230px; max-width: 330px; }
.pengadaan-items-table .pengadaan-item-volume { width: 76px; text-align: right; }
.pengadaan-items-table td:nth-child(4) .input { width: 64px; }
.pengadaan-items-table .pengadaan-money-input {
  width: 120px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pengadaan-items-table .pengadaan-money-input[readonly] {
  background: var(--surface-3);
  color: var(--text-2);
}
.pengadaan-items-table .pengadaan-money-input.is-disabled {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 1;
  -webkit-text-fill-color: var(--muted);
}
.pengadaan-empty-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 16px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.pengadaan-empty-items[hidden] { display: none; }
.pengadaan-empty-items .icon { width: 22px; height: 22px; color: var(--tone-indigo); opacity: .75; }
.pengadaan-empty-items strong { color: var(--text-2); font-size: 12px; font-weight: 650; }
.pengadaan-empty-items p { margin: 0; font-size: 10.5px; line-height: 1.45; }
.pengadaan-items-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.pengadaan-items-actions .hint { text-align: right; }

.pengadaan-totals-split-wrapper {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pengadaan-totals-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
.pengadaan-totals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(370px, .9fr);
  gap: 14px;
  align-items: start;
}
.pengadaan-totals-note {
  padding: 13px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 11px;
  background: var(--surface-2);
}
.pengadaan-totals-note strong { display: block; color: var(--text-2); font-size: 11.5px; font-weight: 650; }
.pengadaan-totals-note p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.pengadaan-totals-card {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
}
.pengadaan-totals-card.pengadaan-card-hps {
  border-top: 3px solid #3b82f6;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.04) 0%, var(--surface-2) 100%);
}
.pengadaan-totals-card.pengadaan-card-penawaran {
  border-top: 3px solid #10b981;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, var(--surface-2) 100%);
}
.pengadaan-totals-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.pengadaan-totals-head strong {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-2);
}
.pengadaan-totals-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, auto);
  gap: 14px;
  align-items: center;
}
.pengadaan-totals-sisa-card {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
}
.pengadaan-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}
.pengadaan-total-row:first-child { padding-top: 0; }
.pengadaan-total-row > span:first-child { color: var(--text-2); font-weight: 600; }
.pengadaan-total-row > strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pengadaan-total-row.is-ppn {
  display: grid;
  grid-template-columns: 72px 88px minmax(0, 1fr);
  align-items: center;
}
.pengadaan-ppn-field { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 10.5px; }
.pengadaan-ppn-field .input { width: 72px; height: 30px; padding: 0 7px; text-align: right; font-size: 11px; }
.pengadaan-nilai-ppn { min-width: 0; text-align: right; font-size: 9.5px; line-height: 1.35; }
.pengadaan-nilai-ppn strong { display: block; color: var(--text); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.pengadaan-total-row.is-total {
  margin-top: 8px;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--tone-indigo);
}
.pengadaan-total-row.is-total > span:first-child { color: var(--tone-indigo); font-weight: 700; }
.pengadaan-total-row.is-total > strong { color: var(--tone-indigo); font-size: 14px; }
.pengadaan-total-row.is-total.is-hps-total {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}
.pengadaan-total-row.is-total.is-hps-total > span:first-child {
  color: #2563eb;
  font-weight: 700;
}
.pengadaan-total-row.is-total.is-hps-total > strong {
  color: #2563eb;
  font-size: 14px;
}
.pengadaan-total-row.is-sisa { border-bottom: 0; padding-bottom: 0; }
.pengadaan-total-row.is-sisa > strong { color: var(--tone-emerald); }
.pengadaan-total-row.is-sisa > strong.is-over { color: var(--tone-rose); }
.pengadaan-sisa-cell.is-over { color: var(--tone-rose) !important; }

@media (max-width: 980px) {
  .pengadaan-rkakl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pengadaan-rkakl-item.is-wide { grid-column: span 2; }
  .pengadaan-rkakl-item.is-sisa { grid-column: span 4; }
  .pengadaan-totals { grid-template-columns: 1fr; }
  .pengadaan-totals-split { grid-template-columns: 1fr; }
  .pengadaan-totals-footer { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .modal.modal-pengadaan { width: 100%; }
  .pengadaan-modal-body { padding: 14px; gap: 12px; }
  .pengadaan-section { padding: 12px; }
  .pengadaan-section-head { flex-direction: column; gap: 8px; }
  .pengadaan-date-grid { grid-template-columns: 1fr; }
  .pengadaan-rkakl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pengadaan-rkakl-item.is-wide,
  .pengadaan-rkakl-item.is-sisa { grid-column: span 2; }
  .pengadaan-items-actions { flex-direction: column; align-items: stretch; }
  .pengadaan-items-actions .hint { text-align: left; }
}

@media (max-width: 520px) {
  .pengadaan-number-row { flex-wrap: wrap; }
  .pengadaan-number-row .btn { width: 100%; }
  .pengadaan-rkakl-grid { grid-template-columns: 1fr; }
  .pengadaan-rkakl-item.is-wide,
  .pengadaan-rkakl-item.is-sisa { grid-column: span 1; }
  .pengadaan-rkakl-head { align-items: flex-start; flex-direction: column; }
  .pengadaan-total-row.is-ppn { grid-template-columns: 1fr 88px; }
  .pengadaan-nilai-ppn { grid-column: 1 / -1; text-align: left; }
}

/* ---------- Sesi Login & Penawaran Penyedia ---------- */
.session-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  transition: all .15s ease;
  cursor: pointer;
  white-space: nowrap;
}
.session-role-pill:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border-2);
}
.session-role-pill.is-penyedia {
  background: var(--tone-emerald-bg);
  color: var(--tone-emerald);
  border-color: rgba(16, 185, 129, 0.35);
}
.session-role-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
  flex: none;
}
.session-role-pill.is-penyedia .session-role-dot {
  background: var(--tone-emerald);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.user-pop-role-box {
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.user-pop-role-label {
  font-size: 10.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.user-pop-role-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.user-pop-role-btn {
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s ease;
  text-align: center;
}
.user-pop-role-btn:hover {
  color: var(--text);
  border-color: var(--border-2);
}
.user-pop-role-btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.user-pop-penyedia-select {
  width: 100%;
  font-size: 11px;
  height: 30px;
  margin-top: 2px;
}

.penyedia-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.25);
  margin-bottom: 16px;
}
.penyedia-banner-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.penyedia-banner-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--tone-emerald-bg);
  color: var(--tone-emerald);
  display: grid;
  place-items: center;
  flex: none;
}
.penyedia-banner-text strong {
  display: block;
  font-size: 13.5px;
  color: var(--text);
}
.penyedia-banner-text p {
  font-size: 11.5px;
  color: var(--muted);
  margin: 2px 0 0;
}

.modal.modal-penawaran {
  width: min(1060px, 100%);
}
.penawaran-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 22px;
  max-height: calc(85vh - 120px);
  overflow-y: auto;
}
.penawaran-card {
  padding: 14px 16px;
  background: var(--surface-2);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.penawaran-items-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.penawaran-table {
  width: 100%;
  border-collapse: collapse;
}
.penawaran-table th {
  background: var(--surface-3);
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 650;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.penawaran-table th.th-hps {
  background: var(--accent-soft);
  color: var(--tone-indigo);
}
.penawaran-table th.th-penawaran {
  background: var(--tone-emerald-bg);
  color: var(--tone-emerald);
}
.penawaran-table td {
  padding: 8px 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.penawaran-price-input {
  width: 140px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-color: rgba(16, 185, 129, 0.4);
}
.penawaran-price-input:focus {
  border-color: var(--tone-emerald);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}
.penawaran-recap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 760px) {
  .penawaran-recap { grid-template-columns: 1fr; }
}
.penawaran-summary-box {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.penawaran-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-2);
}
.penawaran-summary-row.is-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}
.penawaran-summary-row.is-total strong {
  color: var(--tone-emerald);
}
.penawaran-hps-note {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--surface-3);
  border-radius: 6px;
}

/* ---------- Master Data: PPh ---------- */
.pph-nilai-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
}
.pph-nilai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pph-nilai-header-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pph-nilai-header-title label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  margin: 0;
}
.pph-nilai-header-title span {
  font-size: 11.5px;
  color: var(--muted);
}
.pph-nilai-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pph-nilai-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
}
.pph-nilai-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pph-nilai-input-wrap .input {
  padding-right: 28px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pph-nilai-input-wrap .pph-input-suffix {
  position: absolute;
  right: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
}
.pph-rate-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pph-rate-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--tone-sky-bg);
  color: var(--tone-sky);
  border: 1px solid color-mix(in srgb, var(--tone-sky) 24%, transparent);
}
.pph-rate-chip small {
  font-size: 10px;
  font-weight: normal;
  opacity: 0.85;
}
.pph-rate-chip.is-zero {
  background: var(--surface-3);
  color: var(--muted);
  border-color: var(--border);
}

/* ---------- Pengadaan: Honorarium ---------- */
.modal.modal-honorarium {
  width: min(1380px, calc(100vw - 32px));
  max-width: 1420px;
}
.modal.modal-honorarium .modal-body {
  padding: 18px 22px;
}
.modal.modal-honorarium .modal-head {
  padding: 18px 22px 0;
}
.modal.modal-honorarium .modal-foot {
  padding: 0 22px 20px;
}

.modal.modal-honorarium .form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 900px) {
  .modal.modal-honorarium .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1100px) {
  .modal.modal-honorarium .hon-bulan-grid {
    grid-template-columns: repeat(12, 1fr);
  }
}

.hon-bulan-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
}
.hon-bulan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hon-bulan-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 2px;
}
.hon-bulan-hint {
  font-size: 11.5px;
  color: var(--muted);
}
.hon-bulan-master {
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.hon-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-sm, 6px);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.hon-check-pill:hover {
  border-color: var(--tone-indigo);
  background: var(--surface-3);
}
.hon-check-pill.is-master {
  background: var(--tone-sky-bg);
  border-color: color-mix(in srgb, var(--tone-sky) 30%, transparent);
  color: var(--tone-sky);
}
.hon-bulan-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
@media (max-width: 900px) {
  .hon-bulan-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 600px) {
  .hon-bulan-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.hon-sk-section,
.hon-pegawai-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
}
.hon-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hon-sk-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hon-sk-row {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 10px;
  align-items: end;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
}
@media (max-width: 640px) {
  .hon-sk-row {
    grid-template-columns: 1fr;
  }
}
.hon-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.hon-pegawai-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.hon-pegawai-table th {
  background: var(--surface-3);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 9px 10px;
  white-space: nowrap;
}
.hon-pegawai-table td {
  padding: 6px 8px;
  vertical-align: middle;
}
.hon-pegawai-table td select,
.hon-pegawai-table td input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.hon-pegawai-table .input,
.hon-pegawai-table .select {
  font-size: 12px;
  padding: 6px 8px;
}
.hon-summary-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 4px;
}
@media (max-width: 640px) {
  .hon-summary-columns {
    grid-template-columns: 1fr;
  }
}
.hon-summary-card {
  padding: 14px 16px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hon-summary-card.is-honor {
  background: var(--tone-indigo-bg);
  border-color: color-mix(in srgb, var(--tone-indigo) 25%, transparent);
}
.hon-summary-card.is-pph {
  background: var(--tone-amber-bg);
  border-color: color-mix(in srgb, var(--tone-amber) 25%, transparent);
}
.hon-summary-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.hon-summary-card.is-honor .hon-summary-label {
  color: var(--tone-indigo);
}
.hon-summary-card.is-pph .hon-summary-label {
  color: var(--tone-amber);
}
.hon-summary-val {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.hon-summary-card.is-honor .hon-summary-val {
  color: var(--tone-indigo);
}
.hon-summary-card.is-pph .hon-summary-val {
  color: var(--tone-amber);
}
.hon-summary-sub {
  font-size: 10.5px;
  color: var(--muted);
}
.hon-netto-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md, 8px);
  background: var(--tone-emerald-bg);
  border: 1px solid color-mix(in srgb, var(--tone-emerald) 25%, transparent);
  color: var(--tone-emerald);
}
.hon-netto-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.hon-netto-text strong {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.hon-netto-note {
  font-size: 11px;
  opacity: 0.85;
}

@media (max-width: 768px) {
  .modal.modal-honorarium {
    width: 100%;
    max-height: calc(100vh - 16px);
  }
  .modal.modal-honorarium .modal-body {
    padding: 14px;
  }
}

/* Honorarium budget alert & print styling */
.hon-budget-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.45;
  transition: all .2s ease;
}
.hon-budget-alert-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.hon-budget-alert-icon .icon {
  width: 16px;
  height: 16px;
}
.hon-budget-alert-body {
  flex: 1;
  min-width: 0;
}
.hon-budget-alert-body strong {
  display: block;
  font-size: 13.5px;
  margin-bottom: 2px;
}
.hon-budget-alert-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}
.hon-budget-alert.is-over {
  border-color: color-mix(in srgb, var(--tone-rose) 40%, transparent);
  background: var(--tone-rose-bg);
}
.hon-budget-alert.is-over .hon-budget-alert-icon {
  background: color-mix(in srgb, var(--tone-rose) 20%, transparent);
  color: var(--tone-rose);
}
.hon-budget-alert.is-over strong {
  color: var(--tone-rose);
}
.hon-budget-alert.is-ok {
  border-color: color-mix(in srgb, var(--tone-emerald) 35%, transparent);
  background: var(--tone-emerald-bg);
}
.hon-budget-alert.is-ok .hon-budget-alert-icon {
  background: color-mix(in srgb, var(--tone-emerald) 20%, transparent);
  color: var(--tone-emerald);
}
.hon-budget-alert.is-ok strong {
  color: var(--tone-emerald);
}
.hon-summary-card.is-honor.is-over {
  border-color: color-mix(in srgb, var(--tone-rose) 40%, transparent);
  background: var(--tone-rose-bg);
}
.hon-summary-card.is-honor.is-over .hon-summary-label,
.hon-summary-card.is-honor.is-over .hon-summary-val {
  color: var(--tone-rose);
}

.pdoc.is-landscape {
  width: 297mm;
  min-height: 210mm;
  padding: 12mm 14mm 12mm;
}

@media print {
  body.is-printing-honorarium .pdoc {
    width: auto;
    min-height: 0;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
  }
  body.is-printing-honorarium .pdoc.is-landscape {
    width: auto;
    min-height: 0;
    padding: 0;
  }
}

/* Honorarium Print Menu Table styling */
.modal.modal-honorarium-print {
  width: min(1200px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
}
.modal.modal-honorarium-print .modal-body {
  overflow-y: auto;
  padding: 18px 22px;
}
.hon-print-summary-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  margin-bottom: 18px;
}
.hon-print-summary-item span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  margin-bottom: 3px;
}
.hon-print-summary-item strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.hon-print-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  overflow-x: auto;
  background: var(--surface);
}
.hon-print-table {
  width: 100%;
  border-collapse: collapse;
}
.hon-print-table th {
  background: var(--surface-2);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.hon-print-table th.cell-center,
.hon-print-table td.cell-center {
  text-align: center;
}
.hon-print-table th.cell-num,
.hon-print-table td.cell-num {
  text-align: center;
  width: 50px;
}
.hon-print-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.hon-print-table tr:last-child td {
  border-bottom: 0;
}
.hon-print-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.hon-print-actions .btn {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  gap: 5px;
}
.hon-print-actions .btn:hover {
  filter: brightness(0.95);
}

/* ---------------- Honorarium Daftar Pembayaran & Nominatif Document Layout ---------------- */
.pdoc-hon-pembayaran,
.pdoc-hon-nominatif {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #0f172a;
  background: #ffffff;
  box-sizing: border-box;
}

.hon-pay-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.hon-pay-meta-right {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  column-gap: 8px;
  row-gap: 2px;
  font-size: 8.5pt;
  color: #0f172a;
}

.hon-pay-meta-row {
  display: contents;
}

.hon-pay-meta-lbl {
  font-weight: 500;
  white-space: nowrap;
}

.hon-pay-meta-sep {
  font-weight: 500;
  text-align: center;
}

.hon-pay-meta-val {
  font-weight: 500;
  white-space: nowrap;
}

.hon-pay-header {
  text-align: center;
  margin-bottom: 14px;
}

.hon-pay-title {
  font-size: 14pt;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #0f172a;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.hon-pay-sub {
  font-size: 9pt;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.35;
}

.hon-pay-month {
  margin-top: 6px;
  font-weight: 700;
  font-size: 10pt;
}

.hon-pay-sk-block {
  font-size: 8.5pt;
  color: #1e293b;
  margin-bottom: 10px;
  line-height: 1.45;
}

.hon-pay-sk-lbl {
  font-weight: 500;
  margin-bottom: 2px;
}

.hon-pay-sk-text {
  font-weight: 400;
}

.hon-pay-table-box {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #ffffff;
}

.hon-pay-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8.5pt;
}

.hon-pay-table thead tr {
  background-color: #0b1727;
  color: #ffffff;
}

.hon-pay-table thead th {
  padding: 8px 6px;
  font-weight: 700;
  font-size: 8pt;
  letter-spacing: 0.5px;
  text-align: center;
  border-right: 1px solid #1e293b;
  color: #ffffff;
}

.hon-pay-table thead th:last-child {
  border-right: none;
}

.hon-pay-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
}

.hon-pay-table tbody tr:last-child {
  border-bottom: none;
}

.hon-pay-table tbody td {
  padding: 7px 6px;
  vertical-align: middle;
  color: #1e293b;
  border-right: 1px solid #e2e8f0;
}

.hon-pay-table tbody td:last-child {
  border-right: none;
}

.hon-pay-gol-pill {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  font-size: 7.8pt;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  white-space: nowrap;
}

.hon-pay-pph-pct {
  color: #e11d48;
  font-weight: 700;
  font-size: 8pt;
}

.hon-pay-pph-sub {
  color: #64748b;
  font-size: 7.5pt;
  margin-top: 1px;
}

.hon-pay-table tfoot tr {
  background-color: #0b1727;
  color: #ffffff;
}

.hon-pay-table tfoot td {
  padding: 8px 6px;
  border-right: 1px solid #1e293b;
  vertical-align: middle;
}

.hon-pay-table tfoot td:last-child {
  border-right: none;
}

.hon-pay-foot-label {
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #ffffff;
}

.hon-pay-foot-num {
  text-align: right;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.hon-pay-foot-center {
  text-align: center;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.hon-pay-foot-netto {
  text-align: right;
  font-weight: 800;
  color: #34d399; /* Bright emerald */
  font-size: 9pt;
  white-space: nowrap;
}

.hon-pay-terbilang-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 22px;
}

.hon-pay-terbilang-lbl {
  font-size: 8.5pt;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.5px;
}

.hon-pay-terbilang-val {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 14px;
  font-size: 8.5pt;
  font-weight: 700;
  font-style: italic;
  color: #0f172a;
}

.hon-pay-signs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  column-gap: 24px;
  text-align: center;
  margin-top: 22px;
  font-size: 8.5pt;
  color: #1e293b;
}

.hon-pay-sign-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.hon-pay-sign-header {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.hon-pay-sign-role {
  line-height: 1.35;
  font-weight: 500;
}

.hon-pay-sign-space {
  height: 52px;
}

.hon-pay-sign-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hon-pay-sign-name {
  font-weight: 700;
  text-decoration: underline;
  color: #0f172a;
  line-height: 1.3;
}

.hon-pay-sign-nip {
  font-size: 8pt;
  color: #475569;
  margin-top: 1px;
}

@media print {
  .pdoc-hon-pembayaran,
  .pdoc-hon-nominatif {
    font-size: 8.5pt !important;
  }
  .hon-pay-table thead tr,
  .hon-pay-table tfoot tr {
    background-color: #0b1727 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .hon-pay-table thead th,
  .hon-pay-table tfoot td {
    color: #ffffff !important;
  }
  .hon-pay-foot-netto {
    color: #34d399 !important;
  }
  .hon-pay-gol-pill {
    border: 1px solid #cbd5e1 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .hon-pay-terbilang-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}



/* ---------- Pengadaan: Perjalanan Dinas ---------- */
.modal.modal-perjalanan-dinas {
  width: min(1300px, calc(100vw - 32px));
  max-width: 1350px;
}
.modal.modal-perjalanan-dinas .modal-body {
  padding: 18px 22px;
}
.modal.modal-perjalanan-dinas .modal-head {
  padding: 18px 22px 0;
}
.modal.modal-perjalanan-dinas .modal-foot {
  padding: 0 22px 20px;
}

.pd-section-card {
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}
.pd-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #0f172a);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pd-form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.pd-form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 768px) {
  .pd-form-grid-2, .pd-form-grid-3 {
    grid-template-columns: 1fr;
  }
}

.pd-pegawai-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.pd-pegawai-table th,
.pd-pegawai-table td {
  padding: 8px 10px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.pd-pegawai-table th {
  background: var(--surface-3, #f1f5f9);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text, #334155);
}
.pd-peg-card-info {
  margin-top: 4px;
  line-height: 1.25;
}
.pd-btn-biaya {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 9px;
  font-size: 0.8rem;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
}
.pd-btn-biaya:hover {
  background: var(--surface-2, #f8fafc);
  border-color: #94a3b8;
}
.pd-btn-biaya .badge {
  font-size: 0.75rem;
  font-weight: 600;
}

/* Sub-dialog for Biaya Rincian & Riil */
.pd-subdialog-scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1200;
}
.pd-subdialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  z-index: 1201;
  display: flex;
  flex-direction: column;
}

.pd-sub-table {
  width: 100%;
  border-collapse: collapse;
}
.pd-sub-table th,
.pd-sub-table td {
  padding: 8px 10px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.pd-sub-table th {
  background: var(--surface-3, #f1f5f9);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text, #334155);
}

.pd-subdialog.pd-subdialog-wide {
  width: min(1280px, calc(100vw - 32px)) !important;
  max-width: 1300px !important;
}

/* Perjalanan Dinas table styling matching Pengadaan Barang perfectly */
table.data.pd-data-table td.cell-wrap {
  min-width: 200px !important;
}
table.pd-data-table td.cell-pelaksana {
  min-width: 170px;
  white-space: normal;
  line-height: 1.4;
}
table.pd-data-table td.cell-rute {
  min-width: 150px;
  white-space: normal;
  line-height: 1.4;
}

/* Global compact & tidy table styling for all sub-menus */
table.data td,
table.data th {
  padding: 6px 10px !important;
}
table.data th {
  font-size: 10.5px !important;
  letter-spacing: .04em !important;
}
table.data td {
  font-size: 12px !important;
  line-height: 1.3 !important;
}
table.data td.cell-wrap {
  line-height: 1.32 !important;
}
table.data.pd-data-table td.cell-wrap {
  min-width: 200px !important;
}
table.pd-data-table td.cell-pelaksana {
  min-width: 150px !important;
  white-space: normal;
  line-height: 1.3 !important;
}
table.pd-data-table td.cell-rute {
  min-width: 130px !important;
  white-space: normal;
  line-height: 1.3 !important;
}

/* ---------------- SPK Pengadaan Barang Styles ---------------- */
.modal-spk-pengadaan {
  max-width: 1040px !important;
  width: min(1040px, calc(100vw - 32px)) !important;
}

.spk-modal-tabs-wrap {
  padding: 10px 24px 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.spk-modal-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 10px;
}

.spk-modal-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
}

.spk-modal-tab:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}

.spk-modal-tab.is-active {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.spk-modal-tab .icon {
  width: 15px;
  height: 15px;
}

.spk-tab-pane {
  display: none;
}

.spk-tab-pane.is-active {
  display: block;
}

.spk-schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 12px;
}

.spk-milestone-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  transition: border-color .15s ease, background .15s ease;
}

.spk-milestone-card:hover {
  border-color: var(--border-strong, #cbd5e1);
}

.spk-milestone-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 650;
  margin-bottom: 8px;
  color: var(--text);
}

.spk-manual-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: normal;
  color: var(--muted);
  cursor: pointer;
}

.spk-manual-check input[type="checkbox"] {
  cursor: pointer;
}

.spk-milestone-inputs {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
}

.spk-min-date-hint {
  font-size: 9.5px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.spk-hps-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  margin-top: 8px;
}

.spk-hps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.spk-hps-table th {
  background: var(--surface-2);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
}

.spk-hps-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

textarea.spk-item-spek {
  min-height: 52px;
  resize: vertical;
  line-height: 1.4;
  font-family: inherit;
  font-size: 11px;
}

.spk-hps-table tbody tr:hover {
  background: var(--surface-2);
}

.spk-hps-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

@media (max-width: 768px) {
  .spk-schedule-grid {
    grid-template-columns: 1fr;
  }
  .spk-hps-summary-grid {
    grid-template-columns: 1fr;
  }
}

.spk-summary-col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
}

.spk-summary-col h4 {
  margin: 0 0 10px 0;
  font-size: 12px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.spk-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.spk-summary-row strong,
.spk-summary-row span {
  font-variant-numeric: tabular-nums;
}

.spk-summary-row strong {
  color: var(--text);
}

.spk-total-row {
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

/* ---------------- Modal & Table Styling: Termin Kontraktual ---------------- */
.modal.modal-termin-kontraktual {
  width: min(1320px, calc(100vw - 24px)) !important;
  max-width: 1320px !important;
}

.ktr-termin-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--surface-2);
}

.ktr-termin-table-wrap::-webkit-scrollbar {
  height: 9px;
}

.ktr-termin-table-wrap::-webkit-scrollbar-track {
  background: var(--surface-2, rgba(0,0,0,0.06));
  border-radius: 6px;
}

.ktr-termin-table-wrap::-webkit-scrollbar-thumb {
  background: var(--accent, #0284c7);
  border-radius: 6px;
}

.ktr-termin-table-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover, #0369a1);
}

/* ---------------- SPTJB & Nominatif Styles ---------------- */
.sptjb-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.sptjb-radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm, 6px);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.sptjb-radio-pill:hover {
  border-color: var(--primary);
  background: var(--surface-2);
}
.sptjb-radio-pill:has(input:checked),
.sptjb-radio-pill.is-active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  font-weight: 600;
}
.modal-sptjb {
  width: min(1240px, calc(100vw - 32px)) !important;
  max-width: 1260px !important;
}
.sptjb-subdialog {
  width: min(1360px, calc(100vw - 32px)) !important;
  max-width: 1380px !important;
}

/* ---------------- PEMBAYARAN DASHBOARD & CARDS ---------------- */
.payment-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 1100px) {
  .payment-dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .payment-dashboard-grid {
    grid-template-columns: 1fr;
  }
}
.payment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.payment-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(15, 76, 129, 0.08);
}
.payment-card-span-full {
  grid-column: 1 / -1;
}
.payment-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.payment-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.payment-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--accent);
}
.payment-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.payment-card-val {
  font-size: 22px;
  font-weight: 750;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.payment-card-sub {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
}
.payment-card-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.payment-card-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: all .15s ease;
}
.payment-card-print-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.payment-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.payment-module-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.payment-module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.payment-module-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.payment-module-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  font-size: 11px;
}
.payment-module-metric {
  display: flex;
  flex-direction: column;
}
.payment-module-metric-label {
  font-size: 9.5px;
  color: var(--muted);
}
.payment-module-metric-val {
  font-weight: 650;
  color: var(--text);
}

/* ---------------- LAPORAN REALISASI ANGGARAN (LRA) ---------------- */
.lra-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lra-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.lra-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.lra-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.lra-stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--accent);
}
.lra-stat-icon .icon {
  width: 15px;
  height: 15px;
}
.lra-stat-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono, monospace);
  line-height: 1.2;
}
.lra-stat-sub {
  font-size: 11px;
  color: var(--muted);
}
.lra-toolbar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.lra-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 200px;
}
.lra-filter-group.is-kegiatan {
  flex: 2 1 300px;
}
.lra-filter-group.is-bulan {
  flex: 1 1 180px;
}
.lra-filter-group.is-search {
  flex: 1.5 1 220px;
}
.lra-filter-group.is-action {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.lra-filter-label {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.lra-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 35px;
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.lra-btn-download:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.lra-btn-download .icon {
  width: 15px;
  height: 15px;
}
.lra-table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.lra-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.lra-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
  min-width: 1020px;
}
.lra-table th {
  background: var(--surface-2, #f8fafc);
  color: var(--muted, #64748b);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 10px 8px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  vertical-align: middle;
}
.lra-table th.lra-th-center {
  text-align: center;
}
.lra-table th.lra-th-right {
  text-align: right;
}
.lra-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.lra-table tbody tr:hover {
  background: var(--hover, rgba(0,0,0,0.02));
}
.lra-table tfoot th,
.lra-table tfoot td {
  background: var(--surface-2, #f1f5f9);
  font-weight: 700;
  font-size: 11px;
  padding: 11px 8px;
  border-top: 2px solid var(--border-strong, #cbd5e1);
  color: var(--text);
}
.lra-cell-account {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
}
.lra-account-code {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: var(--text);
  font-size: 11.5px;
}
.lra-account-name {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}
.lra-cell-num {
  text-align: right;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  white-space: nowrap;
}
.lra-stat-metric-pair {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.lra-badge-pct {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 650;
  font-family: var(--font-mono, monospace);
  text-align: right;
  line-height: 1.1;
}
.lra-badge-realisasi {
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
}
.lra-badge-sisa {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
.lra-badge-sisa.is-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}
.lra-badge-sisa.is-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}
.lra-empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}
.lra-empty-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.6;
}

/* ---------------- LAPORAN BPK (PEMERIKSAAN PERJALANAN DINAS) ---------------- */
.lbpk-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lbpk-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.lbpk-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.lbpk-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.lbpk-stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--accent);
}
.lbpk-stat-icon .icon {
  width: 15px;
  height: 15px;
}
.lbpk-stat-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono, monospace);
  line-height: 1.2;
}
.lbpk-stat-sub {
  font-size: 11px;
  color: var(--muted);
}
.lbpk-toolbar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.lbpk-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 200px;
}
.lbpk-filter-group.is-bulan {
  flex: 1 1 220px;
}
.lbpk-filter-group.is-search {
  flex: 2 1 280px;
}
.lbpk-filter-group.is-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.lbpk-filter-label {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.lbpk-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 35px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.lbpk-btn-print {
  background: var(--accent);
  color: #fff;
}
.lbpk-btn-print:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.lbpk-btn-excel {
  background: #107c41;
  color: #ffffff;
}
.lbpk-btn-excel:hover {
  background: #0b6a36;
  color: #ffffff;
  transform: translateY(-1px);
}
.lbpk-btn-action .icon {
  width: 15px;
  height: 15px;
}
.lbpk-table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.lbpk-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.lbpk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
  min-width: 1350px;
}
.lbpk-table th {
  background: var(--surface-2, #f8fafc);
  color: var(--muted, #64748b);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 10px 8px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  vertical-align: middle;
}
.lbpk-table th.lbpk-th-center {
  text-align: center;
}
.lbpk-table th.lbpk-th-right {
  text-align: right;
}
.lbpk-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
  font-size: 11px;
  line-height: 1.35;
}
.lbpk-table tbody tr:hover {
  background: var(--hover, rgba(0,0,0,0.02));
}
.lbpk-table tfoot th,
.lbpk-table tfoot td {
  background: var(--surface-2, #f1f5f9);
  font-weight: 700;
  font-size: 11px;
  padding: 11px 8px;
  border-top: 2px solid var(--border-strong, #cbd5e1);
  color: var(--text);
}
.lbpk-cell-title {
  font-weight: 650;
  color: var(--text);
}
.lbpk-cell-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}
.lbpk-cell-code {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  color: var(--muted);
}
.lbpk-cell-num {
  text-align: right;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  white-space: nowrap;
}
.lbpk-detail-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  padding: 3px 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 10px;
  margin-bottom: 3px;
  max-width: 100%;
}
.lbpk-detail-chip:last-child {
  margin-bottom: 0;
}
.lbpk-empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Modal Laporan Print Preview (Landscape A4) ---------- */
.modal.modal-laporan-print {
  width: min(1500px, calc(100vw - 32px)) !important;
  max-width: 1500px !important;
  height: min(92vh, 920px) !important;
  max-height: calc(100vh - 32px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25) !important;
}

.modal.modal-laporan-print .modal-head {
  flex: none !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 14px 22px !important;
  border-bottom: 1px solid var(--border) !important;
  background: var(--surface) !important;
}

.modal.modal-laporan-print .modal-laporan-print-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  padding: 24px 20px !important;
  background: var(--bg-muted, #f1f5f9) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.modal.modal-laporan-print .lra-print-preview-wrap,
.modal.modal-laporan-print .lbpk-print-preview-wrap {
  width: 100% !important;
  max-width: 1320px !important;
  min-width: 1080px !important;
  background: #ffffff !important;
  padding: 28px 34px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;
}

.pdoc.pdoc-landscape {
  width: 100% !important;
  max-width: 100% !important;
  min-height: auto !important;
  box-shadow: none !important;
}

@media (max-width: 768px) {
  .modal.modal-laporan-print {
    width: calc(100vw - 16px) !important;
    height: calc(100vh - 16px) !important;
    max-height: calc(100vh - 16px) !important;
  }
  .modal.modal-laporan-print .lra-print-preview-wrap,
  .modal.modal-laporan-print .lbpk-print-preview-wrap {
    min-width: 900px !important;
    padding: 16px !important;
  }
}




/* =========================================================
   Backup & Restore Styles — SINTA PU
   ========================================================= */
.br-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Stats Bar */
.br-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.br-stat-card {
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.br-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.br-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
}
.br-stat-icon .icon {
  width: 22px;
  height: 22px;
}
.br-stat-icon.tone-indigo { background: var(--tone-indigo-bg); color: var(--tone-indigo); }
.br-stat-icon.tone-emerald { background: var(--tone-emerald-bg); color: var(--tone-emerald); }
.br-stat-icon.tone-amber { background: var(--tone-amber-bg); color: var(--tone-amber); }
.br-stat-icon.tone-sky { background: var(--tone-sky-bg); color: var(--tone-sky); }

.br-stat-info strong {
  display: block;
  font-size: 18px;
  font-weight: 750;
  color: var(--text);
  line-height: 1.2;
}
.br-stat-info span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

/* Main 2-column Grid */
.br-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.br-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.br-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.br-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.br-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
}
.br-card-icon .icon {
  width: 20px;
  height: 20px;
}
.br-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.br-card-desc {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.5;
}

/* Scope Selector in Backup */
.br-scope-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.br-scope-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.br-scope-radios {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}
.br-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  color: var(--text);
  user-select: none;
}
.br-radio-label input {
  accent-color: var(--accent);
  cursor: pointer;
}

.br-module-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.br-module-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.br-module-chip:hover {
  border-color: var(--accent);
}
.br-module-chip input {
  accent-color: var(--accent);
  cursor: pointer;
}

/* Meta preview */
.br-meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 12px;
}
.br-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.br-meta-label {
  color: var(--muted);
}
.br-meta-val {
  font-weight: 600;
  color: var(--text);
}

.br-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

/* Drag and Drop Zone */
.br-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: 16px;
  background: var(--surface-2);
  padding: 26px 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  user-select: none;
}
.br-dropzone:hover, .br-dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.br-dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--accent);
  box-shadow: var(--shadow-xs);
}
.br-dropzone-icon .icon {
  width: 22px;
  height: 22px;
}
.br-dropzone-title {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text);
}
.br-dropzone-sub {
  font-size: 11.5px;
  color: var(--muted);
}

/* Pre-Restore Inspection Card */
.br-inspect-box {
  background: var(--surface-2);
  border: 1px solid var(--tone-emerald);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}
.br-inspect-box[hidden] {
  display: none !important;
}
.br-inspect-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.br-inspect-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--tone-emerald-bg);
  color: var(--tone-emerald);
  font-size: 11.5px;
  font-weight: 650;
}
.br-inspect-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.br-inspect-item {
  font-size: 11.5px;
}
.br-inspect-item strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}
.br-inspect-item span {
  color: var(--muted);
}

/* Semantic Progress Bar per modern-web-guidance */
.br-progress-wrap {
  margin: 14px 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.br-progress-wrap[hidden] {
  display: none !important;
}
.br-progress-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.br-progress-bar {
  appearance: none;
  border: 0 solid;
  overflow: clip;
  border-radius: 999px;
  height: 10px;
  width: 100%;
  background: var(--surface-3);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
.br-progress-bar::-webkit-progress-bar {
  background: transparent;
}
.br-progress-bar::-webkit-progress-value {
  background: linear-gradient(90deg, var(--accent) 0%, #10b981 100%);
  border-radius: 999px;
  transition: inline-size 0.3s;
}
.br-progress-bar::-moz-progress-bar {
  background: linear-gradient(90deg, var(--accent) 0%, #10b981 100%);
  border-radius: 999px;
  transition: inline-size 0.3s;
}

/* Snapshot History Card */
.br-snapshot-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-xs);
}
.br-snapshot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.br-snapshot-table-wrap {
  overflow-x: auto;
}
.br-snapshot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.br-snapshot-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1.5px solid var(--border-strong);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.br-snapshot-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.br-snapshot-table tr:hover td {
  background: var(--surface-2);
}
.br-snap-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 1024px) {
  .br-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .br-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .br-stats-bar { grid-template-columns: 1fr; }
  .br-inspect-grid { grid-template-columns: 1fr; }
}


/* =========================================================
   SECURITY HARDENING, ENCRYPTION & RATE LIMITING STYLES
   ========================================================= */

/* Backup Encryption UI */
.br-encrypt-option {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s ease;
}
.br-encrypt-option:hover {
  border-color: var(--border-strong, rgba(255, 255, 255, 0.2));
}
.br-encrypt-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text);
}
.br-encrypt-check-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary, #6366f1);
  cursor: pointer;
}
.br-encrypt-pass-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.br-encrypt-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.45;
}

/* Restore Decryption UI */
.br-decrypt-box {
  padding: 16px;
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  margin-bottom: 16px;
  animation: fadeIn 0.25s ease-out;
}
.br-decrypt-head {
  margin-bottom: 12px;
}
.br-decrypt-head p {
  font-size: 12.5px;
  color: var(--text);
  margin-top: 8px;
  line-height: 1.4;
}
.br-decrypt-input-row {
  display: flex;
  gap: 10px;
}
.br-decrypt-input-row .input {
  flex: 1;
}

/* Auth Rate Limiting Lockout Banner */
.auth-alert.is-lockout {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #ef4444 !important;
  animation: shake 0.4s ease;
}
.auth-alert.is-lockout .auth-alert-content strong {
  color: #ef4444 !important;
}
.auth-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.5);
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}


/* =========================================================
   SINTA-PU — General Settings & Dynamic Branding Styles
   ========================================================= */
.brand-monogram {
  font-family: inherit;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: -0.02em;
  user-select: none;
}

.logo-type-card {
  transition: all .2s ease;
  user-select: none;
}

.logo-type-card:hover {
  border-color: var(--accent) !important;
  transform: translateY(-1px);
}

.logo-type-card.is-active {
  border-color: var(--accent) !important;
  background: var(--surface-3) !important;
  box-shadow: 0 0 0 2px var(--accent-subtle, rgba(37, 99, 235, 0.2));
}

#genPreviewBox {
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

#genPreviewBox:hover {
  border-color: var(--accent);
}

.preset-icon-btn.is-active {
  border-color: var(--accent) !important;
  background: var(--surface-3) !important;
  color: var(--accent) !important;
}

/* =========================================================
   SINTA-PU — Dashboard Monitoring Kegiatan & Grafik Realisasi
   ========================================================= */
.dash-kegiatan-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Executive Summary Stats Bar */
.dash-exec-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 4px;
}

.exec-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.exec-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.exec-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}

.exec-stat-icon.tone-primary {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.exec-stat-icon.tone-rose {
  background: rgba(225, 29, 72, 0.1);
  color: #e11d48;
}

.exec-stat-icon.tone-emerald {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.exec-stat-icon.tone-amber {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.exec-stat-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.exec-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.exec-stat-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exec-stat-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

/* Kegiatan Section & Grid */
.kegiatan-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kegiatan-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.kegiatan-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.kegiatan-section-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 2px 0 0 0;
}

.kegiatan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.kegiatan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.kegiatan-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
}

.kegiatan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  opacity: 0.85;
}

.kegiatan-card.status-optimal::before {
  background: linear-gradient(90deg, #10b981, #059669);
}

.kegiatan-card.status-sedang::before {
  background: linear-gradient(90deg, #2563eb, #0284c7);
}

.kegiatan-card.status-rendah::before {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.kegiatan-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.kegiatan-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kegiatan-head-main {
  flex: 1;
  min-width: 0;
}

.kegiatan-meta-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.kegiatan-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kegiatan-card-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3 Metrics Box: Anggaran, Blokir, Realisasi */
.kegiatan-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  background: var(--surface-2, rgba(248, 250, 252, 0.6));
  border: 1px solid var(--border-subtle, rgba(226, 232, 240, 0.8));
  border-radius: 10px;
  padding: 12px 10px;
}

.kegiatan-metric-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: center;
}

.kegiatan-metric-cell:not(:last-child) {
  border-right: 1px solid var(--border-subtle, rgba(226, 232, 240, 0.8));
}

.kegiatan-metric-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.kegiatan-metric-val {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kegiatan-metric-val.val-anggaran {
  color: #1e40af;
}

.kegiatan-metric-val.val-blokir {
  color: #e11d48;
}

.kegiatan-metric-val.val-realisasi {
  color: #059669;
}

/* Progress Bar Realisasi */
.kegiatan-progress-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kegiatan-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.kegiatan-progress-label {
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kegiatan-progress-pct {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.kegiatan-progress-pct.tone-emerald {
  color: #059669;
}

.kegiatan-progress-pct.tone-primary {
  color: #2563eb;
}

.kegiatan-progress-pct.tone-amber {
  color: #d97706;
}

.kegiatan-progress-track {
  width: 100%;
  height: 10px;
  background: var(--surface-3, rgba(226, 232, 240, 0.7));
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.kegiatan-progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.kegiatan-progress-fill.fill-emerald {
  background: linear-gradient(90deg, #10b981, #059669);
}

.kegiatan-progress-fill.fill-primary {
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.kegiatan-progress-fill.fill-amber {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.kegiatan-progress-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.kegiatan-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  gap: 8px;
}

/* Grafik Realisasi Card */
.realisasi-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.realisasi-chart-head {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.realisasi-chart-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.realisasi-chart-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 3px 0 0 0;
}

.realisasi-chart-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.realisasi-chart-wrap {
  padding: 16px 20px 20px;
  position: relative;
  overflow-x: auto;
}

.realisasi-chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: var(--surface-2, rgba(248, 250, 252, 0.5));
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  font-size: 12px;
}

.legend-bar-sample {
  display: inline-block;
  width: 14px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

.legend-bar-real {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
}

.legend-bar-target {
  background: rgba(245, 158, 11, 0.25);
  border: 1px dashed #f59e0b;
}

.chart-stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 16px 24px;
  background: var(--surface-2, rgba(248, 250, 252, 0.4));
  border-top: 1px solid var(--border);
}

.chart-stat-item {
  display: flex;
  flex-direction: column;
}

.chart-stat-item small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.chart-stat-item strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}

/* Tooltip Popup on SVG Chart */
.dash-chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  z-index: 50;
  transition: opacity .15s ease, transform .15s ease;
  white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .kegiatan-grid {
    grid-template-columns: 1fr;
  }
  .dash-exec-bar {
    grid-template-columns: 1fr 1fr;
  }
  .realisasi-chart-head {
    flex-direction: column;
    align-items: stretch;
  }
}
@media (max-width: 480px) {
  .dash-exec-bar {
    grid-template-columns: 1fr;
  }
  .kegiatan-metrics-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .kegiatan-metric-cell:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle, rgba(226, 232, 240, 0.8));
    padding-bottom: 8px;
    margin-bottom: 8px;
  }
}
.chart-month-col:hover .col-hover-bg {
  fill: rgba(37, 99, 235, 0.05);
}
.realisasi-monthly-svg {
  min-width: 600px;
}
