/* ============================================================
   COFFEE SẠC — Design System (Step 1)
   Pure CSS3 · mobile-first · 390x844
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand */
  --brand: #52F04F;
  --brand-deep: #00B95B;
  --brand-gradient: linear-gradient(135deg, #52F04F, #00B95B);
  --brand-soft: rgba(82, 240, 79, 0.12);

  /* Backgrounds */
  --bg-dark: #191919;
  --bg-light: #F5F7F6;
  --bg-white: #FFFFFF;
  --bg-elevated: #FFFFFF;

  /* Text */
  --text-main: #151515;
  --text-sub: #69716D;
  --text-invert: #FFFFFF;
  --text-on-brand: #08320F;

  /* Status */
  --success: #00B95B;
  --warning: #F5A623;
  --danger: #E5484D;
  --info: #2F6BFF;

  /* Availability */
  --slot-free: #00B95B;
  --slot-busy: #F5A623;
  --slot-maint: #C6CBC8;

  /* Borders */
  --border: #E6EAE8;
  --border-strong: #D5DBD8;

  /* Font */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 11px;
  --fs-sm: 13px;
  --fs-md: 15px;
  --fs-lg: 17px;
  --fs-xl: 20px;
  --fs-2xl: 24px;
  --fs-3xl: 30px;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extra: 800;

  /* Spacing scale (4pt) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;

  /* Radius */
  --r-chip: 999px;
  --r-btn: 16px;
  --r-card: 20px;
  --r-card-lg: 24px;
  --r-sheet: 28px;

  /* Shadow */
  --shadow-sm: 0 2px 8px rgba(20, 30, 25, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 30, 25, 0.10);
  --shadow-lg: 0 16px 40px rgba(20, 30, 25, 0.16);
  --shadow-brand: 0 10px 28px rgba(0, 185, 91, 0.28);

  /* Transition */
  --t-fast: 140ms ease;
  --t-base: 240ms cubic-bezier(0.22, 1, 0.36, 1);
  --t-slow: 420ms cubic-bezier(0.22, 1, 0.36, 1);

  /* Z-index */
  --z-nav: 40;
  --z-overlay: 60;
  --z-sheet: 70;
  --z-toast: 90;

  /* Layout */
  --nav-h: 76px;
  --status-h: 44px;
}

/* ---------- 2. Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--text-main);
  background: #0e0f0e;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }
img, svg { display: block; }
ul { list-style: none; }

/* ---------- 3. Device frame ---------- */
.device {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(82,240,79,0.10), transparent 60%),
    #0e0f0e;
}
.phone {
  position: relative;
  width: 390px;
  max-width: 100vw;
  height: 844px;
  max-height: 100dvh;
  background: var(--bg-light);
  border-radius: 46px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 10px #050605, 0 0 0 12px #24272510;
  display: flex;
  flex-direction: column;
}
@media (max-width: 430px) {
  .device { padding: 0; }
  .phone { border-radius: 0; box-shadow: none; height: 100dvh; }
}

/* ---------- 4. Status bar ---------- */
.statusbar {
  height: var(--status-h);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-6);
  padding-top: env(safe-area-inset-top);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-main);
  z-index: 5;
}
.statusbar--dark { color: var(--text-invert); }
.statusbar__icons { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- 5. Screen ---------- */
.screen {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }

.screen--dark { background: var(--bg-dark); }
.page {
  padding: var(--sp-4) var(--sp-5);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--sp-5));
  animation: screenIn var(--t-base);
}
@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 6. Typography helpers ---------- */
.h1 { font-size: var(--fs-2xl); font-weight: var(--fw-extra); letter-spacing: -0.5px; }
.h2 { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.muted { color: var(--text-sub); }
.small { font-size: var(--fs-sm); }

/* ---------- 7. Section header ---------- */
.section {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: var(--sp-6) 0 var(--sp-3);
}
.section__title { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.section__link {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--brand-deep);
}

/* ---------- 8. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 52px;
  padding: 0 var(--sp-6);
  border-radius: var(--r-btn);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  transition: transform var(--t-fast), box-shadow var(--t-base), opacity var(--t-fast);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--brand-gradient); color: var(--text-on-brand); box-shadow: var(--shadow-brand); }
.btn--dark { background: var(--bg-dark); color: var(--text-invert); }
.btn--ghost { background: var(--bg-light); color: var(--text-main); }
.btn--outline { background: transparent; border: 1.5px solid var(--border-strong); color: var(--text-main); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--block { width: 100%; }
.btn--sm { height: 40px; font-size: var(--fs-sm); padding: 0 var(--sp-4); border-radius: 12px; }

/* ---------- 9. Icon button ---------- */
.iconbtn {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--bg-white);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast), background var(--t-fast);
  position: relative;
}
.iconbtn:active { transform: scale(0.92); }
.iconbtn--ghost { background: rgba(255,255,255,0.08); color: var(--text-invert); box-shadow: none; }
.iconbtn .dot {
  position: absolute; top: 9px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--bg-white);
}

