/* ============================================================
   BITEO RESTAURANT APP — STYLES
   Arabic RTL, Mobile-first, 390px viewport
   ============================================================ */

/* ── Design tokens ── */
:root {
  --primary:       #EB6825;
  --primary-light: #F4863F;
  --primary-dark:  #CF551A;
  --secondary:     #FFDE59;
  --bg:            #FAF6E6;
  --bg-card:       #FFFFFF;
  --bg-card2:      #F3EDD7;
  --bg-input:      #F3EDD7;
  --border:        #ECE3C9;
  --text:          #2B2117;
  --text-secondary:#8C8067;
  --text-muted:    #B3A986;
  --success:       #1F9D55;
  --danger:        #E23B3B;
  --radius:        16px;
  --radius-sm:     12px;
  --radius-xs:     8px;
  --nav-h:         80px;
  --status-h:      44px;
  --shadow:        0 6px 24px rgba(150,110,50,.14);
  --shadow-card:   0 2px 12px rgba(150,110,50,.08);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }

body {
  font-family: 'Cairo', sans-serif;
  background: #E7E0C8;
  color: var(--text);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: center;
}

button { font-family: 'Cairo', sans-serif; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: 'Cairo', sans-serif; color: var(--text); }

/* ── Splash screen ── */
.splash {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 28px;
  z-index: 1000;
  transition: opacity .5s ease;
}
.splash.hide { opacity: 0; pointer-events: none; }
.splash-logo {
  width: 62%; max-width: 280px;
  animation: splashPop .6s cubic-bezier(.34,1.4,.64,1) both;
}
@keyframes splashPop {
  0% { transform: scale(.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.splash-loader { display: flex; gap: 8px; }
.splash-loader span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary);
  animation: splashBounce 1s infinite ease-in-out both;
}
.splash-loader span:nth-child(1) { animation-delay: -.32s; }
.splash-loader span:nth-child(2) { animation-delay: -.16s; }
@keyframes splashBounce {
  0%, 80%, 100% { transform: scale(.5); opacity: .4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── App shell ── */
#app {
  width: 100%;
  max-width: 420px;
  height: 100dvh;
  max-height: 896px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(120,90,40,.3);
  border-radius: 44px;
}

@media (max-width: 430px) {
  #app { border-radius: 0; max-height: 100dvh; }
}

/* ── Status bar ── */
.status-bar {
  height: var(--status-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  z-index: 10;
  background: var(--bg);
}
.status-bar .time { font-size: 15px; font-weight: 700; }
.status-icons { display: flex; align-items: center; gap: 6px; }

/* ── Screens ── */
#screens { flex: 1; overflow: hidden; position: relative; }

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-20px);
  transition: opacity .25s ease, transform .25s ease;
}
.screen.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

/* ── Scroll content ── */
.scroll-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-content::-webkit-scrollbar { display: none; }

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 8px;
  flex-shrink: 0;
}
.page-header h1 { font-size: 24px; font-weight: 800; }

/* ── Icon button ── */
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: background .15s;
}
.icon-btn:active { background: var(--bg-card2); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.danger { color: var(--danger); }

.notif-dot {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg);
}

/* ============================================================
   HOME SCREEN
   ============================================================ */

/* Header */
.home-header {
  padding: 0 20px 12px;
  background: var(--bg);
  flex-shrink: 0;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.logo-wrap { display: flex; flex-direction: column; align-items: center; }
.header-logo { height: 32px; width: auto; object-fit: contain; }
.logo-fallback { display: none; flex-direction: column; align-items: center; }
.logo-text { font-size: 22px; font-weight: 900; color: var(--primary); line-height: 1; }
.logo-sub { font-size: 10px; color: var(--text-secondary); letter-spacing: 2px; }

.avatar-wrap { cursor: pointer; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
}

/* Location bar */
.location-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
  width: 100%;
  border: 1px solid var(--border);
}
.location-info { display: flex; flex-direction: column; align-items: flex-start; }
.location-label { font-size: 11px; color: var(--text-secondary); }
.location-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 2px; }
.location-pin svg { width: 22px; height: 22px; color: var(--primary); }

