/* ==========================================================================
   FoodIn — Mobile App Demo Styles (3-panel phone frames)
   Loaded after main.css — relies on its design tokens.
   ========================================================================== */

.mobile-page {
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(232, 25, 44, 0.16), transparent 70%),
              var(--bg-main);
}

/* ---------- Hero ---------- */

.mobile-hero {
  text-align: center;
  padding: 3.5rem 2rem 2.5rem;
  max-width: 860px;
  margin: 0 auto;
}

.mobile-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.mobile-hero h1 span {
  background: linear-gradient(135deg, #FF5E62, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mobile-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---------- Role selector ---------- */

.role-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  max-width: 1080px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
}

.role-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  text-align: left;
  transition: var(--transition);
  cursor: pointer;
}

.role-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-card);
}

.role-card.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(232, 25, 44, 0.14), var(--bg-surface));
  box-shadow: var(--shadow-glow);
}

.role-card .rc-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bg-surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.role-card.active .rc-icon { background: var(--primary); }

.role-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.3rem; }
.role-card p { color: var(--text-muted); font-size: 0.86rem; }

/* ---------- Phone row ---------- */

.phones-row {
  display: flex;
  gap: 2.2rem;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 0 2rem 5rem;
}

.phone-col { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }

.phone-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.phone-col.is-active .phone-label {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.phone {
  width: 330px;
  background: #05050600;
  border: 1px solid #26262c;
  border-radius: 46px;
  padding: 11px;
  background-image: linear-gradient(160deg, #1c1c22, #0a0a0c);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  transition: var(--transition);
}

.phone-col.is-active .phone {
  border-color: rgba(232, 25, 44, 0.55);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(232, 25, 44, 0.28);
}

.phone-inner {
  position: relative;
  background: var(--bg-main);
  border-radius: 36px;
  height: 680px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 104px;
  height: 22px;
  background: #000;
  border-radius: 20px;
  z-index: 30;
}

.statusbar {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 1.4rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-strong);
  flex-shrink: 0;
}

/* ---------- App screen ---------- */

.app-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
  animation: screenIn 0.28s ease;
}

.app-body::-webkit-scrollbar { display: none; }

@keyframes screenIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.app-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 1.1rem 0.9rem;
}

.app-header h2 { font-size: 1.15rem; font-weight: 800; }
.app-header .sub { font-size: 0.72rem; color: var(--text-muted); }

.app-back {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.app-tabbar {
  display: flex;
  border-top: 1px solid var(--border-subtle);
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.app-tabbar button {
  flex: 1;
  padding: 0.6rem 0 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: var(--transition);
}

.app-tabbar button .ti { font-size: 1.05rem; }
.app-tabbar button.active { color: var(--primary); }

/* ---------- Mobile UI atoms ---------- */

.m-pad { padding: 0 1.1rem; }

.m-row { display: flex; align-items: center; gap: 0.7rem; }
.m-between { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.m-gap-sm { gap: 0.4rem; }
.m-mt { margin-top: 0.9rem; }
.m-mt-lg { margin-top: 1.4rem; }
.m-mb { margin-bottom: 0.9rem; }

.m-title { font-size: 0.95rem; font-weight: 800; }
.m-sub { font-size: 0.75rem; color: var(--text-muted); }
.m-dim { font-size: 0.68rem; color: var(--text-dim); }
.m-price { font-weight: 800; color: var(--primary); font-size: 0.9rem; }

.m-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Interactive search field (mobile customer app) */
.m-search-input {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0 1rem;
  transition: var(--transition);
}

.m-search-input:focus-within { border-color: var(--primary); }

.m-search-input .si { font-size: 0.8rem; line-height: 1; }

.m-search-input input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.78rem;
  padding: 0.6rem 0;
}

.m-search-input input::placeholder { color: var(--text-dim); }

.m-banner {
  border-radius: var(--radius-md);
  padding: 1.1rem;
  background: linear-gradient(135deg, var(--tint-to), var(--tint-from));
  border: 1px solid rgba(232, 25, 44, 0.28);
  position: relative;
  overflow: hidden;
}

.m-banner::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 130px; height: 130px;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%);
}

.m-banner h4 { font-size: 0.95rem; font-weight: 800; }
.m-banner p { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.2rem; }

.m-chips { display: flex; gap: 0.45rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 0.2rem; }
.m-chips::-webkit-scrollbar { display: none; }

.m-chip {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  white-space: nowrap;
}

.m-chip.active { background: rgba(232, 25, 44, 0.16); border-color: var(--primary); color: var(--text-strong); }

.m-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.m-card-tap { transition: var(--transition); cursor: pointer; }
.m-card-tap:hover { border-color: var(--border-active); }

.m-rest-thumb {
  width: 100%;
  height: 108px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  display: block;
}

.m-thumb-sm {
  width: 62px;
  height: 62px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.m-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #FF5E62);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.m-avatar-lg {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #FF5E62);
  color: #fff; font-weight: 800; font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
}

.m-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  transition: var(--transition);
}

