:root {
  --orange: #FD5309;
  --orange-dark: #E04603;
  --orange-soft: #FFF3EC;
  --orange-border: #FDD5C3;
  --charcoal: #454545;
  --ink: #0F1115;
  --muted: #6B7280;
  --bg: #F3F4F6;
  --white: #FFFFFF;
  --border: #E5E7EB;
  --green: #15803D;
  --green-soft: #ECFDF3;
  --amber: #B45309;
  --amber-soft: #FEF3C7;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #E6E9EE;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
}

.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 16px;
}

.device-shell {
  width: 392px;
  height: min(840px, calc(100vh - 36px));
  min-height: 640px;
  background: #16181D;
  border-radius: 46px;
  padding: 11px;
  border: 1px solid #2C3038;
  box-shadow: 0 24px 60px rgba(15, 17, 21, 0.24);
  position: relative;
}

.device-screen {
  width: 100%;
  height: 100%;
  background: var(--white);
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Status Bar */
.statusbar {
  height: 38px;
  padding: 11px 22px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: var(--white);
  position: relative;
  z-index: 30;
  flex-shrink: 0;
}

.status-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dynamic-island {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 98px;
  height: 22px;
  background: #111317;
  border-radius: 999px;
}

/* Push Notification Toast */
.push-toast {
  position: absolute;
  top: 42px;
  left: 12px;
  right: 12px;
  background: #16181D;
  color: #FFFFFF;
  border-radius: 14px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 60;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
  transform: translateY(-145%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}

.push-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.push-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--orange);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.push-copy strong {
  display: block;
  font-size: 12.5px;
}

.push-copy span {
  display: block;
  font-size: 11.5px;
  color: #D1D5DB;
}

/* Main Content */
.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--white);
  position: relative;
}

.app-content::-webkit-scrollbar {
  width: 3px;
}

.app-content::-webkit-scrollbar-thumb {
  background: #D5D9E0;
  border-radius: 3px;
}

/* Uber Eats Sticky Top Address Header */
.ue-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  padding: 8px 16px 10px;
  border-bottom: 1px solid #F1F3F5;
}

.ue-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ue-addr-btn {
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  flex: 1;
}

.ue-addr-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--orange);
}

.ue-addr-main {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ue-time-pill {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

/* Uber Eats Search Pill */
.ue-search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg);
  border-radius: 999px;
  padding: 10px 14px;
}

.ue-search input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
}

.ue-search input:focus {
  outline: none;
}

/* Uber Eats Category Strip */
.ue-cats {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 16px 8px;
  border-bottom: 1px solid #F1F3F5;
}

.ue-cats::-webkit-scrollbar {
  display: none;
}

.ue-cat-item {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 62px;
  padding: 0;
}

.ue-cat-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--bg);
  display: grid;
  place-items: center;
  color: var(--charcoal);
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
}

.ue-cat-item.active .ue-cat-icon {
  background: var(--orange-soft);
  border-color: var(--orange);
  color: var(--orange);
}

.ue-cat-item span {
  font-size: 11px;
  font-weight: 600;
  color: var(--charcoal);
}

.ue-cat-item.active span {
  color: var(--orange-dark);
  font-weight: 700;
}

