/* =========================================================
   Sewa Kereta USIM — gaya "app" mobile-first
   (tiada Pico.css lagi; semua style dalam fail ni)
   ========================================================= */
:root {
  --brand: #0F766E;          /* teal utama */
  --brand-dark: #0B5A54;
  --brand-soft: #E6F4F2;
  --accent: #F59E0B;         /* amber untuk highlight */
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --line: #E2E8F0;
  --bg: #F4F6F8;
  --card: #FFFFFF;
  --ok: #15803D;  --ok-soft: #DCFCE7;
  --no: #B91C1C;  --no-soft: #FEE2E2;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 6px 24px rgba(15, 23, 42, .08);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
  --nav-h: 64px;
  --maxw: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
body.has-sticky-cta { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
p { margin: 0 0 .75rem; }

.ic { flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.link-sm { font-size: .9rem; font-weight: 600; text-decoration: none; }

/* ---------- App bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.appbar-inner {
  max-width: var(--maxw); margin: 0 auto;
  height: 58px; padding: 0 16px;
  display: flex; align-items: center; gap: 12px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.02rem;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
}
.appbar-title { font-weight: 700; font-size: 1.02rem; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink); background: var(--bg); text-decoration: none;
}
.topnav { display: none; margin-left: auto; gap: 4px; }
.topnav a {
  padding: 8px 14px; border-radius: 999px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem;
}
.topnav a:hover { background: var(--bg); }
.topnav a.active { background: var(--brand-soft); color: var(--brand-dark); }
.lang-pill {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  color: var(--ink); font-weight: 700; font-size: .82rem; text-decoration: none;
}

/* ---------- Layout ---------- */
.page { max-width: var(--maxw); margin: 0 auto; padding: 0 16px 24px; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section h2 { font-size: 1.25rem; }

/* ---------- Hero + kad carian ---------- */
.hero {
  margin: 0 -16px;
  padding: 28px 16px 0;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(245, 158, 11, .25) 0%, transparent 55%),
    linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  border-radius: 0 0 28px 28px;
  padding-bottom: 1px;
}
.hero-inner { max-width: 560px; }
.hero-eyebrow {
  display: inline-block; margin-bottom: 10px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.hero h1 { font-size: 1.75rem; font-weight: 800; }
.hero-sub { opacity: .9; font-size: .95rem; }

.search-card {
  position: relative;
  margin: 18px 0 -64px;
  background: var(--card); color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid; gap: 10px;
}
.hero + .perks { margin-top: 82px; }

/* ---------- Field gaya app ---------- */
.field {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer;
  transition: border-color .15s;
}
.field:focus-within { border-color: var(--brand); }
.field > div { flex: 1; min-width: 0; }
.field-static { background: var(--bg); border-color: transparent; cursor: default; }
.field-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.field-label { display: block; font-size: .74rem; font-weight: 600; color: var(--muted); }
.field-value { display: block; font-weight: 700; }
.field input {
  width: 100%; border: 0; outline: 0; padding: 0; margin: 0;
  font: inherit; font-weight: 700; color: var(--ink); background: transparent;
  min-height: 24px;
}
.field-row { display: grid; gap: 10px; }
.stack { display: grid; gap: 10px; }

/* ---------- Butang ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: 14px; border: 0;
  font: inherit; font-weight: 700; font-size: .98rem;
  text-decoration: none; cursor: pointer;
  transition: transform .05s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-outline:hover { background: var(--brand-soft); }
.btn-block { width: 100%; }

/* ---------- Perks ---------- */
.perks {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 4px 2px 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px;
  scrollbar-width: none;
}
.perks::-webkit-scrollbar { display: none; }
.perk {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 8px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow-sm);
  font-size: .85rem; font-weight: 600; white-space: nowrap;
}
.perk-ic {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: #FEF3C7; color: #B45309;
}
.perk-ic .ic { width: 16px; height: 16px; }

/* ---------- Kad kereta ---------- */
.search-summary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: .85rem; font-weight: 600;
}
.car-list { display: grid; gap: 14px; margin-top: 12px; }
.car-card {
  display: block; overflow: hidden;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: inherit; text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.car-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.car-card.is-unavailable { opacity: .6; }
.car-thumb { position: relative; background: #EEF1F4; }
.car-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.badge {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 700;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-no { background: var(--no-soft); color: var(--no); }
.car-body { padding: 14px 16px 16px; }
.car-body h3 { font-size: 1.08rem; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 8px;
  background: var(--bg); color: var(--ink-2);
  font-size: .8rem; font-weight: 600;
}
.car-foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding-top: 12px; border-top: 1px dashed var(--line);
}
.price-big { font-size: 1.3rem; font-weight: 800; color: var(--ink); }
.go-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
}

/* ---------- Langkah ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.steps p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.step-no {
  flex: 0 0 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 800;
}

/* ---------- Alert / empty ---------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .92rem; margin: 12px 0;
}
.alert .ic { margin-top: 2px; }
.alert-ok    { background: var(--ok-soft); color: var(--ok); }
.alert-error { background: var(--no-soft); color: var(--no); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); display: grid; justify-items: center; gap: 10px; }

/* ---------- Halaman kereta ---------- */
.detail-hero { margin: 0 -16px; background: #EEF1F4; }
.detail-hero img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.detail-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 16px; margin-top: 14px;
}
.detail-hero + .detail-card { margin-top: -24px; position: relative; }
.detail-card h1 { font-size: 1.45rem; font-weight: 800; }
.h-sm { font-size: 1.05rem; font-weight: 700; margin-bottom: 12px; }
.rate-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 16px; }
.rate { background: var(--brand-soft); border-radius: var(--radius-sm); padding: 12px 14px; }
.rate-val { display: block; font-size: 1.25rem; font-weight: 800; color: var(--brand-dark); }
.info-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 12px; }
.info-list li { display: flex; gap: 12px; align-items: center; }
.info-ic {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bg); color: var(--ink-2);
}
.desc { color: var(--ink-2); }

