/* IRSFA v7 — light mode, keluarga Bitstream Vera. Nama domain memakai Vera Sans Mono karena itu data, bukan teks. */
:root {
  --paper: #fbfaf7; --surface: #ffffff; --ink: #17202b; --muted: #5e6875; --rule: #e4e0d7; --rule-strong: #cfc9bc;
  --brand: #0e5c4a; --brand-soft: #e5f0ec; --brand-ink: #ffffff; --ok: #1f7a4d; --warn: #a35f00; --bad: #b42318; --info: #3b5b8c;
  --sans: "Bitstream Vera Sans", "DejaVu Sans", Verdana, Geneva, sans-serif;
  --mono: "Bitstream Vera Sans Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
  --r: 4px;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: var(--sans); font-size: .97rem; color: var(--ink); background: var(--paper); line-height: 1.6; }
a { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 .35rem; letter-spacing: -.01em; }
.lede { font-size: 1.05rem; color: var(--muted); margin-bottom: 1.75rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 .5rem; }
p { margin: 0 0 1rem; max-width: 72ch; }
.muted { color: var(--muted); }
.domain, code { font-family: var(--mono); font-size: .95em; }

/* Kerangka panel: bar atas + navigasi kiri */
.topbar { display: flex; align-items: center; gap: 1rem; padding: .7rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--rule); }
.topbar .brand { font-weight: bold; color: var(--ink); text-decoration: none; }
.topbar .brand span { color: var(--muted); font-weight: normal; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: .9rem; color: var(--muted); }
.topbar .balance { font-size: .9rem; padding: .3rem .7rem; border: 1px solid var(--rule); border-radius: var(--r); color: var(--ink); text-decoration: none; }
.topbar .balance b { font-variant-numeric: tabular-nums; }
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 53px); }
.nav { background: var(--surface); border-right: 1px solid var(--rule); padding: 1rem 0; }
.nav .group { padding: .9rem 1.25rem .3rem; font-size: .8rem; color: var(--muted); }
.nav a { display: block; padding: .45rem 1.25rem; color: var(--ink); text-decoration: none; border-left: 3px solid transparent; }
.nav a:hover { background: var(--paper); }
.nav a.on { border-left-color: var(--brand); color: var(--brand); font-weight: bold; }
main { padding: 1.75rem 2rem 3rem; max-width: 1180px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }

/* Ringkasan angka */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; margin-bottom: 1.5rem; }
.figures > div { padding: 1rem 1.2rem; box-shadow: 1px 0 0 var(--rule), 0 1px 0 var(--rule); }
.figures b { display: block; font-size: 1.45rem; }
.figures small { color: var(--muted); }
.figures .alert b { color: var(--bad); }

/* Tabel data */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: bold; color: var(--muted); background: #fafbfc; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { padding: 2rem; text-align: center; color: var(--muted); }

/* Status siklus hidup domain */
.st { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; white-space: nowrap; }
.st::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--muted); }
.st.ok::before { background: var(--ok); } .st.warn::before { background: var(--warn); } .st.bad::before { background: var(--bad); } .st.info::before { background: var(--info); }

