/*
  Sans Riset. Arah desain (pola unslop oleh Damir Sokolovsky, CC BY 4.0):
  Produk    meja kerja riset jurnal pribadi Sans, dari pertanyaan riset sampai rujukan yang sudah dicek
  Karakter  tekun, kritis, sedikit hangat
  Dunia     ruang baca perpustakaan malam: kartu katalog, lampu meja kuning
  Momen     diagram alir PRISMA yang angkanya hidup; kartu record seperti kartu katalog
  Ciri      nomor panggil mono (R0012) di tab kecil, seperti kartu katalog
  Warna dan huruf mengikuti Sans-Desk: biru dan putih, satu aksen biru, IBM Plex.
  (Nama token --gold dipertahankan agar diff kecil; nilainya kini biru.)
*/
:root {
  --bg: #f4f7fc;
  --deep: #ffffff;
  --panel: #ffffff;
  --panel2: #eef3fb;
  --raised: #e3ecfb;
  --line: #dae2ee;
  --line-strong: #bccbe2;
  --line-soft: rgba(15, 40, 80, 0.06);
  --fg: #0f1b2d;
  --fg2: #3a4960;
  --muted: #66758c;
  --gold: #2563eb;
  --gold-ink: #1d4ed8;
  --gold-soft: rgba(37, 99, 235, 0.09);
  --on-gold: #ffffff;
  --good: #15803d;
  --good-soft: rgba(21, 128, 61, 0.09);
  --bad: #dc2626;
  --bad-soft: rgba(220, 38, 38, 0.08);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, 0.09);
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-data: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --f-mark: "Chakra Petch", "IBM Plex Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --r-sm: 6px;
  --r: 8px;
  --r-card: 12px;
  --r-panel: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 400 14px/20px var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: var(--gold-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(37, 99, 235, 0.18); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.mono, .num { font-family: var(--f-data); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.fg2 { color: var(--fg2); }
.small { font-size: 12px; line-height: 16px; }
.svg-ico { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--deep); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.brand .mark { width: 28px; height: 28px; border-radius: 6px; background: var(--gold); color: var(--on-gold); display: grid; place-items: center; font: 600 15px/1 var(--f-mark); }
.brand .name { font: 600 17px/1 var(--f-mark); letter-spacing: 0.02em; }
.brand .sub { font: 400 11px/14px var(--f-data); color: var(--muted); margin-top: 4px; }
.side-label { font-size: 12px; color: var(--muted); padding: 0 8px; margin: 0 0 8px; }
.proj-pick { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; cursor: pointer; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.proj-pick:hover { border-color: var(--line-strong); }
.proj-pick .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--r); color: var(--fg2); text-decoration: none; transition: background-color 140ms var(--ease), color 140ms var(--ease); }
.nav a .svg-ico { color: var(--muted); }
.nav a:hover { background: var(--panel); color: var(--fg); }
.nav a.on { background: var(--panel2); color: var(--fg); box-shadow: inset 0 1px 0 rgba(15, 40, 80, 0.04), inset 2px 0 0 var(--gold); }
.nav a.on .svg-ico { color: var(--gold); }
.nav a .count { margin-left: auto; font: 400 12px/1 var(--f-data); color: var(--muted); }
.nav a.disabled { opacity: 0.45; pointer-events: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 8px; }
.side-foot .who { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--fg2); }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.linkbtn:hover { color: var(--fg); }

