/* Oneterprise: token dan komponen bersama. Arah: DESIGN.md. */
@font-face { font-family: "Anton"; src: url("/static/fon/Anton-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "PJS"; src: url("/static/fon/PJS-500.ttf") format("truetype"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "PJS"; src: url("/static/fon/PJS-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "PJS"; src: url("/static/fon/PJS-800.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --navy: #0B1526;
  --navy-2: #16233B;
  --biru: #2563EB;
  --biru-tua: #1D4ED8;
  --biru-terang: #9DBBFA;   /* tautan di atas navy, 8,4:1 */
  --amber: #F59E0B;         /* hanya di atas navy */
  --amber-teks: #B45309;    /* amber untuk teks di latar terang, 5,0:1 */
  --hijau: #15803D;
  --merah: #B42318;
  --coklat: #8A5A00;
  --latar: #F4F6FB;
  --permukaan: #FFFFFF;
  --tinta: #0B1526;
  --redup: #475069;
  --garis: #D5DAE5;
  --garis-kuat: #8C94A8;    /* batas input, 3,2:1 */
  --redup-navy: #B9C3D6;    /* teks sekunder di atas navy, 9,6:1 */
  --r-kartu: 8px;
  --r-kontrol: 6px;
  --r-lencana: 4px;
  --judul: "Anton", "Arial Narrow", sans-serif;
  --isi: "PJS", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--isi); font-size: 16px; line-height: 1.6; color: var(--tinta); background: var(--latar); }
img, svg { max-width: 100%; }
a { color: var(--biru-tua); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3 { font-family: var(--judul); font-weight: 400; letter-spacing: .01em; line-height: 1.1; margin: 0 0 .5em; }
h3 { font-family: var(--isi); font-weight: 800; letter-spacing: 0; line-height: 1.3; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--biru); outline-offset: 2px; border-radius: 2px; }
.lewati { position: absolute; left: -999px; top: 8px; background: var(--permukaan); padding: 10px 14px; z-index: 50; border-radius: var(--r-kontrol); }
.lewati:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tombol */
.tombol { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: var(--r-kontrol); border: 1px solid var(--biru); background: var(--biru); color: #fff; font: 700 15px/1.2 var(--isi);
  text-decoration: none; cursor: pointer; transition: background .15s; }
.tombol:hover { background: var(--biru-tua); color: #fff; }
.tombol.kedua { background: transparent; color: var(--biru-tua); border-color: var(--garis-kuat); }
.tombol.kedua:hover { background: #E8EEFC; color: var(--navy); }
.tombol.bahaya { background: var(--permukaan); color: var(--merah); border-color: var(--merah); }
.tombol.bahaya:hover { background: #FDECEA; }
.tombol.kecil { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.tombol[disabled] { opacity: .65; cursor: progress; }
.tombol-teks { background: none; border: 0; padding: 0; font: inherit; color: var(--biru-tua); text-decoration: underline; cursor: pointer; min-height: 44px; }

/* formulir */
label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.bantu { display: block; font-weight: 500; color: var(--redup); font-size: 13px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 9px 12px; font: 500 15px/1.4 var(--isi); color: var(--tinta);
  background: var(--permukaan); border: 1px solid var(--garis-kuat); border-radius: var(--r-kontrol); }
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"] { width: 20px; min-height: 20px; height: 20px; vertical-align: middle; margin: 0 8px 0 0; }
.cek { display: flex; align-items: center; font-weight: 500; min-height: 44px; }
.medan { margin-bottom: 14px; }
.baris-medan { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }

/* tabel */
.tabel-bungkus { overflow-x: auto; border: 1px solid var(--garis); border-radius: var(--r-kartu); background: var(--permukaan); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--garis); vertical-align: top; }
th { font-weight: 700; color: var(--redup); font-size: 13px; background: #F8F9FC; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.angka, th.angka { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { font-weight: 800; background: #F8F9FC; border-top: 2px solid var(--garis); }
.kosong { padding: 28px 16px; text-align: center; color: var(--redup); }

/* lencana status: warna selalu disertai teks */
.lencana { display: inline-block; padding: 2px 8px; border-radius: var(--r-lencana); font-size: 12px; font-weight: 800; white-space: nowrap; border: 1px solid; }
.lencana.ok { color: var(--hijau); border-color: #8CC9A2; background: #EDF7F0; }
.lencana.bahaya { color: var(--merah); border-color: #F0A8A0; background: #FDECEA; }
.lencana.tunggu { color: var(--coklat); border-color: #E3C27A; background: #FBF4E4; }
.lencana.netral { color: var(--redup); border-color: var(--garis); background: #F4F6FB; }

/* pesan kilat */
.kilat { padding: 12px 16px; border-radius: var(--r-kontrol); margin: 0 0 18px; font-weight: 600; border: 1px solid; }
.kilat.ok { background: #EDF7F0; color: #0F5A2B; border-color: #8CC9A2; }
.kilat.bahaya { background: #FDECEA; color: #8A1A12; border-color: #F0A8A0; }

/* MOTIF: rel tahapan. Tahap terlewati terisi navy, tahap aktif biru, sisanya garis. */
.rel { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; counter-reset: rel; }
.rel li { flex: 1; min-width: 0; position: relative; padding-top: 14px; font-size: 12px; font-weight: 700; color: var(--redup); line-height: 1.3; }
.rel li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 2px; background: var(--garis); }
.rel li.lewat::before { background: var(--navy); }
.rel li.kini::before { background: var(--biru); }
.rel li.kini { color: var(--tinta); }
.rel li span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel.ringkas li { font-size: 0; padding-top: 6px; }
.rel.ringkas li.kini { font-size: 0; }

.batang { height: 8px; border-radius: 2px; background: var(--garis); overflow: hidden; }
.batang > i { display: block; height: 100%; background: var(--navy); }
.batang.biru > i { background: var(--biru); }

/* placeholder jujur: konten yang belum ada, tidak disamarkan */
.ph { display: inline-block; border: 1px dashed var(--garis-kuat); border-radius: var(--r-lencana); padding: 1px 8px; color: var(--redup); font-style: italic; background: rgba(255,255,255,.6); }
.gelap .ph, .ph.gelap { color: var(--redup-navy); border-color: #5B6680; background: transparent; }

.ilustrasi { font-size: 12px; font-weight: 700; color: var(--redup); }
.angka-besar { font-family: var(--judul); font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
