/* Invois Bijak — gaya utama. Mudah dibaca, butang besar, mesra telefon. */
:root {
  --bg: #f6f5f0;
  --card: #ffffff;
  --ink: #1c2321;
  --muted: #5f6b68;
  --line: #e4e2da;
  --brand: #0f766e;
  --brand-dark: #0b5953;
  --brand-soft: #e3f3f0;
  --accent: #f59e0b;
  --wa: #1fa855;
  --danger: #c2410c;
  --ok-bg: #e8f6ec; --ok: #166534;
  --warn-bg: #fff6e0; --warn: #92400e;
  --err-bg: #fdecea; --err: #9f1d1d;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28,35,33,.05), 0 4px 16px rgba(28,35,33,.05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--brand); }
img { max-width: 100%; }
h1 { font-size: 1.75rem; line-height: 1.25; margin: 0 0 .35rem; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .9rem; font-weight: 700; }
h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 24px; padding-bottom: 56px; min-height: 70vh; }
.narrow { max-width: 480px; margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.mt { margin-top: 18px; }
code { background: #efeee8; padding: 1px 6px; border-radius: 6px; }

/* Topbar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: 4px; align-items: center; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; white-space: nowrap; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.on { background: var(--brand-soft); color: var(--brand-dark); }
.nav a.keluar { color: var(--danger); }
.nav-guest a.btn { color: #fff; }
@media (max-width: 760px) {
  .topbar { position: static; }
  .topbar-in { padding-top: 8px; }
  .nav:not(.nav-guest) { order: 3; width: calc(100% + 32px); margin: 0 -16px; padding: 6px 10px 8px; border-top: 1px solid var(--line); flex-wrap: wrap; overflow: visible; justify-content: center; gap: 2px; }
  .nav:not(.nav-guest) a { padding: 7px 10px; font-size: .9rem; }
}

/* Butang */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; border: 2px solid var(--brand);
  padding: 11px 20px; border-radius: 12px; font: inherit; font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer; transition: background .15s, transform .05s; min-height: 48px;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .5; pointer-events: none; }
.btn-sm { padding: 6px 12px; min-height: 38px; font-size: .9rem; border-radius: 10px; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; min-height: 54px; }
.btn-xl { padding: 16px 30px; font-size: 1.12rem; min-height: 60px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg); border-color: #cfccc1; }
.btn-wa { background: var(--wa); border-color: var(--wa); }
.btn-wa:hover { background: #178a45; border-color: #178a45; }
.btn-success { background: #15803d; border-color: #15803d; }
.btn-success:hover { background: #116632; border-color: #116632; }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-white { background: #fff; color: var(--brand-dark); border-color: #fff; }
.btn-white:hover { background: #f0fdfa; border-color: #f0fdfa; }
.btn-link-danger { background: none; border: none; color: var(--danger); font: inherit; font-weight: 600; cursor: pointer; padding: 8px; min-height: 38px; }
.btn-link-danger:hover { text-decoration: underline; }
.btn-block + .btn-block { margin-top: 10px; }

/* Kad & borang */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 14px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; font: inherit; font-weight: 400; font-size: 1rem; color: var(--ink);
  background: #fff; border: 2px solid #dcd9cf; border-radius: 10px; padding: 11px 13px; min-height: 48px;
}
textarea { resize: vertical; min-height: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(15,118,110,.15); }
input:disabled { background: #f3f2ed; color: var(--muted); }
input[type=file] { padding: 9px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
label.check input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.hint { display: block; font-size: .86rem; color: var(--muted); font-weight: 400; margin-top: 4px; }
p.hint { margin: -4px 0 14px; }
.req { color: var(--danger); }
.opt { color: var(--muted); font-weight: 400; font-size: .85rem; }
.err { color: var(--err); font-size: .9rem; margin: -8px 0 12px; font-weight: 600; }
.row2, .row3 { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: repeat(3, 1fr); } }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pw { display: flex; gap: 8px; align-items: stretch; }
.pw input { flex: 1; }
.pw-toggle { margin-top: 6px; border: 2px solid #dcd9cf; background: #fff; border-radius: 10px; padding: 0 12px; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; color: var(--muted); }

/* Notis */
.alert { padding: 13px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 500; border: 1px solid transparent; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe3c9; }
.alert-ralat { background: var(--err-bg); color: var(--err); border-color: #f3c3bd; }
.alert-info { background: var(--brand-soft); color: var(--brand-dark); border-color: #b9e0d9; }
.callout { background: var(--warn-bg); border: 1px solid #f6dc9b; color: #6b3d0a; padding: 13px 16px; border-radius: 12px; margin-bottom: 16px; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.badge.hijau { background: var(--ok-bg); color: var(--ok); }
.badge.kuning { background: var(--warn-bg); color: var(--warn); }
.badge.merah { background: var(--err-bg); color: var(--err); }
.badge.kelabu { background: #ecebe6; color: #555; }
.txt-hijau { color: #15803d; }
.txt-merah { color: var(--danger); }

/* Tajuk halaman */
.page-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.back { text-decoration: none; font-weight: 600; font-size: .95rem; }

/* Papan utama */
.big-actions { display: grid; gap: 14px; margin: 18px 0 22px; }
@media (min-width: 640px) { .big-actions { grid-template-columns: 1fr 1fr; } }
.big-btn { display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: 18px; background: var(--brand); color: #fff; text-decoration: none; box-shadow: 0 6px 20px rgba(15,118,110,.25); transition: transform .12s; }
.big-btn:hover { transform: translateY(-2px); }
.big-btn strong { display: block; font-size: 1.22rem; }
.big-btn small { opacity: .88; font-size: .95rem; }
.big-btn-alt { background: #1e293b; box-shadow: 0 6px 20px rgba(30,41,59,.22); }
.big-btn.disabled { opacity: .55; pointer-events: none; }
.big-ico { font-size: 2.2rem; background: rgba(255,255,255,.16); width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center; flex: none; }
.onboard { border: 2px dashed #b9e0d9; background: #fbfefd; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.steps li a { text-decoration: none; }
.steps li.done span:last-child { color: var(--muted); text-decoration: line-through; font-weight: 500; }
.tick { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #ecebe6; color: var(--muted); font-weight: 800; flex: none; }
.done .tick { background: #15803d; color: #fff; }
.stats { display: grid; gap: 14px; margin-bottom: 18px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stat-label { color: var(--muted); font-weight: 600; font-size: .9rem; }
.stat-val { font-size: 1.55rem; font-weight: 800; margin: 2px 0; }
.stat-sub { font-size: .88rem; color: var(--muted); }

/* Kuota */
.quota-row + .quota-row { margin-top: 14px; }
.quota-top { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; }
.quota-top a { text-decoration: none; }
.bar { height: 12px; background: #ecebe6; border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.bar span.warn { background: var(--accent); }
.bar span.full { background: var(--danger); }
.quota-msg { margin: 12px 0 0; color: var(--err); }

/* Senarai */
.list { display: grid; gap: 10px; }
.list-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap; text-decoration: none; color: var(--ink); }
a.list-item:hover { border-color: #b9e0d9; }
.list-flat .list-item { border: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; }
.list-flat .list-item { flex-wrap: nowrap; }
.list-flat .list-item:last-child { border-bottom: none; }
.li-main { flex: 1 1 220px; min-width: 0; color: var(--ink); text-decoration: none; }
.li-amount { font-weight: 800; text-align: right; }
.li-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.li-actions form { margin: 0; }
.search { display: flex; gap: 8px; margin-bottom: 14px; }
.search input { margin: 0; }
.search .btn { flex: none; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-icon { font-size: 3rem; }

/* Borang dokumen */
.step h2 { display: flex; align-items: center; gap: 10px; }
.step-no { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .95rem; flex: none; }
.items-head { display: none; }
.item-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; background: #fcfcfa; position: relative; }
.item-row label { margin-bottom: 8px; }
.item-row .i-desc { grid-column: 1 / -1; padding-right: 36px; }
.i-amount { grid-column: 1 / -1; display: flex; justify-content: space-between; font-weight: 700; padding-top: 4px; }
.i-amount output::before { content: "RM "; }
.m-label { display: block; font-size: .85rem; color: var(--muted); font-weight: 600; }
.i-del { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--danger); cursor: pointer; font-size: 1rem; }
.i-del:hover { background: var(--err-bg); }
@media (min-width: 760px) {
  .items-head { display: grid; grid-template-columns: 1fr 100px 150px 130px 40px; gap: 10px; font-size: .85rem; color: var(--muted); font-weight: 700; padding: 0 2px 6px; border-bottom: 2px solid var(--line); margin-bottom: 10px; }
  .items-head span:nth-child(n+3) { text-align: right; }
  .items-head span:nth-child(2) { text-align: center; }
  .item-row { grid-template-columns: 1fr 100px 150px 130px 40px; gap: 10px; padding: 0 0 10px; border: none; border-bottom: 1px solid var(--line); border-radius: 0; background: none; margin-bottom: 10px; align-items: start; }
  .item-row .m-label { display: none; }
  .item-row label { margin: 0; }
  .item-row .i-desc { grid-column: auto; padding-right: 0; }
  .item-row input, .item-row textarea { margin-top: 0; }
  .i-qty input { text-align: center; }
  .i-price input { text-align: right; }
  .i-amount { grid-column: auto; justify-content: flex-end; padding-top: 13px; }
  .i-del { position: static; margin-top: 7px; }
}
.totals { margin: 22px 0 0 auto; max-width: 380px; }
.t-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; }
.t-input label { margin: 0; font-weight: 500; }
.t-input input { width: 130px; margin: 0; text-align: right; min-height: 42px; padding: 8px 10px; }
.t-grand { border-top: 3px solid var(--ink); margin-top: 6px; padding-top: 12px; font-size: 1.2rem; }
.t-grand strong { color: var(--brand-dark); }
.sticky-save { position: sticky; bottom: 0; background: rgba(246,245,240,.94); backdrop-filter: blur(6px); padding: 12px 0; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 8px; z-index: 5; }
@media (max-width: 520px) { .sticky-save .btn-lg { flex: 1; } }

/* Paparan dokumen */
.view-grid { display: grid; gap: 18px; align-items: start; }
@media (min-width: 980px) { .view-grid { grid-template-columns: 340px 1fr; } .actions-panel { position: sticky; top: 80px; } }
.actions-panel .card { padding: 18px; }
.drawer { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.share { margin-top: 16px; }
.copy-wrap { display: flex; gap: 8px; align-items: center; }
.copy-wrap input { margin-top: 6px; font-size: .85rem; min-height: 40px; }
.copy-wrap .btn { margin-top: 6px; flex: none; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg form { margin: 0; }
.seg-btn { width: 100%; padding: 10px 4px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; color: var(--muted); }
.seg-btn.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.paper-wrap { overflow-x: auto; }
.paper { background: #fff; border-radius: 6px; box-shadow: 0 2px 18px rgba(0,0,0,.08); padding: 36px 40px; min-width: 640px; max-width: 820px; margin: 0 auto; border: 1px solid var(--line); }
@media (max-width: 700px) { .paper { padding: 20px; } }
.danger-zone summary { cursor: pointer; font-weight: 700; color: var(--danger); }
.danger-zone form { margin-top: 14px; }
.logo-field { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 8px; }
.logo-preview { width: 110px; height: 80px; border: 2px dashed #dcd9cf; border-radius: 10px; display: grid; place-items: center; flex: none; overflow: hidden; background: #fff; color: var(--muted); font-size: .8rem; }
.logo-preview img { max-height: 70px; max-width: 100px; }
.logo-field > div:last-child { flex: 1; }

/* Laman awam pelanggan */
.public .main { padding-top: 18px; }
.public-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; }
.promo { text-align: center; margin: 32px auto 0; max-width: 560px; background: var(--brand-soft); border-radius: var(--radius); padding: 22px; }

/* Laman utama (landing) */
.hero { display: grid; gap: 36px; align-items: center; padding: 26px 0 40px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr .9fr; padding: 48px 0 60px; } }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.12; margin: 14px 0 16px; }
.hl { background: linear-gradient(transparent 62%, #fde68a 62%); }
.lead { font-size: 1.15rem; color: #3a4542; margin: 0 0 24px; }
.pill { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: .8rem; letter-spacing: .04em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-visual { position: relative; }
.mock { background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 20px 50px rgba(15,60,55,.16); border: 1px solid var(--line); transform: rotate(1.5deg); position: relative; font-size: .9rem; }
.mock-head { display: flex; justify-content: space-between; margin-bottom: 16px; }
.mock-biz { font-weight: 800; margin-bottom: 6px; }
.mock-line { height: 8px; background: #ecebe6; border-radius: 4px; margin-bottom: 5px; }
.w60 { width: 140px; } .w40 { width: 95px; }
.mock-title { color: var(--brand); font-weight: 800; font-size: 1.4rem; text-align: right; }
.mock-title small { display: block; font-size: .8rem; color: var(--muted); }
.mock-to { background: #f3f4f6; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.mock-to small { display: block; color: var(--muted); font-size: .7rem; font-weight: 700; }
.mock-row { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 1px solid #eee; }
.mock-row.th { background: var(--brand); color: #fff; border-radius: 6px; font-weight: 700; border: none; padding: 8px 10px; }
.mock-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.1rem; padding: 12px 4px 0; border-top: 2px solid var(--ink); margin-top: 8px; }
.mock-stamp { position: absolute; right: 26px; bottom: 70px; border: 3px solid #16a34a; color: #16a34a; font-weight: 800; padding: 2px 12px; border-radius: 6px; transform: rotate(-14deg); font-size: 1.2rem; opacity: .85; }
.mock-wa { position: absolute; left: -6px; bottom: -18px; background: var(--wa); color: #fff; font-weight: 700; padding: 10px 16px; border-radius: 14px 14px 14px 4px; box-shadow: 0 8px 20px rgba(31,168,85,.3); font-size: .92rem; }
.how, .features, .faq { padding: 30px 0; }
.how h2, .features h2, .faq h2, .compare h2 { font-size: 1.6rem; margin-bottom: 22px; }
.how-grid, .feat-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .how-grid { grid-template-columns: repeat(3, 1fr); } .feat-grid { grid-template-columns: repeat(3, 1fr); } }
.how-card, .feat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.how-no { width: 42px; height: 42px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; margin-bottom: 12px; }
.how-card p, .feat p { margin: 0; color: var(--muted); }
.feat span { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.compare { margin: 20px 0; }
.compare-grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .compare-grid { grid-template-columns: 1fr 1fr; } }
.compare ul { list-style: none; padding: 0; margin: 0; }
.compare li { padding: 7px 0 7px 30px; position: relative; }
.compare .x li::before { content: "✗"; position: absolute; left: 4px; color: var(--danger); font-weight: 800; }
.compare .ok li::before { content: "✓"; position: absolute; left: 4px; color: #15803d; font-weight: 800; }
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.cta-final { background: var(--brand); color: #fff; border-radius: 22px; padding: 44px 24px; text-align: center; margin-top: 20px; }
.cta-final h2 { font-size: 1.8rem; }
.cta-final p { opacity: .9; margin: 0 0 22px; }

.prose h2 { margin-top: 22px; }
.prose li { margin-bottom: 6px; }

.foot { border-top: 1px solid var(--line); background: #fff; padding: 24px 0; font-size: .9rem; color: var(--muted); }
.foot p { margin: 4px 0; }

@media print {
  .topbar, .foot, .actions-panel, .back, .page-title, .alert, .public-bar, .promo { display: none !important; }
  body { background: #fff; }
  .paper { box-shadow: none; border: none; padding: 0; min-width: 0; }
  .view-grid { display: block; }
}

/* Sokongan (iced latte) & khidmat laman web — sengaja ringan, tidak mengganggu */
.btn-latte { background: #8a5a3b; border-color: #8a5a3b; }
.btn-latte:hover { background: #6f4529; border-color: #6f4529; }
.support-card { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #fbf6f0; border: 1px solid #ecdccb; border-radius: var(--radius); padding: 16px 44px 16px 18px; margin-top: 8px; }
.support-card[hidden] { display: none; }
.support-ico { font-size: 1.8rem; }
.support-txt { flex: 1 1 260px; }
.support-txt strong { display: block; }
.support-txt span { color: var(--muted); font-size: .92rem; }
.support-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: .9rem; }
.support-x:hover { background: #efe3d6; }
.foot-extra { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.foot-chip { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .86rem; font-weight: 600; background: var(--bg); }
.foot-chip:hover { border-color: #cfccc1; background: #fff; }
.support-page { max-width: 560px; margin: 0 auto; }
.latte-big { font-size: 3rem; line-height: 1; margin-bottom: 8px; }
.qr-img { display: block; width: 260px; height: auto; margin: 18px auto 8px; border-radius: 16px; }
.web-card { background: #f4fbf9; }

/* =====================================================================
   RESPONSIF — telefon & tablet
   Saiz lebih kecil, semua butang penuh lebar & di tengah pada telefon.
   ===================================================================== */
html, body { overflow-x: hidden; }
.li-amount { white-space: nowrap; }

/* Tablet & telefon besar */
@media (max-width: 900px) {
  body { font-size: 16px; }
  h1 { font-size: 1.5rem; }
  .hero { gap: 28px; }
  .hero-visual { max-width: 460px; margin: 0 auto; width: 100%; }
}

/* Telefon */
@media (max-width: 640px) {
  body { font-size: 15px; line-height: 1.5; }
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.05rem; margin-bottom: .75rem; }
  h3 { font-size: 1rem; }
  .main { padding-top: 16px; padding-bottom: 36px; }
  .card { padding: 16px; margin-bottom: 14px; border-radius: 12px; }
  label { font-size: .9rem; margin-bottom: 12px; }
  /* 16px pada input elak iPhone zoom automatik */
  input, select, textarea { font-size: 16px; padding: 9px 11px; min-height: 44px; border-radius: 9px; }
  .hint { font-size: .8rem; }
  .muted.small, .small { font-size: .82rem; }

  /* Bar atas */
  .topbar-in { min-height: 54px; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  .nav-guest { gap: 6px; }
  .nav-guest a { padding: 6px 8px; font-size: .85rem; }
  .nav-guest a.btn { padding: 6px 12px; min-height: 36px; }
  .topbar-in:has(.nav-guest) { flex-wrap: nowrap; }
  .nav:not(.nav-guest) a { padding: 6px 9px; font-size: .84rem; }

  /* Butang: saiz sederhana, penuh lebar & di tengah */
  .btn { font-size: .95rem; padding: 10px 16px; min-height: 44px; border-radius: 10px; }
  .btn-lg { font-size: 1rem; padding: 11px 18px; min-height: 48px; }
  .btn-xl { font-size: 1rem; padding: 12px 20px; min-height: 50px; border-radius: 12px; }
  .btn-sm { font-size: .85rem; padding: 6px 10px; min-height: 38px; }
  .card > .btn, form > .btn, .card form > .btn,
  .page-title > .btn, .hero-cta .btn, .actions .btn,
  .empty .btn, .cta-final .btn, .public-bar .btn,
  .support-page .btn, .search .btn { width: 100%; }
  .card > .btn, form > .btn { display: flex; margin-left: auto; margin-right: auto; }

  /* Tajuk halaman: tindanan menegak */
  .page-title { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 14px; }
  .page-title h1 { font-size: 1.25rem; gap: 8px; }
  .actions, .hero-cta { flex-direction: column; gap: 8px; }

  /* Papan utama */
  .big-actions { gap: 10px; margin: 14px 0 16px; }
  .big-btn { padding: 14px; gap: 12px; border-radius: 14px; }
  .big-btn strong { font-size: 1.05rem; }
  .big-btn small { font-size: .82rem; }
  .big-ico { width: 46px; height: 46px; font-size: 1.6rem; border-radius: 12px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats .stat:first-child { grid-column: 1 / -1; }
  .stat { padding: 12px 14px; }
  .stat-label { font-size: .8rem; }
  .stat-val { font-size: 1.15rem; }
  .stat-sub { font-size: .78rem; }
  .steps li { font-size: .92rem; }
  .tick { width: 26px; height: 26px; font-size: .8rem; }

  /* Senarai: maklumat + jumlah sebaris, butang tindakan penuh lebar di bawah */
  .list-item { padding: 12px 14px; gap: 8px 12px; }
  .li-main { flex: 1 1 0; }
  .li-amount { font-size: .95rem; }
  .li-actions { flex: 1 1 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
  .li-actions .btn, .li-actions form, .li-actions form .btn { width: 100%; }
  .li-actions .btn-link-danger { width: 100%; border: 1px solid #f1d2c4; border-radius: 10px; min-height: 38px; font-size: .85rem; }
  .list-flat .list-item { gap: 10px; }
  .list-flat .li-amount { text-align: right; font-size: .9rem; }
  .search { gap: 6px; }
  .search .btn { width: auto; flex: none; }

  /* Borang dokumen */
  .step h2 { gap: 8px; }
  .step-no { width: 26px; height: 26px; font-size: .82rem; }
  .item-row { padding: 12px; gap: 0 10px; }
  .totals { max-width: none; margin-top: 16px; }
  .t-input input { width: 110px; min-height: 40px; }
  .t-grand { font-size: 1.05rem; }
  #add-item { width: 100%; }
  .sticky-save { gap: 8px; }
  .sticky-save .btn { flex: 1; width: auto; }
  .sticky-save .btn-ghost { flex: 0 0 34%; }

  /* Paparan dokumen */
  .actions-panel .card { padding: 14px; }
  .seg-btn { font-size: .8rem; padding: 9px 2px; }
  .paper { padding: 16px; }

  /* Tetapan */
  .logo-field { flex-direction: column; align-items: stretch; }
  .logo-preview { margin: 0 auto; }

  /* Notis */
  .alert, .callout { padding: 11px 13px; font-size: .9rem; border-radius: 10px; }
  .badge { font-size: .7rem; padding: 2px 8px; }

  /* Laman utama (landing) */
  .hero { padding: 14px 0 26px; text-align: center; }
  .hero h1 { font-size: 1.6rem; margin: 10px 0 12px; }
  .lead { font-size: 1rem; margin-bottom: 18px; }
  .pill { font-size: .72rem; padding: 5px 12px; }
  .mock { transform: none; padding: 16px; font-size: .8rem; }
  .mock-title { font-size: 1.1rem; }
  .w60 { width: 100px; } .w40 { width: 70px; }
  .mock-stamp { font-size: .95rem; right: 18px; bottom: 58px; }
  .mock-wa { left: 50%; transform: translateX(-50%); bottom: -16px; white-space: nowrap; font-size: .82rem; padding: 8px 14px; }
  .how, .features, .faq { padding: 20px 0; }
  .how h2, .features h2, .faq h2, .compare h2 { font-size: 1.25rem; margin-bottom: 14px; }
  .how-grid, .feat-grid { gap: 10px; }
  .how-card, .feat { padding: 16px; text-align: center; }
  .how-no { margin: 0 auto 10px; width: 36px; height: 36px; font-size: 1rem; }
  .feat span { font-size: 1.5rem; }
  .faq details { padding: 13px 15px; }
  .cta-final { padding: 28px 18px; border-radius: 16px; }
  .cta-final h2 { font-size: 1.3rem; }

  /* Laman awam pelanggan */
  .public-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .promo { padding: 18px; }

  /* Sokongan & footer */
  .support-card { flex-direction: column; text-align: center; padding: 16px; gap: 8px; }
  .support-card .btn { width: 100%; }
  .support-txt { flex: none; }
  .foot { padding: 18px 0; font-size: .82rem; text-align: center; }
  .foot-extra { flex-direction: column; align-items: stretch; }
  .foot-chip { text-align: center; font-size: .82rem; }
  .qr-img { width: 220px; }
  .latte-big { font-size: 2.4rem; }
  .prose h1 { font-size: 1.3rem; }
}

/* Telefon kecil (cth iPhone SE, 320–360px) */
@media (max-width: 360px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 12px; }
  .nav:not(.nav-guest) { margin: 0 -12px; width: calc(100% + 24px); }
  .nav:not(.nav-guest) a { padding: 5px 7px; font-size: .8rem; }
  .stats { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.45rem; }
  .row3 { grid-template-columns: 1fr; }
}

/* Pembetulan kecil telefon */
.brand span { white-space: nowrap; }
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .topbar-in:has(.nav-guest) { justify-content: space-between; }
  .nav-guest { flex: none; overflow: visible; }
  .li-actions .btn, .li-actions .btn-link-danger { white-space: nowrap; padding-left: 4px; padding-right: 4px; font-size: .8rem; }
  .mock-stamp { display: none; }
}
@media (max-width: 340px) {
  .brand { font-size: .92rem; }
  .brand img { width: 24px; height: 24px; }
  .nav-guest a { padding: 5px 6px; font-size: .8rem; }
}