/* Search bar */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  border: 1px solid var(--border);
  cursor: pointer;
}
.search-bar svg { width: 18px; height: 18px; color: var(--text-secondary); flex-shrink: 0; }
.search-placeholder { flex: 1; font-size: 14px; color: var(--text-muted); }
.filter-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.filter-btn svg { width: 16px; height: 16px; color: #fff; }

/* ── Sections ── */
.section { padding: 8px 20px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title { font-size: 17px; font-weight: 700; }
.see-all { font-size: 13px; color: var(--primary); font-weight: 600; }

/* ── Banners ── */
.banner-section { padding: 8px 0 4px; }

.banners {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0;
  padding: 0 20px;
}
.banners::-webkit-scrollbar { display: none; }

.banner {
  min-width: calc(100% - 40px);
  scroll-snap-align: start;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  margin-left: 12px;
  flex-shrink: 0;
  transition: transform .1s;
}
.banner:first-child { margin-left: 0; }
.banner:active { transform: scale(.98); }

.banner-1 { background: linear-gradient(135deg, #F4863F 0%, #EB6825 55%, #CF551A 100%); }
.banner-2 { background: linear-gradient(135deg, #FFE680 0%, #FFDE59 55%, #F5C518 100%); color: #4A3410; }
.banner-3 { background: linear-gradient(135deg, #F4863F 0%, #CF551A 100%); }

/* Yellow banner uses dark text/accents for contrast */
.banner-2 .banner-tag { background: rgba(74,52,16,.15); }
.banner-2 .banner-btn { background: rgba(74,52,16,.85); color: #FFDE59; }
.banner-2 .banner-btn:hover { background: rgba(74,52,16,1); }

.banner::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,.05);
  border-radius: inherit;
}

.banner-content { flex: 1; z-index: 1; }
.banner-tag {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
}
.banner h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; line-height: 1.2; }
.banner p { font-size: 13px; opacity: .9; margin-bottom: 12px; }
.banner-btn {
  display: inline-block;
  background: rgba(255,255,255,.25);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px; font-weight: 700;
  backdrop-filter: blur(4px);
  transition: background .15s;
}
.banner-btn:hover { background: rgba(255,255,255,.35); }

.banner-img {
  font-size: 64px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.3));
  flex-shrink: 0;
}
.banner-img img {
  width: 96px; height: 96px; object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}

.banner-dots {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 10px;
}
.dot {
  width: 6px; height: 6px; border-radius: 3px;
  background: var(--border);
  transition: all .3s;
}
.dot.active {
  width: 20px;
  background: var(--primary);
}

/* ── Category pills ── */
.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.categories-scroll::-webkit-scrollbar { display: none; }

.cat-pill {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 14px;
  min-width: 72px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  font-size: 12px; font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
  transition: all .15s;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
}
.cat-pill .cat-icon {
  width: 40px; height: 40px;
  border-radius: 14px;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.cat-pill .cat-icon svg { width: 26px; height: 26px; }
.cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.cat-pill:active { transform: scale(.95); }

/* ── Items grid ── */
.items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.item-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform .15s;
}
.item-card:active { transform: scale(.97); }

.item-card-img {
  width: 100%; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  background: #FAF6E6;
  position: relative;
  overflow: hidden;
}
.card-photo { width: 100%; height: 100%; object-fit: cover; }
.card-emoji { font-size: 52px; }

.item-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 10px; font-weight: 700;
}

.item-info { padding: 10px 10px 6px; }
.item-name { font-size: 13px; font-weight: 700; margin-bottom: 2px; line-height: 1.3; }
.item-sub { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; }
.item-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.item-price { font-size: 15px; font-weight: 800; color: var(--primary); }
.item-rating { font-size: 11px; color: var(--text-secondary); }

.item-add-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
  line-height: 1;
  flex-shrink: 0;
  transition: transform .1s;
}
.item-add-btn:active { transform: scale(.9); }

/* ── Loyalty teaser ── */
.loyalty-teaser {
  margin: 8px 20px;
  background: linear-gradient(135deg, #FFF6D8, #FFEFC0);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
  transition: opacity .15s;
  box-shadow: var(--shadow-card);
}
.loyalty-teaser:active { opacity: .8; }
.loyalty-points-badge {
  display: inline-block;
  background: rgba(255,107,44,.2);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px; font-weight: 700; color: var(--primary);
  margin-bottom: 4px;
}
.loyalty-teaser-info p { font-size: 13px; }
.loyalty-teaser-info strong { color: var(--primary); }
.loyalty-cta { font-size: 12px; color: var(--primary); }
.loyalty-teaser-art { font-size: 40px; }

/* ── Active order bar ── */
.active-order-bar {
  position: absolute;
  bottom: calc(var(--nav-h) + 8px);
  left: 12px; right: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,107,44,.4);
  z-index: 5;
  display: none;
}
.active-order-bar.show { display: flex; }
.aob-pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.3); }
}
.aob-status { font-size: 12px; font-weight: 600; }
.aob-label { flex: 1; font-size: 14px; font-weight: 700; }

/* ============================================================
   MENU SCREEN
   ============================================================ */
.menu-cats {
  display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  padding: 4px 20px 12px;
  flex-shrink: 0;
}
.menu-cats::-webkit-scrollbar { display: none; }

.menu-cat {
  padding: 6px 16px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600;
  flex-shrink: 0;
  transition: all .15s;
  white-space: nowrap;
}
.menu-cat.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

.menu-scroll { padding: 0; }

.menu-items-list { display: flex; flex-direction: column; gap: 12px; padding: 4px 20px; }

