/* ============================================================
   OLA · QAYDEX — Smart QR Restaurant Ordering
   Design system / tokens
   ============================================================ */

:root {
  /* Brand */
  --blue:        #2563EB;
  --blue-600:    #1D4ED8;
  --blue-700:    #1E40AF;
  --blue-soft:   #EEF3FF;
  --blue-tint:   #DCE7FF;

  /* Neutrals (cool-tinted) */
  --ink:         #0E1726;
  --ink-2:       #2B3648;
  --muted:       #6B7686;
  --muted-2:     #97A1B0;
  --line:        #ECEFF4;
  --line-2:      #E1E6EE;
  --bg:          #F8F9FA;
  --surface:     #FFFFFF;
  --surface-2:   #F5F7FB;

  /* State accents */
  --green:       #1FB36B;
  --green-soft:  #E6F7EE;
  --amber:       #F6A609;
  --amber-soft:  #FFF3DC;
  --red:         #EF4757;
  --red-soft:    #FDECEE;
  --purple:      #7A5CF0;
  --purple-deep: #241149;
  --purple-card: #3A1D6E;

  /* Radii */
  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Shadows — soft, layered */
  --sh-sm: 0 4px 14px rgba(16,23,38,.10);
  --sh-md: 0 4px 14px rgba(16,23,38,.06), 0 10px 30px rgba(16,23,38,.06);
  --sh-lg: 0 10px 24px rgba(16,23,38,.08), 0 24px 60px rgba(16,23,38,.10);
  --sh-blue: 0 8px 22px rgba(37,99,235,.30);

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Cairo", system-ui, sans-serif;
  background: #FFFFFF;
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--blue-tint); }

/* hide scrollbars but keep scroll */
.no-sb { scrollbar-width: none; -ms-overflow-style: none; }
.no-sb::-webkit-scrollbar { display: none; height: 0; width: 0; }

/* ============================================================
   Stage + phone shell
   ============================================================ */
#root { min-height: 100vh; }

.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 46px;
  padding: 40px 28px;
}

.brandbar {
  position: fixed;
  top: 22px; right: 50%;
  transform: translateX(50%);
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: .14em;
  color: var(--ink-2); font-size: 13px;
  z-index: 60;
}
.brandbar .spark { color: var(--blue); }