/* Uber Eats Promo Hero Card */
.ue-promo {
  margin: 12px 16px;
  background: linear-gradient(135deg, #FD5309 0%, #DF4300 100%);
  color: #FFFFFF;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ue-promo strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 3px;
}

.ue-promo span {
  display: block;
  font-size: 11.5px;
  opacity: 0.92;
  line-height: 1.4;
}

.ue-promo-badge {
  background: #FFFFFF;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* Uber Eats Section Heading */
.ue-sec-head {
  padding: 6px 16px 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.ue-sec-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ue-sec-head small {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

/* Uber Eats Product Card */
.ue-feed {
  padding: 0 16px 84px;
}

.ue-card {
  margin-bottom: 18px;
  cursor: pointer;
}

.ue-card-media {
  position: relative;
  height: 132px;
  border-radius: 14px;
  overflow: hidden;
  background: #181B22;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}

.ue-eta-pill {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: #FFFFFF;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.ue-tag-tl {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--orange);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
}

.ue-card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.ue-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 2px;
}

.ue-card-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
}

.ue-price-chip {
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Uber Eats Floating Cart Bar */
.ue-cart-bar {
  position: sticky;
  bottom: 10px;
  margin: 0 14px 10px;
  z-index: 22;
  background: var(--orange);
  color: #FFFFFF;
  border: none;
  width: calc(100% - 28px);
  border-radius: 12px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(253, 83, 9, 0.32);
}

.ue-cart-count {
  background: rgba(0, 0, 0, 0.22);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
}

/* Uber Eats Item Customization View */
.ue-item-hero {
  position: relative;
  height: 155px;
  background: #181B22;
  overflow: hidden;
}

.ue-circle-back {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: none;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 5;
}

.ue-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 8px;
  border-top: 6px solid var(--bg);
  margin-top: 12px;
}

.ue-group-head strong {
  font-size: 15px;
  font-weight: 800;
}

.ue-req-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--charcoal);
}

.ue-req-pill.req {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.ue-opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid #F1F3F5;
  cursor: pointer;
}

/* Bottom Navigation */
.bottom-nav {
  height: 62px;
  border-top: 1px solid var(--border);
  background: var(--white);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px 8px;
  flex-shrink: 0;
  z-index: 25;
}

.bnav-btn {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #717884;
  cursor: pointer;
}

.bnav-btn.active {
  color: var(--orange);
}

/* Shared Elements */
.pad { padding: 16px; }
.h1 { font-size: 21px; font-weight: 800; margin: 0 0 4px; color: var(--ink); }
.sub { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px;
  margin-bottom: 12px;
}

.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 5px;
}

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #D5DAE1;
  background: #FFFFFF;
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 10px;
}

.input:focus {
  outline: none;
  border-color: var(--orange);
}

.btn-primary {
  width: 100%;
  border: none;
  background: var(--orange);
  color: #FFFFFF;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary:hover { background: var(--orange-dark); }
.btn-primary:disabled { background: #D1D5DB; cursor: not-allowed; }

.btn-secondary {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.back-btn {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.map-box {
  position: relative;
  height: 250px;
  width: 100%;
  background: #E8EEF3;
  border-bottom: 1px solid var(--border);
}

#customer-map, #tracking-map, #checkout-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.map-zone-chip {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 400;
  background: var(--ink);
  color: #FFFFFF;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.chip-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
}
.chip-scroll::-webkit-scrollbar { display: none; }

.site-pill {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--white);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  cursor: pointer;
}
.site-pill.active {
  background: var(--orange-soft);
  border-color: var(--orange);
  color: var(--orange-dark);
}

.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 10px;
}

.step-btn {
  width: 40px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.banner {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 12px;
}
.banner.warn { background: var(--amber-soft); color: var(--amber); border: 1px solid #FDE68A; }
.banner.info { background: var(--bg); color: var(--charcoal); border: 1px solid var(--border); }

.pay-row {
  width: 100%;
  border: 1.5px solid var(--border);
  background: var(--white);
  border-radius: 10px;
  padding: 11px 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}
.pay-row.active { border-color: var(--orange); background: var(--orange-soft); }

.pay-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
}
.pay-row.active .pay-dot {
  border-color: var(--orange);
  background: radial-gradient(circle, var(--orange) 46%, #FFFFFF 52%);
}

/* Uber Eats Live Tracking Header */
.ue-track-head {
  padding: 14px 16px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.track-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.track-bar {
  height: 4px;
  border-radius: 2px;
  background: #E5E7EB;
}

.track-bar.done {
  background: var(--orange);
}

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.st-pending { background: var(--amber-soft); color: var(--amber); }
.st-assigned { background: #EFF6FF; color: #1D4ED8; }
.st-enroute { background: var(--orange-soft); color: var(--orange-dark); }
.st-delivered { background: var(--green-soft); color: var(--green); }

/* Bottom Sheet */
.phone-sheet {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 21, 0.45);
  z-index: 70;
  display: none;
  align-items: flex-end;
}
.phone-sheet.open { display: flex; }

.sheet-card {
  width: 100%;
  background: #FFFFFF;
  border-radius: 18px 18px 0 0;
  padding: 12px 18px 24px;
  max-height: 85%;
  overflow-y: auto;
}
.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #D1D5DB;
  margin: 0 auto 12px;
}

@media (max-width: 520px) {
  body { background: var(--white); }
  .stage { padding: 0; min-height: 100dvh; height: 100dvh; }
  .device-shell {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }
  .device-screen { border-radius: 0; }
  .dynamic-island { display: none; }
  .statusbar { height: 28px; padding: 4px 16px; }
}