/* ---------- 10. App header ---------- */
.appbar {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.appbar__title { flex: 1; font-size: var(--fs-xl); font-weight: var(--fw-extra); }
.avatar {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-on-brand); font-weight: var(--fw-bold); font-size: var(--fs-md);
  flex: 0 0 auto;
}
.avatar--lg { width: 84px; height: 84px; border-radius: 26px; font-size: var(--fs-2xl); }
.hello { flex: 1; min-width: 0; }
.hello__sub { font-size: var(--fs-sm); color: var(--text-sub); }
.hello__name { font-size: var(--fs-lg); font-weight: var(--fw-bold); }

/* ---------- 11. Search box ---------- */
.search {
  display: flex; align-items: center; gap: var(--sp-2);
  height: 50px; padding: 0 var(--sp-4);
  background: var(--bg-white);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  color: var(--text-sub);
}
.search svg { flex: 0 0 auto; }
.search input {
  flex: 1; border: none; outline: none; background: none;
  font-size: var(--fs-md); color: var(--text-main);
}
.search input::placeholder { color: var(--text-sub); }

/* ---------- 12. Card ---------- */
.card {
  background: var(--bg-white);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-4);
}

/* ---------- 13. Membership card ---------- */
.member {
  position: relative;
  border-radius: var(--r-card-lg);
  padding: var(--sp-5);
  color: var(--text-invert);
  background:
    radial-gradient(120px 120px at 88% 12%, rgba(82,240,79,0.35), transparent 60%),
    linear-gradient(135deg, #1f2a24, #0f1512);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.member__row { display: flex; align-items: center; justify-content: space-between; }
.member__tier {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm); font-weight: var(--fw-bold);
  background: rgba(82,240,79,0.16); color: var(--brand);
  padding: 5px 12px; border-radius: var(--r-chip);
}
.member__points { font-size: var(--fs-3xl); font-weight: var(--fw-extra); margin-top: var(--sp-3); }
.member__points span { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: rgba(255,255,255,0.7); }
.member__hint { font-size: var(--fs-xs); color: rgba(255,255,255,0.7); margin: var(--sp-3) 0 var(--sp-2); }

/* ---------- 14. Progress bar ---------- */
.progress {
  height: 8px; border-radius: 999px;
  background: rgba(255,255,255,0.15); overflow: hidden;
}
.progress--light { background: var(--border); }
.progress__fill {
  height: 100%; border-radius: 999px;
  background: var(--brand-gradient);
  transition: width var(--t-slow);
}

/* ---------- 15. Service tiles ---------- */
.services { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-4); }
.service {
  text-align: left;
  border-radius: var(--r-card);
  padding: var(--sp-4);
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast);
}
.service:active { transform: scale(0.97); }
.service__ic {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-3);
}
.service__ic--coffee { background: var(--brand-soft); color: var(--brand-deep); }
.service__ic--charge { background: rgba(47,107,255,0.12); color: var(--info); }
.service__t { font-size: var(--fs-md); font-weight: var(--fw-bold); }
.service__d { font-size: var(--fs-xs); color: var(--text-sub); margin-top: 2px; }

/* ---------- 16. Station card ---------- */
.station {
  background: var(--bg-white);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
}
.station__head { display: flex; align-items: flex-start; gap: var(--sp-3); }
.station__logo {
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--brand-soft); color: var(--brand-deep);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.station__name { font-size: var(--fs-md); font-weight: var(--fw-bold); }
.station__addr { font-size: var(--fs-sm); color: var(--text-sub); margin-top: 2px; }
.station__meta { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--text-sub); }
.station__meta b { color: var(--text-main); font-weight: var(--fw-semibold); }