.menu-item-row {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .15s;
}
.menu-item-row:active { background: var(--bg-card2); }

.menu-item-emoji { font-size: 44px; flex-shrink: 0; }
.menu-item-media {
  width: 72px; height: 72px; flex-shrink: 0;
  border-radius: 12px; overflow: hidden;
  background: #FAF6E6;
  display: flex; align-items: center; justify-content: center;
}
.menu-photo { width: 100%; height: 100%; object-fit: cover; }
.menu-emoji { font-size: 40px; }
.menu-item-info { flex: 1; min-width: 0; }
.menu-item-name { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.menu-item-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item-footer { display: flex; align-items: center; gap: 8px; }
.menu-item-price { font-size: 16px; font-weight: 800; color: var(--primary); }
.menu-item-cal { font-size: 11px; color: var(--text-muted); }
.menu-item-rating { font-size: 11px; color: var(--text-secondary); }
.menu-item-badges { display: flex; gap: 4px; }
.menu-badge {
  padding: 2px 7px; border-radius: 10px; font-size: 10px; font-weight: 600;
  background: rgba(255,107,44,.15); color: var(--primary);
}
.menu-badge.new { background: rgba(34,197,94,.15); color: var(--success); }

.menu-add-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; flex-shrink: 0;
  transition: transform .1s;
}
.menu-add-btn:active { transform: scale(.9); }

/* ============================================================
   CART SCREEN
   ============================================================ */

/* Empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px;
  padding: 60px 20px;
  text-align: center;
}
.empty-icon { font-size: 60px; margin-bottom: 4px; }
.empty-state h3 { font-size: 20px; font-weight: 700; }
.empty-state p { color: var(--text-secondary); font-size: 14px; }

/* Delivery toggle */
.delivery-toggle {
  display: flex; gap: 8px;
  margin: 16px 20px 12px;
}
.dtoggle {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600;
  transition: all .15s;
}
.dtoggle.active { border-color: var(--primary); color: var(--primary); background: rgba(255,107,44,.08); }

/* Time selector */
.time-selector {
  display: flex; gap: 8px;
  padding: 0 20px 12px;
}
.time-opt {
  flex: 1; padding: 8px;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  font-size: 12px; font-weight: 600;
  transition: all .15s;
}
.time-opt.active { border-color: var(--primary); color: var(--primary); }

.scheduled-picker { padding: 0 20px 12px; }
.time-picker-select {
  width: 100%; padding: 10px 14px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 14px;
  appearance: none;
}

/* Cart items */
.cart-items { padding: 0 20px; display: flex; flex-direction: column; gap: 10px; }

.cart-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border);
}
.cart-item-emoji { font-size: 36px; flex-shrink: 0; }
.cart-item-media {
  width: 56px; height: 56px; flex-shrink: 0;
  border-radius: 10px; overflow: hidden;
  background: #FAF6E6;
  display: flex; align-items: center; justify-content: center;
}
.cart-item-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.cart-item-custom { font-size: 11px; color: var(--text-secondary); }
.cart-item-price { font-size: 14px; font-weight: 700; color: var(--primary); margin-top: 4px; }

.cart-item-qty {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.qty-sm-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-card2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  transition: all .1s;
}
.qty-sm-btn:active { background: var(--primary); border-color: var(--primary); color: #fff; }
.qty-sm-val { font-size: 15px; font-weight: 700; min-width: 20px; text-align: center; }

/* Coupon row */
.coupon-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 12px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1.5px dashed var(--border);
  cursor: pointer;
}
.coupon-btn { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--primary); }
.coupon-discount { font-size: 14px; font-weight: 700; color: var(--success); }

/* Price summary */
.price-summary {
  margin: 0 20px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
}
.price-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 14px; }
.price-row:last-child { margin-bottom: 0; }
.discount-label { color: var(--success); }
.discount-val { color: var(--success); font-weight: 700; }
.price-divider { height: 1px; background: var(--border); margin: 10px 0; }
.total-row { font-size: 17px; font-weight: 800; }

/* Payment */
.payment-section { padding: 0 20px 12px; }
.payment-opts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.pay-opt {
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  font-size: 13px; font-weight: 700;
  transition: all .15s;
}
.pay-opt.active { border-color: var(--primary); background: rgba(255,107,44,.08); }
.pay-icon { display: flex; align-items: center; gap: 4px; }
.mada-icon { color: #2e4788; background: #fff; padding: 1px 5px; border-radius: 4px; font-weight: 800; font-size: 12px; border: 1px solid #d8d2bf; }
.stc-icon { color: #6a0dad; font-size: 11px; }

/* Points toggle */
.points-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 20px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
}
.points-toggle-label { font-size: 14px; font-weight: 600; }
.points-toggle-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg-card2); border-radius: 13px;
  border: 1px solid var(--border);
  cursor: pointer; transition: .3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--text-secondary);
  left: 2px; top: 2px;
  transition: .3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); border-color: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); background: #fff; }