.m-btn:hover { background: var(--primary-hover); }

.m-btn-ghost {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.m-btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--bg-surface-2); }

.m-btn-green { background: var(--success-solid); }
.m-btn-red { background: #B91C1C; }
.m-btn-sm { padding: 0.45rem 0.8rem; font-size: 0.72rem; width: auto; }

.m-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }

.m-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.m-stat .v { font-size: 1.15rem; font-weight: 800; }
.m-stat .l { font-size: 0.63rem; color: var(--text-muted); margin-top: 0.1rem; }

.m-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.m-badge-green { background: rgba(34, 197, 94, 0.16); color: var(--success); }
.m-badge-yellow { background: rgba(245, 158, 11, 0.16); color: var(--warning); }
.m-badge-red { background: rgba(232, 25, 44, 0.18); color: var(--badge-red-fg, #FF5E62); }
.m-badge-blue { background: rgba(59, 130, 246, 0.16); color: var(--badge-blue-fg, #60a5fa); }
.m-badge-grey { background: var(--bg-surface-3); color: var(--text-muted); }

.m-progress {
  height: 6px;
  border-radius: 20px;
  background: var(--bg-surface-3);
  overflow: hidden;
}

.m-progress > div {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #FF5E62);
  border-radius: 20px;
  transition: width 0.6s ease;
}

.m-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 110px;
  padding-top: 0.5rem;
}

.m-bar {
  flex: 1;
  background: linear-gradient(to top, var(--primary), #FF5E62);
  border-radius: 5px 5px 2px 2px;
  position: relative;
  min-height: 6px;
}

.m-bar span {
  position: absolute;
  bottom: -1.05rem;
  left: 0; right: 0;
  text-align: center;
  font-size: 0.55rem;
  color: var(--text-dim);
}

.m-map {
  position: relative;
  height: 190px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background:
    repeating-linear-gradient(0deg, var(--map-line) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, var(--map-line) 0 1px, transparent 1px 30px),
    radial-gradient(circle at 40% 45%, rgba(232,25,44,.14), transparent 60%),
    var(--map-bg);
}

.m-map .pin {
  position: absolute;
  width: 24px; height: 24px;
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%,-50%) rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.66rem;
}

.m-map .pin > span { transform: rotate(45deg); }
.m-map .pin.s { background: var(--primary); }
.m-map .pin.e { background: var(--success-solid); }

.m-map .mover {
  position: absolute;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg-surface-2);
  border: 2px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transform: translate(-50%,-50%);
  box-shadow: 0 0 0 5px rgba(232, 25, 44, 0.22);
}

.m-route { position: absolute; inset: 0; width: 100%; height: 100%; }

.m-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  font-size: 0.76rem;
  color: var(--text-muted);
  cursor: pointer;
}

.m-option-row.active {
  border-color: var(--primary);
  background: rgba(232, 25, 44, 0.12);
  color: var(--text-strong);
}

.m-promo-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  background: rgba(232, 25, 44, 0.09);
  border: 1px dashed rgba(232, 25, 44, 0.45);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.74rem;
}

.m-login-logo {
  width: 74px; height: 74px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), #FF5E62);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  box-shadow: var(--shadow-glow);
  margin: 0 auto 1.2rem;
}

.m-input {
  width: 100%;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.72rem 0.85rem;
  color: var(--text-strong);
  font-size: 0.78rem;
  outline: none;
}

.m-input::placeholder { color: var(--text-dim); }

.m-label { font-size: 0.68rem; font-weight: 600; color: var(--text-muted); display: block; margin-bottom: 0.35rem; }

.m-timeline { position: relative; padding-left: 1.5rem; }
.m-timeline::before {
  content: '';
  position: absolute; left: 6px; top: 5px; bottom: 5px;
  width: 2px; background: var(--border-subtle);
}
.m-tl-item { position: relative; padding-bottom: 1rem; font-size: 0.74rem; }
.m-tl-item:last-child { padding-bottom: 0; }
.m-tl-item::before {
  content: '';
  position: absolute; left: -1.5rem; top: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg-surface-3);
  border: 2px solid var(--border-active);
}
.m-tl-item.done::before { background: var(--success); border-color: var(--success); }
.m-tl-item.now::before { background: var(--primary); border-color: var(--primary); }
.m-tl-item.now { color: var(--text-strong); font-weight: 600; }

.m-swipe {
  position: relative;
  height: 46px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.m-swipe .knob {
  position: absolute;
  left: 4px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 1120px) {
  .phones-row { flex-direction: column; align-items: center; }
}

@media (max-width: 820px) {
  .mobile-hero h1 { font-size: 2rem; }
  .role-cards { grid-template-columns: 1fr; }
  .phone { width: 100%; max-width: 340px; }
}

/* ---------- Role tabs (mobile selector) ---------- */

.role-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0 2rem;
  flex-wrap: wrap;
}

.role-tab {
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition);
}

.role-tab:hover { color: var(--text-main); }

.role-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

@media (min-width: 821px) {
  .role-tabs { display: none; }
}