.slots { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.slot {
  flex: 1; text-align: center; padding: var(--sp-2) 0;
  border-radius: 12px; font-size: var(--fs-xs); font-weight: var(--fw-semibold);
}
.slot b { display: block; font-size: var(--fs-lg); font-weight: var(--fw-extra); line-height: 1.1; }
.slot--free { background: rgba(0,185,91,0.10); color: var(--slot-free); }
.slot--busy { background: rgba(245,166,35,0.12); color: #B9791A; }
.slot--maint { background: #F0F2F1; color: #8A928E; }

.station__actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.station__actions .btn { flex: 1; }

/* ---------- 17. Badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  padding: 3px 9px; border-radius: var(--r-chip);
}
.badge--open { background: rgba(0,185,91,0.12); color: var(--success); }
.badge--closed { background: #F0F2F1; color: var(--text-sub); }
.badge--fast { background: rgba(82,240,79,0.16); color: var(--brand-deep); }

/* ---------- 18. Chips ---------- */
.chips { display: flex; gap: var(--sp-2); overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  height: 38px; padding: 0 var(--sp-4);
  border-radius: var(--r-chip);
  background: var(--bg-white);
  color: var(--text-sub);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-sm);
  transition: all var(--t-fast);
}
.chip--active { background: var(--bg-dark); color: var(--text-invert); }

/* ---------- 19. Segmented control ---------- */
.segment {
  display: flex; gap: 4px; padding: 4px;
  background: var(--bg-white); border-radius: 14px;
  box-shadow: var(--shadow-sm); margin-top: var(--sp-3);
}
.segment button {
  flex: 1; height: 40px; border-radius: 11px;
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  color: var(--text-sub); transition: all var(--t-fast);
}
.segment button.is-on { background: var(--brand-gradient); color: var(--text-on-brand); }

/* ---------- 20. Product cards ---------- */
.hscroll {
  display: flex; gap: var(--sp-3);
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; margin: 0 calc(-1 * var(--sp-5)); padding: 0 var(--sp-5) var(--sp-1);
}
.hscroll::-webkit-scrollbar { display: none; }

.prod-h {
  flex: 0 0 160px; scroll-snap-align: start;
  background: var(--bg-white); border-radius: var(--r-card);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.prod-h__img {
  height: 108px; display: flex; align-items: center; justify-content: center;
  font-size: 48px; background: var(--bg-light);
}
.prod-h__body { padding: var(--sp-3); }
.prod-h__name { font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.prod-h__row { display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-2); }
.prod-h__price { font-size: var(--fs-md); font-weight: var(--fw-extra); color: var(--brand-deep); }

/* Vertical product list (Coffee) */
.prod {
  display: flex; gap: var(--sp-3);
  background: var(--bg-white); border-radius: var(--r-card);
  box-shadow: var(--shadow-sm); padding: var(--sp-3); margin-bottom: var(--sp-3);
}
.prod__img {
  width: 88px; height: 88px; border-radius: 16px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; background: var(--bg-light);
}
.prod__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.prod__name { font-size: var(--fs-md); font-weight: var(--fw-bold); }
.prod__desc { font-size: var(--fs-xs); color: var(--text-sub); margin-top: 2px; }
.prod__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: var(--sp-2); }
.prod__price { font-size: var(--fs-md); font-weight: var(--fw-extra); color: var(--brand-deep); }

.rating { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: #B9791A; }
.rating svg { color: var(--warning); }

.addbtn {
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--brand-gradient); color: var(--text-on-brand);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); transition: transform var(--t-fast);
}
.addbtn:active { transform: scale(0.88); }

/* ---------- 21. Banner ---------- */
.banner {
  border-radius: var(--r-card-lg);
  padding: var(--sp-5);
  color: var(--text-invert);
  background:
    radial-gradient(140px 140px at 90% 10%, rgba(82,240,79,0.4), transparent 60%),
    linear-gradient(135deg, #123, #0c1a12);
  margin-top: var(--sp-4);
  position: relative; overflow: hidden;
}
.banner__tag { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--brand); letter-spacing: .5px; }
.banner__t { font-size: var(--fs-xl); font-weight: var(--fw-extra); margin-top: 6px; line-height: 1.2; }
.banner__d { font-size: var(--fs-sm); color: rgba(255,255,255,0.75); margin-top: 6px; }

/* ---------- 22. Voucher ---------- */
.voucher {
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--bg-white); border-radius: var(--r-card);
  box-shadow: var(--shadow-sm); padding: var(--sp-3);
  margin-bottom: var(--sp-3); text-align: left; width: 100%;
  position: relative; transition: all var(--t-fast);
  border: 1.5px solid transparent;
}
.voucher:active { transform: scale(0.99); }
.voucher.is-selected { border-color: var(--brand-deep); background: var(--brand-soft); }
.voucher__ic {
  width: 52px; height: 52px; border-radius: 14px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.voucher__ic--coffee { background: var(--brand-soft); color: var(--brand-deep); }
.voucher__ic--charge { background: rgba(47,107,255,0.12); color: var(--info); }
.voucher__t { font-size: var(--fs-md); font-weight: var(--fw-bold); }
.voucher__d { font-size: var(--fs-xs); color: var(--text-sub); margin-top: 2px; }
.voucher__pick {
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  color: var(--brand-deep); flex: 0 0 auto;
}

/* ---------- 23. Mini cart (Coffee) ---------- */
.minicart {
  position: absolute; left: var(--sp-5); right: var(--sp-5);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--sp-3));
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--bg-dark); color: var(--text-invert);
  border-radius: 18px; padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-lg); z-index: 30;
  transform: translateY(120%); opacity: 0;
  transition: transform var(--t-base), opacity var(--t-base);
}
.minicart.is-on { transform: translateY(0); opacity: 1; }
.minicart__count {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  background: var(--brand-gradient); color: var(--text-on-brand);
  display: flex; align-items: center; justify-content: center; font-weight: var(--fw-extra);
}
.minicart__info { flex: 1; }
.minicart__label { font-size: var(--fs-xs); color: rgba(255,255,255,0.6); }
.minicart__total { font-size: var(--fs-md); font-weight: var(--fw-bold); }

