/* Warna dan huruf template ini diatur di blok :root berikut. */
:root {
  --ground: #0E3B2E;
  --paper: #F7C5CF;
  --ink: #1A1516;
  --serial: #A80F1C;
  --action: #1A1516;
  --action-ink: #F7C5CF;
  --font: 'Barlow Condensed', 'Karcis Cadangan', 'Arial Narrow', Arial, sans-serif;
}
/* Kalau huruf gagal dimuat, huruf cadangan diperkecil agar judul tetap muat */
@font-face { font-family: 'Karcis Cadangan'; src: local('Roboto'), local('Arial'), local('Helvetica'), local('Liberation Sans'); size-adjust: 72%; }

@font-face { font-family: 'Barlow Condensed'; font-weight: 500; font-display: swap; src: url('fonts/barlow-condensed-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('fonts/barlow-condensed-700.woff2') format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh; min-height: 100svh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
}
h1, h2, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
input, button { font: inherit; color: inherit; border-radius: 0; }
button { cursor: pointer; }
[hidden] { display: none; }
:focus-visible { outline: 3px solid var(--focus, currentColor); outline-offset: 2px; }

.alert { font-weight: 600; }
.trial { display: inline-block; padding: 10px 0; }
.more summary { cursor: pointer; padding: 10px 0; }
.more label { display: block; }
.more input { width: 100%; padding: 10px 12px; margin-top: 4px; }

/* Halaman setelah login: alogin, status, logout, error */
.sheet {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  min-height: 100vh; min-height: 100svh;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  padding: 32px 20px;
}
.sheet h1 { font-size: 44px; line-height: 1.02; }
.facts { display: grid; gap: 10px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; }
.facts dd { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.action {
  display: block;
  width: 100%;
  padding: 16px;
  border: 0;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  background: var(--action);
  color: var(--action-ink);
  transition: transform .15s ease;
}
.action:active { transform: translateY(1px); }

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

body { font-size: 19px; font-weight: 500; line-height: 1.25; }
.page-login { display: flex; align-items: center; justify-content: center; padding: 14px; }

.karcis {
  width: 100%;
  max-width: 400px;
  background: var(--paper);
  animation: sobek .5s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes sobek { from { opacity: 0; transform: translateY(18px) rotate(-1.5deg); } }

.stub { position: relative; overflow: hidden; padding: 18px 44px 14px 18px; }
h1 { font-size: 84px; font-weight: 700; line-height: .84; letter-spacing: -.01em; text-transform: uppercase; }
h1 span { display: block; }
.tempat { margin-top: 10px; font-size: 22px; font-weight: 700; }
/* Nomor seri cap merah: alamat MAC perangkat ini, jadi tiap karcis berbeda */
.seri {
  position: absolute; right: 14px; top: 18px;
  writing-mode: vertical-rl;
  color: var(--serial); font-size: 17px; font-weight: 700; letter-spacing: .06em;
}

/* Lubang sobekan: titik warna latar, dengan takik di kedua ujung */
.perf { position: relative; margin: 0 16px; border-top: 6px dotted var(--ground); }
.perf::before, .perf::after {
  content: ''; position: absolute; top: -14px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--ground);
}
.perf::before { left: -27px; }
.perf::after { right: -27px; }

.isi { padding: 16px 18px; }
.form { display: grid; gap: 10px; }
label { font-size: 19px; font-weight: 700; }
.kode {
  width: 100%; height: 66px; padding: 0 12px;
  border: 3px solid var(--ink); background: transparent;
  font-size: 36px; font-weight: 700; letter-spacing: .08em;
}
.action { font-size: 24px; text-transform: uppercase; letter-spacing: .03em; padding: 14px; }
.alert { color: var(--serial); line-height: 1.2; }
.more { font-size: 17px; }
.more input { border: 2px solid var(--ink); background: transparent; }

.tarif { padding: 14px 18px 18px; }
h2 { font-size: 19px; font-weight: 700; }
.tarif li { display: flex; justify-content: space-between; font-size: 21px; }
.tarif b { font-weight: 700; font-variant-numeric: tabular-nums; }

@media (min-width: 1000px) {
  .karcis {
    display: grid;
    grid-template-columns: 1.15fr auto 1.2fr auto .9fr;
    max-width: 1180px;
    min-height: 460px;
  }
  .stub { padding: 30px 56px 30px 30px; display: flex; flex-direction: column; }
  h1 { font-size: 150px; }
  .tempat { margin-top: auto; font-size: 28px; }
  .seri { top: 30px; right: 20px; font-size: 20px; }
  .perf { margin: 16px 0; border-top: 0; border-left: 6px dotted var(--ground); }
  .perf::before, .perf::after { left: -14px; right: auto; }
  .perf::before { top: -27px; }
  .perf::after { top: auto; bottom: -27px; }
  .isi { padding: 30px; align-self: center; }
  label { font-size: 22px; }
  .kode { height: 76px; font-size: 42px; }
  .action { font-size: 28px; padding: 16px; }
  .tarif { padding: 30px; display: flex; flex-direction: column; justify-content: flex-end; }
  h2 { margin-bottom: auto; font-size: 22px; }
  .tarif li { font-size: 25px; padding-top: 6px; flex-direction: column; }
}

.sheet { padding: 14px; }
.sheet > * { position: relative; }
.page-done .sheet, .page-status .sheet, .page-out .sheet, .page-error .sheet { justify-content: center; }
.sheet h1 { font-size: 64px; }
.sheet { color: var(--paper); }
.facts div { padding-bottom: 8px; border-bottom: 3px dotted currentColor; font-size: 22px; }
.sheet .action { background: var(--paper); color: var(--ink); }
