:root {
  --canvas: #D2D6CF;
  --bg: #E4E7E0;
  /* Authentic Vivid Ambient Pastel Mesh Gradient */
  --ambient-mesh: 
    radial-gradient(ellipse 75% 60% at 6% 12%, rgba(140, 222, 178, 0.96) 0%, transparent 68%),
    radial-gradient(ellipse 75% 65% at 94% 15%, rgba(255, 214, 162, 0.96) 0%, transparent 66%),
    radial-gradient(ellipse 80% 70% at 88% 58%, rgba(154, 220, 240, 0.88) 0%, transparent 68%),
    radial-gradient(ellipse 75% 60% at 10% 72%, rgba(172, 228, 198, 0.92) 0%, transparent 68%),
    radial-gradient(ellipse 72% 55% at 72% 90%, rgba(255, 218, 190, 0.94) 0%, transparent 66%),
    linear-gradient(135deg, #E6EBE3 0%, #ECEFE8 100%);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #FFFFFF;
  --surface-2: rgba(230, 232, 226, 0.72);
  --ink: #141514;
  --ink-2: #262927;
  --muted: #848885;
  --muted-2: #B3B6B3;
  --line: rgba(255, 255, 255, 0.70);
  --green: #26C281;
  --green-soft: rgba(38, 194, 129, 0.16);
  --coral: #EA5455;
  --coral-soft: rgba(234, 84, 85, 0.14);
  --amber: #F59E0B;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --card-dark-1: #2B3B30;
  --card-dark-2: #171A18;
  --card-dark-3: #111312;
  --card-peek: #2D4635;
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-soft: 0 4px 20px rgba(20, 21, 20, 0.035);
  --shadow-float: 0 12px 32px rgba(20, 21, 20, 0.09);
  --shadow-glass: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* iOS Blur & Glass Tokens */
  --ios-blur-nav: blur(24px) saturate(190%);
  --ios-blur-sheet: blur(30px) saturate(200%);
  --ios-blur-card: blur(20px) saturate(185%);
  --ios-blur-toast: blur(24px) saturate(180%);
  --ios-glass-bg: rgba(255, 255, 255, 0.72);
  --ios-glass-border: rgba(255, 255, 255, 0.75);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior-y: none;
}
body {
  font-family: var(--font);
  background-color: #E6ECE4;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: -0.01em;
  min-height: 100vh;
  position: relative;
}
button, a, input, select, textarea, .seg-tab, .chip, .card, .qa-card, .btn {
  touch-action: manipulation;
}

/* Fixed ambient background layer — permanently visible on all iOS/Android/desktop devices */
.ambient-mesh-bg,
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: var(--ambient-mesh);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
h1, h2, h3, p { margin: 0; }

/* Desktop phone-frame presentation (full-bleed on mobile) */
@media (min-width: 520px) {
  body {
    padding: 24px 16px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  .phone-shell {
    max-width: 416px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.28) !important;
    border-radius: 46px;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    box-shadow: 
      0 28px 70px rgba(18, 30, 24, 0.16),
      0 0 0 9px rgba(255, 255, 255, 0.55),
      0 0 0 10px rgba(255, 255, 255, 0.25);
    min-height: calc(100vh - 48px);
    position: relative;
  }
}

.phone-shell {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  background: transparent;
  padding: 20px 20px 120px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}

/* ---------- Generic primitives ---------- */
.center-screen { min-height: 100vh; display: grid; place-items: center; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--surface-2); border-top-color: var(--ink);
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.surface {
  background: var(--surface);
  backdrop-filter: var(--ios-blur-card);
  -webkit-backdrop-filter: var(--ios-blur-card);
  border: 1px solid var(--ios-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  padding: 18px;
}
.muted { color: var(--muted); }
.pos { color: var(--green) !important; }
.neg { color: var(--coral) !important; }

.error {
  color: var(--coral);
  background: var(--coral-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(234, 84, 85, 0.2);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  transition: transform 0.1s ease, opacity 0.2s, background 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-outline { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: var(--coral-soft); color: var(--coral); }
.btn-sm { padding: 8px 13px; font-size: 12px; border-radius: 10px; }
.btn-block { width: 100%; }

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
}
input, textarea, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: #FAF9F6;
  color: var(--ink);
  font-size: 16px; /* 16px prevents iOS Safari from automatically zooming in */
  font-weight: 600;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); font-weight: 500; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); background: #fff; }
textarea { resize: vertical; min-height: 76px; }

/* ---------- Top Header Bar (Home & Inner screens) ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 0;
  margin: -20px -20px 0;
  padding-left: 20px;
  padding-right: 20px;
  background: rgba(230, 234, 228, 0.72);
  backdrop-filter: var(--ios-blur-nav);
  -webkit-backdrop-filter: var(--ios-blur-nav);
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}
.login-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}
.user-row {
  display: flex;
  align-items: center;
  gap: 11px;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #DCDEDB;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.greeting-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.2;
}
.greeting-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid var(--ios-glass-border);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(20, 21, 20, 0.05);
  position: relative;
  flex-shrink: 0;
  transition: transform 0.12s ease, background 0.15s ease;
}
.circle-btn:active { transform: scale(0.94); }
.circle-btn .notif-dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  border: 1.5px solid var(--surface);
}
.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid var(--ios-glass-border);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}

/* ---------- Hero Account / Room Stat Block (Left screen in reference) ---------- */
.hero-stat {
  padding: 6px 2px 2px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.hero-badge {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green);
  display: inline-grid;
  place-items: center;
}
.hero-value-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 6px;
}
.hero-value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.05;
}
.hero-value .muted-dec {
  font-size: 23px;
  font-weight: 700;
  color: var(--muted-2);
}
.eye-pill {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
}
.hero-updated {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- Section Headers ---------- */
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 0;
}
.sec-head span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.sec-head button, .sec-head b {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  padding: 2px 0;
}

