/* ═══════════════════════════════════════════════════
   FOODCAPS · Design System · 2025
═══════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --green:      #1a7660;
  --green2:     #14604f;
  --green-bg:   #e8f5f0;
  --yellow:     #FFE600;
  --blue:       #3483FA;
  --blue-hover: #2968c8;
  --red:        #F23D4F;
  --bg:         #f5f5f7;
  --white:      #ffffff;
  --text:       #1d1d1f;
  --text2:      #6e6e73;
  --text3:      #aeaeb2;
  --border:     #e5e5ea;
  --shadow:     0 1px 4px rgba(0,0,0,.12);
  --radius:     14px;
  --nav-h:      56px;
  color-scheme: light only;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  color-scheme: light;
}
body.no-scroll { overflow: hidden !important; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── INPUTS LIGHT MODE ── */
input, textarea, select, button {
  -webkit-appearance: none; appearance: none;
  color-scheme: light;
  background-color: #fff;
  color: #111;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: #111 !important;
}

/* ══ HERO HOME ══════════════════════════════════════ */
#fc-home {
  background: #fff;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.fc-nav {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: .5px solid rgba(0,0,0,.1);
  position: sticky;
  top: 0;
  z-index: 100;
}
.fc-nav-logo { height: 22px; width: auto; }
.fc-nav-skip {
  font-size: 14px; font-weight: 500;
  color: var(--green);
  background: none; border: none;
}

.fc-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 28px 28px;
}

.fc-eyebrow {
  font-size: 13px; font-weight: 500; color: #3a3a3c;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 6px;
  background: #f5f5f7; padding: 7px 14px; border-radius: 30px;
}

.fc-av {
  width: 84px; height: 84px; border-radius: 50%;
  overflow: hidden; margin-bottom: 20px;
  box-shadow: 0 2px 14px rgba(0,0,0,.11);
}
.fc-av img { width: 100%; height: 100%; object-fit: cover; object-position: center 8%; }

.fc-ttl {
  font-size: 30px; font-weight: 700;
  color: #1d1d1f; letter-spacing: -.6px;
  line-height: 1.1; margin-bottom: 10px;
}
.fc-ttl em { color: var(--green); font-style: normal; }

.fc-sub-hook {
  font-size: 15px; font-weight: 500; color: #6e6e73;
  line-height: 1.5; margin-bottom: 8px; max-width: 300px;
}
.fc-reinforce {
  font-size: 17px; font-weight: 800;
  color: var(--green); letter-spacing: -.35px;
  line-height: 1.25; margin-bottom: 18px;
}
.fc-reinforce::after {
  content: '';
  display: block; width: 40px; height: 3px;
  background: linear-gradient(90deg, var(--green), transparent);
  border-radius: 2px; margin: 6px auto 0;
}
.fc-sub {
  font-size: 14px; color: #6e6e73;
  line-height: 1.6; margin-bottom: 14px; max-width: 290px;
}
.fc-microtrust {
  font-size: 11px; color: rgba(142,142,147,.75);
  margin-bottom: 8px; text-align: center;
}