/* Buttons */
.btn-primary {
  display: block; width: 100%;
  background: var(--primary); color: #fff;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 16px; font-weight: 700;
  text-align: center;
  transition: all .15s;
  margin: 8px 0;
}
.btn-primary:active { background: var(--primary-dark); transform: scale(.98); }

.btn-secondary {
  display: block; width: 100%;
  background: var(--bg-card); color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px; font-weight: 600;
  text-align: center;
  border: 1.5px solid var(--border);
  transition: all .15s;
  margin: 8px 0;
}

.btn-checkout {
  display: flex; align-items: center; justify-content: space-between;
  width: calc(100% - 40px);
  margin: 0 20px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 16px; font-weight: 800;
  box-shadow: 0 4px 20px rgba(255,107,44,.4);
  transition: all .15s;
}
.btn-checkout:active { transform: scale(.98); }
.checkout-total-badge {
  background: rgba(255,255,255,.2);
  padding: 4px 12px; border-radius: 20px;
  font-size: 14px;
}

/* ============================================================
   WALLET SCREEN
   ============================================================ */

/* Wallet card */
.wallet-card {
  margin: 8px 20px;
  background: linear-gradient(135deg, #F4863F 0%, #EB6825 55%, #CF551A 100%);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 10px 30px rgba(235,104,37,.35);
}
.wallet-card-deco {
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  border: 40px solid rgba(255,255,255,.06);
  bottom: -60px; left: -40px;
  pointer-events: none;
}
.wallet-card::before {
  content: '';
  position: absolute;
  width: 150px; height: 150px; border-radius: 50%;
  border: 30px solid rgba(255,255,255,.04);
  top: -50px; right: -30px;
}
.wallet-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.wallet-label { font-size: 13px; opacity: .8; }
.wallet-logo { font-size: 18px; font-weight: 900; opacity: .9; }
.wallet-balance { display: flex; align-items: baseline; gap: 6px; margin-bottom: 20px; }
.balance-amount { font-size: 44px; font-weight: 900; line-height: 1; }
.balance-currency { font-size: 18px; font-weight: 600; opacity: .8; }
.wallet-actions { display: flex; gap: 12px; position: relative; z-index: 1; }
.wallet-action-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px;
  background: rgba(255,255,255,.2);
  border-radius: var(--radius-xs);
  font-size: 14px; font-weight: 600; color: #fff;
  backdrop-filter: blur(4px);
  transition: background .15s;
}
.wallet-action-btn:active { background: rgba(255,255,255,.3); }

/* Loyalty card */
.loyalty-card {
  margin: 12px 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--border);
}
.loyalty-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.loyalty-header h3 { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.loyalty-header p { font-size: 12px; color: var(--text-secondary); }
.points-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: 0 4px 12px rgba(255,107,44,.3);
}
.points-num { font-size: 18px; font-weight: 900; line-height: 1; }
.points-label-sm { font-size: 10px; opacity: .8; }

.points-progress-wrap { margin-bottom: 16px; }
.points-progress-bar { height: 8px; background: var(--bg-card2); border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.points-progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 4px; transition: width .6s ease; }
.points-progress-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); }

.points-tiers { display: flex; gap: 8px; }
.tier {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px;
  border-radius: 8px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  opacity: .5;
}
.tier.active { opacity: 1; border-color: var(--primary); background: rgba(255,107,44,.08); }
.tier-icon { font-size: 20px; }
.tier-name { font-size: 10px; font-weight: 600; }

/* Coupons */
.coupons-list { display: flex; flex-direction: column; gap: 10px; }

.coupon-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex; overflow: hidden;
  position: relative;
}
.coupon-card::before {
  content: '';
  position: absolute;
  left: 115px; top: -10px; bottom: -10px;
  width: 0;
  border-left: 2px dashed var(--border);
}
.coupon-left { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 3px; }
.coupon-code { font-size: 15px; font-weight: 800; color: var(--primary); letter-spacing: 1px; }
.coupon-desc { font-size: 12px; color: var(--text); }
.coupon-exp { font-size: 11px; color: var(--text-muted); }
.coupon-right {
  width: 90px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,107,44,.08);
  font-size: 22px; font-weight: 900; color: var(--primary);
  text-align: center;
}
.coupon-ship { background: rgba(34,197,94,.08); }
.coupon-ship .coupon-val { color: var(--success); }
.coupon-used { opacity: .4; }
.coupon-used .coupon-code { text-decoration: line-through; }

