/* Stay'D Dabong — sistem reka bentuk sendiri. Mobile-first. */
:root {
  --hutan: #14302B;
  --hutan-2: #3E5A54;
  --hutan-3: #6B8580;
  --putih: #FFFFFF;
  --embun: #F2F6F4;
  --garis: #DCE5E1;
  --sungai: #0F5D52;
  --sungai-2: #0B4A41;
  --sungai-tint: #E3F0EC;
  --padi: #E8A33D;
  --padi-tint: #FCF1DF;
  --indigo: #2B3A67;
  --indigo-tint: #E6E9F3;
  --merah: #B42318;
  --merah-tint: #FDECEA;
  --hijau-ok: #1D7A47;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;
  --ff: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gutter: 16px;
  --max: 1180px;
  --focus: 0 0 0 3px rgba(232, 163, 61, .55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --hutan: #E6EFEC; --hutan-2: #B6C7C2; --hutan-3: #8AA19B; --putih: #0F1A18; --embun: #16241F; --garis: #26372F;
    --sungai: #3FB59E; --sungai-2: #5BC9B3; --sungai-tint: #173A33; --padi-tint: #3A2E17; --indigo-tint: #1E2540; --merah-tint: #3A1714;
  }
}
:root[data-theme="dark"] {
  --hutan: #E6EFEC; --hutan-2: #B6C7C2; --hutan-3: #8AA19B; --putih: #0F1A18; --embun: #16241F; --garis: #26372F;
  --sungai: #3FB59E; --sungai-2: #5BC9B3; --sungai-tint: #173A33; --padi-tint: #3A2E17; --indigo-tint: #1E2540; --merah-tint: #3A1714;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--ff); font-size: 16px; line-height: 1.55; color: var(--hutan); background: var(--putih); padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
img { max-width: 100%; display: block; }
a { color: var(--sungai); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .4em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--hutan-3); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--padi); color: #14302B; padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main { min-height: 70vh; outline: none; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--putih) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--garis); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; color: var(--hutan); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; }
.topnav { margin-left: auto; display: none; gap: 4px; align-items: center; }
.topnav a, .linkbtn { display: inline-flex; align-items: center; text-decoration: none; color: var(--hutan-2); font-weight: 600; font-size: 14.5px; padding: 8px 12px; border-radius: var(--r-pill); background: none; border: 0; cursor: pointer; }
.topnav a:hover, .linkbtn:hover { background: var(--embun); color: var(--hutan); }
.topnav a[aria-current="page"] { color: var(--sungai); }
.topbar .acct { margin-left: auto; }
.badge-dot { display: inline-block; min-width: 18px; height: 18px; border-radius: 9px; background: var(--padi); color: #14302B; font-size: 11px; font-weight: 800; text-align: center; line-height: 18px; padding: 0 5px; margin-left: 4px; }
.testbar { background: var(--padi); color: #14302B; text-align: center; font-size: 13px; font-weight: 700; padding: 4px 8px; }

/* ---------- Bottom nav (mudah alih) ---------- */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--putih); border-top: 1px solid var(--garis); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: 11.5px; font-weight: 600; color: var(--hutan-3); text-decoration: none; position: relative; }
.bottomnav a[aria-current="page"] { color: var(--sungai); }
.bottomnav svg { width: 24px; height: 24px; }
.bottomnav .badge-dot { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottomnav { display: none; }
  .topnav { display: flex; }
  .topbar .acct { margin-left: 0; }
  h1 { font-size: 36px; }
}