.breakdown { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.bd-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; text-align: right; }
.bd-row > span:first-child { color: var(--muted); text-align: left; }
.bd-total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; font-weight: 800; font-size: 1.08rem; }
.bd-total > span:first-child { color: var(--ink); }

.slots { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.slots li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg); font-size: .88rem; font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--no); flex-shrink: 0; }

/* ---------- Sticky CTA (car.php) ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(15, 23, 42, .06);
}
.sticky-price { display: grid; line-height: 1.2; }
.sticky-price strong { font-size: 1.2rem; font-weight: 800; }
.sticky-cta .btn { flex: 0 0 auto; min-width: 170px; }

/* ---------- Bottom nav (mobile) ---------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-top: 1px solid var(--line);
}
.bottomnav a {
  display: grid; justify-items: center; align-content: center; gap: 3px;
  color: var(--muted); text-decoration: none;
  font-size: .7rem; font-weight: 600;
}
.bottomnav a.active { color: var(--brand); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #fff; margin-top: 32px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 24px 16px; text-align: center; }
.footer-brand { font-weight: 800; }
.wa-link { font-weight: 700; text-decoration: none; }

/* =========================================================
   Skrin lebih besar
   ========================================================= */
@media (min-width: 480px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 640px) {
  .car-list { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .info-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  body.has-sticky-cta { padding-bottom: 0; }
  .bottomnav { display: none; }
  .topnav { display: flex; }
  .lang-pill { margin-left: 8px; }
  .hero {
    margin: 20px 0 0; border-radius: 28px;
    padding: 44px 40px 40px;
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center;
  }
  .hero h1 { font-size: 2.4rem; }
  .search-card { margin: 0; }
  .hero + .perks { margin-top: 20px; }
  .perks { margin: 0; padding-left: 2px; padding-right: 2px; flex-wrap: wrap; }
  .car-list { grid-template-columns: repeat(3, 1fr); }

  /* car.php: 2 lajur, CTA jadi kad melekat di kanan */
  .has-sticky-cta .page {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 24px; align-items: start;
    padding-top: 20px;
  }
  .has-sticky-cta .detail-hero { margin: 0; border-radius: var(--radius); overflow: hidden; grid-column: 1; }
  .has-sticky-cta .detail-hero + .detail-card { margin-top: 14px; }
  .has-sticky-cta .detail-card { grid-column: 1; }
  .has-sticky-cta #check { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .sticky-cta {
    position: static; grid-column: 2; grid-row: 3; align-self: start; margin-top: 14px;
    border-radius: var(--radius); border: 0; box-shadow: var(--shadow-sm);
    padding: 14px 16px;
  }
}

/* =========================================================
   FASA 2 — tempahan, bayaran, status
   ========================================================= */
.mt { margin-top: 16px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; }
.h-md { font-size: 1.2rem; font-weight: 800; }
.page-head { padding: 22px 0 4px; }
.page-head h1 { font-size: 1.5rem; font-weight: 800; }