/* ---------- 24. Map (Stations) ---------- */
.map {
  position: relative; height: 260px; border-radius: var(--r-card-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); margin-top: var(--sp-3);
  background:
    linear-gradient(0deg, rgba(0,0,0,0.04), rgba(0,0,0,0.04)),
    repeating-linear-gradient(0deg, #E9EDEB 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, #E9EDEB 0 1px, transparent 1px 44px),
    #EEF3F0;
}
.map__road {
  position: absolute; background: #DDE4E0; border-radius: 8px;
}
.map__road--h { left: 0; right: 0; height: 18px; }
.map__road--v { top: 0; bottom: 0; width: 18px; }
.marker {
  position: absolute; transform: translate(-50%, -100%);
  display: flex; flex-direction: column; align-items: center;
  transition: transform var(--t-fast);
}
.marker:active { transform: translate(-50%, -100%) scale(0.9); }
.marker__pin {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 2px;
  transform: rotate(45deg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); border: 2px solid #fff;
}
.marker__pin svg { transform: rotate(-45deg); }
.marker--free .marker__pin { background: var(--slot-free); color: #fff; }
.marker--busy .marker__pin { background: var(--slot-busy); color: #fff; }
.marker__label {
  margin-top: 6px; font-size: 10px; font-weight: var(--fw-bold);
  background: #fff; color: var(--text-main);
  padding: 2px 7px; border-radius: 999px; box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.map__legend {
  position: absolute; left: 12px; bottom: 12px;
  display: flex; gap: 10px; background: rgba(255,255,255,0.92);
  padding: 6px 10px; border-radius: 12px; box-shadow: var(--shadow-sm);
  font-size: 10px; font-weight: var(--fw-semibold); color: var(--text-sub);
}
.map__legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; vertical-align: middle; }

/* ---------- 25. Account ---------- */
.profile-hero {
  border-radius: var(--r-card-lg); padding: var(--sp-5);
  color: var(--text-invert);
  background:
    radial-gradient(160px 160px at 85% 0%, rgba(82,240,79,0.3), transparent 60%),
    linear-gradient(135deg, #1f2a24, #0f1512);
  box-shadow: var(--shadow-md);
}
.profile-hero__row { display: flex; align-items: center; gap: var(--sp-4); }
.profile-hero__name { font-size: var(--fs-xl); font-weight: var(--fw-extra); }
.profile-hero__phone { font-size: var(--fs-sm); color: rgba(255,255,255,0.72); margin-top: 2px; }
.profile-hero__tier {
  display: inline-flex; align-items: center; gap: 5px; margin-top: var(--sp-2);
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  background: rgba(82,240,79,0.16); color: var(--brand);
  padding: 4px 10px; border-radius: var(--r-chip);
}
.wallet { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-4); }
.wallet__box {
  background: rgba(255,255,255,0.08); border-radius: 16px; padding: var(--sp-3) var(--sp-4);
}
.wallet__label { font-size: var(--fs-xs); color: rgba(255,255,255,0.6); }
.wallet__val { font-size: var(--fs-lg); font-weight: var(--fw-extra); margin-top: 2px; }

.menu-group {
  background: var(--bg-white); border-radius: var(--r-card);
  box-shadow: var(--shadow-sm); overflow: hidden; margin-top: var(--sp-4);
}
.menu-item {
  display: flex; align-items: center; gap: var(--sp-3);
  width: 100%; padding: var(--sp-4); text-align: left;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--bg-light); }
.menu-item__ic {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  background: var(--bg-light); color: var(--brand-deep);
  display: flex; align-items: center; justify-content: center;
}
.menu-item__t { flex: 1; font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.menu-item--danger .menu-item__ic { background: rgba(229,72,77,0.10); color: var(--danger); }
.menu-item--danger .menu-item__t { color: var(--danger); }

/* ---------- 26. Switch ---------- */
.switch { position: relative; width: 46px; height: 28px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch__track {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--border-strong); transition: background var(--t-base);
}
.switch__thumb {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm);
  transition: transform var(--t-base);
}
.switch input:checked ~ .switch__track { background: var(--brand-deep); }
.switch input:checked ~ .switch__thumb { transform: translateX(18px); }

/* ---------- 27. Bottom navigation ---------- */
.bottomnav {
  flex: 0 0 auto;
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  z-index: var(--z-nav);
}
.bottomnav[hidden] { display: none; }
.navtab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--text-sub); font-size: 11px; font-weight: var(--fw-semibold);
  transition: color var(--t-fast);
}
.navtab__ic { transition: transform var(--t-base); }
.navtab.is-active { color: var(--brand-deep); }
.navtab.is-active .navtab__ic { transform: translateY(-2px); }