/* ---------- Butang & borang ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid transparent; border-radius: var(--r-pill); padding: 11px 20px; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; min-height: 44px; }
.btn-primary { background: var(--sungai); color: #fff; }
.btn-primary:hover { background: var(--sungai-2); }
.btn-ghost { background: transparent; border-color: var(--garis); color: var(--hutan); }
.btn-ghost:hover { border-color: var(--hutan-3); }
.btn-danger { background: var(--merah); color: #fff; }
.btn-gold { background: var(--padi); color: #14302B; }
.btn-sm { padding: 6px 14px; min-height: 34px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
label.field { display: block; }
label.field > span { display: block; font-size: 13.5px; font-weight: 600; color: var(--hutan-2); margin-bottom: 4px; }
.input, select.input, textarea.input { width: 100%; border: 1.5px solid var(--garis); background: var(--putih); border-radius: var(--r-sm); padding: 10px 12px; min-height: 44px; }
.input:focus { border-color: var(--sungai); outline: none; box-shadow: 0 0 0 3px var(--sungai-tint); }
textarea.input { min-height: 96px; resize: vertical; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid .span2 { grid-column: span 2; } }
.check { display: flex; align-items: center; gap: 8px; font-size: 14.5px; padding: 6px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--sungai); }
.errtext { color: var(--merah); font-size: 13.5px; }
/* Kawalan setempat (gantian input tarikh/masa/fail asli pelayar supaya bahasa kekal konsisten) */
.datefield { display: block; position: relative; }
.datebtn { text-align: left; cursor: pointer; font: inherit; color: inherit; display: flex; align-items: center; gap: 8px; }
.datebtn::after { content: ''; margin-left: auto; width: 16px; height: 16px; flex: none; opacity: .55; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat; }
.datebtn.placeholder { color: var(--hutan-3); font-weight: 500; }
.ticket .seg .datebtn { border: 0; padding: 2px 0; min-height: 30px; background: transparent; font-weight: 600; font-size: 16px; box-shadow: none; }
.ticket .seg .datebtn::after { display: none; }
.filefield { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filefield label.btn { cursor: pointer; margin: 0; }
.filefield input:focus-visible + label { box-shadow: var(--focus); }
.input[aria-invalid="true"], .datefield.invalid .datebtn, .filefield[aria-invalid="true"] label { border-color: var(--merah); }
.field-error { display: block; margin-top: 4px; }
fieldset { border: 1px solid var(--garis); border-radius: var(--r-md); padding: 14px 16px 16px; margin: 0; }
legend { font-weight: 700; padding: 0 6px; }

/* ---------- Hero & tiket carian (elemen utama) ---------- */
.hero { padding-top: 28px; padding-bottom: 20px; }
.hero h1 { font-size: clamp(34px, 7.5vw, 64px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; max-width: 12ch; margin-bottom: 12px; }
.hero p.lede { font-size: 17px; color: var(--hutan-2); max-width: 46ch; }
.ticket { margin-top: 22px; background: var(--putih); border: 1.5px solid var(--hutan); border-radius: var(--r-lg); display: grid; grid-template-columns: 1fr; position: relative; }
.ticket .seg { padding: 12px 18px; position: relative; }
.ticket .seg + .seg { border-top: 2px dashed var(--garis); }
.ticket .seg label { display: block; font-size: 12.5px; font-weight: 700; color: var(--hutan-2); }
.ticket .seg input, .ticket .seg select { border: 0; padding: 2px 0; width: 100%; background: transparent; font-weight: 600; font-size: 16px; min-height: 30px; }
.ticket .seg input:focus, .ticket .seg select:focus { outline: none; }
.ticket .go { padding: 10px; }
.ticket .go .btn { width: 100%; height: 100%; border-radius: var(--r-md); font-size: 16px; }
@media (min-width: 900px) {
  .ticket { grid-template-columns: 1.6fr 1fr 1fr .8fr auto; align-items: stretch; border-radius: var(--r-pill); }
  .ticket .seg + .seg { border-top: 0; }
  .ticket .seg + .seg::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; border-left: 2px dashed var(--garis); }
  /* "lubang" tiket */
  .ticket .seg:nth-child(2)::after { content: ''; position: absolute; left: -9px; top: -10px; width: 18px; height: 18px; border-radius: 50%; background: var(--putih); border-bottom: 1.5px solid var(--hutan); }
  .ticket .go { padding: 8px; }
  .ticket .go .btn { border-radius: var(--r-pill); padding: 0 28px; }
}

.cats { display: flex; gap: 8px; overflow-x: auto; padding: 18px 0 6px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--garis); background: var(--putih); padding: 8px 14px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; color: var(--hutan); white-space: nowrap; }
.chip[aria-pressed="true"], .chip.on { border-color: var(--hutan); background: var(--hutan); color: var(--putih); }
.section { padding-top: 26px; padding-bottom: 26px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 22px; }