@keyframes ctaPulse {
  0%,100% { box-shadow: 0 6px 24px rgba(26,118,96,.42),0 0 0 0 rgba(26,118,96,.18); }
  50%      { box-shadow: 0 8px 30px rgba(26,118,96,.5),0 0 0 8px rgba(26,118,96,0); }
}
.fc-btn-primary {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 100%; max-width: 360px;
  padding: 17px 28px;
  background: var(--green); color: #fff;
  border: none; border-radius: 50px;
  animation: ctaPulse 3s ease-in-out infinite;
  transition: transform .12s;
}
.fc-btn-primary:active { transform: scale(.97); animation: none; }
.fc-cta-main { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.fc-cta-sub  { font-size: 11px; opacity: .72; }

.fc-btn-ghost {
  margin-top: 12px; font-size: 13px;
  color: #aeaeb2; background: none; border: none;
}

.fc-divider { height: .5px; background: #e5e5ea; margin: 0 20px; }

.fc-proof {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 20px;
}
.fc-proof-avs { display: flex; }
.fc-proof-av {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid #fff;
  background: #f0f7f5; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  margin-left: -6px;
}
.fc-proof-av:first-child { margin-left: 0; }
.fc-proof-txt { font-size: 13px; color: #6e6e73; line-height: 1.4; }
.fc-proof-txt strong { color: #1d1d1f; font-weight: 600; }
.fc-proof-stars { font-size: 11px; color: #f0a500; }

.fc-steps-section { padding: 24px 20px; background: #f5f5f7; }
.fc-steps-label {
  font-size: 11px; font-weight: 600; color: #6e6e73;
  letter-spacing: 1.2px; text-transform: uppercase;
  margin-bottom: 16px; text-align: center;
}
.fc-step-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 0; border-bottom: .5px solid #e5e5ea;
}
.fc-step-row:last-child { border-bottom: none; padding-bottom: 0; }
.fc-step-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.fc-step-ttl { font-size: 14px; font-weight: 600; color: #1d1d1f; margin-bottom: 2px; }
.fc-step-sub { font-size: 12.5px; color: #6e6e73; line-height: 1.5; }

.fc-sticky-footer {
  padding: 12px 20px calc(env(safe-area-inset-bottom,0px) + 12px);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: .5px solid rgba(0,0,0,.1);
  display: flex; flex-direction: column; gap: 4px;
}
.fc-sticky-main {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 100%; padding: 15px;
  background: var(--green); color: #fff;
  border: none; border-radius: 50px;
  font-size: 16px; font-weight: 700;
  box-shadow: 0 4px 18px rgba(26,118,96,.3);
  transition: opacity .15s;
}
.fc-sticky-main:active { opacity: .8; }
.fc-sticky-sec {
  width: 100%; padding: 6px;
  background: none; border: none;
  font-size: 12px; color: #aeaeb2; text-align: center;
}

/* ══ ML NAVBAR ══════════════════════════════════════ */
.ml-nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--yellow);
  height: var(--nav-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.ml-nav-logo {
  font-size: 13px; font-weight: 900; color: var(--text);
  white-space: nowrap; letter-spacing: -.3px; line-height: 1.1;
  flex-shrink: 0; text-decoration: none;
}
.ml-nav-logo span { display: block; font-size: 9px; font-weight: 600; color: #555; letter-spacing: .3px; }
.ml-search-wrap { flex: 1; position: relative; }
.ml-search {
  width: 100%; height: 36px;
  border: none; border-radius: 4px;
  padding: 0 36px 0 12px;
  font-size: 14px; color: var(--text);
  background: #fff; outline: none;
}
.ml-search-ico {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 16px; color: #888; pointer-events: none;
}
.ml-nav-cart {
  position: relative; flex-shrink: 0;
  background: none; border: none;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 4px 6px; border-radius: 6px;
  transition: background .15s;
}
.ml-nav-cart:active { background: rgba(0,0,0,.1); }
.ml-nav-cart-ico  { font-size: 22px; line-height: 1; }
.ml-nav-cart-lbl  { font-size: 9px; font-weight: 600; color: var(--text); letter-spacing: .2px; }
.ml-cart-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: none; align-items: center; justify-content: center;
  padding: 0 4px; line-height: 1;
}
.ml-cart-badge.show { display: flex; }

/* ── DRA BANNER ── */
.ml-dra-banner {
  background: linear-gradient(135deg,#004d33,#006644,#1a7660);
  color: #fff; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.ml-dra-banner-av {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5);
  overflow: hidden; flex-shrink: 0; background: #004d33;
}
.ml-dra-banner-av img { width: 100%; height: 100%; object-fit: cover; object-position: center 10%; }
.ml-dra-banner-txt { flex: 1; }
.ml-dra-banner-ttl { font-size: 13px; font-weight: 800; letter-spacing: -.2px; }
.ml-dra-banner-sub { font-size: 11px; opacity: .85; margin-top: 1px; }
.ml-dra-banner-cta {
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.4);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 6px 12px; border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}

/* ── CAT FILTER ── */
.ml-cats-wrap {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: var(--nav-h); z-index: 190;
}
.ml-cats {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 10px 12px; scrollbar-width: none;
}
.ml-cats::-webkit-scrollbar { display: none; }
.ml-cat-btn {
  flex-shrink: 0; padding: 7px 14px;
  border: 1.5px solid var(--border); border-radius: 20px;
  background: #fff; font-size: 13px; font-weight: 600; color: var(--text2);
  white-space: nowrap; transition: all .15s;
}
.ml-cat-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── TOOLBAR ── */
.ml-toolbar {
  background: #fff; padding: 8px 12px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.ml-result-count { color: var(--text2); font-size: 12px; }
.ml-sort-select {
  border: 1px solid var(--border); border-radius: 4px;
  padding: 4px 8px; font-size: 12px; color: var(--text);
  background: #fff; outline: none;
}

/* ══ PRODUCT GRID ════════════════════════════════════ */
#cat-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 0;
  padding: 8px;
  background: var(--bg);
}
.prod-grid-inner {
  display: contents;
}
@media(min-width:640px){
  #cat-grid { grid-template-columns: repeat(3,1fr); gap: 0; }
}

/* ── CAT GROUP HEADERS ── */
.cat-group-header {
  grid-column: 1 / -1;
  padding: 16px 4px 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.cat-group-header--first { padding-top: 4px; }
.cat-group-lbl { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -.3px; }
.cat-group-sub { font-size: 11px; color: var(--text2); }
.cat-group-header--advanced .cat-group-lbl { color: #7B2FBE; }

/* ══ PRODUCT CARD ════════════════════════════════════ */
.prod-card {
  background: #fff; border-radius: 10px;
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  position: relative; cursor: pointer;
  transition: box-shadow .2s;
  margin: 4px;
}
.prod-card:active { box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.prod-card--advanced { border: 1.5px solid rgba(123,47,190,.25); }

.prod-card-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 10px; font-weight: 800; padding: 3px 7px;
  border-radius: 4px; text-transform: uppercase; letter-spacing: .3px;
}
.prod-card-badge.hot  { background: var(--red); color: #fff; }
.prod-card-badge.top  { background: #FF7733; color: #fff; }
.prod-card-badge.new  { background: var(--blue); color: #fff; }
.prod-card-badge.adv  { background: #7B2FBE; color: #fff; }
.prod-card-badge.best { background: var(--green); color: #fff; }

.prod-card-line {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  font-size: 9px; font-weight: 800; color: #7B2FBE;
  background: rgba(123,47,190,.1); padding: 2px 6px; border-radius: 3px;
}

.prod-card-img-wrap {
  width: 100%; padding-top: 100%; position: relative;
  background: #f8f8f8;
}
.prod-card-img-wrap img,
.prod-card-img-wrap span {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; padding: 10px;
  transition: transform .3s;
}
.prod-card:active .prod-card-img-wrap img { transform: scale(1.04); }

.prod-card-body {
  padding: 8px 10px 6px;
  display: flex; flex-direction: column; gap: 3px;
  flex: 1;
}
.prod-card-name {
  font-size: 13px; color: var(--text); line-height: 1.3; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod-card-goal {
  font-size: 11px; color: var(--text2); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

.prod-card-actions {
  padding: 6px 8px 10px;
  display: flex; flex-direction: column; gap: 5px;
}

.prod-add-btn {
  width: 100%; padding: 9px 6px;
  border: none; border-radius: 8px;
  font-size: 12px; font-weight: 700;
  transition: all .15s;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.prod-add-btn--add {
  background: var(--blue); color: #fff;
}
.prod-add-btn--add:active { background: var(--blue-hover); transform: scale(.98); }
.prod-add-btn--remove {
  background: #f0faf4; color: var(--green);
  border: 1.5px solid var(--green);
}
.prod-add-btn--remove:active { background: #d4f0e5; }

.prod-dra-link {
  width: 100%; padding: 7px 6px;
  background: none; border: 1.5px solid var(--border);
  color: var(--green); border-radius: 8px;
  font-size: 11px; font-weight: 700;
  transition: all .15s;
}
.prod-dra-link:active { background: #f0faf4; }

/* ── CART BAR ── */
#cart-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 400;
  background: var(--green);
  padding: 12px 16px calc(env(safe-area-inset-bottom,0px) + 12px);
  display: flex; align-items: center; gap: 12px;
  transform: translateY(110%);
  transition: transform .3s cubic-bezier(.32,1,.3,1);
  box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}
#cart-bar.open { transform: translateY(0); }
.cart-bar-badge {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; color: var(--green);
  font-size: 13px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cart-bar-info { flex: 1; min-width: 0; }
.cart-bar-ttl { font-size: 13px; font-weight: 700; color: #fff; }
.cart-bar-sub {
  font-size: 11px; color: rgba(255,255,255,.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-open-btn {
  background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.5);
  color: #fff; font-size: 13px; font-weight: 700;
  padding: 8px 14px; border-radius: 20px; white-space: nowrap;
}

/* ── PROMO BANNER ── */
.ml-promo-banner {
  background: linear-gradient(135deg,#1a7660,#004d33);
  margin: 8px; border-radius: 12px; overflow: hidden;
  padding: 20px 16px; display: flex; flex-direction: column; gap: 8px;
}
.ml-promo-banner-ttl { font-size: 18px; font-weight: 900; color: #fff; letter-spacing: -.3px; }
.ml-promo-banner-sub { font-size: 13px; color: rgba(255,255,255,.85); line-height: 1.5; }
.ml-promo-banner-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--yellow); color: #333;
  padding: 10px 20px; border-radius: 6px;
  font-size: 14px; font-weight: 800; border: none;
  width: fit-content; margin-top: 4px;
}
.ml-promo-banner-cta:active { background: #f0d900; }

/* ── ML CART OVERLAY ── */
.ml-cart-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.5);
  display: none; align-items: stretch; justify-content: flex-end;
}
.ml-cart-overlay.open { display: flex; }
.ml-cart-overlay.open .ml-cart-panel { animation: slideInRight .25s ease; }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

.ml-cart-panel {
  width: min(100%, 400px); background: #fff;
  display: flex; flex-direction: column; max-height: 100vh; overflow: hidden;
}
.ml-cart-header {
  background: var(--yellow); padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.ml-cart-header-ttl { font-size: 16px; font-weight: 800; color: var(--text); }
.ml-cart-close {
  background: none; border: none; font-size: 22px;
  color: var(--text); padding: 2px 6px; border-radius: 4px;
}
.ml-cart-items { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.ml-cart-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; color: var(--text3); padding: 40px 20px; text-align: center;
}
.ml-cart-empty-ico { font-size: 48px; }
.ml-cart-empty-txt { font-size: 14px; }
.ml-cart-item {
  display: flex; gap: 10px; padding: 10px;
  border: 1px solid var(--border); border-radius: 8px; position: relative;
}
.ml-cart-item-img {
  width: 64px; height: 64px; flex-shrink: 0;
  background: #f8f8f8; border-radius: 6px; overflow: hidden;
}
.ml-cart-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.ml-cart-item-info { flex: 1; min-width: 0; }
.ml-cart-item-name {
  font-size: 12px; color: var(--text); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ml-cart-item-price { font-size: 14px; font-weight: 700; color: var(--text); margin-top: 4px; }
.ml-cart-item-controls {
  display: flex; align-items: center; margin-top: 6px;
  border: 1px solid var(--border); border-radius: 4px;
  overflow: hidden; width: fit-content;
}
.ml-ci-btn {
  width: 28px; height: 26px; border: none; background: #f5f5f5;
  font-size: 16px; color: var(--blue); transition: background .1s;
}
.ml-ci-btn:active { background: #ddd; }
.ml-ci-qty {
  width: 32px; text-align: center; font-size: 13px; font-weight: 700;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  line-height: 26px;
}
.ml-cart-item-remove {
  position: absolute; top: 6px; right: 6px;
  background: none; border: none; color: var(--text3); font-size: 14px;
  padding: 2px; border-radius: 3px;
}
.ml-cart-item-remove:active { color: var(--red); }
.ml-cart-footer {
  padding: 12px 16px; border-top: 1px solid var(--border);
  flex-shrink: 0; display: flex; flex-direction: column; gap: 8px;
}
.ml-cart-summary { display: flex; justify-content: space-between; align-items: baseline; }
.ml-cart-total-lbl { font-size: 13px; color: var(--text2); }
.ml-cart-total-val { font-size: 20px; font-weight: 800; color: var(--text); }
.ml-cart-installment { font-size: 11px; color: var(--green); }
.ml-btn-checkout {
  width: 100%; padding: 14px;
  background: var(--blue); color: #fff;
  border: none; border-radius: 8px;
  font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.ml-btn-checkout:active { background: var(--blue-hover); }
.ml-btn-checkout-dra {
  width: 100%; padding: 12px;
  background: none; border: 2px solid var(--green); color: var(--green);
  border-radius: 8px; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.ml-btn-checkout-dra:active { background: #f0faf4; }

/* ── ADD TOAST ── */
#ml-add-toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--green); color: #fff;
  padding: 10px 20px; border-radius: 30px;
  font-size: 13px; font-weight: 700;
  opacity: 0; transition: all .3s; z-index: 999;
  pointer-events: none; white-space: nowrap;
}
#ml-add-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── BACK TO TOP ── */
.ml-back-top {
  position: fixed; bottom: 20px; right: 16px; z-index: 300;
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  display: none; align-items: center; justify-content: center;
  font-size: 18px; color: var(--blue);
}
.ml-back-top.show { display: flex; }

/* ── RIPPLE ── */
.ripple-wrap { position: relative; overflow: hidden; }
@keyframes ripple { from { transform: scale(0); opacity: .4; } to { transform: scale(2.5); opacity: 0; } }
.ripple-circle {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.4);
  animation: ripple .5s ease-out;
  pointer-events: none;
}

/* ══ CHAT PANEL ══════════════════════════════════════ */
#fc-chat {
  position: fixed; inset: 0; z-index: 1000;
  display: none; flex-direction: column;
  background: #ECE5DD;
  --wpp-in: #fff; --wpp-out: #DCF8C6;
}
#fc-chat.aberto { display: flex; }
.chat-header {
  background: var(--green); padding: 12px 16px;
  padding-top: max(env(safe-area-inset-top,0px),12px);
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.chat-back {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: #fff; font-size: 22px;
}
.chat-av { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 2px solid rgba(255,255,255,.5); }
.chat-av img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.chat-name { font-size: 16px; font-weight: 700; color: #fff; }
.chat-status { font-size: 12px; color: rgba(255,255,255,.85); display: flex; align-items: center; gap: 5px; }
.chat-status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.4} }

.save-status { font-size: 11px; text-align: center; padding: 3px; color: #aaa; min-height: 18px; flex-shrink: 0; }
.save-status.ok  { color: var(--green); }
.save-status.err { color: var(--red); }

.chat-msgs {
  flex: 1; overflow-y: auto; padding: 16px 12px 8px;
  display: flex; flex-direction: column; gap: 4px;
  scroll-behavior: smooth;
}
.date-chip { text-align: center; margin: 6px 0; }
.date-chip span {
  background: rgba(0,0,0,.12); color: #555;
  font-size: 11px; font-weight: 600; letter-spacing: .3px;
  padding: 4px 12px; border-radius: 12px;
}
.bubble-row { display: flex; gap: 6px; max-width: 88%; animation: fadeUp .28s ease; }
/* Card IMC — bolha larga sem padding extra */
.bubble-row.imc-card { max-width: 96%; }
.bubble-row.imc-card .bubble { padding: 0; background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
@keyframes fadeUp { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }
.bubble-row.in  { align-self: flex-start; }
.bubble-row.out { align-self: flex-end; }
/* .bubble-av removido — foto só no cabeçalho do chat */
.bubble {
  padding: 9px 12px; border-radius: 18px;
  font-size: 14.5px; line-height: 1.55; max-width: 100%; word-break: break-word;
}
.bubble-row.in  .bubble { background: var(--wpp-in); color: var(--text); border-radius: 4px 18px 18px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.bubble-row.out .bubble { background: var(--wpp-out); color: var(--text); border-radius: 18px 18px 4px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.bubble-time { font-size: 10px; color: #999; margin-top: 3px; text-align: right; }
.bubble em { color: var(--green); font-style: normal; font-weight: 600; }
.bubble strong { font-weight: 700; }

.typing-row { display: flex; gap: 0; align-self: flex-start; animation: fadeUp .25s ease; }
.typing-bubble {
  background: var(--wpp-in); padding: 12px 16px;
  border-radius: 4px 18px 18px 18px; box-shadow: 0 1px 2px rgba(0,0,0,.1);
  display: flex; gap: 4px; align-items: center;
}
.typing-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #aaa;
  animation: typing .9s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: .18s; }
.typing-dot:nth-child(3) { animation-delay: .36s; }
@keyframes typing { 0%,100%{transform:translateY(0);opacity:.5} 50%{transform:translateY(-4px);opacity:1} }

.opts-panel {
  background: #f0f0f0; border-top: 1px solid #ddd;
  padding: 10px 12px 12px; flex-shrink: 0;
  display: flex; flex-direction: column;
}
.opts-panel.hidden { display: none; }
.opts-label { font-size: 11px; font-weight: 600; color: #555; letter-spacing: .3px; margin-bottom: 8px; }

/* ── Botão Voltar inline — dentro do fluxo de mensagens ── */
.chat-voltar-inline-wrap {
  display: flex;
  justify-content: flex-end;
  padding: 0 4px 2px;
  animation: fadeUp .22s ease;
}
.chat-voltar-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,.72);
  border: 1.5px solid rgba(26,107,74,.28);
  border-radius: 50px;
  padding: 5px 13px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1a6b4a;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s, transform .12s;
  backdrop-filter: blur(3px);
  letter-spacing: .01em;
}
.chat-voltar-inline:hover {
  background: rgba(26,107,74,.10);
  border-color: rgba(26,107,74,.55);
}
.chat-voltar-inline:active {
  transform: scale(.94);
}
.opts-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.opt-chip {
  padding: 9px 16px; background: #fff;
  border: 1.5px solid #ddd; border-radius: 50px;
  font-size: 13.5px; font-weight: 500; color: var(--text);
  white-space: nowrap; transition: all .15s;
}
.opt-chip.selected { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.opt-chip:active { transform: scale(.96); }
.opts-confirm {
  margin-top: 8px; width: 100%; padding: 12px;
  background: var(--green); color: #fff;
  border: none; border-radius: 50px; font-size: 15px; font-weight: 700;
  opacity: .35; pointer-events: none; transition: all .15s;
}
.opts-confirm.active { opacity: 1; pointer-events: auto; }
.opts-confirm:active { transform: scale(.97); }

.capture-bar {
  background: #f0f0f0; border-top: 1px solid #ddd;
  padding: 10px 12px calc(env(safe-area-inset-bottom,0px) + 12px);
  display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
}
.capture-bar.hidden { display: none; }
.capture-label { font-size: 12px; font-weight: 600; color: #555; }
.capture-input {
  background: #fff; border: 1.5px solid #ddd; border-radius: 14px;
  padding: 11px 14px; font-size: 15px; color: var(--text);
  outline: none; transition: border-color .15s;
}
.capture-input:focus { border-color: var(--green); }
.capture-btn {
  padding: 13px; background: var(--green); color: #fff;
  border: none; border-radius: 50px; font-size: 16px; font-weight: 700;
  opacity: .4; pointer-events: none; transition: all .15s;
}
.capture-btn.active { opacity: 1; pointer-events: auto; }
.capture-btn:active { transform: scale(.97); }

/* Botão Voltar dentro do capture-bar */
.capture-voltar-btn {
  background: none;
  border: 1.5px solid rgba(26,107,74,.3);
  border-radius: 50px;
  padding: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #1a6b4a;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s, transform .12s;
  text-align: center;
}
.capture-voltar-btn:hover { background: rgba(26,107,74,.07); border-color: rgba(26,107,74,.5); }
.capture-voltar-btn:active { transform: scale(.95); }

/* ── Aviso LGPD — chat capture-bar ── */
.lgpd-notice {
  font-size: 10.5px;
  color: #888;
  text-align: center;
  line-height: 1.5;
  padding: 4px 4px 0;
  margin: 0;
}
.lgpd-notice strong { color: #666; font-weight: 600; }

.wpp-bar {
  background: #f0f0f0; border-top: 1px solid #ddd;
  padding: 12px 16px calc(env(safe-area-inset-bottom,0px) + 12px);
  display: flex; flex-direction: column; gap: 6px; flex-shrink: 0;
}
.wpp-bar.hidden { display: none; }
.btn-wpp {
  width: 100%; padding: 15px; background: #25D366; color: #fff;
  border: none; border-radius: 50px; font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 4px 18px rgba(37,211,102,.38);
}
.btn-wpp:active { transform: scale(.97); opacity: .88; }
.wpp-note { font-size: 11.5px; color: #555; text-align: center; }

/* ══ MODALS ══════════════════════════════════════════ */
#smart-consult {
  position: fixed; inset: 0; background: rgba(0,0,0,.52);
  z-index: 900; display: none; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(2px);
}
#smart-consult.on { display: flex; }
.sc-sheet {
  background: #fff; border-radius: 24px 24px 0 0;
  width: 100%; max-width: 430px;
  padding: 16px 20px calc(env(safe-area-inset-bottom,0px) + 20px);
  max-height: 90vh; overflow-y: auto;
}
.sc-pill { width: 36px; height: 4px; background: #e5e5ea; border-radius: 2px; margin: 0 auto 16px; }
.sc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.sc-av { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 2px solid #e8f5f0; }
.sc-av img { width: 100%; height: 100%; object-fit: cover; object-position: center 8%; }
.sc-ttl { font-size: 15px; font-weight: 700; color: #1d1d1f; }
.sc-sub { font-size: 12px; color: var(--green); font-weight: 600; }
.sc-msg { font-size: 15px; color: #3a3a3c; line-height: 1.55; margin-bottom: 18px; }
.sc-obj-ttl { font-size: 11px; font-weight: 700; color: #aeaeb2; letter-spacing: .6px; text-transform: uppercase; margin-bottom: 12px; }
.sc-objs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.sc-obj-btn {
  padding: 10px 16px; border: 1.5px solid #e5e5ea; border-radius: 50px;
  background: #fff; font-size: 13.5px; font-weight: 500; color: #1d1d1f;
  cursor: pointer; transition: all .15s; display: flex; align-items: center; gap: 6px;
}
.sc-obj-btn .lbl {}
.sc-obj-btn.selected { border-color: var(--green); background: #e8f5f0; color: var(--green); font-weight: 600; }
.sc-obj-btn:active { transform: scale(.96); }
.sc-cta {
  width: 100%; padding: 15px; background: var(--green); color: #fff;
  border: none; border-radius: 50px; font-size: 16px; font-weight: 700;
  margin-bottom: 10px; transition: opacity .15s;
}
.sc-cta:disabled { opacity: .35; pointer-events: none; }
.sc-skip { text-align: center; font-size: 13px; color: #aeaeb2; cursor: pointer; padding: 4px 0; }

/* ── CONSULTA IFRAME ── */
#consulta-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: #000; display: none; flex-direction: column;
}
#consulta-overlay.vis { display: flex; }
@keyframes overlayIn  { from{transform:translateY(100%)} to{transform:translateY(0)} }
@keyframes overlayOut { from{transform:translateY(0)} to{transform:translateY(100%)} }
#consulta-overlay.anim-in  { animation: overlayIn .3s cubic-bezier(.32,1,.3,1); }
#consulta-overlay.anim-out { animation: overlayOut .25s ease-in forwards; }
#consulta-topbar {
  background: var(--green); height: 52px; min-height: 52px;
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  padding-top: env(safe-area-inset-top,0);
  position: relative; z-index: 2; flex-shrink: 0;
}
#consulta-back-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.15); border: none; color: #fff;
  font-size: 22px; display: flex; align-items: center; justify-content: center;
}
#consulta-title { flex: 1; text-align: center; font-size: 14px; font-weight: 700; color: #fff; }
#consulta-status { font-size: 11px; font-weight: 700; color: #69ff79; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
#consulta-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #69ff79; animation: blink 2s infinite; }
#consulta-iframe { flex: 1; width: 100%; border: none; background: #e5ddd5; display: block; }
#consulta-loading {
  position: absolute; inset: 52px 0 0;
  background: var(--green); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; z-index: 1;
  transition: opacity .3s;
}
#consulta-loading.hidden { opacity: 0; pointer-events: none; }
#consulta-loading-ring {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,.2); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#consulta-loading-txt { font-size: 14px; color: rgba(255,255,255,.85); font-weight: 600; }

/* ── REF BANNER ── */
#ref-banner {
  background: var(--green); color: #fff;
  padding: 10px 16px; display: flex; align-items: center; gap: 10px;
}
#ref-banner.hidden { display: none; }
.ref-av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #004d33; }
.ref-av img { width: 100%; height: 100%; object-fit: cover; }
.ref-info { flex: 1; font-size: 12px; }
.ref-nm { font-weight: 700; font-size: 13px; }
.ref-desc { opacity: .85; }
.ref-badge {
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.4);
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px; white-space: nowrap;
}

/* ── FOOTER ── */
.ml-footer {
  background: var(--green); color: rgba(255,255,255,.8);
  text-align: center; padding: 20px 16px calc(env(safe-area-inset-bottom,0px) + 20px);
  font-size: 12px; line-height: 1.8;
}
.ml-footer strong { color: #fff; }

/* ── LOADING SPINNER ── */
.ml-loading {
  display: flex; align-items: center; justify-content: center;
  grid-column: 1 / -1; padding: 60px 20px;
  flex-direction: column; gap: 12px; color: #999;
}
@keyframes mlspin { to { transform: rotate(360deg); } }
.ml-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid #ddd; border-top-color: var(--blue);
  animation: mlspin .7s linear infinite;
}
