/* ============================================================
   BRIVO — Pantallas del app dentro del iPhone
   Reproducción fiel del UI real (violeta/lima · Space Grotesk)
   poblada con datos ficticios. El founder reemplaza luego por
   screenshots reales del build de Expo.
   ============================================================ */

/* ---------- iPhone 14 frame (390×844) ---------- */
.phone {
  --pw: 320px;           /* ancho render (escalado desde 390) */
  width: var(--pw);
  aspect-ratio: 390 / 844;
  position: relative;
  border-radius: 56px;
  background: #0B0418;
  padding: 11px;
  box-shadow:
    0 0 0 2px #2A1B45,
    0 0 0 12px #15082C,
    var(--sh-lg);
  flex-shrink: 0;
}
.phone-screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 46px; overflow: hidden; background: var(--bg);
  /* escala interna: diseñamos a 390px y escalamos */
  --scale: calc(var(--pw) / 390);
}
.phone-notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 38%; height: 26px; background: #0B0418; border-radius: 0 0 18px 18px; z-index: 40;
}
.phone .home-indicator {
  position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%);
  width: 36%; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.6); z-index: 45;
}

/* Lienzo a escala real 390 de ancho, escalado por transform */
.screen-canvas {
  position: absolute; top: 0; left: 0;
  width: 390px; height: 844px;
  transform: scale(var(--scale)); transform-origin: top left;
  font-size: 16px; color: var(--ink);
  display: flex; flex-direction: column;
  background: var(--bg);
}

/* status bar */
.sbar { height: 54px; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 28px 6px; font-size: 15px; font-weight: 600; flex-shrink: 0; position: relative; z-index: 20; }
.sbar.on-violet { color: #fff; }
.sbar .sb-icons { display: flex; gap: 6px; align-items: center; }

/* ---------- BrivoHero violeta (magia) ---------- */
.bhero {
  position: relative; color: #fff; padding: 8px 22px 26px; overflow: hidden;
  background: linear-gradient(165deg, #3B0F7D 0%, #7C3AED 60%, #5B21B6 100%);
}
.bhero .h-light {
  position: absolute; width: 240px; height: 240px; left: -40px; top: -90px;
  background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 65%);
}
.bhero .h-lime {
  position: absolute; width: 220px; height: 220px; right: -70px; bottom: -110px;
  background: radial-gradient(circle, rgba(132,204,22,0.34), transparent 62%);
}
.bhero .h-circle { position: absolute; border-radius: 50%; background: rgba(91,33,182,0.5); }
.bhero-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 3; margin-bottom: 18px; }
.bhero-greet { font-size: 14px; color: var(--on-dark-soft); font-weight: 500; }
.bhero h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; position: relative; z-index: 3; }
.bhero h2 .q { color: var(--accent); }
.bhero h2 .bd { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 3px; vertical-align: baseline; }
.bhero-sub { font-size: 14px; color: var(--on-dark-soft); margin-top: 8px; position: relative; z-index: 3; }
.icon-btn-d { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.16);
  display: flex; align-items: center; justify-content: center; position: relative; }