/* Halaman aliran (book/payment) & status: satu lajur sempit */
.flow .page { max-width: 640px; }
.narrow .page { max-width: 640px; }

/* Langkah 1-2-3 */
.flow-steps {
  list-style: none; margin: 16px 0 4px; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.flow-steps li {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 700; color: var(--muted);
  padding-top: 8px; border-top: 3px solid var(--line);
}
.flow-steps li span {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: .7rem;
  background: var(--line); color: var(--ink-2);
}
.flow-steps li.done { color: var(--brand-dark); border-color: var(--brand); }
.flow-steps li.done span { background: var(--brand); color: #fff; }
.flow-steps li.current { color: var(--ink); border-color: var(--accent); }
.flow-steps li.current span { background: var(--accent); color: #fff; }

/* Ringkasan tempahan */
.summary-car { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.summary-car img { width: 76px; height: 54px; object-fit: cover; border-radius: 10px; background: #EEF1F4; }
.summary-car > div { display: grid; }
.trip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px; border-radius: var(--radius-sm); background: var(--bg); margin-bottom: 8px;
}
.trip > div { display: grid; font-size: .9rem; }
.trip-arrow { color: var(--muted); }

/* Input borang */
.form-grid { display: grid; gap: 14px; align-items: start; }
.input-group { display: grid; gap: 6px; }
.input-group > span:first-child { font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.input-group input {
  width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  outline: 0; transition: border-color .15s, box-shadow .15s;
}
.input-group input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input-group small { font-size: .78rem; }
.has-err input { border-color: var(--no); }
.input-err { color: var(--no); font-size: .8rem; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: .9rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.check.has-err { color: var(--no); }
.note {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 16px 0 0; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink-2); font-size: .82rem;
}
.note .ic { margin-top: 2px; color: var(--brand); }

/* Kad tengah (ralat) */
.center-card { text-align: center; display: grid; justify-items: center; gap: 6px; margin-top: 24px; padding: 28px 20px; }
.big-ic { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px; }
.big-ic-no { background: var(--no-soft); color: var(--no); }

/* Butang tambahan */
.btn-ghost { background: var(--bg); color: var(--ink); padding: 13px 14px; }
.sticky-cta .btn-ghost { min-width: 0; }
.btn-grow { flex: 1; }

/* Bayaran */
.pay-head { text-align: center; }
.pay-amount { font-size: 2.2rem; font-weight: 800; color: var(--brand-dark); letter-spacing: -.02em; }
.ref-row { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 6px 0 4px; }
.copy-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 8px; border: 1px dashed var(--brand);
  background: var(--brand-soft); color: var(--brand-dark);
  font: inherit; font-size: .88rem; cursor: pointer;
}
.copy-chip.copied { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.copy-chip.copied::after { content: " ✓"; }
.timer {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  padding: 8px 12px; border-radius: 999px;
  background: #FEF3C7; color: #92400E; font-size: .82rem;
}
.alert-warn { background: #FEF3C7; color: #92400E; text-align: left; }
.alert-info { background: #E0F2FE; color: #075985; text-align: left; }

.qr-box { display: grid; justify-items: center; text-align: center; gap: 8px; }
.qr-box img { width: 220px; max-width: 80%; border-radius: 14px; border: 1px solid var(--line); padding: 8px; background: #fff; }
.qr-missing {
  width: 220px; aspect-ratio: 1; border-radius: 14px; border: 2px dashed var(--line);
  display: grid; place-content: center; justify-items: center; gap: 8px; padding: 16px;
  color: var(--muted); font-size: .85rem;
}
.or-line { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.dropzone {
  position: relative; display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: 26px 16px; border: 2px dashed var(--brand); border-radius: var(--radius);
  background: var(--brand-soft); cursor: pointer;
}
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--brand); }
.dz-name { word-break: break-all; }

/* Status */
.status-head { margin-top: 16px; }
.status-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.code-big { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.6rem; font-weight: 800; letter-spacing: .08em; }
.status-badge { display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.sb-warn  { background: #FEF3C7; color: #92400E; }
.sb-info  { background: #E0F2FE; color: #075985; }
.sb-ok    { background: var(--ok-soft); color: var(--ok); }
.sb-no    { background: var(--no-soft); color: var(--no); }
.sb-muted { background: var(--bg); color: var(--muted); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 0 18px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:not(:last-child)::before {
  content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line);
}
.timeline li.done:not(:last-child)::before { background: var(--brand); }
.tl-dot {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; border: 2px solid var(--line); background: #fff; color: #fff;
}
.timeline li.done, .timeline li.current { color: var(--ink); }
.timeline li.done .tl-dot { background: var(--brand); border-color: var(--brand); }
.timeline li.current .tl-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px #FEF3C7; }

.booking-list { display: grid; gap: 10px; }
.booking-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow-sm); color: inherit; text-decoration: none;
}
.booking-item > div { display: grid; }

@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .input-group:first-child { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  /* book/payment: kekal satu lajur, CTA jadi kad biasa */
  .flow .page { display: block; padding-top: 4px; }
  .flow .sticky-cta { position: static; margin-top: 14px; }
  .flow .detail-card { margin-top: 14px; }
}

/* =========================================================
   FASA 3 — panel admin
   ========================================================= */
.admin { background: #EEF1F5; }
.appbar-dark { background: rgba(15, 23, 42, .96); border-bottom-color: #1E293B; }
.appbar-dark .brand, .appbar-dark .appbar-title { color: #fff; }
.appbar-dark .icon-btn { background: #1E293B; color: #fff; }
.appbar-dark .topnav a { color: #CBD5E1; }
.appbar-dark .topnav a:hover { background: #1E293B; }
.appbar-dark .topnav a.active { background: #134E4A; color: #fff; }
.appbar-dark .lang-pill { background: #1E293B; border-color: #334155; color: #fff; cursor: pointer; font-family: inherit; }
.logout-form { margin: 0 0 0 auto; }
.count, .tab-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800;
}
.bottomnav-3 { grid-template-columns: repeat(3, 1fr); }
.nav-ic-wrap { position: relative; display: inline-block; }
.dot-count {
  position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: .65rem; font-weight: 800;
  display: grid; place-items: center;
}

/* Login / setup */
.admin-bare { padding-bottom: 0; }
.auth-wrap { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px 0; }
.auth-card {
  width: min(400px, calc(100vw - 32px));
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow);
  padding: 28px 22px; display: grid; gap: 12px; justify-items: stretch; text-align: center;
}
.auth-card .stack { text-align: left; }
.brand-mark-lg { width: 54px; height: 54px; border-radius: 16px; justify-self: center; }
code { background: var(--bg); padding: 1px 5px; border-radius: 5px; font-size: .85em; }

/* Dashboard */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  display: grid; gap: 2px; padding: 16px; border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow-sm);
  color: var(--ink-2); text-decoration: none; font-size: .85rem; font-weight: 600;
}
.stat-num { font-size: 1.7rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat-hot { background: linear-gradient(160deg, var(--brand), var(--brand-dark)); color: #D1FAE5; }
.stat-hot .stat-num { color: #fff; }
.stat-wide { grid-column: 1 / -1; }
.empty-line { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: var(--card); border-radius: var(--radius); }

/* Senarai */
.admin-row > div:first-child { gap: 2px; min-width: 0; }
.row-right { display: grid; justify-items: end; gap: 6px; flex-shrink: 0; }
.search-bar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  padding: 6px 12px 6px 6px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-sm);
}
.search-bar input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; padding: 8px 0; background: transparent; }
.tabs {
  display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 6px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; background: var(--card);
  color: var(--ink-2); text-decoration: none; font-size: .85rem; font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.tabs a.active { background: var(--ink); color: #fff; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }

/* Butiran tempahan */
.admin-grid { display: flex; flex-direction: column; }
/* Mobile: susun semula kad supaya Tindakan terus selepas resit */
.admin-grid .col-main, .admin-grid .col-side { display: contents; }
.o1 { order: 1; } .o2 { order: 2; } .o3 { order: 3; } .o4 { order: 4; }
.o5 { order: 5; } .o6 { order: 6; } .o7 { order: 7; }
.expect-amt { font-size: .85rem; color: var(--ink-2); margin-bottom: 12px; }
.receipt-img img { width: 100%; max-height: 520px; object-fit: contain; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); }
.receipt-empty, .receipt-pdf {
  display: grid; justify-items: center; gap: 8px; padding: 28px 16px; text-align: center;
  border: 2px dashed var(--line); border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; text-decoration: none;
}
.receipt-pdf { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn-danger { background: #fff; color: var(--no); border: 1.5px solid #FCA5A5; }
.btn-danger:hover { background: var(--no-soft); }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1EBE5A; }
.keybox { display: grid; gap: 8px; padding: 12px; border-radius: var(--radius-sm); background: var(--bg); }
.textarea, .input-group textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: .95rem; color: var(--ink); background: #fff; outline: 0; resize: vertical;
}
.textarea:focus, .input-group textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.shake { animation: shake .35s; border-color: var(--no) !important; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

@media (min-width: 640px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
  .admin .page { padding-top: 4px; }
  .admin-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 20px; align-items: start; }
  .admin-grid .col-main, .admin-grid .col-side { display: block; }
  .col-side { position: sticky; top: 70px; }
}

/* =========================================================
   FASA 4 — kereta, block, tetapan, syarat
   ========================================================= */
.mt-lg { margin-top: 28px; }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.head-row h1 { margin: 0; }
.narrow-form { max-width: 680px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.select {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 1rem; color: var(--ink); background: #fff; outline: 0;
}
.select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.link-card {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  padding: 12px 14px; border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow-sm); color: inherit; text-decoration: none;
}
.link-card > span:nth-child(2) { flex: 1; }
.admin-cars { margin-top: 0; }

.img-edit, .qr-edit { display: grid; gap: 10px; justify-items: stretch; }
.img-edit img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); background: #EEF1F4; }
.qr-edit { justify-items: center; }
.qr-edit img { width: 200px; border-radius: 12px; border: 1px solid var(--line); padding: 6px; background: #fff; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn.has-err { border-color: var(--no); color: var(--no); }
.switch-row { margin-top: 14px; }
.danger-zone { display: grid; gap: 10px; margin-top: 28px; padding-top: 18px; border-top: 1px dashed #CBD5E1; }
.icon-btn-danger { border: 0; cursor: pointer; background: var(--no-soft); color: var(--no); }
.mono-sm { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.6; }
.slots li > span:last-child { display: block; }

/* Syarat */
.terms h2 { font-size: 1.02rem; font-weight: 800; margin: 22px 0 8px; color: var(--brand-dark); }
.terms h2:first-child { margin-top: 0; }
.terms ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.terms li, .terms p { color: var(--ink-2); font-size: .95rem; }
.terms li::marker { color: var(--brand); }

.dt-grid { grid-template-columns: 1fr; }
.dt-grid .input-group:first-child, .form-grid-2 .input-group:first-child { grid-column: auto; }
@media (min-width: 480px) { .dt-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  .admin-cars { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   Galeri gambar kereta (luar / dalam)
   ========================================================= */
/* --- Awam: car.php --- */
.gallery { position: relative; overflow: hidden; }
.gal-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.gal-track::-webkit-scrollbar { display: none; }
.gal-slide { flex: 0 0 100%; scroll-snap-align: start; cursor: zoom-in; }
.gal-slide img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #EEF1F4; }
.gal-count {
  position: absolute; right: 12px; bottom: 36px;
  padding: 3px 10px; border-radius: 999px; background: rgba(15, 23, 42, .65); color: #fff;
  font-size: .75rem; font-weight: 700;
}
.gal-tabs {
  position: absolute; left: 12px; bottom: 34px; display: flex; gap: 6px;
}
.gal-tabs button {
  border: 0; cursor: pointer; padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .85); color: var(--ink); font: inherit; font-size: .78rem; font-weight: 700;
  backdrop-filter: blur(6px);
}
.gal-tabs button.active { background: var(--ink); color: #fff; }
.gal-nav {
  position: absolute; top: 45%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  display: none; place-items: center; background: rgba(255, 255, 255, .9); color: var(--ink); box-shadow: var(--shadow-sm);
}
.gal-prev { left: 12px; } .gal-next { right: 12px; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: #000; display: grid; }
.lightbox[hidden] { display: none; }
.lb-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide { flex: 0 0 100%; scroll-snap-align: start; display: grid; place-items: center; }
.lb-slide img { max-width: 100%; max-height: 100vh; object-fit: contain; }
.lb-close {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, .15); color: #fff;
}
.lb-count { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: #fff; font-weight: 700; font-size: .85rem; }

@media (min-width: 900px) {
  .gal-nav { display: grid; }
  .gal-count { bottom: 14px; }
  .gal-tabs { bottom: 12px; }
}

/* --- Admin: car_edit.php --- */
.gal-group + .gal-group { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.gal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gal-item { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: #EEF1F4; aspect-ratio: 4 / 3; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; }
.gal-item.is-cover { outline: 3px solid var(--accent); outline-offset: -3px; }
.gal-badge {
  position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .68rem; font-weight: 800;
}
.gal-actions { position: absolute; right: 5px; bottom: 5px; display: flex; gap: 5px; }
.gal-actions button {
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--ink);
  font-size: .9rem; box-shadow: var(--shadow-sm);
}
.gal-actions .gal-del { color: var(--no); }
.gal-add {
  position: relative; aspect-ratio: 4 / 3; border-radius: 10px; cursor: pointer;
  border: 2px dashed var(--brand); background: var(--brand-soft); color: var(--brand-dark);
  display: grid; place-content: center; justify-items: center; font-weight: 700;
}
.gal-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.gal-plus { font-size: 1.6rem; line-height: 1; }
.gal-pending { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.gal-pending img { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; outline: 2px solid var(--accent); }
.gal-pending .muted { flex-basis: 100%; }
#saveBtn:disabled { opacity: .6; cursor: wait; }
@media (min-width: 640px) { .gal-grid { grid-template-columns: repeat(4, 1fr); } }

/* car.php: mesej semakan automatik */
.auto-check { display: flex; align-items: center; gap: 6px; margin: 0; }
.auto-check[hidden] { display: none; }

/* Pemilih tarikh + masa (gandaan 30 minit) */
.dt-field { cursor: default; }
.dt-row { display: flex; gap: 8px; align-items: center; }
.dt-row input[type=date] { flex: 1 1 auto; min-width: 0; }
.dt-row select {
  flex: 0 0 auto; width: 112px; padding: 4px 26px 4px 10px; margin: 0;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg);
  font: inherit; font-weight: 700; color: var(--ink); cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.dt-row select:focus { outline: 0; border-color: var(--brand); }
.dt-row select:invalid { color: var(--muted); }
/* Hero: tarikh+masa terlalu sempit untuk 2 lajur — kekal satu lajur */
.search-card .field-row { grid-template-columns: 1fr; }

/* car.php: Info Booking */
.sub-h { font-size: .88rem; font-weight: 700; color: var(--ink-2); margin: 18px 0 10px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* =========================================================
   book.php: upload gambar IC & lesen
   ========================================================= */
.doc-section { display: grid; gap: 6px; margin-top: 18px; }
.doc-title { font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.doc-tile {
  position: relative; display: grid; justify-items: center; align-content: start; gap: 4px;
  padding: 12px 8px; border: 2px dashed var(--line); border-radius: var(--radius-sm);
  background: #fff; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.doc-tile:hover { border-color: var(--brand); }
.doc-tile input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.doc-preview {
  width: 100%; aspect-ratio: 85.6 / 54; border-radius: 8px; overflow: hidden;   /* nisbah kad IC */
  display: grid; place-items: center; background: var(--bg); color: var(--muted); margin-bottom: 4px;
}
.doc-preview img { width: 100%; height: 100%; object-fit: cover; }
.doc-tile strong { font-size: .88rem; }
.doc-state { color: var(--muted); line-height: 1.3; }
.doc-tile.has-file { border-style: solid; border-color: var(--brand); background: var(--brand-soft); }
.doc-tile.has-file .doc-preview { color: var(--brand); background: #fff; }
.doc-tile.has-file .doc-state { color: var(--brand-dark); font-weight: 600; }
.doc-tile.has-err { border-color: var(--no); background: var(--no-soft); }
.doc-js-err[hidden] { display: none; }
button[form=bookForm]:disabled { opacity: .6; cursor: wait; }
.ok-text { color: var(--ok); font-weight: 600; }
/* Admin: gambar IC & lesen */
.doc-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.doc-admin {
  display: grid; gap: 4px; justify-items: center; text-align: center; text-decoration: none;
  color: var(--ink-2); font-size: .8rem; font-weight: 700;
}
.doc-admin img, .doc-admin > .muted {
  width: 100%; aspect-ratio: 85.6 / 54; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center;
}
/* Kad matrik: kotak penuh lebar di atas */
.doc-tile.doc-wide, .doc-admin.doc-wide { grid-column: 1 / -1; }
.doc-tile.doc-wide .doc-preview, .doc-admin.doc-wide img { max-width: 260px; justify-self: center; }

/* =========================================================
   Akaun pelanggan
   ========================================================= */
.center { text-align: center; }
.no-text { color: var(--no); font-weight: 600; }
.big-ic-brand { background: var(--brand-soft); color: var(--brand); }
.footer-links { font-size: .88rem; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.old-customer { padding: 12px; border-radius: var(--radius-sm); background: var(--bg); display: grid; gap: 10px; }
.old-customer .check { margin-top: 0; }
.old-customer .old-code { display: none; }
.old-customer.open .old-code { display: grid; }
.old-docs-note { display: none; color: var(--ok) !important; font-weight: 600; }
.old-customer.open ~ .doc-section .old-docs-note { display: block; }
.center-card .btn + .btn { margin-top: 2px; }
.temp-pw { display: grid; gap: 4px; padding: 12px; margin-bottom: 10px; border-radius: var(--radius-sm); background: #FEF3C7; }
.temp-pw strong { font-size: 1.3rem; letter-spacing: .08em; }
.temp-pw { display: grid; gap: 4px; padding: 12px; margin-bottom: 10px; border-radius: var(--radius-sm); background: #FEF3C7; }
.temp-pw strong { font-size: 1.3rem; letter-spacing: .08em; }
.mb { margin-bottom: 14px; }
.sticky-cta .btn:disabled { opacity: .55; cursor: not-allowed; }
/* Hero: baris ejen berdaftar */
.hero-agent {
  display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 0;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28);
  font-size: .82rem; font-weight: 700;
}

/* car.php: pemilih tarikh senarai + grey-out slot ditempah */
.dt-row select.dt-date {
  flex: 1 1 auto; min-width: 0; width: auto; padding: 4px 26px 4px 0; border: 0; background-color: transparent;
}
.dt-row select option:disabled { color: #A0AEC0; }
.legend-busy { display: flex; align-items: center; gap: 8px; margin: 0; }
.legend-busy .swatch { width: 14px; height: 14px; border-radius: 4px; background: #E2E8F0; border: 1px solid #CBD5E1; flex-shrink: 0; }

/* payment.php: no. rujukan transaksi */
.ref-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); font-size: .9rem; }
.ref-row { display: flex; gap: 8px; }
.ref-row input { flex: 1; min-width: 0; }
.paste-btn { flex: 0 0 auto; padding: 0 14px; }
.paste-btn[hidden] { display: none; }
/* admin: kotak no. rujukan */
.pay-ref-box { display: grid; justify-items: start; gap: 6px; padding: 14px; border-radius: var(--radius-sm); background: var(--brand-soft); }
.copy-chip.big { font-size: 1.05rem; padding: 8px 12px; word-break: break-all; }
.hours-line { display: flex; align-items: center; gap: 6px; margin: 0; }
.dropzone-sm { padding: 16px 12px; }
.dropzone-sm .dz-ic { width: 42px; height: 42px; }
.dropzone.has-err { border-color: var(--no); background: var(--no-soft); }

/* =========================================================
   Tetapan akaun (settings.php) + butang Tetapan di account.php
   ========================================================= */
.back-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  color: var(--muted, #64748B); font-weight: 600; font-size: .92rem; text-decoration: none;
}
.menu-list {
  display: grid; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; margin-top: 8px;
}
.menu-row {
  display: flex; align-items: center; gap: 12px; padding: 15px 16px;
  color: inherit; text-decoration: none; min-height: 64px;
}
.menu-row + .menu-row { border-top: 1px solid var(--line); }
.menu-row:active { background: #F1F5F9; }
.menu-ico {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; background: #E6F4F1; color: var(--brand);
}
.menu-txt { flex: 1; display: grid; min-width: 0; }
.menu-txt small { font-size: .82rem; }
.menu-chev { color: #94A3B8; display: grid; }
.menu-row .status-badge { flex-shrink: 0; }
.menu-list.mt-lg { margin-top: 18px; }

/* =========================================================
   Kalendar pemilih tarikh (car.php)
   ========================================================= */
.dt-cal { flex: 1 1 auto; min-width: 0; display: flex; }
.dt-cal-btn { display: none; }
.dt-cal.cal-on select.dt-date { display: none; }
.dt-cal.cal-on .dt-cal-btn {
  display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0;
  padding: 4px 0; border: 0; background: none; cursor: pointer; text-align: left;
  font: inherit; font-weight: 700; color: var(--ink);
}
.dt-cal-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-cal-btn svg { color: var(--brand); flex-shrink: 0; }
.dt-cal.is-empty .dt-cal-btn { color: var(--muted); }

.cal-sheet { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.cal-sheet[hidden] { display: none; }
.cal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.cal-panel {
  position: relative; width: 100%; max-width: 420px; background: #fff;
  border-radius: 22px 22px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(15, 23, 42, .18); animation: calUp .18s ease-out;
}
@keyframes calUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) {
  .cal-sheet { align-items: center; }
  .cal-panel { border-radius: 22px; padding-bottom: 18px; }
}
body.cal-open { overflow: hidden; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cal-title { font-size: 1.05rem; }
.cal-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink); }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.cal-month { font-weight: 800; }
.cal-nav button {
  width: 38px; height: 38px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff;
  font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink);
}
.cal-nav button:disabled { opacity: .3; cursor: default; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-week span { font-size: .74rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-day {
  aspect-ratio: 1; min-height: 40px; border: 0; border-radius: 12px; background: #fff;
  font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; position: relative;
}
.cal-day:hover:not(:disabled) { background: #E6F4F1; }
.cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--brand); }
.cal-day.in-range { background: #E6F4F1; border-radius: 0; }
.cal-day.is-pick { background: #CCEAE4; color: var(--brand); }
.cal-day.is-sel { background: var(--brand); color: #fff; }
.cal-day.is-off { color: #CBD5E1; cursor: default; font-weight: 500; }
.cal-day.is-full { background: #F1F5F9; color: #94A3B8; }
.cal-legend { display: flex; gap: 16px; justify-content: center; margin-top: 12px; font-size: .78rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend span:first-child { display: none; }
.cal-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.lg-full { background: #F1F5F9; border: 1px solid #CBD5E1; }
.dt-field { min-width: 0; }                       /* jangan biar label tarikh panjang tolak kotak keluar */
.dt-cal { flex: 1 1 0; overflow: hidden; }
/* Ikon kalendar = butang buka kalendar (car.php) */
button.dt-cal-open { border: 0; padding: 0; flex-shrink: 0; cursor: pointer; font: inherit; }
button.dt-cal-open:hover { background: #CCEAE4; }
button.dt-cal-open:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.dt-cal.cal-on .dt-cal-btn { cursor: default; }

/* =========================================================
   Pemeriksaan kereta semasa ambil (pickup.php)
   ========================================================= */
.insp-tips { list-style: none; margin: 0; padding: 12px 14px; background: var(--bg); border-radius: var(--radius-sm); display: grid; gap: 6px; }
.insp-tips li { display: flex; gap: 8px; align-items: flex-start; }
.insp-tips svg { color: var(--brand); flex-shrink: 0; margin-top: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
/* Timeline: tarikh/masa bawah label */
.tl-text { display: grid; }
.tl-when { font-size: .78rem; color: var(--muted); font-weight: 500; }
/* Butang langkah yang dah dibuat (status.php) */
.btn.btn-done[disabled] { background: #E2E8F0; border-color: #E2E8F0; color: #64748B; opacity: 1; }

/* Tempahan saya: tajuk + butang Sejarah sebaris */
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 8px 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line);
  color: var(--ink); font-weight: 700; font-size: .88rem; text-decoration: none; box-shadow: var(--shadow-sm);
}
.pill-btn svg { color: var(--brand); }
.pill-btn:active { background: #F1F5F9; }
.pill-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .74rem; display: grid; place-items: center; }

/* Agensi berdaftar (homepage) */
.agency-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1.5px solid #CCEAE4;
}
.agency-ic { width: 48px; height: 48px; border-radius: 14px; background: #E6F4F1; color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.agency-card > div { display: grid; gap: 4px; min-width: 0; }
.agency-name { font-size: 1.1rem; }
.agency-info { margin: 6px 0; display: grid; gap: 6px; }
.agency-info div { display: grid; gap: 2px; padding: 8px 12px; background: var(--bg); border-radius: 10px; font-size: .88rem; }
.agency-info dt { color: var(--muted); font-size: .78rem; }
.agency-info dd { margin: 0; font-weight: 700; word-break: break-word; }

/* =========================================================
   FPX (ToyyibPay) di payment.php
   ========================================================= */
.fpx-card { display: grid; gap: 14px; border: 2px solid var(--brand); }
.fpx-head { display: flex; align-items: center; gap: 12px; }
.fpx-head > div { flex: 1; display: grid; gap: 2px; min-width: 0; }
.fpx-ic { width: 44px; height: 44px; border-radius: 12px; background: #E6F4F1; color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.warn-text { color: #B45309; font-weight: 600; margin: 0; }
.center { text-align: center; }
.req { color: #DC2626; font-weight: 700; }
/* Amaran tinggalkan halaman bayaran */
.leave-sheet .cal-panel { display: grid; gap: 12px; text-align: center; justify-items: center; }
.leave-sheet .cal-panel p { margin: 0; }
.leave-sheet .btn { width: 100%; }
.leave-ic { width: 56px; height: 56px; border-radius: 50%; background: #FEF3C7; color: #B45309; display: grid; place-items: center; }
.leave-deadline { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 10px; background: #FEF3C7; color: #92400E; font-size: .88rem; font-weight: 600; }