/* ---------- Promotion Banners (Special Offers & Events) ---------- */
.promo-carousel-container {
  position: relative;
  width: 100%;
}
.promo-card {
  position: relative;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(185%);
  -webkit-backdrop-filter: blur(20px) saturate(185%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 0 rgba(255, 255, 255, 0.95) inset;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  cursor: pointer;
  overflow: hidden;
}
.promo-card:active {
  transform: scale(0.985);
}
.promo-card-amber {
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.85) 0%, rgba(255, 255, 255, 0.72) 100%);
  border-color: rgba(251, 146, 60, 0.35);
}
.promo-card-coral {
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.85) 0%, rgba(255, 255, 255, 0.72) 100%);
  border-color: rgba(248, 113, 113, 0.35);
}
.promo-card-green {
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.85) 0%, rgba(255, 255, 255, 0.72) 100%);
  border-color: rgba(74, 222, 128, 0.35);
}
.promo-card-blue {
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.85) 0%, rgba(255, 255, 255, 0.72) 100%);
  border-color: rgba(96, 165, 250, 0.35);
}

.promo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.promo-badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}
.promo-badge-amber { background: rgba(245, 158, 11, 0.18); color: #B45309; border: 1px solid rgba(245, 158, 11, 0.35); }
.promo-badge-coral { background: rgba(239, 68, 68, 0.18); color: #B91C1C; border: 1px solid rgba(239, 68, 68, 0.35); }
.promo-badge-green { background: rgba(34, 197, 94, 0.18); color: #15803D; border: 1px solid rgba(34, 197, 94, 0.35); }
.promo-badge-blue  { background: rgba(14, 165, 233, 0.18); color: #0369A1; border: 1px solid rgba(14, 165, 233, 0.35); }

.promo-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}
.promo-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}
.promo-subtitle {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.4;
  opacity: 0.92;
}
.promo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.promo-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.promo-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}
.promo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.22);
  transition: all 0.25s ease;
  cursor: pointer;
}
.promo-dot.active {
  width: 18px;
  border-radius: 999px;
  background: var(--ink);
}

/* Pure Image Promotion Banner (Home Screen) */
.promo-banner-pure {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  background: var(--surface-2);
  border: none;
  outline: none;
}
.promo-banner-pure:active {
  transform: scale(0.985);
}
.promo-pure-img {
  width: 100%;
  height: 156px;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}
.promo-pure-fallback {
  padding: 16px 18px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.promo-fallback-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.promo-fallback-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}
.promo-fallback-sub {
  font-size: 12.5px;
  color: var(--ink-2);
}

/* Dedicated Promotion Detail Page */
.promo-page-view {
  width: 100%;
}
.promo-page-hero {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(18, 30, 24, 0.12);
  background: var(--surface-2);
}
.promo-page-hero-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.promo-hero-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.promo-page-hero-fallback {
  padding: 32px 20px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Detail Sheet Styles */
.promo-detail-hero-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  background: var(--surface-2);
}
.promo-detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.promo-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

/* Home Screen 1-Tap Call Card */
.home-call-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--ios-blur);
  -webkit-backdrop-filter: var(--ios-blur);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  margin-top: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease;
}
.home-call-banner:active {
  transform: scale(0.985);
}
.home-call-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.14);
  color: #15803D;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-call-cta {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  background: #15803D;
  color: #FFFFFF;
  text-decoration: none;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.25);
}
.promo-toggle-link {
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-weight: 600;
}
.promo-toggle-link:hover {
  color: var(--ink);
}

