/* =========================================================
   ML Coffee — Aplikasi Pemesanan (tampilan APK premium)
   Hitam kopi + gold, kartu hangat, gerak halus.
   ========================================================= */

.app-body { background: #050403; display: flex; justify-content: center; min-height: 100dvh; }

.phone {
  position: relative; width: 100%; max-width: 430px; min-height: 100dvh;
  background: var(--bg); display: flex; flex-direction: column; overflow: clip;
}
@media (min-width: 500px) {
  .phone {
    margin: 18px 0 28px; height: calc(100dvh - 46px);
    min-height: calc(100dvh - 46px); max-height: 920px;
    border-radius: 34px; border: 1px solid #2A2013;
    box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 0 8px #14100A;
  }
}
.desktop-side { display: none; }

.statusbar {
  height: 34px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--text); position: relative; z-index: 30;
}
.sb-title { font-size: 9.5px; letter-spacing: .28em; color: var(--faint); font-weight: 700; }
.sb-icons { display: flex; gap: 6px; }
.sb-icons svg { width: 15px; height: 15px; }
.statusbar.is-hidden { display: none; }

.screen { flex: 1; position: relative; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; scrollbar-width: none; }
.screen::-webkit-scrollbar { display: none; }

.view {
  position: absolute; inset: 0;
  padding: 18px 18px calc(96px + env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: none;
  opacity: 0; transform: translateX(26px); pointer-events: none;
  transition: opacity .32s var(--ease), transform .32s var(--ease);
}
.view::-webkit-scrollbar { display: none; }
.view.is-active { opacity: 1; transform: none; pointer-events: auto; }
.view.slide-back { transform: translateX(-26px); }

/* ---------------- Header ---------------- */
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-top: 6px; }
.ah-brand { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.ah-logo { width: 44px; height: 44px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line-hard); flex: none; }
.ah-greet span { display: block; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.ah-greet strong { display: block; font-family: var(--font-disp); font-weight: 700; font-size: 20px; letter-spacing: .04em; color: var(--text); line-height: 1.2; }
.ah-center { text-align: center; flex: 1; }

.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--text);
  transition: transform .15s var(--ease);
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 19px; height: 19px; }

.cart-badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px;
  border-radius: 99px; background: var(--gold); color: #17110B;
  font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 5px;
  transform: scale(0); transition: transform .25s var(--ease);
}
.cart-badge.on { transform: scale(1); }
.tab-badge { position: absolute; top: -4px; right: 4px; }

/* ---------------- Banner coming soon ---------------- */
.soon-banner {
  display: grid; gap: 10px; justify-items: start;
  background: linear-gradient(140deg, rgba(201,162,107,.14), rgba(22,16,9,.4));
  border: 1px solid var(--line-hard); border-radius: var(--r-m);
  padding: 14px 16px; margin-bottom: 16px;
}
.soon-banner p { font-size: 12.5px; color: var(--muted); }

/* ---------------- Hero strip ---------------- */
.hero-strip {
  display: flex; align-items: center; gap: 8px;
  border-radius: var(--r-l); padding: 8px 20px 8px 20px; margin-bottom: 18px;
  background: radial-gradient(120% 160% at 85% 0%, rgba(138,90,50,.35), rgba(22,16,9,.6) 60%);
  border: 1px solid var(--line-hard); overflow: hidden; position: relative;
}
.hs-copy { flex: 1; padding: 14px 0; }
.hs-script { display: block; font-family: var(--font-script); font-size: 22px; color: var(--gold-2); line-height: 1; }
.hs-copy strong { display: block; font-family: var(--font-disp); font-weight: 700; font-size: 21px; letter-spacing: .04em; color: var(--text); margin: 4px 0 2px; }
.hs-copy span { font-size: 11.5px; color: var(--muted); }
.hs-img { width: 108px; flex: none; margin-right: 4px; filter: drop-shadow(0 10px 16px rgba(0,0,0,.5)); }

