:root {
  --navy: #1F3864; --navy2: #2F5597; --gold: #C9A043; --gold-light: #E8C66A; --gold-dark: #8A6420;
  --gray: #F2F4F7; --line: #D5DCE7; --text: #1D2433; --muted: #566074; --bad: #C00000; --warnbg: #FBE5D6;
  --tabs: 62px; color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--gray);
  padding-bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; min-height: 58px;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px; background: var(--navy); color: #fff; }
.top img { border-radius: 8px; background: #fff; }
.title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.title strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title small { color: #C9D3E6; font-size: 12px; }
.iconbtn { width: 44px; height: 44px; margin: -4px 0 -4px -8px; border: 0; border-radius: 10px; background: none; color: inherit; display: grid; place-items: center; }
.chip { border: 0; border-radius: 999px; background: var(--gold); color: var(--navy); font-weight: 700; padding: 8px 14px; font-size: 14px; }

main { max-width: 1040px; margin: 0 auto; padding: 14px; outline: none; }
.tabs { position: fixed; inset: auto 0 0 0; z-index: 10; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; height: var(--tabs); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 12px; color: var(--muted); text-decoration: none; }
.tabs a[aria-current] { color: var(--navy); font-weight: 700; box-shadow: inset 0 3px 0 var(--gold); }

h2 { font-size: 16px; color: var(--navy); margin: 20px 2px 8px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.card > :last-child { margin-bottom: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 3px; min-height: 124px; }
.tile:active { background: #E9EEF7; }
.tile .ico { width: 42px; height: 42px; border-radius: 11px; background: var(--navy); color: var(--gold-light); display: grid; place-items: center; margin-bottom: 6px; }
.tile b { color: var(--navy); line-height: 1.2; }
.tile span { font-size: 13px; color: var(--muted); line-height: 1.3; }

.calc { display: grid; gap: 12px; align-items: start; }
@media (min-width: 820px) { .calc { grid-template-columns: 380px 1fr; } }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f.wide { grid-column: 1 / -1; }
.f label { font-size: 14px; font-weight: 600; }
.in { display: flex; align-items: stretch; border: 1.5px solid #9AA6BA; border-radius: 10px; background: #fff; overflow: hidden; }
.in:focus-within { border-color: var(--navy); box-shadow: 0 0 0 2px var(--gold-light); }
.in input { flex: 1; min-width: 0; border: 0; padding: 0 10px; height: 46px; font-size: 18px; background: none; outline: none; }
.in em { font-style: normal; color: var(--muted); padding: 0 10px; display: grid; place-items: center; background: var(--gray); font-size: 14px; }
.f.err .in { border-color: var(--bad); }
.f .msg { color: var(--bad); font-size: 13px; }
.f .hint { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
select, .txt { width: 100%; height: 48px; border: 1.5px solid #9AA6BA; border-radius: 10px; background: #fff; padding: 0 10px; font-size: 16px; }
details.adv { margin-top: 12px; border-top: 1px solid var(--line); }
details.adv summary { padding: 12px 0; font-weight: 600; color: var(--navy2); cursor: pointer; }

.vol { background: var(--navy); color: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.vol div { display: flex; flex-direction: column; }
.vol span { font-size: 13px; color: #C9D3E6; }
.vol b { font-size: 26px; line-height: 1.2; }
.vol b small { font-size: 15px; font-weight: 400; }
.empty { text-align: center; color: var(--muted); padding: 26px 16px; }
.alert { background: var(--warnbg); border-left: 4px solid var(--bad); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }

.mat { width: 100%; border-collapse: collapse; }
.mat th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 0 0 6px; border-bottom: 1px solid var(--line); }
.mat td { padding: 9px 0; border-bottom: 1px solid #E8ECF3; vertical-align: top; }
.mat tr:last-child td { border-bottom: 0; }
.mat td:nth-child(n+2), .mat th:nth-child(n+2) { text-align: right; padding-left: 8px; white-space: nowrap; }
.mat b { color: var(--navy); font-size: 17px; }
.mat small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.mat td:first-child { overflow-wrap: anywhere; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-top: 2px solid var(--navy); margin-top: 4px; padding-top: 10px; font-weight: 700; color: var(--navy); }
.total b { font-size: 20px; }
.notes { margin: 10px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.notes li { margin: 3px 0; }
.info { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; font-size: 15px; }
.info b { text-align: right; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--navy);
  background: #fff; color: var(--navy); font-weight: 700; text-decoration: none; text-align: center; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.row .btn { flex: 1 1 130px; padding: 0 8px; font-size: 15px; }
.item { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #E8ECF3; }
.item:last-child { border-bottom: 0; }
.item a { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.item a b { color: var(--navy); display: block; overflow-wrap: anywhere; }
.item a small { color: var(--muted); }
.x { border: 0; background: none; width: 44px; height: 44px; border-radius: 10px; color: var(--bad); display: grid; place-items: center; flex: none; }

.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; padding: 4px 14px 16px; text-align: center; font-size: 13px; color: var(--muted); }
.foot a { color: var(--navy2); font-weight: 600; padding: 4px 0; }
.foot span { padding: 4px 0; }

.tile { position: relative; }
.card h3 { margin: 0 0 8px; color: var(--navy); font-size: 16px; }
.msgx { color: var(--bad); font-size: 14px; min-height: 20px; margin: 6px 0; }
.item .btn.sm { flex: none; }

dialog { border: 0; border-radius: 16px; padding: 18px; width: min(420px, 92vw); color: var(--text); }
dialog::backdrop { background: rgba(15, 28, 54, .55); }
dialog h3 { margin: 0 0 10px; color: var(--navy); }
dialog .row { margin-top: 14px; }
#toast { position: fixed; left: 50%; bottom: calc(var(--tabs) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #111A2E; color: #fff; padding: 10px 16px; border-radius: 10px;
  opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; z-index: 20; font-size: 14px; }
#toast.on { opacity: 1; }
.only-print { display: none; }

@media print {
  @page { margin: 14mm; }
  body { background: #fff; padding: 0; font-size: 11pt; }
  .top, .tabs, #toast, .noprint, .x { display: none !important; }
  main { max-width: none; padding: 0; }
  .card { border: 0; padding: 0; border-radius: 0; }
  .only-print { display: block; }
  .phead { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid #1F3864; padding-bottom: 8px; margin-bottom: 12px; }
  .pricebtn { text-decoration: none; color: inherit; }
  .mat tr, .item { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }


/* ---------- Mesin BBS ---------- */
main { max-width: 1180px; }
.hero h2 { margin: 0 0 6px; font-size: 20px; }
.item a b i { font-style: normal; font-weight: 400; color: var(--muted); font-size: 14px; margin-left: 4px; }
.item a[href] { cursor: pointer; }
.bad { color: var(--bad); } .warn { color: var(--gold-dark); font-weight: 600; }
.x.n { color: var(--navy2); }
.center { text-align: center; }
.fine { font-size: 12.5px; }
.mt { margin-top: 12px; }
main > .row { margin-bottom: 12px; }
.tile { min-height: 108px; }
.two { display: grid; gap: 0 18px; align-items: start; }
@media (min-width: 900px) { .two { grid-template-columns: 1fr 360px; } }
.vol b { font-size: 23px; }
.fh { grid-column: 1 / -1; font-weight: 700; color: var(--navy2); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px; font-size: 15px; }
.f { justify-content: flex-start; }
@media (min-width: 620px) { .fields.f3 { grid-template-columns: repeat(3, 1fr); } .fields.f4 { grid-template-columns: repeat(4, 1fr); } }
.savebar { position: sticky; bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); background: var(--gray); padding: 10px 0; z-index: 5; }
@media (min-width: 820px) { .calc { grid-template-columns: 400px minmax(0, 1fr); } #res { position: sticky; top: 72px; } }

.sk { width: 108px; height: 61px; stroke: var(--navy); stroke-width: 8; }
.sk .dim { stroke: #8A94A8; stroke-width: 2.5; }
.sk text { font: 700 31px "Segoe UI", Roboto, Arial, sans-serif; fill: var(--bad); stroke: #fff; stroke-width: 7; paint-order: stroke; text-anchor: middle; dominant-baseline: middle; }
.sk.big { width: min(340px, 100%); height: auto; }
.sec { width: 128px; height: 118px; stroke: none; }
.secbox { background: #fff; border-radius: 10px; padding: 4px; }
.sec .cc { fill: #E3E8F0; stroke: #8A94A8; stroke-width: 1.5; } .sec .st { fill: none; stroke: var(--navy2); stroke-width: 2.5; }
.sec .rb { fill: var(--bad); } .sec .rb.tb { fill: var(--gold); }
.sec text { font: 600 13px "Segoe UI", Arial, sans-serif; fill: var(--text); text-anchor: middle; }

.bars { padding: 4px 12px; }
.bar { display: grid; grid-template-columns: 108px 1fr 1fr 1fr; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid #E8ECF3; align-items: start; }
.bar:last-child { border-bottom: 0; }
.bar .sk { grid-row: 1 / 3; }
.bar .bm { grid-column: 2 / -1; } .bar .bs { grid-column: 2; display: none; }
.bar .bl { grid-column: 2; } .bar .bq { grid-column: 3; } .bar .bk { grid-column: 4; text-align: right; }
.bar b { color: var(--navy); } .bar small { display: block; color: var(--muted); font-size: 12.5px; }
.bar .bm span { font-size: 14px; }
.bar .bs { display: block; grid-column: 1; text-align: center; }
.bar .sk { grid-row: 1; } .bar .bm { grid-row: 1; }
.bar .bs, .bar .bl, .bar .bq, .bar .bk { grid-row: 2; }
.bar.bh { display: none; }
.isform .bs small { display: none; }
@media (min-width: 900px) {
  .bar, .bar.bh { display: grid; grid-template-columns: 108px 1fr 88px 120px 90px 80px; align-items: center; }
  .bar > * { grid-row: 1 !important; grid-column: auto !important; }
  .bar .bl, .bar .bq, .bar .bk { text-align: right; } .bar .bs { text-align: center; }
  .bar.bh { font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 8px 0; }
  .isform .bar { grid-template-columns: 108px 1fr 56px 96px 76px 64px; }
}

.phd { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.phd b { color: var(--navy); font-size: 19px; }
.tag { border-radius: 999px; padding: 2px 10px; background: #F8EFD6; color: var(--gold-dark); font-weight: 700; font-size: 12.5px; }
.tag.g { background: #DFF1E4; color: #176B34; }
.pat { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid #E8ECF3; align-items: center; }
.ck { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; width: 86px; flex: none; min-height: 44px; cursor: pointer; }
.ck input { width: 22px; height: 22px; accent-color: var(--navy); margin: 0; }
.ck b { font-size: 18px; color: var(--navy); } .ck small { width: 100%; color: var(--gold-dark); font-size: 12px; font-weight: 600; }
.pb { flex: 1; min-width: 0; }
.pat.done .pb { opacity: .45; }
.strip { display: flex; height: 30px; border-radius: 6px; overflow: hidden; gap: 2px; background: #fff; }
.strip i { flex: 1 1 0; min-width: 0; overflow: hidden; font: 600 12px/30px "Segoe UI", Arial, sans-serif; text-align: center; color: #fff; white-space: nowrap; }
.strip i.np { font-size: 0; }
.c0 { background: #1F3864; } .c1 { background: #2F6DB5; } .c2 { background: #0E7C86; } .c3 { background: #6A4C9C; } .c4 { background: #8A6420; } .c5 { background: #A33B5E; } .c6 { background: #4A5F2A; } .c7 { background: #565F70; }
.strip .re, .legend .re { background: #BFE3CB; color: #12532A; } .strip .sc, .legend .sc { background: #F6C9A8; color: #6B2F0A; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin: 0 2px 0 6px; }
.ptx { font-size: 13.5px; margin-top: 4px; } .ptx span { color: var(--muted); }
details.adv2 { padding: 0 14px; } details.adv2 > summary { padding: 13px 0; font-weight: 600; color: var(--navy2); cursor: pointer; } details.adv2 > .row { padding: 12px 0 14px; }
.scroll { overflow-x: auto; }
.mat.wide { min-width: 720px; }
.mat tr.tt td { border-top: 2px solid var(--navy); font-weight: 700; color: var(--navy); }
dialog .f { margin-bottom: 4px; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .foot { display: none; }
  .bar, .bar.bh { display: grid; grid-template-columns: 108px 1fr 88px 140px 90px 80px; align-items: center; padding: 4px 0; }
  .bar > * { grid-row: 1 !important; grid-column: auto !important; }
  .bar .bl, .bar .bq, .bar .bk { text-align: right; }
  .bar, .pat { break-inside: avoid; } h2 { break-after: avoid; }
  .pat.done .pb { opacity: 1; } .ck input { appearance: none; border: 1.5px solid #333; border-radius: 3px; }
  .ck input:checked { background: #1F3864; }
  .scroll { overflow: visible; }
}