/* Phone */
.phone {
  position: relative;
  width: 392px;
  height: 840px;
  border-radius: 52px;
  background: #0B0F18;
  padding: 12px;
  box-shadow:
    0 0 0 2px #20242E,
    0 0 0 11px #0B0F18,
    0 0 0 12px #2A2F3A,
    var(--sh-lg);
  flex: none;
}
.phone__screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 41px;
  overflow: hidden;
  background: var(--bg);
  display: flex; flex-direction: column;
}
.phone__notch {
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 132px; height: 30px;
  background: #0B0F18;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  z-index: 50;
}
.statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 46px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px;
  font-size: 13.5px; font-weight: 700;
  color: var(--ink);
  z-index: 45;
  pointer-events: none;
}
.statusbar.on-color { color: #fff; }
.statusbar .sb-time { letter-spacing: .02em; }
.statusbar .sb-icons { display: flex; align-items: center; gap: 6px; }

/* App viewport inside phone */
.app {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.app__scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 46px;
}

/* ============================================================
   Generic atoms
   ============================================================ */
.h1 { font-size: 25px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.h3 { font-size: 16.5px; font-weight: 700; }
.sub { color: var(--muted); font-size: 14px; font-weight: 500; }
.price { font-weight: 800; font-variant-numeric: tabular-nums; }
.dim { color: var(--muted); }

.row { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 56px; padding: 0 22px;
  border-radius: var(--r-md);
  font-size: 16px; font-weight: 700;
  background: var(--blue); color: #fff;
  box-shadow: var(--sh-blue);
  transition: transform .14s var(--ease), box-shadow .2s var(--ease), background .2s;
  width: 100%;
  white-space: nowrap;
}
.btn:active { transform: scale(.975); }
.btn:hover { background: var(--blue-600); }
.btn--ghost {
  background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-2);
}
.btn--ghost:hover { background: var(--surface-2); }
.btn--soft {
  background: var(--blue-soft); color: var(--blue-600);
  box-shadow: none;
}
.btn--soft:hover { background: var(--blue-tint); }
.btn--sm { height: 42px; font-size: 14px; border-radius: var(--r-sm); padding: 0 16px; }

/* Icon button */
.iconbtn {
  width: 42px; height: 42px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  box-shadow: var(--sh-sm);
  color: var(--ink-2);
  transition: transform .14s var(--ease), background .2s;
  flex: none;
}
.iconbtn:hover { background: var(--surface-2); }
.iconbtn:active { transform: scale(.92); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px;
  border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 800;
  letter-spacing: .01em;
}
.badge--blue { background: var(--blue-soft); color: var(--blue-600); }
.badge--amber { background: var(--amber-soft); color: #B5750A; }
.badge--green { background: var(--green-soft); color: #138A50; }
.badge--red { background: var(--red-soft); color: var(--red); }

.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }

/* App header */
.appbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px;
  background: var(--surface);
}
.appbar__title { flex: 1; text-align: center; font-weight: 800; font-size: 17px; }

/* Section title */
.sec-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.sec-title b { font-size: 17px; font-weight: 800; }
.sec-title a { color: var(--blue); font-size: 13px; font-weight: 700; }

/* Food image placeholder */
.food {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(140deg, var(--f1, #FBE3CB), var(--f2, #F4C79A));
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.food::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120px 80px at 30% 20%, rgba(255,255,255,.45), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 12px, rgba(0,0,0,.03) 12px 24px);
  mix-blend-mode: soft-light;
}
.food .glyph { font-size: 46px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); z-index: 1; }
.food .tag {
  position: absolute; bottom: 7px; left: 7px;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 8.5px; letter-spacing: .08em;
  color: rgba(0,0,0,.4); background: rgba(255,255,255,.7);
  padding: 2px 6px; border-radius: 6px; z-index: 1;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
}
.glass {
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

/* Quantity stepper */
.stepper {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  padding: 5px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.stepper button {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--blue-600);
  box-shadow: var(--sh-sm);
  font-size: 22px; font-weight: 700;
  transition: transform .12s var(--ease);
}
.stepper button:active { transform: scale(.85); }
.stepper button[disabled] { color: var(--muted-2); box-shadow: none; background: transparent; }
.stepper .qv { min-width: 30px; text-align: center; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }

/* Large stepper (product sheet) */
.stepper--lg { padding: 6px; gap: 6px; }
.stepper--lg button { width: 48px; height: 48px; font-size: 26px; }
.stepper--lg .qv { min-width: 40px; font-size: 20px; }

/* Round + add button */
.fab-add {
  width: 38px; height: 38px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff;
  box-shadow: var(--sh-blue);
  font-size: 22px; font-weight: 400; line-height: 1;
  transition: transform .14s var(--ease), background .2s;
  flex: none;
}
.fab-add:hover { background: var(--blue-600); }
.fab-add:active { transform: scale(.86); }

/* Category chips */
.cats { display: flex; gap: 9px; overflow-x: auto; padding: 2px 18px 4px; }
.chip {
  flex: none;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 9px 4px 8px;
  min-width: 62px;
  border-radius: var(--r-sm);
  transition: background .2s, color .2s;
  color: var(--muted);
}
.chip .cic {
  width: 46px; height: 46px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px; background: var(--surface); box-shadow: var(--sh-sm);
  transition: transform .2s var(--ease);
}
.chip span { font-size: 12px; font-weight: 700; }
.chip.active { color: var(--blue-600); }
.chip.active .cic { background: var(--blue); transform: translateY(-2px); }

/* Inputs */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 0 4px 7px; }
.input {
  width: 100%; height: 52px; padding: 0 16px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px var(--line-2);
  font-size: 15px; font-weight: 600; color: var(--ink);
  transition: box-shadow .2s, background .2s;
}
.input::placeholder { color: var(--muted-2); font-weight: 500; }
.input:focus { outline: none; background: var(--surface); box-shadow: inset 0 0 0 2px var(--blue); }
textarea.input { height: auto; padding: 13px 16px; resize: none; line-height: 1.5; }

/* Search */
.search {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px; margin: 0 18px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--muted);
}
.search input { flex: 1; border: none; background: none; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.search input:focus { outline: none; }

/* Bottom nav */
.bnav {
  display: flex; align-items: stretch;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-top: 1px solid var(--line);
  padding: 8px 8px 12px;
}
.bnav button {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0;
  color: var(--muted-2);
  font-size: 11px; font-weight: 700;
  transition: color .2s, transform .14s var(--ease);
}
.bnav button.active { color: var(--blue); }
.bnav button:active { transform: scale(.9); }

/* Sticky cart bar */
.cartbar {
  margin: 0 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  height: 60px; padding: 0 8px 0 18px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--sh-blue);
  cursor: pointer;
  transition: transform .14s var(--ease);
}
.cartbar:active { transform: scale(.985); }
.cartbar .cb-count {
  width: 30px; height: 30px; border-radius: 10px;
  background: rgba(255,255,255,.2);
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
}