.icon-btn-d .badge { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid #5B21B6; }

/* scroll body */
.sbody { flex: 1; overflow: hidden; padding: 0 18px; background: var(--bg); }
.sbody.pad-top { padding-top: 18px; }

/* AI search entry */
.search-entry {
  height: 60px; border-radius: 30px; background: #fff; box-shadow: var(--sh-md);
  border: 1px solid var(--border); display: flex; align-items: center; gap: 12px;
  padding: 0 7px 0 20px; margin-top: -28px; position: relative; z-index: 6;
}
.search-entry .ph { flex: 1; color: var(--ink-hint); font-size: 15px; }
.search-entry .ai-btn {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; position: relative;
  background: linear-gradient(135deg, #7C3AED, #5B21B6);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-brand);
}
.search-entry .ai-btn .ai-tag {
  position: absolute; bottom: -4px; right: -5px; font-size: 8px; font-weight: 800; letter-spacing: 0.3px;
  background: var(--accent); color: var(--accent-text); padding: 2px 5px; border-radius: 999px; border: 2px solid #fff;
}

/* sección title con dot */
.s-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 24px 0 14px; display: flex; align-items: baseline; }
.s-title .bd { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 3px; }
.s-title.row { justify-content: space-between; }
.s-title .more { font-size: 13px; font-weight: 600; color: var(--brand); }

/* macro tiles */
.macro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.macro-tile {
  background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; min-height: 104px;
}
.macro-tile.hero-tile { grid-column: span 2; background: linear-gradient(120deg, #F4F2FA, #fff); }
.macro-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center; }
.macro-tile.exterior .macro-ico { background: #E6F4DC; color: #4D7C0F; }
.macro-tile.logistica .macro-ico { background: #FEEAD6; color: #C2640E; }
.macro-tile.personal .macro-ico { background: #FBE3F1; color: #BE1A6B; }
.macro-tile.mascotas .macro-ico { background: #FEF3C7; color: #A87400; }
.macro-tile h4 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.macro-tile .subs { font-size: 12px; color: var(--ink-2); line-height: 1.4; }

/* tracking card (en curso) */
.track-card {
  background: linear-gradient(135deg, #5B21B6, #3B0F7D); border-radius: 22px; padding: 16px; color: #fff;
  position: relative; overflow: hidden; box-shadow: var(--sh-brand);
}
.track-card .pill-live {
  position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(132,204,22,0.2); border: 1px solid rgba(132,204,22,0.5); color: var(--accent-soft);
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
}
.track-card .pill-live .ld { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.track-eye { font-size: 11px; letter-spacing: 0.1em; color: rgba(255,255,255,0.6); text-transform: uppercase; }
.track-time { font-size: 42px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-top: 2px; }
.track-time small { font-size: 20px; font-weight: 600; opacity: 0.85; margin-left: 4px; }
.track-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: rgba(255,255,255,0.85); }
.track-actions { display: flex; gap: 8px; margin-top: 14px; }
.track-actions button { flex: 1; height: 40px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.track-actions .ghost { background: rgba(255,255,255,0.16); color: #fff; border: 1px solid rgba(255,255,255,0.22); }
.track-actions .solid { background: #fff; color: var(--brand-deep); }
.track-avatar { width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg,#A78BCA,#7C3AED);
  border: 2px solid rgba(255,255,255,0.5); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; color: #fff; flex-shrink: 0; }

/* tab bar */
.tabbar {
  flex-shrink: 0; height: 78px; background: #fff; border-top: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-around; padding: 10px 8px 0; position: relative;
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink-hint); font-size: 10px; font-weight: 600; width: 56px; }
.tab.active { color: var(--brand); }
.tab-fab {
  width: 60px; height: 60px; border-radius: 50%; margin-top: -22px;
  background: radial-gradient(circle at 40% 35%, #7C3AED, #3B0F7D);
  display: flex; align-items: center; justify-content: center; position: relative;
  box-shadow: 0 8px 22px rgba(124,58,237,0.5);
}
.tab-fab::before {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(from 0deg, #84CC16, #B6F03A, #fff, #7C3AED, #5B21B6, #84CC16);
  z-index: -1; opacity: 0.9;
}

/* ---------- chips / pills genéricos ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border); white-space: nowrap; }
.chip.lime { background: var(--accent-tint); color: var(--accent-text); border-color: transparent; }
.chip.violet { background: var(--brand-light); color: var(--brand); border-color: transparent; }
.chip.sel { background: var(--brand); color: #fff; border-color: transparent; }

/* ---------- pantalla AI typing ---------- */
.ai-screen { padding: 0 20px; }
.ai-bubble {
  background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 18px; margin-top: 8px;
  box-shadow: var(--sh-sm); font-size: 17px; line-height: 1.4; color: var(--ink); min-height: 90px;
}
.ai-bubble .caret { display: inline-block; width: 2px; height: 19px; background: var(--brand); vertical-align: -3px; margin-left: 1px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ai-understood { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  background: var(--accent-tint); color: var(--accent-text); padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ai-detected { margin-top: 22px; }
.ai-detected .lbl { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-hint); font-weight: 600; margin-bottom: 10px; }
.detect-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border);
  border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; }
.detect-row .dico { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.detect-row .dt { font-size: 14px; font-weight: 600; }
.detect-row .ds { font-size: 12px; color: var(--ink-2); }
.detect-row .vchk { margin-left: auto; }

/* ---------- feed de cotizaciones ---------- */
.feed-head { padding: 16px 20px 4px; }
.quote-card {
  background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 15px; margin: 0 20px 12px;
}
.quote-card.best { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.qc-top { display: flex; gap: 12px; align-items: center; }
.qc-av { width: 50px; height: 50px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 18px; position: relative; }
.qc-av .lvl { position: absolute; bottom: -5px; right: -5px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center; font-size: 10px; }
.qc-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; }
.qc-meta { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.qc-stars { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink); }
.qc-price { text-align: right; margin-left: auto; }
.qc-price .amt { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.qc-price .lbl { font-size: 10px; color: var(--ink-hint); text-transform: uppercase; letter-spacing: 0.06em; }
.qc-msg { font-size: 13px; color: var(--ink-2); line-height: 1.4; background: var(--surface-2); border-radius: 12px; padding: 11px 13px; margin-top: 12px; }
.qc-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.qc-foot .chip { font-size: 11px; padding: 5px 10px; }

/* badge "best match" floating */
.best-flag { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--accent-text);
  font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 999px; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 10px; }

/* ---------- detalle cotización ---------- */
.det-head { background: linear-gradient(165deg, #3B0F7D, #7C3AED); padding: 8px 20px 24px; color: #fff; position: relative; overflow: hidden; }
.det-head .h-lime { position: absolute; width: 200px; height: 200px; right: -60px; bottom: -110px; background: radial-gradient(circle, rgba(132,204,22,0.3), transparent 62%); }
.det-pro { display: flex; gap: 12px; align-items: center; position: relative; z-index: 2; margin-top: 8px; }
.det-pro .av { width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(135deg,#A78BCA,#5B21B6); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 24px; color: #fff; position: relative; }
.det-pro .nm { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.det-pro .rl { font-size: 13px; color: var(--on-dark-soft); margin-top: 2px; }
.det-pro .st { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 13px; color: #fff; font-weight: 600; }
.det-body { padding: 18px 20px 0; }
.det-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 16px; margin-bottom: 12px; }
.det-card .row { display: flex; align-items: baseline; justify-content: space-between; }
.det-eye { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-hint); font-weight: 600; }
.det-total { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; margin: 4px 0 14px; }
/* termómetro de precios */
.thermo { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #16A34A, #84CC16 40%, #F4B400 70%, #DC2626); position: relative; margin: 8px 0 6px; }
.thermo .knob { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); transform: translate(-50%, -50%); box-shadow: var(--sh-sm); }
.thermo-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-2); }
.brk-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.brk-row:last-child { border-bottom: none; }
.brk-row .v { font-weight: 700; }
.det-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.det-mini { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
.det-mini .ml { font-size: 11px; color: var(--ink-hint); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 8px; }
.det-mini .mv { font-size: 16px; font-weight: 700; margin-top: 2px; }
.review-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 14px; margin-top: 10px; }
.review-card .rtop { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-card .rav { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#84CC16,#4D7C0F); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.review-card p { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.det-cta { flex-shrink: 0; padding: 12px 20px 22px; display: flex; gap: 10px; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.det-cta .b { height: 52px; border-radius: 999px; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.det-cta .b.sec { flex: 1; background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); }
.det-cta .b.pri { flex: 1.5; background: var(--brand); color: #fff; box-shadow: var(--sh-brand); }

/* ---------- pago MercadoPago ---------- */
.pay-screen { padding: 18px 20px 0; }
.mp-card { background: linear-gradient(135deg, #00B1EA, #008FCC); border-radius: 20px; padding: 18px; color: #fff; position: relative; overflow: hidden; }
.mp-card .mp-logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; }
.mp-card .mp-hand { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; }
.mp-amt-lbl { font-size: 12px; opacity: 0.85; margin-top: 18px; }
.mp-amt { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; }
.escrow-banner { display: flex; gap: 12px; align-items: flex-start; background: var(--accent-tint); border-radius: 16px; padding: 14px; margin-top: 14px; }
.escrow-banner .ei { width: 36px; height: 36px; border-radius: 11px; background: var(--accent); color: var(--accent-text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.escrow-banner .et { font-size: 14px; font-weight: 700; color: var(--accent-text); }
.escrow-banner .es { font-size: 12px; color: #4D7C0F; line-height: 1.4; margin-top: 2px; }
.pay-line { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.pay-line .v { font-weight: 700; }
.pay-line.tot { font-size: 16px; }
.pay-line.tot .v { font-size: 20px; }
.pay-methods { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.pay-method { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 13px; font-size: 14px; font-weight: 600; }
.pay-method.sel { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-light); }
.pay-method .pm-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.pay-method .radio { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-2); }
.pay-method.sel .radio { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 42%, transparent 46%); }

/* ---------- cierre stepper ---------- */
.close-head { background: linear-gradient(165deg, #16A34A, #0E7C4D); padding: 8px 20px 22px; color: #fff; position: relative; overflow: hidden; }
.stepper { display: flex; align-items: center; gap: 0; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 16px; margin: -16px 20px 18px; position: relative; z-index: 5; box-shadow: var(--sh-md); }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.step .sc { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.step .sc.done { background: var(--brand); color: #fff; }
.step .sc.now { background: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 6px var(--accent-tint); }
.step .sc.todo { background: var(--surface-2); color: var(--ink-hint); border: 1px solid var(--border); }
.step .sl { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.step.is-now .sl { color: var(--ink); }
.step-bar { position: absolute; top: 19px; height: 2px; background: var(--border); z-index: -1; }
.close-body { padding: 0 20px; }
.rate-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 18px; text-align: center; }
.rate-stars { display: flex; justify-content: center; gap: 10px; margin: 14px 0; }
.rate-stars svg { width: 34px; height: 34px; }
.tip-chips { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.tip-chips .chip { font-size: 13px; padding: 8px 14px; }

/* ---------- prestador home (mapa + oportunidades) ---------- */
.pro-hero { background: linear-gradient(165deg, #3B0F7D, #7C3AED 60%, #5B21B6); padding: 8px 22px 20px; color: #fff; position: relative; overflow: hidden; }
.pro-online { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.14); padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.pro-online .od { width: 9px; height: 9px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,0.3); }
.pro-stats { display: flex; gap: 10px; margin-top: 16px; position: relative; z-index: 3; }
.pro-stat { flex: 1; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.14); border-radius: 14px; padding: 12px; }
.pro-stat .pv { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.pro-stat .pl { font-size: 11px; color: var(--on-dark-soft); margin-top: 2px; }
.map-block { height: 150px; margin: 14px 20px 0; border-radius: 18px; overflow: hidden; position: relative; border: 1px solid var(--border); }
.map-block svg { width: 100%; height: 100%; }
.opp-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 14px; margin: 0 20px 12px; position: relative; }
.opp-card .accent-strip { position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 4px; background: var(--brand); }
.opp-top { display: flex; align-items: center; gap: 10px; padding-left: 10px; }
.opp-cat { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-light); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.opp-title { font-size: 15px; font-weight: 700; }
.opp-sub { font-size: 12px; color: var(--ink-2); }
.opp-urgency { margin-left: auto; }
.opp-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-left: 10px; }
.opp-foot .dist { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.opp-foot .cotizar { margin-left: auto; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; padding: 9px 18px; border-radius: 999px; }

/* small helpers */
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.scrim-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