/* ---------- Kad listing ---------- */
.cards { display: grid; gap: 22px 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1150px) { .cards.four { grid-template-columns: repeat(4, 1fr); } }
.pcard { position: relative; color: inherit; text-decoration: none; display: block; }
.pcard .ph { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--embun); }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pcard .body { padding-top: 10px; }
.pcard .t { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 15.5px; }
.pcard .t span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .loc { color: var(--hutan-3); font-size: 14px; }
.pcard .price { margin-top: 4px; font-size: 15px; }
.pcard .price b { font-weight: 800; }
.rating { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.rating svg { width: 14px; height: 14px; color: var(--padi); }
.heart { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); display: grid; place-items: center; cursor: pointer; color: #14302B; }
.heart svg { width: 20px; height: 20px; }
.heart[aria-pressed="true"] { color: #C0392B; }
.heart[aria-pressed="true"] svg path { fill: currentColor; }
.tag { display: inline-block; background: var(--padi-tint); color: #8A5A10; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); }
:root[data-theme="dark"] .tag, .tag.dark { color: var(--padi); }
.pcard .tag { position: absolute; left: 10px; top: 10px; background: rgba(255,255,255,.95); color: #14302B; }

/* ---------- Destinasi ---------- */
.dests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .dests { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dest { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; padding: 6px; border-radius: var(--r-md); }
.dest:hover { background: var(--embun); }
.dest img, .dest .ph { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; background: var(--embun); flex: none; }
.dest b { display: block; }
.dest > span:last-child { min-width: 0; overflow-wrap: anywhere; }

/* ---------- Jalur promosi & host ---------- */
.offer { border: 1.5px dashed var(--padi); background: var(--padi-tint); border-radius: var(--r-md); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.offer code { font-family: var(--ff); font-weight: 800; font-size: 18px; letter-spacing: .04em; background: var(--putih); padding: 4px 10px; border-radius: 8px; }
.become { background: var(--sungai); color: #fff; border-radius: var(--r-lg); padding: 28px 22px; display: grid; gap: 16px; }
.become h2 { font-size: 26px; color: #fff; }
.become p { color: rgba(255,255,255,.88); max-width: 52ch; }
.become .btn { background: #fff; color: var(--sungai); justify-self: start; }
@media (min-width: 900px) { .become { grid-template-columns: 1.4fr 1fr; align-items: center; padding: 40px; } .become .btn { justify-self: end; } }

/* ---------- Carian ---------- */
.filterbar { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; position: sticky; top: 60px; background: var(--putih); z-index: 10; scrollbar-width: none; }
.search-layout { display: grid; gap: 20px; }
@media (min-width: 1000px) { .search-layout.withmap { grid-template-columns: 1.5fr 1fr; } .mapcol { position: sticky; top: 120px; height: calc(100vh - 140px); } }
.map { width: 100%; height: 320px; border-radius: var(--r-md); overflow: hidden; background: var(--embun); border: 1px solid var(--garis); }
.mapcol .map { height: 100%; }
.map-fallback { padding: 14px; font-size: 14px; height: 100%; overflow: auto; }
.map-fallback li { margin-bottom: 6px; }
.pagination { display: flex; justify-content: center; gap: 8px; padding: 24px 0; }

/* ---------- Butiran property ---------- */
.gallery { display: grid; gap: 6px; border-radius: var(--r-md); overflow: hidden; grid-template-columns: 1fr; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--embun); }
.gallery img:not(:first-child) { display: none; }
@media (min-width: 800px) {
  .gallery { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; height: 420px; border-radius: var(--r-lg); }
  .gallery img { aspect-ratio: auto; height: 100%; }
  .gallery img:not(:first-child) { display: block; }
  .gallery img:first-child { grid-row: span 2; }
}
.detail { display: grid; gap: 28px; padding: 20px 0 40px; }
@media (min-width: 1000px) { .detail { grid-template-columns: 1.6fr 1fr; } }
.facts { display: flex; gap: 18px; flex-wrap: wrap; color: var(--hutan-2); font-size: 15px; }
.facts b { color: var(--hutan); }
.hostline { display: flex; gap: 12px; align-items: center; padding: 16px 0; border-top: 1px solid var(--garis); border-bottom: 1px solid var(--garis); }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--sungai-tint); color: var(--sungai); display: grid; place-items: center; font-weight: 800; flex: none; }
.amen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; }
.amen div { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.amen svg { width: 20px; height: 20px; color: var(--sungai); flex: none; }
.bookpanel { border: 1.5px solid var(--garis); border-radius: var(--r-lg); padding: 20px; align-self: start; position: sticky; top: 80px; background: var(--putih); }
.bookpanel .big { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.datebox { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--hutan-3); border-radius: var(--r-md); overflow: hidden; margin: 14px 0 10px; }
.datebox button { text-align: left; background: none; border: 0; padding: 10px 12px; cursor: pointer; }
.datebox button + button { border-left: 1.5px solid var(--garis); }
.datebox small { display: block; font-size: 11.5px; font-weight: 700; color: var(--hutan-2); }
.breakdown { width: 100%; border-collapse: collapse; font-size: 15px; margin: 10px 0; }
.breakdown td { padding: 5px 0; }
.breakdown td:last-child { text-align: right; white-space: nowrap; }
.breakdown tr.total td { border-top: 1px solid var(--garis); padding-top: 10px; font-weight: 800; font-size: 16.5px; }
.breakdown .disc td { color: var(--hijau-ok); }
.reviews { display: grid; gap: 22px; }
@media (min-width: 800px) { .reviews { grid-template-columns: 1fr 1fr; } }
.review .who { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.reply { border-left: 3px solid var(--sungai-tint); padding-left: 12px; margin-top: 8px; font-size: 14.5px; color: var(--hutan-2); }
.scores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 24px; font-size: 14px; margin-bottom: 16px; }
.scorebar { display: flex; align-items: center; gap: 8px; }
.scorebar i { flex: 1; height: 4px; background: var(--garis); border-radius: 2px; position: relative; overflow: hidden; }
.scorebar i b { position: absolute; inset: 0 auto 0 0; background: var(--hutan); }

/* ---------- Kalendar ---------- */
.cal { user-select: none; }
.cal-months { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cal-months.two { grid-template-columns: 1fr 1fr; } }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cal-nav { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--garis); background: var(--putih); cursor: pointer; }
.cal table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { font-size: 12px; color: var(--hutan-3); font-weight: 600; padding: 4px 0; }
.cal td { padding: 1px; }
.cal button.d { width: 100%; aspect-ratio: 1; border: 0; background: none; border-radius: 50%; cursor: pointer; font-weight: 600; font-size: 14px; }
.cal button.d:hover:not([disabled]) { box-shadow: inset 0 0 0 1.5px var(--hutan); }
.cal button.d[disabled] { color: var(--hutan-3); text-decoration: line-through; opacity: .5; cursor: not-allowed; }
.cal button.d.inr { background: var(--sungai-tint); border-radius: 0; }
.cal button.d.sel { background: var(--hutan); color: var(--putih); }
.cal button.d.blocked { background: var(--embun); color: var(--hutan-3); }
.cal button.d.booked { background: var(--indigo-tint); color: var(--indigo); text-decoration: none; opacity: 1; }
.cal button.d.picked { box-shadow: inset 0 0 0 2px var(--padi); }

/* ---------- Panel / jadual / status ---------- */
.panel { border: 1px solid var(--garis); border-radius: var(--r-md); padding: 16px; background: var(--putih); }
.panel.soft { background: var(--embun); border-color: transparent; }
.list { display: grid; gap: 10px; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--garis); border-radius: var(--r-md); text-decoration: none; color: inherit; background: var(--putih); }
.item:hover { border-color: var(--hutan-3); }
.item img, .item .ph { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; flex: none; background: var(--embun); }
.item .grow { flex: 1; min-width: 0; }
.status { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); background: var(--embun); color: var(--hutan-2); white-space: nowrap; }
.status.ok { background: #E1F3E8; color: #17643A; }
.status.warn { background: var(--padi-tint); color: #8A5A10; }
.status.bad { background: var(--merah-tint); color: var(--merah); }
.status.info { background: var(--indigo-tint); color: var(--indigo); }
.table-wrap { overflow-x: auto; border: 1px solid var(--garis); border-radius: var(--r-md); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--garis); white-space: nowrap; vertical-align: top; }
table.data th { background: var(--embun); font-weight: 700; font-size: 13px; color: var(--hutan-2); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 40px 16px; color: var(--hutan-2); }
.empty h3 { color: var(--hutan); }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--garis); margin-bottom: 16px; scrollbar-width: none; }
.tabs button, .tabs a { background: none; border: 0; border-bottom: 2.5px solid transparent; padding: 10px 12px; font-weight: 600; color: var(--hutan-3); cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--hutan); border-bottom-color: var(--hutan); }

/* ---------- Ruang kerja host/admin ---------- */
.work { display: grid; gap: 20px; padding: 16px 0 40px; }
.sidenav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--garis); }
.sidenav a { padding: 10px 12px; white-space: nowrap; font-weight: 600; font-size: 14.5px; color: var(--hutan-2); text-decoration: none; border-bottom: 2.5px solid transparent; }
.sidenav a[aria-current="page"] { color: var(--hutan); border-bottom-color: var(--hutan); }
.sidenav .area { display: none; }
@media (min-width: 1000px) {
  .work { grid-template-columns: 220px 1fr; align-items: start; }
  .sidenav { flex-direction: column; border-bottom: 0; position: sticky; top: 76px; }
  .sidenav a { border-bottom: 0; border-radius: var(--r-sm); padding: 9px 12px; }
  .sidenav a[aria-current="page"] { background: var(--embun); }
  .sidenav .area { display: block; font-size: 13px; font-weight: 700; color: var(--hutan-3); padding: 4px 12px 8px; }
}
.work.admin .sidenav a[aria-current="page"] { color: var(--indigo); border-bottom-color: var(--indigo); }
@media (min-width: 1000px) { .work.admin .sidenav a[aria-current="page"] { background: var(--indigo-tint); } }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { padding: 14px 16px; border: 1px solid var(--garis); border-radius: var(--r-md); }
.kpi .v { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 13px; color: var(--hutan-3); font-weight: 600; }
.kpi.lead { border-color: var(--sungai); background: var(--sungai-tint); }
.wallet-strip { display: grid; gap: 1px; background: var(--garis); border: 1px solid var(--garis); border-radius: var(--r-md); overflow: hidden; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 800px) { .wallet-strip { grid-template-columns: repeat(5, 1fr); } }
.wallet-strip > div { background: var(--putih); padding: 14px; }
.wallet-strip .v { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wallet-strip .l { font-size: 12.5px; color: var(--hutan-3); font-weight: 600; }
.wallet-strip > .avail { background: var(--sungai-tint); }
.charts { display: grid; gap: 16px; }
@media (min-width: 900px) { .charts { grid-template-columns: 1fr 1fr; } }
.chart svg { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--sungai); }
.chart .bar.neg { fill: var(--merah); }
.chart .axis { stroke: var(--garis); }
.chart text { fill: var(--hutan-3); font-size: 10px; font-family: var(--ff); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--garis); font-size: 14.5px; }
.timeline .date { color: var(--hutan-3); font-size: 13px; font-weight: 600; }
.timeline .amt { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.amt.plus { color: var(--hijau-ok); }
.amt.minus { color: var(--merah); }

/* ---------- Mesej ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 210px); min-height: 380px; border: 1px solid var(--garis); border-radius: var(--r-md); overflow: hidden; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--embun); }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 16px; background: var(--putih); font-size: 15px; white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { align-self: flex-end; background: var(--sungai); color: #fff; border-bottom-right-radius: 4px; }
.bubble.them { border-bottom-left-radius: 4px; }
.bubble time { display: block; font-size: 11px; opacity: .7; margin-top: 2px; }
.chat form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--garis); background: var(--putih); }

/* ---------- Toast & modal ---------- */
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--hutan); color: var(--putih); padding: 12px 18px; border-radius: var(--r-md); font-weight: 600; font-size: 14.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--merah); color: #fff; }
@media (min-width: 900px) { .toast { bottom: 24px; } }
.modal-back { position: fixed; inset: 0; background: rgba(10, 24, 21, .5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--putih); width: 100%; max-height: 92vh; overflow-y: auto; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom)); }
@media (min-width: 720px) { .modal-back { align-items: center; } .modal { width: min(720px, 94vw); border-radius: var(--r-lg); padding: 24px; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.xbtn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--embun); cursor: pointer; font-size: 20px; line-height: 1; }

