/* TempahKE: gaya bersama.
   Hala tuju: tenang dan kemas, diilhamkan oleh woblo.in (pilihan pemilik), disesuaikan.
   Design Read: SaaS tempahan untuk pemilik kedai kecil, gaya editorial minimal, dial ENERGY 2 / RHYTHM 2 / MOTION 1.
   Sebab setiap keputusan:
   - Latar #FBFBFB + teks #101013: hampir putih dan hampir hitam, kontras 18:1, rasa kemas dan "premium".
   - Kelabu #626262 untuk teks kedua: kontras 5.9:1, cukup untuk WCAG AA.
   - Biru (--accent) satu-satunya warna aksen: perkataan italic dalam tajuk, slot dipilih, butang utama.
   - Onest untuk semua teks: grotesk neutral macam Inter tapi bukan pilihan lalai AI, sokong BM dengan baik.
   - Instrument Serif italic untuk SATU perkataan dalam tajuk utama: titik fokus, bukan hiasan di mana-mana.
   - IBM Plex Mono untuk label kecil (harga, masa, rujukan): nombor sejajar dan mudah dibaca.
   - Kad: putih, garisan 1px, sudut 16px, tanpa bayang. Hierarki datang dari saiz dan ruang, bukan bayang.
   - Butang pil berkilat hanya untuk satu tindakan utama setiap skrin. Butang lain sudut 10px.
   - Motif identiti: tiket tempahan berlekuk dengan garis koyak (dikekalkan dari reka bentuk lama).
   - Tema cerah sahaja: gaya ini dibina atas latar putih. Pelanggan buka di telefon waktu siang. */

/* Font disimpan dalam sistem sendiri (subset Latin), tanpa sambungan ke Google semasa pelawat buka halaman. */
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/Onest.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/IBMPlexMono-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/IBMPlexMono-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/InstrumentSerif-400i.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #FBFBFB;
  --surface: #FFFFFF;
  --well: #F4F4F5;
  --ink: #101013;
  --muted: #626262;
  --line: #E9E8EA;
  --line-strong: #D4D3D8;
  --accent: #2F64D6;
  --accent-soft: #E3EDFF;
  --accent-line: #6BA0EF;
  --ok-bg: #E6F4EA;
  --ok-ink: #1B6B3A;
  --wait-bg: #FFF1D6;
  --wait-ink: #8A5300;
  --err: #B3261E;
  --err-bg: #FDECEA;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; font-family: var(--sans); background: var(--bg); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 500; line-height: 1.1; letter-spacing: -0.03em; }
.accent-word { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -0.01em; }
.mono { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
a:hover { text-decoration-color: currentColor; }
img { max-width: 100%; height: auto; }

/* Semua kawalan: penunjuk tetikus & fokus yang jelas */
a[href], button, summary, select, label[for], input[type=checkbox], input[type=radio], label:has(> input[type=checkbox]), label:has(> input[type=radio]) { cursor: pointer; }
button:disabled, input:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Bar atas (melekat, macam rujukan) ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: #F5F5F5; border-bottom: 1px solid rgb(0 0 0 / .05); }
.topbar-in { max-width: 1080px; margin: 0 auto; padding: 0 20px; min-height: 56px; display: flex; align-items: center; gap: 12px; }
/* Logo teks TempahKE: "KE" dalam warna aksen. Belum ada logo grafik. */
.brand-ke { color: var(--accent); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; text-decoration: none; margin-right: auto; }
.brand-icon { display: block; flex: none; }
/* Logo tulisan tangan (pelekat). Ikon tiket kekal untuk favicon dan app. */
.brand-word { display: block; flex: none; height: 37px; width: auto; margin: -4px 0 -4px -4px; }

/* ---------- Motif: tiket tempahan ---------- */
.ticket, .stub { position: relative; background: var(--surface); padding: 22px; }
/* Bahagian atas: lekuk di bucu bawah. Keratan (stub): lekuk di bucu atas. Garis putus = tempat koyak. */
.ticket { border-radius: var(--r-md) var(--r-md) 0 0; padding-bottom: 18px;
  -webkit-mask: radial-gradient(11px at 0 100%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(11px at 100% 100%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(11px at 0 100%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(11px at 100% 100%, #0000 98%, #000) right / 51% 100% no-repeat; }
.stub { border-radius: 0 0 var(--r-md) var(--r-md); border-top: 1.5px dashed var(--line-strong); padding-top: 16px;
  -webkit-mask: radial-gradient(11px at 0 0, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(11px at 100% 0, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(11px at 0 0, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(11px at 100% 0, #0000 98%, #000) right / 51% 100% no-repeat; }
/* Tiket putih diletak atas "telaga" kelabu supaya bentuk lekuknya kelihatan tanpa bayang. */
.ticket-well { background: var(--well); border-radius: var(--r-lg); padding: 14px; }

/* ---------- Butang ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 9px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 500; text-decoration: none;
  transition: background-color .15s, border-color .15s, transform .16s, box-shadow .16s;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; }
/* Satu tindakan utama setiap skrin: pil berkilat biru (diilhamkan oleh rujukan). */
.btn.primary {
  border-radius: 999px; border-color: var(--accent-line); padding: 9px 22px;
  background: linear-gradient(#EDF4FF 0%, #D6E7FF 18%, #A2C7FF 50%, #99CBF8 80%, #A2D2F7 100%);
  box-shadow: 0 8px 20px rgb(47 100 214 / .18);
}
.btn.primary:hover { border-color: var(--accent); filter: brightness(1.03); }
.btn.primary:active { box-shadow: 0 2px 6px rgb(47 100 214 / .2); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.dark:hover { background: #2A2A30; }
.btn.quiet { border-color: var(--line); }
.btn.quiet:hover { border-color: var(--line-strong); background: var(--well); }
.btn.block { width: 100%; }
.btn.big { min-height: 50px; font-size: 1.02rem; }

/* ---------- Borang ---------- */
label.field, p.field { display: block; font-weight: 500; font-size: .92rem; margin: 14px 0 6px; }
.input, input[type=text], input[type=tel], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], input[type=url], input[type=month], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: inherit;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
input:disabled { background: var(--well); color: var(--muted); }
input:hover, select:hover, textarea:hover { border-color: #B9B8BF; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); outline: 3px solid var(--accent-soft); outline-offset: 0; }
.hint { color: var(--muted); font-size: .86rem; margin: 6px 0 0; }
.err { color: var(--err); font-weight: 500; margin: 10px 0 0; min-height: 1.4em; }
.ok { color: var(--ok-ink); font-weight: 500; }

/* ---------- Pil status (fungsi: status sebenar tempahan) ---------- */
.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: .8rem; font-weight: 500; background: var(--well); color: var(--muted); }
.pill.disahkan, .pill.paid { background: var(--ok-bg); color: var(--ok-ink); }
.pill.menunggu_bayaran { background: var(--wait-bg); color: var(--wait-ink); }
.pill.selesai { background: var(--accent-soft); color: var(--ink); }
.pill.bertindih { background: var(--err-bg); color: var(--err); }
.pill.tamat { background: var(--well); color: var(--muted); }

.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.site-foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 40px 16px; }
.site-foot a { color: var(--muted); }

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