/* PANDU — sistem e-document
   Palet biru muda & putih. Satu keluarga huruf: Plus Jakarta Sans. */

:root {
  --white: #ffffff;
  --mist: #f3f8fc;
  --sky-50: #eef7fd;
  --sky-100: #dbeffb;
  --sky-200: #b4dcf5;
  --sky-300: #8fcbf0;
  --sky-400: #5db4e8;
  --sky-500: #2f9ad9;
  --sky-600: #1b74b0;
  --sky-700: #155c8c;
  --ink: #0f3352;
  --text: #29425a;
  --muted: #64809a;
  --line: #dce9f3;
  --line-strong: #c4dbec;

  --green: #17845a; --green-bg: #e2f5ec;
  --amber: #9a6a00; --amber-bg: #fdf2d8;
  --red: #c23b3b;   --red-bg: #fde9e9;
  --violet: #5d47c2; --violet-bg: #ece9fc;
  --teal: #0f7c86;  --teal-bg: #dff4f5;
  --blue: #1b74b0;  --blue-bg: #e2f1fb;
  --neutral: #5d7286; --neutral-bg: #edf2f6;

  --r-xs: 6px; --r-sm: 9px; --r-md: 13px; --r-lg: 18px;
  --shadow: 0 1px 2px rgba(15, 51, 82, .05), 0 6px 20px -12px rgba(15, 51, 82, .18);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sidebar: 262px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.55; color: var(--text); background: var(--mist); font-feature-settings: "tnum" 0; }
a { color: var(--sky-600); text-decoration: none; }
a:hover { color: var(--sky-700); text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 .75em; }
img { max-width: 100%; }
small, .small { font-size: 12.5px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--sky-500); outline-offset: 2px; border-radius: 4px; }
.ic { flex-shrink: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Kerangka ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--white);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text small { font-size: 11px; color: var(--muted); line-height: 1.3; margin-top: 6px; }
.logo-mark { display: block; flex-shrink: 0; height: auto; }
.logo-word { display: block; width: auto; align-self: flex-start; }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nav-label { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 16px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; margin: 1px 0; border-radius: var(--r-sm);
  color: var(--text); font-weight: 500; font-size: 14px;
}
.nav-item .ic { color: var(--muted); }
.nav-item:hover { background: var(--sky-50); text-decoration: none; color: var(--ink); }
.nav-item.is-active { background: var(--sky-100); color: var(--ink); font-weight: 650; }
.nav-item.is-active .ic { color: var(--sky-600); }
.nav-item span { flex: 1; }
.nav-badge { min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--sky-500); color: #fff; font-size: 11.5px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.sidebar-foot { border-top: 1px solid var(--line); padding: 12px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); color: var(--text); }
.me:hover { background: var(--sky-50); text-decoration: none; }
.me span { display: flex; flex-direction: column; min-width: 0; }
.me strong { font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--muted); font-size: 12px; }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 28px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); min-height: 66px;
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.topsearch { position: relative; display: flex; align-items: center; width: min(340px, 32vw); }
.topsearch .ic { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.topsearch input[type=search] { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--mist); font: inherit; font-size: 13.5px; color: var(--text); }
.topsearch input[type=search]:focus { outline: none; border-color: var(--sky-400); background: #fff; box-shadow: 0 0 0 3px var(--sky-100); }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--sky-50); color: var(--ink); }
.bell b { position: absolute; top: 5px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.usermenu { position: relative; }
.usermenu-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; padding: 4px 10px 4px 4px; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.usermenu-btn:hover { border-color: var(--line-strong); }
.usermenu-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 16px 40px -16px rgba(15, 51, 82, .35); padding: 6px; }
.usermenu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; }
.usermenu-head strong { color: var(--ink); }
.usermenu-head small { color: var(--muted); }
.usermenu-pop a, .usermenu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text); border: 0; background: none; font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.usermenu-pop a:hover, .usermenu-pop button:hover { background: var(--sky-50); text-decoration: none; }
.content { flex: 1; padding: 26px 28px 40px; max-width: 1360px; width: 100%; }
.foot { display: flex; justify-content: space-between; gap: 12px; padding: 16px 28px 22px; font-size: 12px; color: var(--muted); }
.scrim { display: none; }
.only-mobile { display: none; }