/* ---------- Bayaran ujian ---------- */
.sandbox { max-width: 460px; margin: 30px auto; border: 2px dashed var(--padi); border-radius: var(--r-lg); padding: 24px; }
.sandbox .warnhead { background: var(--padi); color: #14302B; font-weight: 800; padding: 6px 12px; border-radius: 8px; display: inline-block; margin-bottom: 12px; }

.spinner { width: 28px; height: 28px; border: 3px solid var(--garis); border-top-color: var(--sungai); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.footer { border-top: 1px solid var(--garis); padding: 28px 0 40px; margin-top: 30px; color: var(--hutan-3); font-size: 14px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-grid figure { margin: 0; position: relative; }
.photo-grid img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; width: 100%; }
.photo-grid button { position: absolute; top: 4px; right: 4px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--hutan-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
pre.json { background: var(--embun); padding: 12px; border-radius: var(--r-sm); font-size: 12px; overflow-x: auto; max-height: 300px; }

/* Saiz ikon sebaris */
.btn svg, .facts svg, .linkbtn svg, .topnav svg { width: 18px; height: 18px; flex: none; }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.capital::first-letter { text-transform: uppercase; }
/* Bar tempah melekat (mudah alih) */
.mobile-reserve { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); background: var(--putih); border-top: 1px solid var(--garis); padding: 10px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 25; }
.mobile-reserve b { font-size: 18px; }
@media (min-width: 1000px) { .mobile-reserve { display: none; } }
@media (max-width: 999px) { .bookpanel { position: static; } .detail { padding-bottom: 90px; } }

/* Pemilih bahasa */
select.lang { border: 1.5px solid var(--garis); background: var(--putih); color: var(--hutan); border-radius: var(--r-pill); padding: 6px 10px; font-size: 13.5px; font-weight: 600; min-height: 34px; cursor: pointer; }
.topbar .acct { display: flex; gap: 8px; align-items: center; }

/* Pengepala sempit: nama jenama, pemilih bahasa dan butang kekal satu baris */
.brand, .topbar .acct .btn, .topbar .acct a { white-space: nowrap; }
@media (max-width: 480px) {
  .topbar .wrap { gap: 8px; }
  .brand { font-size: 17px; gap: 6px; }
  .brand-mark { width: 26px; height: 26px; }
  select.lang { max-width: 118px; padding: 6px 8px; text-overflow: ellipsis; }
  .topbar .acct { gap: 6px; }
  .topbar .acct .btn { padding-inline: 12px; }
}
@media (max-width: 360px) {
  .brand-mark { display: none; }
  .brand { font-size: 16px; }
}