/* ---------- 28. Overlay / modal / sheet ---------- */
.overlay {
  position: absolute; inset: 0; z-index: var(--z-overlay);
  background: rgba(10,14,12,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn var(--t-base);
}
.overlay[hidden] { display: none; }
.overlay.is-center { align-items: center; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%; background: var(--bg-white);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: var(--sp-3) var(--sp-5) calc(var(--sp-6) + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg);
  animation: sheetUp var(--t-base);
  max-height: 82%; overflow-y: auto; scrollbar-width: none;
}
.sheet::-webkit-scrollbar { display: none; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet__grip { width: 44px; height: 5px; border-radius: 999px; background: var(--border-strong); margin: 4px auto var(--sp-4); }
.sheet__title { font-size: var(--fs-lg); font-weight: var(--fw-bold); margin-bottom: var(--sp-1); }
.sheet__body { font-size: var(--fs-md); color: var(--text-sub); }

.modal {
  width: calc(100% - 48px); max-width: 340px;
  background: var(--bg-white); border-radius: var(--r-card-lg);
  padding: var(--sp-6); box-shadow: var(--shadow-lg);
  text-align: center; animation: popIn var(--t-base);
}
@keyframes popIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal__ic {
  width: 60px; height: 60px; border-radius: 20px; margin: 0 auto var(--sp-4);
  display: flex; align-items: center; justify-content: center;
  background: rgba(229,72,77,0.10); color: var(--danger);
}
.modal__title { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.modal__text { font-size: var(--fs-sm); color: var(--text-sub); margin-top: var(--sp-2); }
.modal__actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); }
.modal__actions .btn { flex: 1; }

/* Notifications list inside sheet */
.notif { display: flex; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.notif:last-child { border-bottom: none; }
.notif__ic {
  width: 42px; height: 42px; border-radius: 13px; flex: 0 0 auto;
  background: var(--brand-soft); color: var(--brand-deep);
  display: flex; align-items: center; justify-content: center;
}
.notif__t { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text-main); }
.notif__d { font-size: var(--fs-xs); color: var(--text-sub); margin-top: 2px; }
.notif__time { font-size: 10px; color: var(--text-sub); margin-top: 4px; }

/* Station detail rows in sheet */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); margin: var(--sp-4) 0; }
.detail-cell { background: var(--bg-light); border-radius: 14px; padding: var(--sp-3); }
.detail-cell__l { font-size: var(--fs-xs); color: var(--text-sub); }
.detail-cell__v { font-size: var(--fs-md); font-weight: var(--fw-bold); margin-top: 2px; }