/* Formulir */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; }
form.stack > * + *, .stack > * + * { margin-top: .9rem; }
.card > h3:first-of-type { margin-top: 0; }
.row.cards { align-items: stretch; }
.row.cards > .card { margin-bottom: 0; }
.table-wrap + p, .table-wrap + .card, .table-wrap + form, .row.cards + h2 { margin-top: 1.25rem; }
h1.domain { font-size: 1.6rem; }
details pre { white-space: pre-wrap; font-size: .8rem; max-height: 16rem; overflow: auto; }
label { display: block; font-weight: bold; font-size: .92rem; margin-bottom: .3rem; }
.hint { font-weight: normal; color: var(--muted); font-size: .85rem; }
input, select, textarea { width: 100%; max-width: 32rem; font: inherit; padding: .55rem .7rem; border: 1px solid #b9c6d2; border-radius: var(--r); background: #fff; color: var(--ink); }
input[type=checkbox] { width: auto; }
textarea { min-height: 7rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; }
.row > div { flex: 1 1 12rem; }
.btn { display: inline-block; font: inherit; font-weight: bold; padding: .5rem .95rem; border-radius: var(--r); border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); font-weight: normal; }
.btn.ghost:hover { border-color: var(--ink); filter: none; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.small { padding: .3rem .6rem; font-size: .85rem; }
.inline { display: inline; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Pesan */
.flash { padding: .8rem 1rem; border-radius: var(--r); margin-bottom: 1.25rem; border: 1px solid; }
.flash.ok { background: #eaf6ef; border-color: #b6dcc5; }
.flash.bad { background: #fbecea; border-color: #eab7b3; }
.flash ul { margin: .3rem 0 0 1.1rem; padding: 0; }
.secret { font-family: var(--mono); font-size: 1.1rem; padding: .75rem 1rem; background: #fff8e1; border: 1px dashed var(--warn); border-radius: var(--r); word-break: break-all; }

/* Halaman publik & storefront */
.public-top { display: flex; align-items: center; padding: 1rem 2rem; gap: 1rem; }
.public-top .spacer { flex: 1; }
.hero { padding: 3.5rem 2rem 2.5rem; max-width: 980px; margin: 0 auto; }
.hero h1 { font-size: 2.3rem; max-width: 20ch; }
.hero p { font-size: 1.1rem; color: var(--muted); }
.search { display: flex; margin-top: 1.5rem; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: #fff; max-width: 760px; }
.search input { border: 0; font-family: var(--mono); font-size: 1.5rem; padding: 1rem 1.2rem; max-width: none; border-radius: 0; }
.search select { border: 0; border-left: 1px solid var(--rule); font-family: var(--mono); font-size: 1.3rem; max-width: 9rem; border-radius: 0; background: var(--paper); }
.search button { border: 0; border-radius: 0; padding: 0 1.8rem; font-size: 1.1rem; }
.results { max-width: 760px; margin-top: 1.25rem; }
.result { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; background: #fff; border: 1px solid var(--rule); border-radius: var(--r); margin-bottom: .5rem; }
.result .domain { font-size: 1.15rem; }
.result .price { display: flex; align-items: center; gap: .75rem; white-space: nowrap; }
.prices { max-width: 980px; margin: 0 auto; padding: 0 2rem 3rem; }
.auth-box { max-width: 26rem; margin: 3rem auto; }
footer.site { padding: 2rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--rule); }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .nav { border-right: 0; border-bottom: 1px solid var(--rule); display: flex; overflow-x: auto; padding: 0; }
  .nav .group { display: none; }
  .nav a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .nav a.on { border-bottom-color: var(--brand); }
  main { padding: 1.25rem; }
  .hero h1 { font-size: 1.7rem; }
  .search { flex-wrap: wrap; } .search input { font-size: 1.2rem; }
  .search select, .search button { flex: 1 1 50%; max-width: none; padding: .8rem; border-left: 0; border-top: 1px solid var(--rule); }
  .result { flex-wrap: wrap; gap: .5rem; }
  .result .price { width: 100%; justify-content: space-between; }
  .figures { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- Daftar "perlu tindakan": kalimat + satu tombol, bukan kartu angka ---- */
.todo { list-style: none; margin: 0 0 2rem; padding: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.todo li { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; border-bottom: 1px solid var(--rule); }
.todo li:last-child { border-bottom: 0; }
.todo li p { margin: 0; }
.todo li.bad { border-left: 3px solid var(--bad); }
.todo li.warn { border-left: 3px solid var(--warn); }
.todo li.info { border-left: 3px solid var(--rule-strong); }
.todo .when { color: var(--muted); font-size: .88rem; }
.allgood { padding: 1rem 1.1rem; background: var(--brand-soft); border-radius: var(--r); margin-bottom: 2rem; }

/* ---- Garis waktu siklus hidup domain (SVG) ---- */
.lifeline { margin: 0 0 1.5rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 1rem 1.2rem .6rem; margin-bottom: 1.5rem; }
.lifeline svg { width: 100%; height: 64px; display: block; overflow: visible; }
.lifeline .legend { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); gap: .5rem; flex-wrap: wrap; }
.seg-active { fill: #cfe5dc; } .seg-grace { fill: #f3dfb8; } .seg-red { fill: #f1c6c1; } .seg-del { fill: #e2dfd8; }
.today-line { stroke: var(--ink); stroke-width: 2; }
.today-label { font: bold 12px var(--sans); fill: var(--ink); }
.tick-label { font: 11px var(--sans); fill: var(--muted); }

/* ---- Tata letak halaman detail: isi utama + kolom tindakan ---- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.5rem; align-items: start; }
.aside .card h3 { font-size: .95rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 0 0 1.25rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* ---- Domain list: sisa masa aktif ---- */
.left { font-size: .85rem; color: var(--muted); }
.left.soon { color: var(--warn); font-weight: bold; }
.left.gone { color: var(--bad); font-weight: bold; }

/* ---- Storefront ---- */
.hero .eyebrow { font-family: var(--mono); color: var(--brand); margin-bottom: .5rem; }
.steps { max-width: 980px; margin: 0 auto; padding: 0 2rem 2.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.steps div { border-top: 2px solid var(--ink); padding-top: .75rem; }
.steps b { display: block; margin-bottom: .25rem; }
.steps p { color: var(--muted); margin: 0; font-size: .93rem; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 1rem; }
  .todo li { flex-direction: column; align-items: flex-start; }
}

/* Dokumen hukum */
.legal h2 { margin-top: 1.75rem; }
.legal p { max-width: 70ch; }

/* Invoice cetak */
.invoice { max-width: 820px; margin: 2rem auto; padding: 2rem; background: var(--surface); border: 1px solid var(--rule); }
.inv-head { display: flex; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.inv-title { text-align: right; }
.invoice table { margin: 1rem 0; } .invoice tfoot td { border-bottom: 0; } .invoice tfoot tr:first-child td { border-top: 2px solid var(--ink); }
@media print { .noprint { display: none; } body { background: #fff; } .invoice { border: 0; margin: 0; padding: 0; } }

fieldset.choices { border: 1px solid var(--rule); border-radius: var(--r); padding: .75rem 1rem; }
fieldset.choices legend { font-weight: bold; font-size: .92rem; padding: 0 .3rem; }
fieldset.choices label { font-weight: normal; margin: .4rem 0; }
fieldset.choices .hint { display: block; margin-left: 1.5rem; }
input[type="radio"] { width: auto; margin: 0 .5rem 0 0; vertical-align: -1px; }
fieldset.choices label { display: block; text-align: left; }

/* Daftar harga */
.pricebook td { vertical-align: top; }
.pricebook .price-input { width: 8.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.pricebook .price-input.is-set { border-color: var(--brand); background: var(--brand-soft); }
.pricebook small { display: block; margin-top: .25rem; }
.pricebook small.warn { color: var(--warn); font-weight: bold; }
.buyers { max-height: 26rem; overflow-y: auto; display: flex; flex-direction: column; }
.buyer { display: block; padding: .45rem .6rem; border-radius: var(--r); color: var(--ink); text-decoration: none; }
.buyer:hover { background: var(--paper); }
.buyer.on { background: var(--brand-soft); color: var(--brand); font-weight: bold; }
.buyer small { display: block; font-weight: normal; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.buyer-bar select { min-width: 22rem; }

/* Tiket */
.thread { display: flex; flex-direction: column; gap: .9rem; margin-bottom: 1.5rem; max-width: 52rem; }
.msg { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: .9rem 1.1rem; }
.msg.from-handler { border-left: 3px solid var(--brand); }
.msg.internal { background: #fff8e8; border-color: #ecd9ac; }
.msg header { display: flex; gap: .75rem; align-items: baseline; margin-bottom: .4rem; flex-wrap: wrap; }
.msg .tag { font-size: .78rem; background: #f3dfb8; padding: .1rem .45rem; border-radius: 3px; }
.msg .body { white-space: normal; overflow-wrap: anywhere; }
.msg .attachment { margin: .6rem 0 0; padding-top: .5rem; border-top: 1px dashed var(--rule); font-size: .92rem; }
.filters { display: flex; gap: .4rem 1.25rem; flex-wrap: wrap; } .filters a { white-space: nowrap; } .filters a.on { font-weight: bold; color: var(--brand); }
.narrow-form { max-width: 52rem; }
.field-error { color: var(--bad); margin: .3rem 0 0; font-size: .9rem; }
.perm-form label { display: block; font-weight: normal; margin: .2rem 0; }
.tag-owner { background: var(--brand-soft); color: var(--brand); padding: .05rem .4rem; border-radius: 3px; font-weight: bold; }
.small { font-size: .88rem; margin: .2rem 0; }
.error-page { max-width: 34rem; margin: 18vh auto; padding: 0 1.5rem; }
.error-page .code { font-family: var(--mono); color: var(--brand); margin: 0; }
.error-page .btn { margin-right: .5rem; }
.table-wrap + .split { margin-top: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1rem; align-items: start; }
.grid-2 > .card { margin: 0; }
.row > div.wide { flex: 2 1 18rem; }