/* Transactions */
.transactions-list { display: flex; flex-direction: column; gap: 0; }
.tx-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.tx-item:last-child { border-bottom: none; }
.tx-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0;
}
.tx-icon.tx-in { background: rgba(34,197,94,.15); color: var(--success); }
.tx-icon.tx-out { background: rgba(239,68,68,.1); color: var(--danger); }
.tx-info { flex: 1; }
.tx-title { font-size: 13px; font-weight: 600; display: block; }
.tx-date { font-size: 11px; color: var(--text-secondary); }
.tx-amount { font-size: 14px; font-weight: 700; }
.tx-amount.tx-in { color: var(--success); }
.tx-amount.tx-out { color: var(--danger); }

/* ============================================================
   ORDERS SCREEN
   ============================================================ */

.tracking-card {
  margin: 8px 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--border);
}
.tracking-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.tracking-badge {
  display: inline-block;
  background: rgba(255,107,44,.15); color: var(--primary);
  border-radius: 20px; padding: 3px 10px;
  font-size: 11px; font-weight: 700;
  margin-bottom: 4px;
}
.tracking-order-num { font-size: 18px; font-weight: 800; }
.tracking-eta { font-size: 20px; font-weight: 900; color: var(--primary); }

/* Order steps */
.order-steps {
  display: flex; align-items: center;
  margin-bottom: 20px; gap: 0;
}
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-card2); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
}
.step.completed .step-circle { background: var(--success); border-color: var(--success); color: #fff; font-size: 14px; }
.step.active .step-circle { background: var(--primary); border-color: var(--primary); }
.step-circle.anim { animation: pulse 1.2s infinite; }
.step-label { font-size: 10px; color: var(--text-secondary); text-align: center; white-space: nowrap; }
.step.completed .step-label, .step.active .step-label { color: var(--text); }

.step-line { flex: 1; height: 2px; background: var(--border); }
.step-line.completed { background: var(--success); }

/* Map simulation */
.map-sim {
  height: 140px;
  background: #E9EFE6;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.map-bg { position: absolute; inset: 0; }
.map-road {
  position: absolute;
  background: #D6DDD2;
}
.map-road-h { left: 0; right: 0; top: 50%; height: 24px; transform: translateY(-50%); }
.map-road-h2 { left: 0; right: 0; top: 75%; height: 16px; transform: translateY(-50%); }
.map-road-v { top: 0; bottom: 0; right: 30%; width: 20px; }

.map-restaurant { position: absolute; top: 20%; right: 25%; font-size: 24px; transform: translate(50%, -50%); }
.map-home { position: absolute; top: 50%; left: 15%; font-size: 24px; transform: translateY(-50%); }
.map-rider {
  position: absolute; top: 50%; right: 60%;
  font-size: 22px; transform: translateY(-50%);
  animation: riderMove 4s linear infinite alternate;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}
@keyframes riderMove {
  0% { right: 60%; }
  100% { right: 25%; }
}
.map-info {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.6); border-radius: 20px;
  padding: 4px 12px; font-size: 11px;
  display: flex; align-items: center; gap: 4px;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

/* Past orders */
.past-orders { display: flex; flex-direction: column; gap: 10px; }

.past-order-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
}
.past-order-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.past-order-num { font-size: 14px; font-weight: 700; }
.past-order-date { font-size: 12px; color: var(--text-secondary); }
.past-order-items { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.past-order-footer { display: flex; justify-content: space-between; align-items: center; }
.past-order-total { font-size: 15px; font-weight: 800; color: var(--primary); }
.reorder-btn {
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(255,107,44,.1);
  color: var(--primary);
  font-size: 13px; font-weight: 700;
  border: 1px solid rgba(255,107,44,.3);
  transition: all .15s;
}
.reorder-btn:active { background: var(--primary); color: #fff; }

/* ============================================================
   PROFILE SCREEN
   ============================================================ */

.profile-card {
  margin: 8px 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--border);
  position: relative;
}
.profile-avatar-big {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; flex-shrink: 0;
}
.profile-info h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.profile-info p { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.profile-edit-btn {
  position: absolute; top: 16px; left: 16px;
  padding: 5px 12px; border-radius: 20px;
  background: var(--bg-card2); color: var(--primary);
  font-size: 12px; font-weight: 600;
  border: 1px solid rgba(255,107,44,.3);
}

.profile-menu { margin: 12px 20px; display: flex; flex-direction: column; gap: 2px; }
.profile-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 15px; font-weight: 600;
  transition: background .15s;
  margin-bottom: 6px;
}
.profile-item:active { background: var(--bg-card2); }
.profile-item svg { margin-right: auto; color: var(--text-muted); }
.profile-item-icon { font-size: 20px; }

.app-version { text-align: center; font-size: 12px; color: var(--text-muted); padding: 16px; }

/* ============================================================
   BOTTOM NAV
   ============================================================ */

.bottom-nav {
  height: var(--nav-h);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex; align-items: flex-start;
  padding-top: 10px;
  flex-shrink: 0;
  z-index: 20;
  border-radius: 0 0 44px 44px;
}
@media (max-width: 430px) { .bottom-nav { border-radius: 0; } }

.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  margin: 0 4px;
  padding: 8px 4px 6px;
  border-radius: 16px;
  font-size: 10px; font-weight: 600; color: var(--primary);
  transition: color .2s, background .2s;
}
.nav-item.active { color: #fff; background: var(--primary); }
.nav-item svg { width: 22px; height: 22px; transition: transform .2s; }
.nav-item.active svg { transform: scale(1.1); }

.nav-cart { position: relative; }
.cart-icon-wrap { position: relative; }
.cart-badge {
  position: absolute; top: -4px; right: -6px;
  min-width: 18px; height: 18px;
  background: var(--primary); color: #fff;
  border-radius: 9px; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-card);
}

/* ============================================================
   MODALS
   ============================================================ */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  display: flex; align-items: flex-end;
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
  backdrop-filter: blur(3px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-sheet {
  width: 100%; max-width: 420px; margin: 0 auto;
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  padding: 16px 20px 32px;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.34,1.2,.64,1);
  max-height: 90dvh;
  overflow-y: auto;
  scrollbar-width: none;
}
.modal-sheet::-webkit-scrollbar { display: none; }
.modal-overlay.open .modal-sheet { transform: translateY(0); }

.modal-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: var(--border); margin: 0 auto 16px;
}