/* ---------- 29. Empty state ---------- */
.empty { text-align: center; padding: var(--sp-8) var(--sp-5); color: var(--text-sub); }
.empty__ic {
  width: 72px; height: 72px; border-radius: 24px; margin: 0 auto var(--sp-4);
  background: var(--bg-white); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center; color: var(--border-strong);
}
.empty__t { font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--text-main); }
.empty__d { font-size: var(--fs-sm); margin-top: 4px; }

/* ---------- 30. Toast ---------- */
.toast-wrap {
  position: absolute; left: 0; right: 0;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 90px);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  z-index: var(--z-toast); pointer-events: none;
}
.toast {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: var(--bg-dark); color: var(--text-invert);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: toastIn var(--t-base);
  max-width: 300px;
}
.toast svg { color: var(--brand); flex: 0 0 auto; }
.toast.out { animation: toastOut var(--t-base) forwards; }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateY(20px); opacity: 0; } }

/* ---------- 31. Splash ---------- */
.splash {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: var(--sp-8) var(--sp-6) calc(var(--sp-8) + env(safe-area-inset-bottom));
  color: var(--text-invert);
  background:
    radial-gradient(500px 320px at 50% 24%, rgba(82,240,79,0.22), transparent 60%),
    linear-gradient(180deg, #10231a, #0c110e 70%);
}
.splash__logo { animation: floatIn var(--t-slow); }
.splash__logo img { width: 128px; height: 128px; filter: drop-shadow(0 12px 30px rgba(82,240,79,0.35)); }
.splash__name {
  font-size: var(--fs-3xl); font-weight: var(--fw-extra); letter-spacing: 1px;
  margin-top: var(--sp-5); animation: floatIn var(--t-slow) 60ms both;
}
.splash__name b { color: var(--brand); }
.splash__slogan {
  font-size: var(--fs-md); color: rgba(255,255,255,0.72); margin-top: var(--sp-3);
  max-width: 260px; line-height: 1.5; animation: floatIn var(--t-slow) 120ms both;
}
.splash__spacer { flex: 1; }
.splash__cta { width: 100%; animation: floatIn var(--t-slow) 200ms both; }
.splash__hint { font-size: var(--fs-xs); color: rgba(255,255,255,0.5); margin-top: var(--sp-4); }
@keyframes floatIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* Section spacing helper */
.stack > * + * { margin-top: var(--sp-3); }

/* ============================================================
   STEP 2 — Detail screen components (additive)
   ============================================================ */

/* Sub-screen page: room for sticky footer bar */
.page--sub { padding-bottom: var(--sp-5); }

/* Sticky footer action bar */
.footerbar {
  position: sticky; bottom: 0;
  margin: var(--sp-5) calc(-1 * var(--sp-5)) 0;
  padding: var(--sp-3) var(--sp-5) calc(var(--sp-4) + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: var(--sp-3);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  z-index: 20;
}
.footerbar__info { flex: 0 0 auto; }
.footerbar__label { font-size: var(--fs-xs); color: var(--text-sub); }
.footerbar__total { font-size: var(--fs-lg); font-weight: var(--fw-extra); color: var(--text-main); }
.footerbar .btn { flex: 1; }

/* Stepper */
.stepper {
  display: inline-flex; align-items: center; gap: var(--sp-2); flex: 0 0 auto;
  background: var(--bg-light); border-radius: 14px; padding: 4px;
}
.stepper__btn {
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-white); color: var(--text-main); box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast);
}
.stepper__btn:active { transform: scale(0.9); }
.stepper__val { min-width: 28px; text-align: center; font-weight: var(--fw-bold); font-size: var(--fs-md); }
.stepper--lg { display: flex; justify-content: space-between; width: 160px; padding: 6px; }
.stepper--lg .stepper__btn { width: 40px; height: 40px; }
.stepper--lg .stepper__val { font-size: var(--fs-lg); }

