/* ============================================================
   YEIMER APP — pages.css
   Estilos específicos de páginas que complementan el Design System
   ============================================================ */

/* ─── PAGE TRANSITIONS ────────────────────────────────────── */

body.page-enter {
  animation: pageEnter 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

body.page-exit {
  animation: pageExit 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pageExit {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.97); }
}

/* ─── TOAST NOTIFICATIONS ─────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 99px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-success {
  background: rgba(6, 214, 160, 0.95);
  color: #0A0A0F;
}

.toast-error {
  background: rgba(239, 35, 60, 0.95);
  color: #fff;
}

.toast-info {
  background: rgba(0, 212, 255, 0.95);
  color: #0A0A0F;
}

.toast-icon { font-size: 16px; }
.toast-msg  { font-size: 14px; font-weight: 700; }

/* ─── SPLASH SCREEN ───────────────────────────────────────── */

/* (ver inline en index.html — aquí van las sobreescrituras si el diseñador las necesita) */

/* ─── FAKE MAP (Checkout + Tracking) ─────────────────────── */

.fake-map,
.big-map {
  background:
    linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(135deg, #0D1B2A 0%, #0F2920 50%, #1A0D2E 100%);
  background-size: 26px 26px, 26px 26px, 100% 100%;
}

/* ─── OTP INPUT ───────────────────────────────────────────── */

.otp-box {
  width: 64px;
  height: 72px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--color-primary, #FF6B35);
  font-family: 'Outfit', sans-serif;
  transition: all 0.2s ease;
  caret-color: var(--color-primary, #FF6B35);
  outline: none;
}

.otp-box:focus {
  border-color: var(--color-primary, #FF6B35);
  background: rgba(255, 107, 53, 0.1);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
  transform: scale(1.05);
}

.otp-box.filled {
  border-color: rgba(255, 107, 53, 0.5);
  background: rgba(255, 107, 53, 0.08);
}

/* ─── PIN DISPLAY (Tracking) ──────────────────────────────── */

.pin-display {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.pin-digit {
  width: 60px;
  height: 68px;
  border-radius: 16px;
  background: linear-gradient(135deg,
    rgba(255, 107, 53, 0.1),
    rgba(124, 58, 237, 0.1));
  border: 2px solid rgba(255, 107, 53, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  color: #FF6B35;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.2);
  animation: pinReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.pin-digit:nth-child(2) { animation-delay: 0.1s; }
.pin-digit:nth-child(3) { animation-delay: 0.2s; }
.pin-digit:nth-child(4) { animation-delay: 0.3s; }

@keyframes pinReveal {
  from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

/* ─── RIDER DOT (Tracking map) ────────────────────────────── */

.rider-dot {
  position: absolute;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B35, #F72585);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 0 6px rgba(255, 107, 53, 0.25), 0 4px 16px rgba(255, 107, 53, 0.5);
}

.rider-dot::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 107, 53, 0.35);
  animation: riderRipple 1.5s ease-out infinite;
}

@keyframes riderRipple {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.8); }
}

/* ─── TENDERO: ORDER ALERT PULSE ──────────────────────────── */

.order-alert {
  animation: alertBorderPulse 2s ease-in-out infinite;
}

@keyframes alertBorderPulse {
  0%, 100% { border-color: rgba(255, 107, 53, 0.4); box-shadow: none; }
  50%      { border-color: rgba(255, 107, 53, 0.8); box-shadow: 0 0 20px rgba(255, 107, 53, 0.18); }
}

/* ─── ONBOARDING SLIDE TRANSITION ─────────────────────────── */

#slides-track {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── CATEGORY CHIPS SCROLL ───────────────────────────────── */

.categories-wrap,
.filter-wrap,
.businesses-wrap {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.categories-wrap::-webkit-scrollbar,
.filter-wrap::-webkit-scrollbar,
.businesses-wrap::-webkit-scrollbar {
  display: none;
}

/* ─── PRODUCT CARD HOVER EFFECT ────────────────────────────── */

.product-card:hover .product-img,
.cat-product-card:hover .cat-prod-img {
  background: linear-gradient(135deg,
    rgba(255, 107, 53, 0.15),
    rgba(124, 58, 237, 0.15));
}

/* ─── BUSINESS CARD STATUS ─────────────────────────────────── */

.business-card.closed {
  opacity: 0.5;
  filter: grayscale(0.3);
  pointer-events: none;
}

/* ─── CART ITEM ANIMATION ─────────────────────────────────── */

.cart-item {
  animation: cartItemIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

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

.cart-item.removing {
  opacity: 0;
  transform: translateX(100%) scale(0.9);
  transition: all 0.28s ease;
}

/* ─── PROCESSING OVERLAY ───────────────────────────────────── */

.processing-overlay {
  animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── STEPPER ──────────────────────────────────────────────── */

.step-circle {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── WOMPI CARD SHINE ─────────────────────────────────────── */

.wompi-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 65%
  );
  background-size: 200% 100%;
  animation: cardShine 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cardShine {
  0%   { background-position: 200% 0; }
  50%  { background-position: -200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── PROFILE AVATAR GLOW ──────────────────────────────────── */

.avatar-wrap {
  position: relative;
}

.avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 36px;
  background: linear-gradient(135deg, #FF6B35, #7C3AED);
  opacity: 0.2;
  filter: blur(12px);
  animation: avatarGlow 3s ease-in-out infinite alternate;
}

@keyframes avatarGlow {
  from { opacity: 0.15; transform: scale(0.95); }
  to   { opacity: 0.35; transform: scale(1.05); }
}

/* ─── KPI CARDS ────────────────────────────────────────────── */

.kpi-card {
  transition: all 0.25s ease;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.14);
}

/* ─── STAT CARDS ───────────────────────────────────────────── */

.stat-card:nth-child(1) .stat-value { background: linear-gradient(135deg, #FF6B35, #F72585); }
.stat-card:nth-child(2) .stat-value { background: linear-gradient(135deg, #7C3AED, #00D4FF); }
.stat-card:nth-child(3) .stat-value { background: linear-gradient(135deg, #FFD166, #FF6B35); }

/* ─── MENU ITEMS ───────────────────────────────────────────── */

.menu-item {
  transition: background 0.15s ease;
}

/* ─── SEARCH INPUT FOCUS ───────────────────────────────────── */

.search-input:focus + * .search-icon,
.search-wrap:focus-within .search-icon {
  color: #FF6B35;
}

/* ─── PROMO BANNER ANIMATION ───────────────────────────────── */

.promo-banner {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.promo-banner:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(255, 107, 53, 0.45);
}

/* ─── ONBOARDING BG ────────────────────────────────────────── */

.ob-bg {
  transition: background 0.6s ease;
}

/* ─── BOTTOM SHEET MODAL ───────────────────────────────────── */

.bottom-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-height: 90vh;
  background: #14141F;
  border-radius: 28px 28px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 8px 0 40px;
}

.bottom-sheet.open {
  transform: translateY(0);
}

.bottom-sheet-handle {
  width: 36px; height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.15);
  margin: 12px auto 20px;
}

.bottom-sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 199;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.bottom-sheet-overlay.show {
  opacity: 1;
  pointer-events: all;
}

/* ─── DELIVERY PROGRESS BAR ────────────────────────────────── */

.delivery-progress-fill {
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── GENERAL UTILITIES ────────────────────────────────────── */

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Smooth scrolling universal */
* { scroll-behavior: smooth; }

/* Tap highlight off en móvil */
* { -webkit-tap-highlight-color: transparent; }

/* Prevenir zoom en input focus iOS */
input[type="text"],
input[type="tel"],
input[type="search"],
input[type="email"],
textarea {
  font-size: 16px;
}

@media (max-width: 375px) {
  .pin-digit   { width: 52px; height: 60px; font-size: 26px; }
  .otp-box     { width: 56px; height: 64px; font-size: 24px; }
  .hero-title  { font-size: 22px; }
  .kpi-value   { font-size: 22px; }
}

@media (min-width: 430px) {
  body { max-width: 430px; margin: 0 auto; }
}

/* ─── ROLES PAGE STYLES ───────────────────────────────────── */

.roles-container {
  padding: var(--space-2xl, 2rem) var(--space-md, 1rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl, 1.5rem);
  min-height: 100vh;
}

.roles-header {
  text-align: center;
  margin-bottom: var(--space-md, 1rem);
}

.roles-title {
  font-size: var(--text-2xl, 1.875rem);
  font-weight: var(--font-black, 900);
  background: linear-gradient(135deg, #FF6B35, #F72585);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-xs, 0.5rem);
}

.roles-subtitle {
  font-size: var(--text-sm, 0.875rem);
  color: rgba(255, 255, 255, 0.55);
}

.roles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md, 1rem);
  width: 100%;
  max-width: 380px;
}

.roles-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  padding: var(--space-xl, 1.5rem) var(--space-md, 1rem);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm, 0.75rem);
  position: relative;
  overflow: hidden;
}

.roles-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.roles-card:hover {
  border-color: rgba(255, 107, 53, 0.40);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 32px rgba(255, 107, 53, 0.15);
}

.roles-card:hover::before {
  opacity: 1;
}

.roles-card.selected {
  border-color: #FF6B35;
  background: rgba(255, 107, 53, 0.12);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.25);
}

.roles-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  position: relative;
  z-index: 1;
}

.roles-card.selected .roles-card__icon {
  background: rgba(255, 107, 53, 0.2);
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.3);
}

.roles-card__name {
  font-size: var(--text-base, 1rem);
  font-weight: var(--font-bold, 700);
  color: #fff;
  position: relative;
  z-index: 1;
}

.roles-card__desc {
  font-size: var(--text-xs, 0.75rem);
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

/* ─── ADMIN PAGE STYLES ───────────────────────────────────── */

.admin-container {
  padding: var(--space-md, 1rem);
  padding-bottom: calc(var(--bottom-nav-h, 72px) + var(--space-lg, 1.25rem));
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl, 1.5rem);
}

.admin-title {
  font-size: var(--text-xl, 1.5rem);
  font-weight: var(--font-bold, 700);
  color: #fff;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md, 1rem);
  margin-bottom: var(--space-xl, 1.5rem);
}

.admin-stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  padding: var(--space-lg, 1.25rem);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #FF6B35, #F72585);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.admin-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.admin-stat-card:hover::before {
  opacity: 1;
}

.admin-stat-card__icon {
  font-size: 24px;
  margin-bottom: var(--space-sm, 0.75rem);
}

.admin-stat-card__value {
  font-size: var(--text-2xl, 1.875rem);
  font-weight: var(--font-black, 900);
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}

.admin-stat-card__label {
  font-size: var(--text-xs, 0.75rem);
  color: rgba(255, 255, 255, 0.55);
  font-weight: var(--font-medium, 500);
}

.admin-stat-card__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs, 0.75rem);
  font-weight: var(--font-semibold, 600);
  margin-top: var(--space-xs, 0.5rem);
}

.admin-stat-card__delta--up { color: #06D6A0; }
.admin-stat-card__delta--down { color: #EF233C; }

.admin-section-title {
  font-size: var(--text-lg, 1.25rem);
  font-weight: var(--font-bold, 700);
  color: #fff;
  margin-bottom: var(--space-md, 1rem);
}

.admin-order-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: var(--space-md, 1rem);
  margin-bottom: var(--space-sm, 0.75rem);
  transition: all 0.2s ease;
  cursor: pointer;
}

.admin-order-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.admin-order-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xs, 0.5rem);
}

.admin-order-card__id {
  font-size: var(--text-sm, 0.875rem);
  font-weight: var(--font-bold, 700);
  color: #fff;
}

.admin-order-card__time {
  font-size: var(--text-xs, 0.75rem);
  color: rgba(255, 255, 255, 0.45);
}

.admin-order-card__details {
  font-size: var(--text-sm, 0.875rem);
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: var(--space-xs, 0.5rem);
}

.admin-order-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-order-card__total {
  font-size: var(--text-md, 1.125rem);
  font-weight: var(--font-extrabold, 800);
  color: #FF6B35;
}

.admin-actions {
  display: flex;
  gap: var(--space-xs, 0.5rem);
}

.admin-action-btn {
  padding: 6px 14px;
  border-radius: 99px;
  font-size: var(--text-xs, 0.75rem);
  font-weight: var(--font-semibold, 600);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.admin-action-btn--accept {
  background: rgba(6, 214, 160, 0.15);
  color: #06D6A0;
  border: 1px solid rgba(6, 214, 160, 0.3);
}

.admin-action-btn--accept:hover {
  background: rgba(6, 214, 160, 0.25);
  box-shadow: 0 0 12px rgba(6, 214, 160, 0.2);
}

.admin-action-btn--reject {
  background: rgba(239, 35, 60, 0.15);
  color: #EF233C;
  border: 1px solid rgba(239, 35, 60, 0.3);
}

.admin-action-btn--reject:hover {
  background: rgba(239, 35, 60, 0.25);
  box-shadow: 0 0 12px rgba(239, 35, 60, 0.2);
}

.admin-empty-state {
  text-align: center;
  padding: var(--space-3xl, 2.5rem) var(--space-md, 1rem);
  color: rgba(255, 255, 255, 0.35);
}

.admin-empty-state__icon {
  font-size: 48px;
  margin-bottom: var(--space-md, 1rem);
}

.admin-empty-state__text {
  font-size: var(--text-base, 1rem);
  font-weight: var(--font-medium, 500);
}