.modal-item-img {
  text-align: center; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
}
.modal-item-img img {
  width: 180px; height: 180px; object-fit: cover;
  border-radius: 20px; background: #FAF6E6;
}
.modal-emoji { font-size: 80px; }
.modal-item-name { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.modal-item-desc { font-size: 14px; color: var(--text-secondary); text-align: center; margin-bottom: 10px; line-height: 1.5; }
.modal-item-meta { display: flex; justify-content: center; align-items: center; gap: 16px; margin-bottom: 20px; }
.modal-cal { font-size: 12px; color: var(--text-secondary); background: var(--bg-card2); padding: 3px 10px; border-radius: 20px; }
.modal-stars { font-size: 13px; font-weight: 600; }

.modal-section-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; }

.custom-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.custom-opt {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-card2); border-radius: var(--radius-xs);
  border: 1.5px solid var(--border);
  cursor: pointer; transition: all .15s;
}
.custom-opt.selected { border-color: var(--primary); background: rgba(255,107,44,.08); }
.custom-opt-label { font-size: 14px; font-weight: 600; }
.custom-opt-price { font-size: 13px; color: var(--primary); }
.custom-opt-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border);
  background: none; transition: all .15s;
}
.custom-opt.selected .custom-opt-check { background: var(--primary); border-color: var(--primary); }

.notes-input {
  width: 100%; height: 70px;
  background: var(--bg-card2); border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); padding: 10px 12px;
  font-size: 14px; resize: none;
  margin-bottom: 16px;
}
.notes-input:focus { outline: none; border-color: var(--primary); }
.notes-input::placeholder { color: var(--text-muted); }

.modal-qty-row { display: flex; align-items: center; gap: 12px; }
.qty-ctrl { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.qty-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-card2); border: 1.5px solid var(--border);
  font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  transition: all .1s;
}
.qty-btn:active { background: var(--primary); border-color: var(--primary); color: #fff; }
.qty-val { font-size: 18px; font-weight: 800; min-width: 24px; text-align: center; }

.btn-add-to-cart {
  flex: 1;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-radius: var(--radius-sm);
  padding: 13px; font-size: 15px; font-weight: 700;
  transition: all .15s;
  box-shadow: 0 4px 16px rgba(255,107,44,.35);
}
.btn-add-to-cart:active { transform: scale(.97); }

/* Success modal */
.success-modal { text-align: center; padding: 32px 24px 40px; }
.success-icon { font-size: 64px; margin-bottom: 12px; }
.success-modal h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.success-modal p { color: var(--text-secondary); margin-bottom: 4px; }
.success-eta { font-size: 16px; font-weight: 700; color: var(--primary); margin: 8px 0 20px; }
.success-modal .btn-primary { margin-bottom: 8px; }
.success-modal .btn-secondary { border: none; }

/* Top-up modal */
.topup-amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.topup-amt {
  padding: 12px; border-radius: var(--radius-xs);
  border: 1.5px solid var(--border);
  background: var(--bg-card2);
  font-size: 15px; font-weight: 700;
  transition: all .15s;
}
.topup-amt.active { border-color: var(--primary); background: rgba(255,107,44,.08); color: var(--primary); }
.custom-amount-input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-card2); border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); font-size: 15px;
  margin-bottom: 14px;
}
.custom-amount-input:focus { outline: none; border-color: var(--primary); }
.topup-pay-opts { display: flex; gap: 8px; margin-bottom: 16px; }
.topup-pay { flex: 1; justify-content: center; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 100px;
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 12px 24px;
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: all .25s;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-screen {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 500;
  display: none;
  flex-direction: column;
  max-width: 420px; margin: 0 auto;
  overflow: hidden;
}
.admin-screen.open { display: flex; }

@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }

/* Login */
.admin-login {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative;
}
.admin-back {
  position: absolute; top: 20px; left: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-card); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.admin-login-card { text-align: center; width: 100%; max-width: 320px; }
.admin-login-icon { font-size: 56px; margin-bottom: 12px; }
.admin-login-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.admin-login-card p { color: var(--text-secondary); font-size: 14px; margin-bottom: 20px; }
.admin-pass-input {
  width: 100%; padding: 14px 16px;
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 16px; text-align: center;
  margin-bottom: 12px;
}
.admin-pass-input:focus { outline: none; border-color: var(--primary); }
.admin-hint { font-size: 12px !important; color: var(--text-muted) !important; margin-top: 14px !important; }
.admin-hint strong { color: var(--primary); }

/* Dashboard */
.admin-dash { flex: 1; overflow-y: auto; scrollbar-width: none; }
.admin-dash::-webkit-scrollbar { display: none; }
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; position: sticky; top: 0;
  background: var(--bg); z-index: 3; border-bottom: 1px solid var(--border);
}
.admin-header h2 { font-size: 20px; font-weight: 800; }
.admin-header .admin-back { position: static; }

.admin-stats { display: flex; gap: 10px; padding: 16px 20px; }
.admin-stat {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; text-align: center;
}
.admin-stat-num { display: block; font-size: 24px; font-weight: 900; color: var(--primary); }
.admin-stat-label { font-size: 11px; color: var(--text-secondary); }

.admin-toolbar { display: flex; gap: 10px; padding: 0 20px 12px; align-items: center; }
.admin-add-btn { flex: 1; margin: 0 !important; }
.admin-reset-btn {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  white-space: nowrap;
}

.admin-list { padding: 0 20px; display: flex; flex-direction: column; gap: 10px; }
.admin-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  transition: opacity .2s;
}
.admin-item-off { opacity: .5; }
.admin-item-img {
  width: 50px; height: 50px; border-radius: 10px; overflow: hidden;
  background: #FAF6E6; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.admin-item-img img { width: 100%; height: 100%; object-fit: cover; }
.admin-item-info { flex: 1; min-width: 0; }
.admin-item-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-item-meta { font-size: 12px; color: var(--text-secondary); }
.admin-item-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.admin-toggle { transform: scale(.85); }
.admin-icon-btn {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg-card2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
}
.admin-icon-btn.admin-del { color: var(--danger); }
.admin-icon-btn:active { background: var(--border); }

/* Add/Edit form */
.admin-form-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; z-index: 600;
  opacity: 0; pointer-events: none; transition: opacity .25s;
  max-width: 420px; margin: 0 auto;
}
.admin-form-overlay.open { opacity: 1; pointer-events: all; }
.admin-form {
  width: 100%; background: var(--bg-card);
  border-radius: 24px 24px 0 0; padding: 16px 20px 24px;
  max-height: 92dvh; overflow-y: auto; scrollbar-width: none;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.34,1.2,.64,1);
}
.admin-form::-webkit-scrollbar { display: none; }
.admin-form-overlay.open .admin-form { transform: translateY(0); }
.admin-form h2 { font-size: 20px; font-weight: 800; text-align: center; margin-bottom: 16px; }

.admin-img-upload { text-align: center; margin-bottom: 16px; }
.admin-img-preview {
  width: 140px; height: 140px; margin: 0 auto 10px;
  border-radius: var(--radius); overflow: hidden;
  background: var(--bg-card2); border: 2px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.admin-img-preview img { width: 100%; height: 100%; object-fit: cover; }
.admin-img-placeholder { font-size: 28px; color: var(--text-muted); text-align: center; line-height: 1.8; }
.admin-img-change {
  font-size: 13px; color: var(--primary); font-weight: 600;
  padding: 4px 12px;
}

.admin-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; margin-top: 12px; }
.admin-input {
  width: 100%; padding: 11px 14px;
  background: var(--bg-card2); border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); font-size: 14px;
  resize: none; appearance: none;
}
.admin-input:focus { outline: none; border-color: var(--primary); }
.admin-row { display: flex; gap: 12px; }
.admin-col { flex: 1; }
.admin-form-actions { display: flex; gap: 10px; margin-top: 20px; }
.admin-form-actions .btn-primary, .admin-form-actions .btn-secondary { flex: 1; margin: 0 !important; }
.profile-item-admin { border-color: rgba(255,107,44,.3); }

/* ============================================================
   PWA — Install banner + iOS hint
   ============================================================ */