.main { min-width: 0; padding: 28px 32px 64px; }
.page { max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; line-height: 34px; font-weight: 500; margin: 0; letter-spacing: -0.01em; }
.page-head .meta { color: var(--muted); margin-top: 6px; font-size: 13px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.topbar { display: none; }

/* ---------- panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; min-width: 0; }
.panel.tight { padding: 16px; }
.panel h2 { font-size: 15px; line-height: 20px; font-weight: 500; margin: 0; }
.panel .ph { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel .ph .hint { color: var(--muted); font-size: 13px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.grid-wide { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- stat ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 20px; }
.stat .l { color: var(--muted); font-size: 13px; }
.stat .v { font: 500 30px/1 var(--f-data); font-variant-numeric: tabular-nums; margin-top: 12px; }
.stat .s { color: var(--muted); font-size: 12px; margin-top: 8px; }
.stat.key .v { color: var(--gold-ink); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--raised); color: var(--fg); cursor: pointer; white-space: nowrap; transition: background-color 140ms var(--ease), border-color 140ms var(--ease), transform 120ms var(--ease); }
.btn:hover { border-color: var(--line-strong); background: var(--panel2); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 500; }
.btn.primary:hover { background: var(--gold-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--fg2); }
.btn.ghost:hover { background: var(--panel2); color: var(--fg); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn.danger:hover { color: var(--bad); border-color: rgba(220, 38, 38, 0.4); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn .svg-ico { color: inherit; }

label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--fg2); min-width: 0; }
label.f .h { color: var(--muted); font-size: 12px; }
.in, select.in, textarea.in { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; min-height: 36px; color: var(--fg); transition: border-color 140ms var(--ease); }
textarea.in { resize: vertical; min-height: 88px; line-height: 20px; }
.in:focus { outline: none; border-color: var(--gold); }
.in::placeholder { color: #94a2b6; }
.in.mono { font-size: 13px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fields .span2 { grid-column: 1 / -1; }

.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 6px; color: var(--fg2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background-color 140ms var(--ease), color 140ms var(--ease); }
.seg button:hover { color: var(--fg); }
.seg button.on { background: var(--raised); color: var(--fg); box-shadow: inset 0 1px 0 rgba(15, 40, 80, 0.04); }
.seg button .num { color: var(--muted); font-size: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-sm); background: var(--panel2); border: 1px solid var(--line); font-size: 13px; color: var(--fg); }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; display: inline-flex; }
.chip button:hover { color: var(--bad); }
.chip.sug { background: transparent; border-style: dashed; color: var(--fg2); cursor: pointer; }
.chip.sug:hover { border-color: var(--gold); color: var(--fg); }

.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font: 400 12px/1 var(--f-data); background: var(--panel2); color: var(--fg2); border: 1px solid var(--line); white-space: nowrap; }
.callno { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px 4px 0 0; font: 500 12px/1 var(--f-data); color: var(--gold-ink); background: var(--gold-soft); border: 1px solid rgba(37, 99, 235, 0.28); border-bottom: 0; letter-spacing: 0.02em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }
.dot.include { background: var(--good); }
.dot.exclude { background: var(--bad); }
.dot.maybe { background: var(--warn); }
.st-ok { color: var(--good); }
.st-bad { color: var(--bad); }
.st-warn { color: var(--warn); }

.note { border-left: 2px solid var(--gold); padding: 2px 0 2px 12px; color: var(--fg2); font-size: 13px; }
.note.bad { border-color: var(--bad); }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 4px; border: 1px solid var(--line); border-bottom-width: 2px; font: 400 11px/1 var(--f-data); color: var(--fg2); background: var(--bg); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12px; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl tbody tr:hover td { background: rgba(37, 99, 235, 0.03); }
.tbl .str { font-family: var(--f-data); font-size: 12px; color: var(--fg2); word-break: break-word; max-width: 520px; }
.clickrow { cursor: pointer; }

/* ---------- proyek ---------- */
.plist { display: flex; flex-direction: column; }
.pitem { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 96px) 120px; gap: 16px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background-color 140ms var(--ease); }
.pitem:hover { background: rgba(37, 99, 235, 0.035); }
.pitem:last-child { border-bottom: 0; }
.pitem .t { font-size: 15px; }
.pitem .c { color: var(--muted); font-size: 12px; margin-top: 2px; }
.pitem .n { text-align: right; font: 400 14px var(--f-data); }
.pitem .n small { display: block; color: var(--muted); font: 400 11px var(--f-body); }
.phead { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 96px) 120px; gap: 16px; color: var(--muted); font-size: 12px; padding: 0 4px 8px; border-bottom: 1px solid var(--line); }
.phead span:not(:first-child) { text-align: right; }