/* ---------- Quick Actions 2x2 Grid (Left screen in reference) ---------- */
.qa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.qa-card {
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: var(--ios-blur-card);
  -webkit-backdrop-filter: var(--ios-blur-card);
  border: 1px solid var(--ios-glass-border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 124px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.035), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.qa-card:active { transform: scale(0.98); }
.qa-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--ink);
  margin-bottom: 14px;
}
.qa-card b {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.qa-card small {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}

/* ---------- Quick Action Helper Tiles Row ---------- */
.card-actions-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.card-act {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.1s ease;
}
.card-act:active { transform: scale(0.97); }
.card-act-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--ink);
}
.card-act span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- Progress Card with Green Bar + Ticks (Spent this month style) ---------- */
.limit-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.limit-top, .limit-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.limit-top span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.limit-top b {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.limit-top b small {
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
}
.limit-track {
  height: 12px;
  border-radius: 4px;
  display: flex;
  align-items: stretch;
  gap: 4px;
  overflow: hidden;
}
.limit-fill {
  background: var(--green);
  border-radius: 3px;
  height: 100%;
  min-width: 10%;
  transition: width 0.3s ease;
}
.limit-ticks {
  flex: 1;
  background-image: repeating-linear-gradient(
    to right,
    #DCDEDB 0px,
    #DCDEDB 2px,
    transparent 2px,
    transparent 6px
  );
}
.limit-foot small {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- Transaction / Activity List ---------- */
.tx-list {
  padding: 6px 16px;
  display: flex;
  flex-direction: column;
}
.tx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  width: 100%;
}
.tx-row:last-child { border-bottom: 0; }
.tx-btn:active { opacity: 0.75; }
.tx-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 14px;
}
.tx-green { background: var(--green-soft); color: var(--green); }
.tx-coral { background: var(--coral-soft); color: var(--coral); }
.tx-neutral { background: #F3F3EF; color: var(--ink); }
.tx-main {
  flex: 1;
  min-width: 0;
}
.tx-main b {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-main small {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}
.tx-right {
  text-align: right;
  flex-shrink: 0;
}
.tx-right b {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.tx-right small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- KOT & Payment Status Badges ---------- */
.badge-kot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #1E293B;
  color: #FFFFFF;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  vertical-align: middle;
}
.badge-paid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(34, 197, 94, 0.15);
  color: #15803D;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  vertical-align: middle;
}
.badge-unpaid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #B45309;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  vertical-align: middle;
}

/* ---------- Restaurant Pickup Notice ---------- */
.pickup-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}
.pickup-notice-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---------- Ready for Pickup Glowing Alert Banner ---------- */
.ready-banner {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.12) 100%);
  border: 1.5px solid #22C55E;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  animation: pulse-ready 2.2s infinite ease-in-out;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.15);
}
@keyframes pulse-ready {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  50% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
}
.ready-banner-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.ready-banner-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #15803D;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}
.ready-banner-desc {
  font-size: 12px;
  color: #166534;
  line-height: 1.35;
}

/* ---------- Cart Sheet Payment Options ---------- */
.pay-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 16px;
}
.pay-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
  border: 1.5px solid var(--line);
  cursor: pointer;
  transition: all 0.15s ease;
}
.pay-option:hover, .pay-option:has(input:checked) {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.pay-option input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}
.pay-option-content {
  flex: 1;
}
.pay-option-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pay-option-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.pay-tag-instant {
  font-size: 10px;
  font-weight: 800;
  background: var(--green-soft);
  color: #15803D;
  padding: 2px 7px;
  border-radius: 4px;
}

/* ---------- Login Segmented Tabs ---------- */
.login-shell { padding-bottom: 36px; }
.login-box { padding: 16px; }
.seg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 3px;
  border-radius: 14px;
  margin-bottom: 16px;
  border: 0.5px solid rgba(0, 0, 0, 0.04);
}
.seg-tab {
  padding: 9px 10px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.seg-tab.active {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08), 0 0.5px 1px rgba(0, 0, 0, 0.04);
}
.field-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
}
.code-input {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-weight: 800;
  text-align: center;
  font-size: 20px;
}
.hint {
  font-size: 12px;
  color: var(--muted);
  margin: -2px 0 14px;
  line-height: 1.45;
}