/* Banner slider */
.banner {
  position: relative;
  height: 120px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(110deg, #1E3A8A, #2563EB 60%, #3B82F6);
  color: #fff;
  display: flex; align-items: center;
  padding: 0 20px;
}
.banner::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(180px 120px at 88% 30%, rgba(255,255,255,.22), transparent 60%);
}

/* Bottom sheet */
.sheet-scrim {
  position: absolute; inset: 0;
  background: rgba(14,23,38,.46);
  backdrop-filter: blur(2px);
  z-index: 70;
  opacity: 0;
  transition: opacity .28s var(--ease);
}
.sheet-scrim.show { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 71;
  background: var(--surface);
  border-top-left-radius: var(--r-xl);
  border-top-right-radius: var(--r-xl);
  box-shadow: 0 -12px 40px rgba(16,23,38,.18);
  transform: translateY(100%);
  transition: transform .34s var(--ease);
  max-height: 92%;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.sheet.show { transform: translateY(0); }
.sheet .grab { width: 42px; height: 5px; border-radius: 999px; background: var(--line-2); margin: 10px auto 0; flex: none; }

/* Timeline */
.tl { position: relative; padding-right: 4px; }
.tl-item { display: flex; gap: 14px; padding-bottom: 4px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-node {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: var(--surface-2); color: var(--muted-2);
  box-shadow: inset 0 0 0 2px var(--line-2);
  font-size: 15px;
  z-index: 1;
}
.tl-node.done { background: var(--green); color: #fff; box-shadow: none; }
.tl-node.current { background: var(--blue); color: #fff; box-shadow: 0 0 0 5px var(--blue-soft); }
.tl-line { width: 2.5px; flex: 1; background: var(--line-2); margin: 2px 0; border-radius: 2px; }
.tl-line.fill { background: var(--green); }
.tl-body { flex: 1; padding-bottom: 22px; }

/* Progress steps */
.steps { display: flex; align-items: center; gap: 6px; }
.steps .st { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.steps .st-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: var(--surface-2); color: var(--muted-2);
  box-shadow: inset 0 0 0 1.5px var(--line-2);
}
.steps .st.active .st-dot { background: var(--blue); color: #fff; box-shadow: var(--sh-blue); }
.steps .st.done .st-dot { background: var(--green); color: #fff; box-shadow: none; }
.steps .st-l { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.steps .st.active .st-l { color: var(--blue); }
.steps .bar { flex: 1; height: 2.5px; background: var(--line-2); border-radius: 2px; }
.steps .bar.fill { background: var(--blue); }

/* Stars */
.stars { display: flex; gap: 8px; justify-content: center; }
.star { font-size: 38px; color: var(--line-2); cursor: pointer; transition: transform .15s var(--ease), color .15s; }
.star.on { color: var(--amber); }
.star:active { transform: scale(.8); }

/* Shimmer skeleton */
.shimmer {
  background: linear-gradient(100deg, var(--line) 30%, #F3F6FB 50%, var(--line) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
  border-radius: 10px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* Confetti */
.confetti { position: absolute; top: -10px; width: 9px; height: 14px; border-radius: 2px; opacity: 0; animation: drop 2.6s var(--ease) forwards; }
@keyframes drop {
  0% { opacity: 0; transform: translateY(-20px) rotate(0); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translateY(620px) rotate(540deg); }
}

/* Entrance animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.fade-up { animation: fadeUp .5s var(--ease) both; }
.pop { animation: pop .5s var(--ease) both; }

.cart-pulse { animation: cartPulse .45s var(--ease); }
@keyframes cartPulse { 0%,100% { transform: none; } 40% { transform: scale(1.12); } }

/* Screen launcher */
.launcher {
  width: 250px; flex: none;
  align-self: stretch;
  display: flex; flex-direction: column;
  max-height: 840px;
}
.launcher h4 { margin: 4px 4px 14px; font-size: 13px; font-weight: 800; letter-spacing: .04em; color: var(--ink-2); }
.launcher .lg { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: var(--muted-2); margin: 14px 4px 7px; }
.launcher .ls {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 12px;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  transition: background .18s, color .18s;
  text-align: right; width: 100%;
}
.launcher .ls:hover { background: rgba(37,99,235,.07); }
.launcher .ls.active { background: var(--blue); color: #fff; box-shadow: var(--sh-blue); }
.launcher .ls .ln { width: 22px; height: 22px; border-radius: 7px; background: var(--surface); box-shadow: var(--sh-sm); display: grid; place-items: center; font-size: 12px; flex: none; color: var(--blue-600); }
.launcher .ls.active .ln { background: rgba(255,255,255,.22); color: #fff; box-shadow: none; }

@media (max-width: 980px) { .launcher { display: none; } .brandbar { display: none; } }
