/* =========================================================
   Studmart — arah desain "Baseplate"
   Latar grid seperti baseplate Roblox Studio, kartu berperilaku
   seperti bata plastik: sisi tebal, bayangan keras tanpa blur,
   dan tertekan saat diklik.
   ========================================================= */

:root {
  --paper: #E3E0D5;
  --surface: #F8F6F0;
  --ink: #151309;
  --muted: #6E6957;
  --garis: #151309;
  --brick: #D33A26;
  --sea: #173F73;
  --stud: #EFB92B;
  --mint: #1C8155;

  --r: 6px;
  --tebal: 2.5px;
  --angkat: 7px;

  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(21, 19, 9, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 19, 9, .06) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}

body.mode-admin {
  --paper: #DCDED8;
  background-color: var(--paper);
}

main { max-width: 1080px; margin: 0 auto; padding: 0 20px 72px; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--sea); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------------- Topbar ---------------- */
.topbar {
  max-width: 1080px; margin: 0 auto;
  padding: 22px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.merek { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.merek__brick {
  width: 26px; height: 20px; background: var(--brick);
  border: var(--tebal) solid var(--ink); border-radius: 3px;
  box-shadow: 3px 3px 0 var(--ink);
  position: relative; flex: none;
}
.merek__brick::before {
  content: ''; position: absolute; inset: 3px 4px auto 4px; height: 4px;
  background:
    radial-gradient(circle at 3px 50%, var(--ink) 0 2px, transparent 2.4px) repeat-x;
  background-size: 9px 100%; opacity: .55;
}
.merek__nama { font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.topnav { display: flex; gap: 18px; font-size: .92rem; font-weight: 500; }
.topnav a { color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
.topnav a:hover { border-bottom-color: var(--brick); }

/* ---------------- Bata ---------------- */
.brick {
  background: var(--surface);
  border: var(--tebal) solid var(--garis);
  border-radius: var(--r);
  box-shadow: var(--angkat) var(--angkat) 0 var(--garis);
  overflow: hidden;
}
.brick--tipis { box-shadow: 4px 4px 0 var(--garis); }
.brick--sukses { background: #E9F5EE; }
.brick--tolak { background: #FBEDEA; }
.brick__isi, .kalkulator__isi { padding: 24px; }
.brick__isi.tengah { text-align: center; }

.studs {
  height: 15px;
  border-bottom: var(--tebal) solid var(--garis);
  background-color: var(--paper);
  background-image: radial-gradient(circle at 13px 50%, var(--ink) 0 4.5px, transparent 5px);
  background-size: 26px 100%;
  background-repeat: repeat-x;
}
.brick--sukses .studs { background-color: #CFE8DA; }
.brick--tolak .studs { background-color: #F4D8D2; }

/* ---------------- Tombol ---------------- */
.tombol {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-size: .95rem; font-weight: 600;
  padding: 12px 20px;
  background: var(--surface); color: var(--ink);
  border: var(--tebal) solid var(--garis); border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--garis);
  cursor: pointer; text-decoration: none;
  transition: transform .06s ease, box-shadow .06s ease;
}
.tombol:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--garis); }
.tombol:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--garis); }
.tombol--utama { background: var(--brick); color: #FFF9F2; width: 100%; padding: 15px 20px; font-size: 1rem; }
.tombol--bahaya { background: transparent; color: var(--brick); border-color: var(--brick); box-shadow: 4px 4px 0 var(--brick); }
.tombol--kecil { padding: 8px 14px; font-size: .85rem; box-shadow: 3px 3px 0 var(--garis); }
.tombol:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--sea); outline-offset: 2px;
}

/* ---------------- Form ---------------- */
.lbl {
  display: block; font-family: var(--mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  margin: 20px 0 7px;
}
.brick__isi > .lbl:first-child, .kalkulator__isi > .lbl:first-child { margin-top: 0; }

input[type=text], input[type=password], input[type=number], input[type=file] {
  width: 100%; font-family: var(--body); font-size: 1rem; color: var(--ink);
  padding: 12px 14px; background: #FFFDF8;
  border: var(--tebal) solid var(--garis); border-radius: var(--r);
}
input[type=file] { padding: 10px; font-size: .9rem; }
input::placeholder { color: #A29B87; }

form > .tombol--utama, .form-bukti > .tombol--utama, .form-tolak > .tombol { margin-top: 18px; }

.stepper { display: flex; align-items: stretch; gap: 10px; }
.stepper input {
  flex: 1; text-align: center;
  font-family: var(--display); font-weight: 800; font-size: 1.9rem;
  padding: 6px 4px; -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__btn {
  width: 54px; font-size: 1.5rem; font-weight: 600; line-height: 1;
  background: var(--surface); border: var(--tebal) solid var(--garis); border-radius: var(--r);
  cursor: pointer; box-shadow: 3px 3px 0 var(--garis);
  transition: transform .06s ease, box-shadow .06s ease;
}
.stepper__btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--garis); }

.paket-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.paket {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 11px 12px; text-align: left; cursor: pointer;
  background: var(--paper); border: 2px solid var(--garis); border-radius: var(--r);
  font-family: var(--body);
}
.paket:hover { background: #EFECE1; }
.paket[aria-pressed=true] { background: var(--stud); box-shadow: inset 0 0 0 2px var(--surface); }
.paket__robux { font-family: var(--display); font-weight: 800; font-size: 1.05rem; }
.paket__robux small { font-size: .7rem; font-weight: 600; }
.paket__harga { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.paket[aria-pressed=true] .paket__harga { color: #5A4A12; }
.paket__tag {
  position: absolute; top: -9px; right: 6px;
  font-family: var(--mono); font-size: .6rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  background: var(--sea); color: #fff; padding: 2px 6px; border-radius: 3px;
}

.cek-user { display: flex; gap: 10px; }
.cek-user input { flex: 1; }
.cek-user .tombol { flex: none; }
.hasil-cek { font-size: .88rem; margin: 8px 0 0; min-height: 1.2em; }
.hasil-cek.ok { color: var(--mint); font-weight: 600; }
.hasil-cek.gagal { color: var(--brick); font-weight: 600; }

.total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-top: 22px; padding-top: 16px; border-top: 2px dashed var(--garis);
}
.total span { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.total strong { font-family: var(--display); font-weight: 800; font-size: 2rem; letter-spacing: -.03em; }

.catatan-kecil { font-size: .82rem; color: var(--muted); line-height: 1.5; margin: 8px 0 0; }
.petunjuk { font-size: .95rem; }
.galat, .sukses-notif {
  font-size: .9rem; font-weight: 500; padding: 12px 14px; border-radius: var(--r);
  border: 2px solid var(--brick); background: #FBEDEA; color: #8A2113; margin-bottom: 16px;
}
.sukses-notif { border-color: var(--mint); background: #E9F5EE; color: #10553A; }

/* ---------------- Hero ---------------- */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; padding: 24px 0 72px; }
.hero__kiri { padding-top: 8px; }
.eyebrow {
  font-family: var(--mono); font-size: .74rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brick); margin-bottom: 14px;
}
.hero__sub { font-size: 1.05rem; color: #443F32; max-width: 42ch; }
.janji { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.janji li { position: relative; padding-left: 30px; font-size: .93rem; }
.janji li::before {
  content: ''; position: absolute; left: 0; top: 5px;
  width: 16px; height: 12px; background: var(--stud);
  border: 2px solid var(--ink); border-radius: 2px;
}

.kalkulator { position: sticky; top: 20px; }

/* ---------------- Langkah ---------------- */
.langkah { padding: 8px 0 64px; }
.langkah__list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: none; }
.langkah__list li { border-top: var(--tebal) solid var(--garis); padding-top: 14px; }
.langkah .no {
  display: inline-block; font-family: var(--mono); font-weight: 600; font-size: .78rem;
  background: var(--ink); color: var(--paper); padding: 2px 8px; border-radius: 3px; margin-bottom: 10px;
}
.langkah h3 { margin-bottom: .35em; }
.langkah p { font-size: .89rem; color: #4A4536; margin: 0; }

/* ---------------- FAQ ---------------- */
.tanya { max-width: 720px; padding-bottom: 40px; }
.tanya details { border-bottom: 2px solid rgba(21, 19, 9, .18); padding: 14px 0; }
.tanya summary { font-family: var(--display); font-weight: 600; font-size: 1.02rem; cursor: pointer; list-style: none; }
.tanya summary::-webkit-details-marker { display: none; }
.tanya summary::before { content: '+ '; color: var(--brick); font-weight: 800; }
.tanya details[open] summary::before { content: '– '; }
.tanya p { margin: 10px 0 0; font-size: .92rem; color: #4A4536; }

/* ---------------- Halaman pesanan ---------------- */
.halaman-pesanan { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; padding: 8px 0 40px; }
.kolom-info { display: grid; gap: 20px; position: sticky; top: 20px; }
.kode-besar { font-family: var(--mono); font-weight: 600; font-size: 1.5rem; letter-spacing: .04em; margin: 0 0 10px; }
.chip {
  display: inline-block; font-family: var(--mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px;
  border: 2px solid var(--garis); border-radius: 999px;
}
.chip--nunggu { background: var(--stud); }
.chip--cek { background: var(--sea); color: #fff; }
.chip--sukses { background: var(--mint); color: #fff; }
.chip--tolak { background: var(--brick); color: #fff; }

.rincian { margin: 18px 0 0; font-size: .9rem; }
.rincian > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dotted rgba(21, 19, 9, .25); }
.rincian dt { color: var(--muted); }
.rincian dd { margin: 0; font-weight: 600; text-align: right; }
.avatar { width: 72px; height: 72px; margin-top: 16px; border: 2px solid var(--garis); border-radius: var(--r); background: var(--paper); }

.riwayat { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; font-size: .85rem; }
.riwayat li { display: grid; gap: 2px; padding-left: 14px; border-left: 3px solid var(--stud); }
.riwayat time { font-family: var(--mono); font-size: .72rem; color: var(--muted); }

.harga-pass { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 0; flex-wrap: wrap; }
.harga-pass__angka { font-family: var(--display); font-weight: 800; font-size: 2.6rem; letter-spacing: -.03em; }
.harga-pass__unit { font-family: var(--mono); font-size: .85rem; color: var(--muted); }

.qris { display: flex; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.qris__img { width: 200px; height: 200px; object-fit: contain; background: #fff; border: var(--tebal) solid var(--garis); border-radius: var(--r); padding: 8px; }
.qris__info { flex: 1; min-width: 200px; }
.nominal { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nominal strong { font-family: var(--display); font-weight: 800; font-size: 2rem; letter-spacing: -.03em; }
.kolom-aksi h2 { margin-top: 32px; padding-top: 20px; border-top: 2px dashed var(--garis); }
.kolom-aksi .brick__isi > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------------- Admin ---------------- */
.admin { padding: 8px 0 40px; }
.admin__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.admin__head h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.admin__head form { margin: 0; }
.balik { font-size: .88rem; }
.ringkas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.ringkas__item {
  background: var(--surface); border: 2px solid var(--garis); border-radius: var(--r);
  box-shadow: 3px 3px 0 var(--garis); padding: 12px 14px;
}
.ringkas__item b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1.1; }
.ringkas__item span { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.tabel-bungkus { overflow-x: auto; background: var(--surface); border: var(--tebal) solid var(--garis); border-radius: var(--r); box-shadow: 5px 5px 0 var(--garis); }
.tabel { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 680px; }
.tabel th {
  text-align: left; font-family: var(--mono); font-size: .7rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  padding: 12px 14px; border-bottom: 2px solid var(--garis);
}
.tabel td { padding: 12px 14px; border-bottom: 1px solid rgba(21, 19, 9, .15); vertical-align: middle; }
.tabel tr:last-child td { border-bottom: 0; }
.tabel .angka, .tabel .waktu { font-family: var(--mono); font-size: .84rem; }
.tabel .waktu { color: var(--muted); }
.kode-link { font-family: var(--mono); font-weight: 600; }
.kosong { text-align: center; color: var(--muted); padding: 32px 14px; }

.admin__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; align-items: start; }
.bukti { width: 100%; border: 2px solid var(--garis); border-radius: var(--r); background: var(--paper); display: block; }
.aksi-baris { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; }
.aksi-baris form { margin: 0; }
.aksi-baris .tombol--utama { width: auto; padding: 12px 20px; font-size: .95rem; }
.form-tolak { margin-top: 24px; padding-top: 18px; border-top: 2px dashed var(--garis); }
.form-tolak .tombol { margin-top: 12px; }

/* ---------------- Lain-lain ---------------- */
.sempit { max-width: 480px; margin: 24px auto 64px; }
.kaki {
  max-width: 1080px; margin: 0 auto; padding: 28px 20px 40px;
  border-top: 2px solid rgba(21, 19, 9, .2);
  font-size: .82rem; color: var(--muted);
}
.kaki p { margin: 0 0 6px; }

/* ---------------- Responsif ---------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-bottom: 48px; }
  .kalkulator { position: static; }
  .halaman-pesanan { grid-template-columns: 1fr; }
  .kolom-info { position: static; }
  .langkah__list { grid-template-columns: repeat(2, 1fr); }
  .admin__grid { grid-template-columns: 1fr; }
  .ringkas { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  main { padding: 0 16px 56px; }
  .topbar { padding: 16px; }
  .brick__isi, .kalkulator__isi { padding: 18px; }
  .paket-grid { grid-template-columns: repeat(2, 1fr); }
  .langkah__list { grid-template-columns: 1fr; }
  .qris__img { width: 100%; height: auto; max-width: 260px; }
  .total strong { font-size: 1.7rem; }
}

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

/* ---------------- Metode pengiriman (kalkulator) ---------------- */
.metode {
  margin-top: 18px; padding: 12px 14px;
  background: #E9F5EE; border: 2px solid var(--mint); border-radius: var(--r);
}
.metode--gp { background: #FDF4DF; border-color: #B98A12; }
.metode__nama {
  display: block; font-family: var(--display); font-weight: 800; font-size: .98rem;
  margin-bottom: 3px;
}
.metode__ket { display: block; font-size: .82rem; line-height: 1.5; color: #3E4C44; }
.metode--gp .metode__ket { color: #5A4A12; }

/* ---------------- Syarat akun ---------------- */
.syarat-blok { padding-bottom: 56px; }
.syarat { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; max-width: 760px; }
.syarat li { position: relative; padding-left: 30px; font-size: .92rem; line-height: 1.55; }
.syarat li::before {
  content: ''; position: absolute; left: 0; top: 6px;
  width: 16px; height: 12px; background: var(--sea);
  border: 2px solid var(--ink); border-radius: 2px;
}

/* ---------------- Langkah menerima transfer ---------------- */
.terima-langkah { margin: 14px 0 0; padding-left: 22px; font-size: .93rem; line-height: 1.65; }
.terima-langkah li { margin-bottom: 6px; }
.peringatan {
  margin-top: 18px; padding: 12px 14px; font-size: .88rem; line-height: 1.55;
  background: #FDF4DF; border: 2px solid #B98A12; border-radius: var(--r); color: #5A4A12;
}

/* ---------------- Kuota akun stok (admin) ---------------- */
.kuota-blok { margin-bottom: 22px; }
.kuota-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 12px; }
.kuota__akun { font-family: var(--mono); font-weight: 600; font-size: .9rem; margin: 0 0 8px; }
.kuota__bar {
  height: 9px; background: var(--paper); border: 2px solid var(--garis);
  border-radius: 999px; overflow: hidden; margin-bottom: 4px;
}
.kuota__bar span { display: block; height: 100%; background: var(--brick); }
.kuota__ket { font-size: .76rem; color: var(--muted); margin: 0 0 10px; }
.kuota__sisa { font-size: .84rem; margin: 0; }
.kuota__sisa b { font-family: var(--mono); }