/* Cart item */
.cart-item {
  display: flex; gap: var(--sp-3); align-items: center;
  background: var(--bg-white); border-radius: var(--r-card);
  box-shadow: var(--shadow-sm); padding: var(--sp-3); margin-bottom: var(--sp-3);
}
.cart-item__img {
  width: 64px; height: 64px; border-radius: 16px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; background: var(--bg-light);
}
.cart-item__del {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 6px;
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--danger);
}

/* Selectable option row (payment, connector, size, vehicle) */
.opt {
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--bg-white); border-radius: 16px; padding: var(--sp-4);
  box-shadow: var(--shadow-sm); border: 1.5px solid transparent; width: 100%;
  text-align: left; transition: border-color var(--t-fast), background var(--t-fast);
}
.opt.is-on { border-color: var(--brand-deep); background: var(--brand-soft); }
.opt__t { display: block; font-size: var(--fs-md); font-weight: var(--fw-bold); }
.opt__d { display: block; font-size: var(--fs-xs); color: var(--text-sub); margin-top: 2px; }
.opt__radio {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--border-strong); transition: all var(--t-fast); position: relative;
}
.opt.is-on .opt__radio { border-color: var(--brand-deep); background: var(--brand-deep); }
.opt.is-on .opt__radio::after {
  content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff;
}

/* Pill grid (dates, time slots) */
.pillgrid { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.pill {
  flex: 0 0 auto; min-width: 62px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 14px; border-radius: 14px;
  background: var(--bg-white); box-shadow: var(--shadow-sm);
  color: var(--text-sub); font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  transition: all var(--t-fast);
}
.pill b { color: var(--text-main); font-weight: var(--fw-bold); }
.pill span { font-size: var(--fs-xs); }
.pill--slot { min-width: 0; }
.pill.is-on { background: var(--brand-gradient); color: var(--text-on-brand); }
.pill.is-on b { color: var(--text-on-brand); }

/* Summary block */
.summary { background: var(--bg-white); border-radius: var(--r-card); box-shadow: var(--shadow-sm); padding: var(--sp-4); }
.summary__row {
  display: flex; justify-content: space-between; gap: var(--sp-4);
  font-size: var(--fs-sm); color: var(--text-sub); padding: 6px 0;
}
.summary__row span:last-child { color: var(--text-main); font-weight: var(--fw-semibold); }
.summary__row--total {
  border-top: 1px solid var(--border); margin-top: 6px; padding-top: var(--sp-3);
  font-size: var(--fs-md);
}
.summary__row--total span { color: var(--text-main); font-weight: var(--fw-extra); }
.summary__row--total span:last-child { color: var(--brand-deep); }

/* Product detail hero */
.detail-hero {
  height: 220px; border-radius: var(--r-card-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 96px; background: var(--bg-white); box-shadow: var(--shadow-sm);
}

/* Amenities */
.amenities { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.amenity {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-white); box-shadow: var(--shadow-sm);
  padding: 8px 12px; border-radius: var(--r-chip);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-main);
}
.amenity svg { color: var(--brand-deep); }

/* Charging session — battery ring */
.ring-wrap { position: relative; width: 220px; height: 220px; margin: var(--sp-6) auto var(--sp-4); }
.ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.ring-pct { font-size: var(--fs-3xl); font-weight: var(--fw-extra); color: var(--text-main); line-height: 1; }
.ring-status { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--brand-deep); margin-top: 6px; }

/* Charging session — stat grid */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.stat { background: var(--bg-white); border-radius: 16px; box-shadow: var(--shadow-sm); padding: var(--sp-4); }
.stat__l { font-size: var(--fs-xs); color: var(--text-sub); }
.stat__v { font-size: var(--fs-lg); font-weight: var(--fw-extra); margin-top: 4px; }