/* ---------- View container ---------- */
.view {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fade 0.18s ease;
}
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ---------- Dining & Menu ---------- */
.food-thumb {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
  box-shadow: 0 2px 8px rgba(20, 21, 20, 0.08);
}
.food-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}
.food-price {
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  margin-top: 3px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--ios-glass-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--muted);
  box-shadow: 0 4px 16px rgba(20, 21, 20, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.search-box:focus-within {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(20, 21, 20, 0.08);
}
.search-box input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 16px; /* 16px prevents iOS Safari auto-zoom on mobile search */
  font-weight: 500;
  color: var(--ink);
  font-family: inherit;
}
.search-box input::placeholder {
  color: var(--muted-2);
}
.search-box-clear {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 50%;
  background: var(--surface-2);
  line-height: 1;
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--ios-glass-border);
  border-radius: 999px;
  padding: 8px 15px;
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  color: var(--muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}
.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 4px 12px rgba(20, 21, 20, 0.16);
}
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.stepper.has-qty {
  background: rgba(20, 21, 20, 0.06);
  border-radius: 999px;
  padding: 3px 4px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.stepper button, .stepper .step-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: transform 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.15s ease;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.stepper button:active, .stepper .step-btn:active {
  transform: scale(0.88);
}
/* iOS Add Button (Authentic Apple iOS SF Symbol style) */
.stepper button.add, .stepper .step-btn.step-add, .ios-add-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #141615;
  color: #FFFFFF;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(20, 21, 20, 0.22);
  transition: transform 0.14s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.15s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.stepper button.add:active, .stepper .step-btn.step-add:active, .ios-add-btn:active {
  transform: scale(0.86);
  background: #000000;
}
.ios-plus-icon {
  display: block;
  pointer-events: none;
}
.stepper .step-btn.step-dec {
  width: 28px;
  height: 28px;
  background: #FFFFFF;
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.stepper .step-btn.step-dec:active {
  background: var(--surface-2);
}
.stepper.has-qty .step-btn.step-add {
  width: 28px;
  height: 28px;
}
.stepper span, .stepper .step-qty {
  min-width: 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.cart-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 412px;
  bottom: 84px;
  bottom: calc(84px + max(14px, env(safe-area-inset-bottom, 14px)));
  padding: 0 16px;
  z-index: 85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cart-bar .btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-radius: 20px;
  background: rgba(20, 21, 20, 0.90);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
  font-weight: 700;
  font-size: 14px;
}

/* ---------- Floating Pill Bottom Navigation (Reference Design) ---------- */
.floating-nav-wrap {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  bottom: max(14px, env(safe-area-inset-bottom, 14px));
  width: 100%;
  max-width: 412px;
  padding: 0 16px;
  z-index: 90;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.floating-nav {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: var(--ios-blur-nav);
  -webkit-backdrop-filter: var(--ios-blur-nav);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  padding: 6px 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

/* When a bottom sheet / modal is open, smoothly hide the floating nav and cart bar */
body.sheet-open .floating-nav-wrap,
body.sheet-open .cart-bar {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transform: translate(-50%, 40px) !important;
}
.nav-item {
  position: relative;
  border-radius: 999px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
.nav-item:active { transform: scale(0.95); }
.nav-item svg {
  width: 20px;
  height: 20px;
}
.nav-item .icon-outline {
  fill: none;
  stroke: #4E524F;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.nav-item .icon-solid {
  fill: var(--ink);
  display: none;
}
.nav-item span {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.nav-item.active {
  background: rgba(20, 21, 20, 0.09);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
}
.nav-item.active .icon-outline { display: none; }
.nav-item.active .icon-solid { display: block; }
.nav-item.active span { font-weight: 700; color: var(--ink); }

.nav-dot {
  position: absolute;
  top: 7px;
  right: 22px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

/* ---------- Sheet Modal ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 21, 20, 0.45);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  z-index: 200;
  animation: fadeIn 0.18s ease;
}
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  z-index: 210;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: var(--ios-blur-sheet);
  -webkit-backdrop-filter: var(--ios-blur-sheet);
  border-radius: 32px 32px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-bottom: none;
  padding: 12px 22px calc(42px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.14), 0 1px 0 rgba(255, 255, 255, 0.95) inset;
  animation: slideUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.sheet::before {
  content: "";
  display: block;
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-2);
  margin: 0 auto 16px;
}
.sheet h3 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 8px; }
.sheet-actions .btn { flex: 1; }
.cart-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.cart-thumb {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 16px;
  padding: 14px 0;
}
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(242, 242, 238, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 18px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.qr-wrap svg { border-radius: 12px; }
@keyframes slideUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translate(-50%, -150%);
  z-index: 100;
  background: rgba(20, 21, 20, 0.82);
  backdrop-filter: var(--ios-blur-toast);
  -webkit-backdrop-filter: var(--ios-blur-toast);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90vw;
  text-align: center;
}
.toast.show { transform: translate(-50%, 0); }