/* ---------- langkah ---------- */
.steps { display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.step:last-child { border-bottom: 0; }
.step .ck { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line); margin-top: 2px; display: grid; place-items: center; }
.step.done .ck { border-color: var(--good); background: var(--good-soft); color: var(--good); }
.step.done .ck .svg-ico { width: 10px; height: 10px; stroke-width: 2.5; }
.step.now .ck { border-color: var(--gold); }
.step .d { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- string builder ---------- */
.concept { border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; background: var(--panel2); display: flex; flex-direction: column; gap: 12px; }
.concept-head { display: flex; align-items: center; gap: 8px; }
.concept-head .idx { font: 500 12px var(--f-data); color: var(--gold-ink); }
.concept-head .in { flex: 1; }
.term-input { display: flex; gap: 8px; }
.op { text-align: center; font: 500 12px var(--f-data); color: var(--muted); letter-spacing: 0.04em; }
.strcard { border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 14px; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.strcard .h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.strcard .db { font-weight: 500; }
.strcard pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 400 12.5px/19px var(--f-data); color: var(--fg2); }
.strcard .warnline { font-size: 12px; color: var(--warn); }

/* ---------- pencarian ---------- */
.src-row { display: grid; grid-template-columns: 28px 140px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.src-row:last-child { border-bottom: 0; }
.src-row input[type=checkbox] { margin-top: 10px; accent-color: var(--gold); width: 16px; height: 16px; }
.src-row .nm { padding-top: 8px; }
.src-row .nm .small { display: block; margin-top: 2px; }
.src-row textarea.in { min-height: 60px; font-size: 12.5px; }
.runlog { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.runlog .ln { display: flex; gap: 10px; align-items: baseline; }

/* ---------- screening ---------- */
.screen { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; }
.qlist { max-height: calc(100vh - 240px); overflow-y: auto; padding: 4px; }
.qitem { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 10px; border-radius: var(--r); cursor: pointer; transition: background-color 120ms var(--ease); }
.qitem:hover { background: var(--panel2); }
.qitem.on { background: var(--raised); box-shadow: inset 0 1px 0 rgba(15, 40, 80, 0.04); }
.qitem .dot { margin-top: 6px; }
.qitem .rid { font: 400 11px var(--f-data); color: var(--muted); }
.qitem .tt { font-size: 13px; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.card-wrap { display: flex; flex-direction: column; }
.ccard { background: #ffffff; color: #0f1b2d; border: 1px solid var(--line); border-radius: 0 var(--r-card) var(--r-card) var(--r-card); padding: 24px 28px; box-shadow: 0 1px 0 rgba(15, 40, 80, 0.04), 0 8px 24px rgba(15, 40, 80, 0.08); position: relative; }
.ccard::before { content: ""; position: absolute; left: 28px; right: 28px; top: 64px; height: 1px; background: rgba(37, 99, 235, 0.35); }
.ccard .ctop { display: flex; justify-content: space-between; gap: 16px; font: 400 12px/16px var(--f-data); color: #66758c; min-height: 32px; }
.ccard h3 { font-size: 19px; line-height: 27px; font-weight: 500; margin: 20px 0 8px; color: #0f1b2d; }
.ccard .au { color: #3a4960; font-size: 14px; }
.ccard .jr { color: #66758c; font-size: 13px; margin-top: 4px; }
.ccard .ab { margin-top: 16px; font-size: 14.5px; line-height: 23px; color: #1f2b3d; max-height: 44vh; overflow-y: auto; padding-right: 8px; }
.ccard .ab mark { background: rgba(37, 99, 235, 0.18); color: inherit; border-radius: 2px; padding: 0 1px; }
.ccard a { color: var(--gold-ink); }
.ccard .links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; }
.ccard .stamp { position: absolute; right: 24px; bottom: 20px; font: 600 13px/1 var(--f-data); letter-spacing: 0.06em; padding: 6px 10px; border: 1.5px solid; border-radius: 4px; transform: rotate(-4deg); opacity: 0.85; }
.ccard .stamp.include { color: #15803d; }
.ccard .stamp.exclude { color: #b91c1c; }
.ccard .stamp.maybe { color: #b45309; }

.decide { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.decide .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.decide .btn.inc.on { background: var(--good-soft); border-color: rgba(21, 128, 61, 0.45); color: var(--good); }
.decide .btn.may.on { background: var(--warn-soft); border-color: rgba(180, 83, 9, 0.45); color: var(--warn); }
.decide .btn.exc.on { background: var(--bad-soft); border-color: rgba(220, 38, 38, 0.45); color: var(--bad); }
.codes { display: flex; flex-wrap: wrap; gap: 6px; }
.codes button { border: 1px solid var(--line); background: var(--bg); color: var(--fg2); border-radius: var(--r-sm); padding: 6px 10px; font-size: 13px; cursor: pointer; text-align: left; transition: border-color 140ms var(--ease), color 140ms var(--ease); }
.codes button:hover { color: var(--fg); border-color: var(--line-strong); }
.codes button.on { border-color: var(--bad); color: var(--fg); background: var(--bad-soft); }
.codes button .k { font-family: var(--f-data); color: var(--muted); margin-right: 6px; }
.aibox { border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 14px; font-size: 13px; background: var(--panel2); }
.aibox .h { color: var(--muted); font-size: 12px; margin-bottom: 4px; }

/* ---------- PRISMA ---------- */
.prisma-wrap { overflow-x: auto; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; }
.prisma-wrap svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.chk { display: grid; grid-template-columns: 48px minmax(0, 1fr) 130px minmax(0, 220px); gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.chk .no { font-family: var(--f-data); color: var(--muted); }
.chk .sec { grid-column: 1 / -1; color: var(--gold-ink); font-weight: 500; padding-top: 12px; border-bottom: 0; }

/* ---------- review ---------- */
.revcol { display: flex; flex-direction: column; gap: 12px; }
.rev { border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; background: var(--panel2); }
.rev h4 { margin: 0 0 8px; font-size: 14px; font-weight: 500; }
.rev ul { margin: 0; padding-left: 18px; color: var(--fg2); }
.rev li { margin: 4px 0; }
.prob { padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.prob .loc { font: 400 12px var(--f-data); color: var(--muted); }
.decision-badge { display: inline-flex; height: 28px; align-items: center; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--gold); color: var(--gold-ink); font-weight: 500; }

/* ---------- prompt ---------- */
.pgroup h3 { font-size: 13px; color: var(--muted); font-weight: 500; margin: 8px 0; }
.pcard { border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; background: var(--panel2); display: flex; flex-direction: column; gap: 10px; }
.pcard .h { display: flex; align-items: center; gap: 10px; }
.pcard .code { font: 500 12px var(--f-data); color: var(--gold-ink); }
.pcard pre { margin: 0; white-space: pre-wrap; font: 400 13px/20px var(--f-body); color: var(--fg2); }
.pcard pre .var { color: var(--warn); font-family: var(--f-data); font-size: 12px; }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* ---------- toast & modal ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 8px); background: var(--raised); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 16px; font-size: 13px; opacity: 0; transition: opacity 180ms var(--ease), transform 180ms var(--ease); z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: rgba(220, 38, 38, 0.45); }
.modal-bg { position: fixed; inset: 0; background: rgba(15, 27, 45, 0.4); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 24px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal h2 { margin: 0; font-size: 18px; font-weight: 500; }
.menu { position: absolute; z-index: 30; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); padding: 4px; min-width: 232px; box-shadow: 0 12px 32px rgba(15, 40, 80, 0.14); }
.menu button { display: flex; width: 100%; gap: 8px; align-items: center; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: var(--r); cursor: pointer; color: var(--fg2); }
.menu button:hover { background: var(--panel2); color: var(--fg); }
.spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 800ms linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.enter { animation: rise 360ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login .left { padding: 48px 64px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: var(--deep); }
.login .right { display: grid; place-items: center; padding: 32px 16px; }
.login form { width: min(360px, 100%); display: flex; flex-direction: column; gap: 16px; }
.login h1 { font-size: 40px; line-height: 44px; font-weight: 400; letter-spacing: -0.02em; margin: 0; max-width: 520px; }
.login .lede { color: var(--fg2); font-size: 16px; line-height: 26px; max-width: 460px; margin-top: 16px; }
.login .catalog { display: flex; flex-direction: column; gap: 0; margin-top: 40px; max-width: 460px; }
.login .catalog .callno { align-self: flex-start; }
.login .catalog .ccard { padding: 18px 22px; }
.login .catalog .ccard::before { top: 52px; left: 22px; right: 22px; }
.login .catalog .ccard h3 { font-size: 16px; line-height: 23px; margin-top: 16px; }
.login .err { color: var(--bad); font-size: 13px; min-height: 18px; }
.login .loginh { font-size: 20px; line-height: 28px; font-weight: 500; margin: 0; letter-spacing: -0.01em; }

/* ---------- responsif ---------- */
@media (max-width: 1100px) {
  .screen { grid-template-columns: minmax(0, 1fr); }
  .qlist { max-height: 280px; }
  .grid-wide { grid-template-columns: minmax(0, 1fr); }
  .pgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 35; transform: translateX(-100%); transition: transform 260ms var(--ease); }
  .side.open { transform: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--deep); position: sticky; top: 0; z-index: 20; }
  .main { padding: 20px 16px 48px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2, .fields { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 24px; line-height: 30px; }
  .pitem, .phead { grid-template-columns: minmax(0, 1fr) 72px 72px; }
  .pitem > :nth-child(4), .pitem > :nth-child(5), .phead > :nth-child(4), .phead > :nth-child(5) { display: none; }
  .src-row { grid-template-columns: 24px minmax(0, 1fr); }
  .src-row textarea { grid-column: 1 / -1; }
  .chk { grid-template-columns: 40px minmax(0, 1fr); }
  .chk select, .chk input { grid-column: 2; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login .left { padding: 32px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login h1 { font-size: 30px; line-height: 34px; }
  .login .catalog { display: none; }
  .ccard { padding: 20px; }
  .between { flex-wrap: wrap; }
  .seg { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg button { flex: none; }
  .between > .row { width: 100%; }
  .between > .row .u11 { flex: 1; width: auto; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* utilitas pengganti atribut style (CSP tanpa unsafe-inline) */
.u1{margin-top:16px}
.u2{justify-content:flex-end}
.u3{width:72px}
.u4{flex:1;min-width:200px}
.u5{margin-top:12px}
.u6{margin-top:8px}
.u7{align-self:end}
.u8{padding:6px 0}
.u9{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:8px}
.u10{flex:1}
.u11{width:260px}
.u12{padding:0 6px 8px}
.u13{padding:4px 0}
.u14{margin-top:6px}
.u15{grid-template-columns:repeat(4,minmax(0,1fr))}
.u16{max-width:260px}
.u17{margin:4px 0 12px}
.u18{max-width:420px}

/* tombol pilih berkas mengikuti gaya tombol */
input[type=file].in { padding: 4px; }
input[type=file]::file-selector-button { font: inherit; font-size: 13px; height: 28px; padding: 0 12px; margin-right: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--raised); color: var(--fg); cursor: pointer; }