/* ---------- Avatar ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.avatar-sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar-xs { width: 26px; height: 26px; font-size: 10.5px; }
.av-0 { background: var(--sky-100); color: var(--sky-700); }
.av-1 { background: #e3f0ff; color: #2257a5; }
.av-2 { background: #dff4f5; color: #0f6f77; }
.av-3 { background: #ebe8fb; color: #5544b0; }
.av-4 { background: #e6f4ea; color: #1f7a48; }

/* ---------- Panel & grid ---------- */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.panel + .panel, .panel + .grid, .grid + .panel, .grid + .grid { margin-top: 20px; }
.grid > .panel + .panel { margin-top: 0; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { font-size: 15.5px; flex: 1; min-width: 160px; }
.panel-head .sub { font-size: 12.5px; color: var(--muted); font-weight: 500; display: block; margin-top: 2px; }
.panel-body { padding: 20px; }
.panel-body.tight { padding: 0; }
.panel-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; background: var(--sky-50); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.g-main-wide { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.stack > * + * { margin-top: 20px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }

/* ---------- Tombol ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: var(--r-sm); border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; line-height: 1.3; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--sky-600); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 4px 12px -6px rgba(27, 116, 176, .7); }
.btn-primary:hover { background: var(--sky-700); color: #fff; }
.btn-soft { background: var(--sky-100); color: var(--sky-700); }
.btn-soft:hover { background: var(--sky-200); color: var(--ink); }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--sky-400); color: var(--sky-700); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #126b49; color: #fff; }
.btn-danger { background: #fff; color: var(--red); border-color: #f0c4c4; }
.btn-danger:hover { background: var(--red-bg); color: var(--red); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: var(--r-xs); }
.btn-lg { padding: 12px 20px; font-size: 15px; }
.btn-block { width: 100%; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--sky-600); cursor: pointer; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--red); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Pill status ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-amber { background: var(--amber-bg); color: var(--amber); }
.pill-red { background: var(--red-bg); color: var(--red); }
.pill-violet { background: var(--violet-bg); color: var(--violet); }
.pill-teal { background: var(--teal-bg); color: var(--teal); }
.pill-blue { background: var(--blue-bg); color: var(--blue); }
.pill-neutral { background: var(--neutral-bg); color: var(--neutral); }
.tag { display: inline-block; padding: 2px 8px; border-radius: var(--r-xs); background: var(--sky-50); color: var(--sky-700); font-size: 12px; font-weight: 600; border: 1px solid var(--sky-100); }

/* Nomor dokumen: label tab seperti map arsip */
.docno {
  display: inline-flex; align-items: center; position: relative; padding: 3px 12px 3px 10px; font-size: 12.5px; font-weight: 700;
  color: var(--ink); background: var(--sky-100); border-radius: 7px 12px 4px 7px; font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap;
}
.docno.trial { background: var(--violet-bg); color: var(--violet); }
.docno.off { background: var(--neutral-bg); color: var(--neutral); }
.rev { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Formulir ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field .req { color: var(--red); }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font: inherit; font-size: 14px; color: var(--text); background: #fff;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky-500); box-shadow: 0 0 0 3px var(--sky-100); }
input[readonly] { background: var(--mist); color: var(--muted); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2364809a' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--sky-600); }
.check small { display: block; color: var(--muted); }
.file-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px dashed var(--sky-300); border-radius: var(--r-md); background: var(--sky-50); cursor: pointer; }
.file-drop:hover, .file-drop.is-over { border-color: var(--sky-500); background: var(--sky-100); }
.file-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop .fd-ic { width: 40px; height: 40px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--sky-600); border: 1px solid var(--sky-100); }
.file-drop strong { display: block; color: var(--ink); font-size: 14px; }
.file-drop small { color: var(--muted); }
.choice-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.choice { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer; background: #fff; }
.choice input { position: absolute; opacity: 0; }
.choice strong { color: var(--ink); font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.choice small { color: var(--muted); }
.choice:has(input:checked) { border-color: var(--sky-500); background: var(--sky-50); box-shadow: 0 0 0 3px var(--sky-100); }
.choice:has(input:focus-visible) { outline: 2px solid var(--sky-500); outline-offset: 2px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.section-title { font-size: 14.5px; font-weight: 700; color: var(--ink); margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.form-section + .form-section { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }

/* Pemilih banyak */
.msel { border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; }
.msel:focus-within { border-color: var(--sky-500); box-shadow: 0 0 0 3px var(--sky-100); }
.msel-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px 0; }
.msel-chips:empty { display: none; }
.msel-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 10px; background: var(--sky-100); color: var(--ink); border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.msel-chip button { border: 0; background: none; padding: 0 2px; cursor: pointer; color: var(--sky-700); display: flex; }
.msel-search { border: 0 !important; box-shadow: none !important; padding: 9px 12px !important; }
.msel-list { max-height: 180px; overflow-y: auto; border-top: 1px solid var(--line); }
.msel-opt { display: flex; gap: 10px; align-items: center; padding: 7px 12px; cursor: pointer; font-size: 13.5px; }
.msel-opt:hover { background: var(--sky-50); }
.msel-opt input { accent-color: var(--sky-600); width: 15px; height: 15px; }
.msel-opt small { display: block; color: var(--muted); font-size: 11.5px; }
.msel-opt.is-hidden { display: none; }
.msel-empty { padding: 10px 12px; color: var(--muted); font-size: 13px; }
.tp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 11px 14px; background: var(--sky-50); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #fafdff; }
.tbl .t-title { font-weight: 600; color: var(--ink); }
.tbl .t-title a { color: var(--ink); }
.tbl .t-title a:hover { color: var(--sky-600); }
.tbl .t-sub { font-size: 12.5px; color: var(--muted); }
.tbl td.actions { text-align: right; white-space: nowrap; }
.tbl .nowrap { white-space: nowrap; }

/* ---------- Toolbar & filter ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }
.toolbar input[type=search], .toolbar select, .toolbar input[type=date] { width: auto; min-width: 150px; padding: 8px 12px; font-size: 13.5px; }
.toolbar select { padding-right: 32px; }
.toolbar .search-field { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.toolbar .search-field .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search-field input { width: 100%; padding-left: 34px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; font-family: inherit; display: inline-flex; gap: 7px; align-items: center; }
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.tabs .is-active { color: var(--sky-700); border-bottom-color: var(--sky-500); }
.tabs .count { font-size: 11.5px; background: var(--sky-100); color: var(--sky-700); border-radius: 999px; padding: 1px 7px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-size: 13px; font-weight: 600; color: var(--text); }
.chip:hover { border-color: var(--sky-400); text-decoration: none; color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Alert ---------- */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.alert span { flex: 1; }
.alert .ic { margin-top: 1px; }
.alert-success { background: var(--green-bg); border-color: #bfe6d3; color: #0f5e3f; }
.alert-error { background: var(--red-bg); border-color: #f2c6c6; color: #8e2525; }
.alert-info { background: var(--sky-50); border-color: var(--sky-200); color: var(--sky-700); }
.alert-warn { background: var(--amber-bg); border-color: #f1dc9f; color: #735000; }
.alert-x { border: 0; background: none; color: inherit; opacity: .6; cursor: pointer; padding: 0; display: flex; }
.alert-x:hover { opacity: 1; }
.note { padding: 12px 14px; border-radius: var(--r-md); background: var(--sky-50); border-left: 3px solid var(--sky-400); font-size: 13.5px; }
.note.warn { background: var(--amber-bg); border-left-color: #e2b23a; }
.note.danger { background: var(--red-bg); border-left-color: var(--red); }
.note strong { color: var(--ink); }

/* ---------- Kosong ---------- */
.empty { text-align: center; padding: 42px 20px; }
.empty-ic { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: var(--sky-50); color: var(--sky-500); }
.empty h4 { font-size: 15px; margin-bottom: 4px; }
.empty p { color: var(--muted); font-size: 13.5px; max-width: 420px; margin: 0 auto 14px; }

/* ---------- Pager ---------- */
.pager { display: flex; gap: 4px; justify-content: center; padding: 16px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; color: var(--text); }
.pager a:hover { background: var(--sky-50); text-decoration: none; }
.pager a.is-current { background: var(--sky-600); color: #fff; }

/* ---------- Beranda ---------- */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.hello h2 { font-size: 24px; font-weight: 800; }
.hello p { color: var(--muted); margin: 4px 0 0; }
.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.stat .stat-n { font-size: 30px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .stat-l { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat a { font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.todo { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); color: var(--text); }
.todo:last-child { border-bottom: 0; }
.todo:hover { background: var(--sky-50); text-decoration: none; color: var(--text); }
.todo-ic { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--sky-100); color: var(--sky-700); flex-shrink: 0; }
.todo-ic.violet { background: var(--violet-bg); color: var(--violet); }
.todo-ic.amber { background: var(--amber-bg); color: var(--amber); }
.todo-ic.green { background: var(--green-bg); color: var(--green); }
.todo-ic.red { background: var(--red-bg); color: var(--red); }
.todo-body { flex: 1; min-width: 0; }
.todo-body strong { display: block; color: var(--ink); font-size: 14px; }
.todo-body small { color: var(--muted); }
.todo-n { font-size: 20px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 40px; gap: 12px; align-items: center; font-size: 13px; }
.bar-track { height: 10px; border-radius: 6px; background: var(--sky-50); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: var(--sky-400); }
.progress { height: 8px; border-radius: 6px; background: var(--sky-50); overflow: hidden; min-width: 80px; }
.progress > span { display: block; height: 100%; background: var(--sky-500); border-radius: 6px; }
.progress.done > span { background: var(--green); }

/* ---------- Perpustakaan ---------- */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.doc-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); color: var(--text); position: relative; }
.doc-card:hover { border-color: var(--sky-300); text-decoration: none; color: var(--text); box-shadow: 0 10px 24px -18px rgba(15, 51, 82, .5); }
.doc-card h3 { font-size: 15px; line-height: 1.35; }
.doc-card .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--muted); margin-top: auto; }
.doc-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.doc-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.doc-card .desc { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------- Detail dokumen ---------- */
.doc-hero { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.doc-hero h2 { font-size: 22px; font-weight: 800; }
.doc-hero .row { gap: 8px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.viewer { position: relative; background: #e9f1f8; border-radius: var(--r-md); min-height: 420px; overflow: hidden; }
.viewer-pages { max-height: 78vh; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.viewer-page { position: relative; background: #fff; box-shadow: 0 4px 16px -8px rgba(15,51,82,.35); max-width: 100%; }
.viewer-page canvas { display: block; max-width: 100%; height: auto !important; }
.watermark { position: absolute; inset: 0; pointer-events: none; overflow: hidden; display: flex; flex-wrap: wrap; align-content: space-around; justify-content: space-around; opacity: .11; }
.watermark span { transform: rotate(-28deg); font-weight: 700; font-size: 14px; color: var(--ink); white-space: nowrap; padding: 70px 30px; }
.viewer-status { padding: 60px 20px; text-align: center; color: var(--muted); }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fff; font-size: 13px; }
.viewer img.preview { display: block; margin: 18px auto; max-height: 76vh; }
.no-select { user-select: none; -webkit-user-select: none; }

/* ---------- Jalur dokumen (stepper 7 langkah) ---------- */
.route { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; padding: 22px 16px 18px; }
.route-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 0 4px; }
.route-step::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 3px; background: var(--sky-100); z-index: 0; }
.route-step:first-child::before { display: none; }
.route-step.is-done::before, .route-step.is-current::before { background: var(--sky-400); }
.route-dot { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 2px solid var(--sky-200); color: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.route-step.is-done .route-dot { background: var(--sky-600); border-color: var(--sky-600); color: #fff; }
.route-step.is-current .route-dot { background: #fff; border-color: var(--sky-500); color: var(--sky-700); box-shadow: 0 0 0 5px var(--sky-100); animation: pulse 2.4s ease-in-out infinite; }
.route-step.is-stop .route-dot { background: var(--red); border-color: var(--red); color: #fff; animation: none; box-shadow: 0 0 0 5px var(--red-bg); }
.route-step.is-stop::before { background: var(--sky-400); }
.route-label { font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.route-step.is-done .route-label, .route-step.is-current .route-label { color: var(--ink); }
.route-who { font-size: 11.5px; color: var(--muted); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 5px var(--sky-100); } 50% { box-shadow: 0 0 0 9px rgba(219, 239, 251, .5); } }
@media (prefers-reduced-motion: reduce) { .route-step.is-current .route-dot { animation: none; } * { transition: none !important; } }

/* Linimasa */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 26px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--sky-400); box-shadow: 0 0 0 3px var(--sky-100); }
.timeline li::after { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 1px; background: var(--line-strong); }
.timeline li:last-child::after { display: none; }
.timeline strong { display: block; font-size: 13.5px; color: var(--ink); }
.timeline small { color: var(--muted); }
.timeline .tl-note { margin-top: 6px; font-size: 13px; background: var(--mist); border-radius: var(--r-sm); padding: 8px 10px; white-space: pre-line; }

/* Daftar file */
.files { list-style: none; margin: 0; padding: 0; }
.files li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.files li:last-child { border-bottom: 0; }
.file-ic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; flex-shrink: 0; background: var(--sky-100); color: var(--sky-700); letter-spacing: .03em; }
.file-ic.pdf { background: #fde7e7; color: #b42f2f; }
.file-ic.doc, .file-ic.docx { background: #e3edfd; color: #2457b5; }
.file-ic.xls, .file-ic.xlsx { background: #e2f5ea; color: #1b7a45; }
.file-ic.ppt, .file-ic.pptx { background: #fdeee2; color: #b5581b; }
.files .f-body { flex: 1; min-width: 0; }
.files .f-name { font-weight: 600; color: var(--ink); font-size: 13.5px; overflow-wrap: anywhere; }
.files .f-meta { font-size: 12px; color: var(--muted); }

/* Reviewer */
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; gap: 11px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.people li:last-child { border-bottom: 0; }
.people .p-body { flex: 1; min-width: 0; }
.people .p-name { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.people .p-sub { font-size: 12px; color: var(--muted); }
.people .p-note { font-size: 12.5px; margin-top: 5px; background: var(--mist); padding: 6px 9px; border-radius: var(--r-xs); color: var(--text); }
.people .p-note.warn { background: var(--amber-bg); color: #6b4a00; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; background: rgba(15, 51, 82, .38); overflow-y: auto; }
.modal-card { width: 100%; max-width: 560px; background: #fff; border-radius: var(--r-lg); box-shadow: 0 30px 70px -20px rgba(15, 51, 82, .5); animation: rise .18s ease-out; }
.modal-card.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { flex: 1; font-size: 16.5px; }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: var(--sky-50); border-radius: 0 0 var(--r-lg) var(--r-lg); }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Tanda tangan */
.sigpad { width: 100%; height: 170px; border: 1.5px dashed var(--sky-300); border-radius: var(--r-md); background: #fff; touch-action: none; cursor: crosshair; display: block; margin: 6px 0; }
.esign { display: flex; flex-direction: column; gap: 12px; }
.esign-current { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--mist); }
.esign-current img { max-height: 80px; background: #fff; border-radius: var(--r-sm); padding: 4px 10px; border: 1px solid var(--line); }
.sig-box { display: flex; align-items: center; justify-content: center; height: 110px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.sig-box img { max-height: 96px; }

/* Quiz */
.qb-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; background: #fff; }
.qb-item + .qb-item { margin-top: 12px; }
.qb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.qb-head strong { color: var(--ink); font-size: 13.5px; }
.qb-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.qb-opt { display: flex; gap: 10px; align-items: center; }
.qb-opt input[type=radio] { accent-color: var(--green); width: 17px; height: 17px; flex-shrink: 0; }
.quiz-q { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.quiz-q:last-child { border-bottom: 0; }
.quiz-q h4 { font-size: 15px; font-weight: 600; margin-bottom: 12px; display: flex; gap: 10px; }
.quiz-q h4 .qn { color: var(--sky-600); font-variant-numeric: tabular-nums; }
.quiz-opt { display: flex; gap: 11px; align-items: center; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); cursor: pointer; margin-top: 8px; font-size: 14px; }
.quiz-opt:hover { border-color: var(--sky-300); background: var(--sky-50); }
.quiz-opt:has(input:checked) { border-color: var(--sky-500); background: var(--sky-50); }
.quiz-opt input { accent-color: var(--sky-600); width: 16px; height: 16px; }
.score-ring { width: 120px; height: 120px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-direction: column; margin: 0 auto 12px; background: conic-gradient(var(--c, var(--sky-500)) calc(var(--p) * 1%), var(--sky-50) 0); position: relative; }
.score-ring::after { content: ""; position: absolute; inset: 10px; background: #fff; border-radius: 50%; }
.score-ring b, .score-ring small { position: relative; z-index: 1; }
.score-ring b { font-size: 30px; color: var(--ink); line-height: 1; }

/* Langkah sosialisasi */
.steps-v { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps-v li { position: relative; display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.steps-v li:last-child { border-bottom: 0; }
.steps-v .s-n { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--sky-50); color: var(--sky-700); font-weight: 800; font-size: 13px; flex-shrink: 0; border: 2px solid var(--sky-100); }
.steps-v li.done .s-n { background: var(--green); color: #fff; border-color: var(--green); }
.steps-v .s-body { flex: 1; min-width: 0; }
.steps-v .s-body strong { display: block; color: var(--ink); font-size: 14px; }
.steps-v .s-body small { color: var(--muted); }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #fff; }
.login-art { position: relative; background: var(--sky-100); padding: 48px 56px; display: flex; flex-direction: column; overflow: hidden; }
.login-brand { margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 0 32px; }
.login-logo { display: block; width: clamp(240px, 28vw, 380px); height: auto; }
.login-lead { margin: 26px 0 0; max-width: 420px; font-size: 15px; font-weight: 500; line-height: 1.6; color: var(--sky-700); }
.login-flow { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; position: relative; z-index: 1; }
.login-flow span { background: rgba(255,255,255,.75); border: 1px solid var(--sky-200); padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.login-card > p { color: var(--muted); margin-bottom: 26px; }
.login-card form { display: flex; flex-direction: column; gap: 16px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; display: flex; }
.bare { background: var(--mist); }
.center-card { max-width: 440px; margin: 9vh auto; padding: 0 16px; }

/* ---------- Lembar pengesahan (cetak) ---------- */
.sheet-page { max-width: 820px; margin: 24px auto; background: #fff; padding: 40px 48px; border: 1px solid var(--line); border-radius: 6px; color: #1d2f40; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 20px; gap: 20px; }
.sheet-head h1 { font-size: 20px; letter-spacing: .02em; }
.sheet-logo { display: block; height: 44px; width: auto; }
.sheet-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 18px; }
.sheet-table th, .sheet-table td { border: 1px solid #b9cfe0; padding: 8px 10px; text-align: left; vertical-align: top; }
.sheet-table th { background: #eef6fc; width: 30%; font-weight: 600; }
.sign-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sign-cell { border: 1px solid #b9cfe0; border-radius: 6px; padding: 10px; text-align: center; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.sign-cell .role { font-weight: 700; color: var(--ink); }
.sign-cell img { height: 64px; object-fit: contain; margin: 4px auto; }
.sign-cell .code { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 11px; }
.print-bar { max-width: 820px; margin: 18px auto 0; display: flex; gap: 10px; justify-content: flex-end; padding: 0 4px; }
@media print {
  .print-bar { display: none; }
  body { background: #fff; }
  .sheet-page { border: 0; margin: 0; padding: 0; max-width: none; }
}

/* ---------- Responsif ---------- */
@media (max-width: 1180px) {
  .g-main, .g-main-wide { grid-template-columns: minmax(0, 1fr); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(15, 51, 82, .2); }
  .sidebar.is-open { transform: none; }
  .scrim.is-open { display: block; position: fixed; inset: 0; background: rgba(15, 51, 82, .35); z-index: 35; }
  .main { margin-left: 0; }
  .only-mobile { display: inline-flex; }
  .topbar { padding: 10px 16px; gap: 8px; }
  .topsearch { display: none; }
  .content { padding: 20px 16px 32px; }
  .foot { padding: 14px 16px 20px; flex-direction: column; gap: 2px; }
  .g-3, .g-2 { grid-template-columns: minmax(0, 1fr); }
  .tp-grid, .choice-cards { grid-template-columns: minmax(0, 1fr); }
  .route { grid-template-columns: repeat(7, minmax(64px, 1fr)); overflow-x: auto; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { padding: 28px 24px; }
  .login-brand { padding: 0 0 20px; }
  .login-logo { width: 190px; }
  .login-lead { margin-top: 16px; font-size: 14px; }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-mobile { display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .panel-body { padding: 16px; }
  .sign-grid { grid-template-columns: 1fr 1fr; }
  .sheet-page { padding: 20px; }
  .bar-row { grid-template-columns: 90px 1fr 34px; }
  .tbl.stack-mobile thead { display: none; }
  .tbl.stack-mobile tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tbl.stack-mobile td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 5px 14px; }
  .tbl.stack-mobile td::before { content: attr(data-l); color: var(--muted); font-size: 12px; font-weight: 600; }
  .tbl.stack-mobile td.actions { justify-content: flex-end; }
  .tbl.stack-mobile td.actions::before { content: none; }
}
.target-picker > .hint { margin-bottom: 10px; }