.install-banner {
  position: fixed;
  bottom: 16px; left: 12px; right: 12px;
  max-width: 396px; margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  z-index: 300;
  box-shadow: var(--shadow);
  transform: translateY(150%);
  transition: transform .35s cubic-bezier(.34,1.2,.64,1);
}
.install-banner.open { transform: translateY(0); }
.install-icon img { width: 44px; height: 44px; border-radius: 10px; }
.install-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.install-text strong { font-size: 14px; font-weight: 700; }
.install-text span { font-size: 11px; color: var(--text-secondary); }
.install-btn {
  background: var(--primary); color: #fff;
  border-radius: 20px; padding: 8px 18px;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.install-close {
  position: absolute; top: 6px; left: 8px;
  font-size: 12px; color: var(--text-muted);
  width: 20px; height: 20px;
}

/* iOS hint modal */
.ios-hint {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-end;
  z-index: 400;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.ios-hint.open { opacity: 1; pointer-events: all; }
.ios-hint-card {
  width: 100%; max-width: 420px; margin: 0 auto;
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  position: relative;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.34,1.2,.64,1);
}
.ios-hint.open .ios-hint-card { transform: translateY(0); }
.ios-hint-close {
  position: absolute; top: 16px; left: 16px;
  font-size: 16px; color: var(--text-muted);
  width: 28px; height: 28px;
}
.ios-hint-icon { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 12px; }
.ios-hint-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.ios-hint-card p { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }
.ios-steps { text-align: right; display: flex; flex-direction: column; gap: 12px; list-style: none; }
.ios-steps li {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; line-height: 1.5;
  background: var(--bg-card2); border-radius: var(--radius-sm);
  padding: 12px 14px;
  counter-increment: step;
}
.ios-steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}
.ios-steps { counter-reset: step; }
.ios-share-icon { color: var(--primary); font-weight: 700; }

/* ── Auth / Login Screen ── */
.auth-screen {
  position: fixed; inset: 0;
  z-index: 200;
  background: linear-gradient(160deg, var(--bg) 0%, #FFF1DE 100%);
  display: none;
  flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px;
  overflow: hidden;
}
.auth-screen.open { display: flex; }
.auth-bg-deco {
  position: absolute;
  top: -120px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(235,104,37,.18), transparent 70%);
  pointer-events: none;
}
.auth-card {
  position: relative;
  width: 100%; max-width: 360px;
  background: var(--bg-card);
  border-radius: 28px;
  padding: 36px 24px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: authIn .5s cubic-bezier(.34,1.2,.64,1);
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-logo {
  width: 96px; height: auto;
  margin-bottom: 18px;
  object-fit: contain;
}
.auth-title {
  font-size: 22px; font-weight: 800;
  margin-bottom: 8px;
}
.auth-sub {
  color: var(--text-secondary);
  font-size: 14px; line-height: 1.6;
  margin-bottom: 28px;
}
.auth-gbtn {
  display: flex; justify-content: center;
  margin-bottom: 16px;
  min-height: 44px;
}
.auth-skip {
  display: block; width: 100%;
  background: none; border: none;
  color: var(--text-secondary);
  font-size: 14px; font-weight: 700;
  font-family: inherit;
  padding: 10px;
  cursor: pointer;
  text-decoration: underline;
}
.auth-terms {
  color: var(--text-muted);
  font-size: 11px; line-height: 1.6;
  margin-top: 18px;
}
.profile-avatar-big img,
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ── Welcome Modal ── */
.welcome-modal {
  text-align: center;
  padding: 32px 24px 28px;
}
.welcome-confetti {
  font-size: 48px;
  animation: bounce 0.6s ease;
}
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.welcome-brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--primary);
  text-transform: uppercase;
  margin: 8px 0 4px;
}
.welcome-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
}
.welcome-sub {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 20px;
}
.welcome-coupon {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, #e8a020 100%);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  overflow: hidden;
}
.welcome-coupon-inner {
  position: relative;
  z-index: 1;
}
.welcome-coupon-deco {
  position: absolute;
  top: -30px; left: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}
.welcome-coupon-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.welcome-coupon-code {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 4px;
  background: rgba(0,0,0,0.15);
  border-radius: 10px;
  padding: 8px 16px;
  display: inline-block;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.welcome-coupon-code:active { background: rgba(0,0,0,0.25); }
.welcome-coupon-desc {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.welcome-coupon-exp {
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  margin-bottom: 12px;
}
.welcome-copy-btn {
  background: rgba(255,255,255,0.25);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.welcome-copy-btn:active { background: rgba(255,255,255,0.4); }
.welcome-start-btn {
  width: 100%;
  font-size: 16px;
  padding: 14px;
}

/* ── iOS safe areas (notch / home indicator) ── */
@supports (padding: env(safe-area-inset-top)) {
  @media (max-width: 430px) {
    .status-bar { padding-top: env(safe-area-inset-top); height: calc(var(--status-h) + env(safe-area-inset-top)); }
    .bottom-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  }
}