/* ---------------- Kategori & menu ---------------- */
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px 14px; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-btn {
  flex: 0 0 auto; padding: 9px 16px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  transition: all .18s var(--ease);
}
.cat-btn.is-on { background: var(--gold); border-color: var(--gold); color: #17110B; }

.menu-list { display: grid; gap: 12px; }
.m-item {
  display: flex; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 12px; cursor: pointer;
  transition: transform .15s var(--ease), border-color .2s;
}
.m-item:active { transform: scale(.98); }
.mi-img { flex: none; width: 74px; height: 84px; border-radius: 10px; overflow: hidden; background: radial-gradient(120% 90% at 50% 30%, #221809, #141009 75%); display: grid; place-items: center; }
.mi-img img { width: 84%; }
.mi-main { flex: 1; min-width: 0; }
.mi-main strong { display: block; font-size: 14.5px; font-weight: 700; color: var(--text); }
.mi-main p { font-size: 11.5px; color: var(--faint); margin: 3px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mi-price { font-family: var(--font-disp); font-weight: 700; font-size: 16px; color: var(--gold-2); }
.mi-add {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  background: var(--gold); color: #17110B; display: grid; place-items: center;
  transition: transform .15s var(--ease);
}
.mi-add:active { transform: scale(.88); }
.mi-add svg { width: 18px; height: 18px; }

.empty { text-align: center; padding: 44px 20px; color: var(--faint); }
.empty svg { width: 44px; height: 44px; margin-bottom: 12px; opacity: .5; }
.empty p { font-size: 13px; max-width: 240px; margin: 0 auto; }

/* ---------------- Keranjang ---------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px; }
.info-card { margin-top: 16px; }
.info-card h3 { font-size: 14px; color: var(--text); margin-bottom: 6px; }
.info-card p { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }

.cart-steps { height: 3px; background: var(--raised); border-radius: 99px; overflow: hidden; margin-bottom: 20px; }
.cart-steps i { display: block; height: 100%; width: 33%; background: linear-gradient(90deg, var(--brown), var(--gold)); transition: width .4s var(--ease); }

.cline {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 12px; margin-bottom: 10px;
}
.cl-img { flex: none; width: 56px; height: 64px; border-radius: 9px; overflow: hidden; background: radial-gradient(120% 90% at 50% 30%, #221809, #141009 75%); display: grid; place-items: center; }
.cl-img img { width: 82%; }
.cl-main { flex: 1; min-width: 0; }
.cl-main strong { display: block; font-size: 13.5px; color: var(--text); }
.cl-main span { font-size: 12px; color: var(--gold-2); font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line-hard);
  display: grid; place-items: center; color: var(--text);
  transition: transform .15s var(--ease);
}
.stepper button:active { transform: scale(.88); color: var(--gold); }
.stepper svg { width: 15px; height: 15px; }
.stepper b { min-width: 22px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.cl-line-total { flex: none; font-size: 13px; font-weight: 700; color: var(--text); min-width: 66px; text-align: right; font-variant-numeric: tabular-nums; }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--r-s); padding: 13px 14px; font-size: 14.5px; color: var(--text);
  transition: border-color .2s; resize: none;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }

.seg { display: flex; gap: 8px; margin-bottom: 16px; }
.seg-btn {
  flex: 1; padding: 11px 10px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 700;
  transition: all .18s var(--ease); text-align: center;
}
.seg-btn.is-on { border-color: var(--gold); color: var(--gold-2); background: rgba(201,162,107,.1); }

.summary-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; margin-top: 16px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; color: var(--muted); }
.sum-row b { color: var(--text); text-align: right; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line-hard); margin-top: 8px; padding-top: 12px; }
.sum-total em { font-style: normal; font-size: 12px; color: var(--muted); }
.sum-total strong { font-family: var(--font-disp); font-size: 24px; color: var(--gold-2); }

.cart-footer {
  position: sticky; bottom: 0; margin: 20px -18px calc(-96px - env(safe-area-inset-bottom));
  padding: 14px 18px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 72%, transparent);
  display: flex; align-items: center; gap: 16px; z-index: 5;
}
.bk-total { flex: 1; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.bk-total strong { display: block; font-family: var(--font-disp); font-size: 23px; color: var(--gold-2); font-weight: 700; letter-spacing: 0; }

/* ---------------- QRIS ---------------- */
.qris-card {
  background: #FFFDF8; color: #17110B; border-radius: var(--r-l);
  padding: 20px; text-align: center;
}
.qris-head { display: flex; align-items: center; gap: 12px; text-align: left; margin-bottom: 14px; }
.qris-logo { font-weight: 800; font-size: 18px; letter-spacing: .06em; color: #B5121B; border: 2px solid #B5121B; padding: 3px 10px; border-radius: 6px; }
.qris-info strong { display: block; font-size: 14px; }
.qris-info span { font-size: 11px; color: #6B5A44; }
.qris-img { width: 216px; margin: 0 auto; border-radius: 8px; }
.qris-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; border-top: 1px dashed #D8CBB2; padding-top: 14px; }
.qris-total em { font-style: normal; font-size: 12px; color: #6B5A44; }
.qris-total strong { font-family: var(--font-disp); font-size: 26px; }
.qris-note { font-size: 11px; color: #6B5A44; margin-top: 10px; }

.pay-wait { text-align: center; padding: 30px 0 10px; color: var(--muted); }
.pay-spin {
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--raised); border-top-color: var(--gold);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pay-wait span { display: block; font-family: var(--font-disp); font-size: 20px; color: var(--gold-2); margin-top: 6px; letter-spacing: .08em; }

/* ---------------- Selesai ---------------- */
.done-wrap { text-align: center; padding-top: 24px; animation: fade-up .5s var(--ease); }
.done-mark {
  width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%;
  background: rgba(76,138,90,.16); color: #6DB07E; display: grid; place-items: center;
  animation: pop .5s var(--ease);
}
.done-mark svg { width: 38px; height: 38px; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.done-title { font-family: var(--font-disp); font-size: 26px; letter-spacing: .04em; color: var(--text); }
.done-sub { font-size: 13px; color: var(--muted); max-width: 280px; margin: 8px auto 22px; }
.order-code-card {
  width: 220px; margin: 0 auto 22px; padding: 18px;
  background: linear-gradient(150deg, #221809, #141009);
  border: 1px solid var(--line-hard); border-radius: var(--r-l);
}
.order-code-card em { font-style: normal; font-size: 9.5px; letter-spacing: .3em; color: var(--faint); font-weight: 700; }
.order-code-card strong { display: block; font-family: var(--font-disp); font-weight: 800; font-size: 44px; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.done-actions { display: grid; gap: 10px; }

/* ---------------- Pesanan ---------------- */
.order-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
  transition: transform .15s var(--ease), border-color .2s;
}
.order-card:active { transform: scale(.98); }
.oc-top { display: flex; align-items: center; justify-content: space-between; }
.oc-code { font-family: var(--font-disp); font-weight: 700; font-size: 19px; color: var(--text); letter-spacing: .04em; }
.oc-status { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; }
.st-bayar { background: rgba(201,162,107,.14); color: var(--gold-2); }
.st-konfirmasi { background: rgba(201,162,107,.26); color: var(--gold-2); }
.st-dibuat { background: rgba(76,138,90,.16); color: #6DB07E; }
.st-selesai { background: rgba(255,255,255,.08); color: var(--muted); }
.oc-sub { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); margin-top: 6px; }
.oc-sub b { color: var(--gold-2); font-weight: 700; }

/* ---------------- Detail pesanan ---------------- */
.detail-hero { text-align: center; padding: 22px 16px; background: linear-gradient(150deg, #221809, #141009); border: 1px solid var(--line); border-radius: var(--r-l); }
.detail-hero .dh-code { font-family: var(--font-disp); font-weight: 800; font-size: 40px; color: var(--gold-2); letter-spacing: .04em; }
.timeline { margin-top: 16px; }
.tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 2px; }
.tl-dot {
  flex: none; width: 38px; height: 38px; border-radius: 12px; z-index: 2;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--faint);
  display: grid; place-items: center;
}
.tl-dot svg { width: 18px; height: 18px; }
.tl-item.is-done .tl-dot { background: rgba(76,138,90,.16); border-color: transparent; color: #6DB07E; }
.tl-item.is-now .tl-dot { background: var(--gold); border-color: transparent; color: #17110B; animation: glow 2s infinite; }
@keyframes glow { 0%,100% { box-shadow: 0 0 0 0 rgba(201,162,107,.4); } 50% { box-shadow: 0 0 0 9px rgba(201,162,107,0); } }
.tl-line { position: absolute; left: 19px; top: 38px; bottom: 4px; width: 2px; background: var(--raised); }
.tl-item.is-done .tl-line { background: rgba(76,138,90,.4); }
.tl-main strong { display: block; font-size: 14px; color: var(--faint); font-weight: 600; }
.tl-item.is-done strong, .tl-item.is-now strong { color: var(--text); }
.tl-item.is-now strong { color: var(--gold-2); }
.tl-main span { font-size: 11.5px; color: var(--faint); }

/* ---------------- Profil ---------------- */
.profile-card { display: flex; align-items: center; gap: 16px; }
.pc-logo { width: 56px; height: 56px; border-radius: 10px; border: 1px solid var(--line-hard); }
.pc-info strong { display: block; font-family: var(--font-disp); font-size: 18px; letter-spacing: .08em; color: var(--text); }
.pc-info .script { font-size: 24px; }
.halal-card { margin-top: 12px; display: flex; align-items: center; gap: 16px; }
.halal-card img { height: 96px; background: #fff; padding: 4px; border-radius: 6px; }
.halal-card p { font-size: 12.5px; color: var(--muted); }
.halal-card strong { color: var(--gold-2); }
.set-group { display: grid; gap: 10px; margin-top: 16px; }
.set-row {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 14px 16px; transition: border-color .2s;
}
.set-row:active { border-color: var(--line-hard); }
.sr-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.06); color: var(--text); display: grid; place-items: center; }
.sr-ic svg { width: 18px; height: 18px; }
.sr-gold { background: rgba(201,162,107,.12); color: var(--gold); }
.sr-main { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.sr-main strong { display: block; font-size: 11.5px; font-weight: 500; color: var(--faint); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
svg.sr-arrow { width: 16px; height: 16px; color: var(--faint); }
.app-version { text-align: center; font-size: 11.5px; color: var(--faint); margin-top: 26px; letter-spacing: .06em; }

/* ---------------- Tab bar ---------------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(9,7,4,.94);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px; color: var(--faint); position: relative;
  font-size: 10px; font-weight: 600; letter-spacing: .02em;
  transition: color .2s;
}
.tab svg { width: 21px; height: 21px; transition: transform .18s var(--ease); }
.tab.is-on { color: var(--gold); }
.tab.is-on svg { transform: translateY(-1px) scale(1.06); }
.tab:active svg { transform: scale(.88); }
.tab-center { position: relative; }
.tab-center-ic {
  width: 46px; height: 46px; margin-top: -26px; border-radius: 50%;
  background: linear-gradient(140deg, var(--gold-2), var(--brown));
  color: #17110B; display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(201,162,107,.3), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .18s var(--ease);
}
.tab-center-ic svg { width: 21px; height: 21px; }
.tab.is-on .tab-center-ic { transform: translateY(-2px); }
.tab-center span:last-of-type { color: var(--text); }
.tab.is-on span { color: var(--gold); }

/* ---------------- Sheets & toast ---------------- */
.sheet-backdrop {
  position: absolute; inset: 0; z-index: 40; background: rgba(4,3,2,.66);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .28s;
}
.sheet-backdrop.is-on { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--raised); border: 1px solid var(--line-hard); border-bottom: 0;
  border-radius: 24px 24px 0 0; max-height: 88%;
  transform: translateY(105%); transition: transform .38s var(--ease);
  display: flex; flex-direction: column;
}
.sheet.is-on { transform: translateY(0); }
.sheet-grip { flex: none; width: 44px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.2); margin: 10px auto 0; cursor: pointer; }
.sheet-body { padding: 16px 20px calc(22px + env(safe-area-inset-bottom)); overflow-y: auto; scrollbar-width: none; }
.sheet-body::-webkit-scrollbar { display: none; }
.sheet-title { font-family: var(--font-disp); font-weight: 700; font-size: 19px; letter-spacing: .04em; color: var(--text); }

.pd-img { width: 60%; margin: 0 auto; display: block; }
.pd-name { font-family: var(--font-disp); font-weight: 700; font-size: 22px; letter-spacing: .04em; color: var(--text); text-align: center; margin-top: 8px; }
.pd-script { font-family: var(--font-script); text-align: center; font-size: 24px; color: var(--gold-2); }
.pd-desc { font-size: 13px; color: var(--muted); text-align: center; margin: 10px 0 16px; }
.pd-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pd-price { font-family: var(--font-disp); font-weight: 700; font-size: 24px; color: var(--gold-2); }
.pd-qty { display: flex; align-items: center; gap: 14px; }
.pd-qty button {
  width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line-hard);
  display: grid; place-items: center; color: var(--text); transition: transform .15s var(--ease);
}
.pd-qty button:active { transform: scale(.9); }
.pd-qty svg { width: 17px; height: 17px; }
.pd-qty b { font-size: 17px; min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }

.btn-block { width: 100%; }
.soon-lock {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; color: var(--muted); margin-top: 10px;
}
.soon-lock svg { width: 15px; height: 15px; color: var(--gold); }

.toast {
  position: absolute; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 70;
  transform: translate(-50%, 20px);
  background: var(--cream); color: #17110B;
  font-size: 13px; font-weight: 600; padding: 12px 18px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease);
  max-width: 82%; text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

body.locked .screen { overflow: hidden; }
