/* =========================================================
   Design system do protótipo — modular e igual para todas as lojas.
   Cada loja muda só --primary / --secondary (aplicados via JS).
   ========================================================= */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --text: #16181d;
  --muted: #667085;
  --border: #e4e7ec;
  --brand: #D81B72;
  --brand-grad: linear-gradient(100deg, #FE6A0A 0%, #FA2581 50%, #4844F0 100%);
  --brand-dark: linear-gradient(135deg, #3a0c3f 0%, #5e1149 45%, #23206e 100%);
  --brand-soft: #fff0f6;
  --on-brand: #ffffff;
  --primary: #D81B72;
  --on-primary: #ffffff;
  --secondary: #1e1b4b;
  --tint: color-mix(in srgb, var(--primary) 10%, white);
  --ok: #067647; --ok-bg: #ecfdf3;
  --warn: #b54708; --warn-bg: #fffaeb;
  --danger: #d92d20; --danger-bg: #fef3f2;
  --info: #175cd3; --info-bg: #eff8ff;
  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .22);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; margin-top: 1.4em; }
p { margin: 0 0 .6em; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 0 .3em; font-size: .85em; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.grow { flex: 1; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
[hidden] { display: none !important; }

/* ---------- Barra do protótipo ---------- */
.protobar {
  display: flex; align-items: center; gap: 10px; padding: 6px 12px;
  background: #101828; color: #fff; font-size: .8rem; position: relative; z-index: 60;
}
.protobar nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.protobar nav::-webkit-scrollbar { display: none; }
.protobar a { text-decoration: none; padding: 4px 10px; border-radius: 99px; white-space: nowrap; opacity: .75; }
.protobar a:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.protobar a.on { opacity: 1; background: rgba(255, 255, 255, .16); font-weight: 600; }
.protobar-tag { background: #fdb022; color: #101828; font-weight: 700; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; font-size: .68rem; letter-spacing: .04em; }
.protobar-reset { background: none; border: 1px solid rgba(255, 255, 255, .25); color: #fff; border-radius: 99px; padding: 3px 10px; cursor: pointer; font: inherit; white-space: nowrap; }

/* ---------- Botões, campos, badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-sm); padding: 10px 16px;
  font: 600 .92rem/1.2 inherit; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: filter .15s, background .15s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { filter: brightness(.93); }
.btn-brand { background: var(--brand); color: var(--on-brand); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger-ghost { background: var(--surface); border-color: #fecdca; color: var(--danger); }
.btn-wa { background: #25d366; color: #fff; }
.btn.sm { padding: 6px 10px; font-size: .82rem; }
.icon-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: .95rem; flex-shrink: 0; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.danger { color: var(--danger); }
.link-danger { background: none; border: 0; color: var(--danger); cursor: pointer; padding: 0; font: inherit; }

.input {
  width: 100%; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: var(--r-sm); padding: 10px 12px; font: inherit; outline: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea.input { resize: vertical; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; font-size: .85rem; font-weight: 600; }
.field > span { color: #344054; }
.field .input { font-weight: 400; font-size: .95rem; }
.row2, .row3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: 1fr 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: flex; align-items: center; padding: 0 10px; background: var(--surface-2); border: 1px solid var(--border); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); color: var(--muted); font-weight: 400; font-size: .85rem; white-space: nowrap; }
.input-prefix .input { border-radius: 0 var(--r-sm) var(--r-sm) 0; min-width: 0; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: #344054; border: 1px solid var(--border); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: #abefc6; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: #fedf89; }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: #fecdca; }
.badge.info { background: var(--info-bg); color: var(--info); border-color: #b2ddff; }
.alert { padding: 10px 12px; border-radius: var(--r-sm); font-size: .88rem; margin: 10px 0; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.danger { background: var(--danger-bg); color: var(--danger); }
.alert.info { background: var(--info-bg); color: var(--info); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 7px 14px; font: 500 .88rem inherit; cursor: pointer; white-space: nowrap; color: var(--text); }
.chip.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }

.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d0d5dd; border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(18px); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.stepper button { width: 38px; height: 40px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--primary); }
.stepper span { min-width: 40px; text-align: center; font-weight: 600; font-size: .92rem; }
.stepper.sm button { width: 30px; height: 30px; font-size: 1rem; }
.stepper.sm span { min-width: 26px; }

/* ---------- Logos e imagens ---------- */
.logo { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; object-fit: cover; flex-shrink: 0; }
.logo.xs { width: 34px; height: 34px; border-radius: 9px; font-size: 1rem; }
.pimg { display: grid; place-items: center; font-size: 2rem; border-radius: var(--r-sm); object-fit: cover; flex-shrink: 0; }

/* ---------- Toast e modal ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: #101828; color: #fff; padding: 10px 18px; border-radius: 99px; font-size: .9rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-wrap { position: fixed; inset: 0; background: rgba(16, 24, 40, .5); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.modal { background: var(--surface); width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: up .2s; position: relative; overflow: hidden; }
@media (min-width: 640px) {
  .modal-wrap { align-items: center; padding: 24px; }
  .modal { max-width: 520px; border-radius: 18px; }
  .modal.wide { max-width: 720px; }
  .modal.small { max-width: 420px; }
  .modal.drawer { position: fixed; right: 0; top: 0; bottom: 0; max-height: none; height: 100%; max-width: 440px; border-radius: 0; }
}
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; flex: 1; font-size: 1.1rem; }
.modal-body { padding: 18px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.modal-x, .modal-back { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.product-modal .modal-x { position: absolute; top: 12px; right: 12px; background: rgba(255, 255, 255, .92); z-index: 2; }
.confirm-text { font-size: 1rem; margin: 0; }

/* =========================================================
   MARKETPLACE
   ========================================================= */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.topbar-in { display: flex; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; text-decoration: none; color: var(--brand); letter-spacing: -.02em; }
.brand-logo { height: 34px; width: auto; display: block; }
.side-brand { flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 16px 12px; }
.side-brand .brand-logo { height: 30px; }
.topbar .search { flex: 1 1 260px; order: 3; }
@media (min-width: 760px) { .topbar .search { order: 0; } }
.search-wrap { position: relative; }
.search-wrap::before { content: '⌕'; position: absolute; left: 12px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 1.15rem; }
.search-wrap .input { padding-left: 34px; border-radius: 99px; background: var(--surface-2); }

.hero { margin: 22px 0 18px; padding: 26px 22px; border-radius: 20px; color: #fff; background: linear-gradient(rgba(20, 0, 30, .18), rgba(20, 0, 30, .18)), var(--brand-grad); }
.hero h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: 6px; }
.hero p { opacity: .85; margin: 0; max-width: 560px; }
.hero-loc { display: inline-flex; gap: 6px; align-items: center; background: rgba(255, 255, 255, .14); padding: 4px 12px; border-radius: 99px; font-size: .82rem; margin-bottom: 12px; }
.mk .chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 22px 0 12px; }
.toolbar h2 { margin: 0; }
.toolbar-r { display: flex; gap: 8px; align-items: center; }
.toolbar-r .input { width: auto; padding: 7px 10px; }
.seg-btns { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.seg-btns button { border: 0; background: none; padding: 7px 12px; cursor: pointer; font: 500 .85rem inherit; color: var(--muted); }
.seg-btns button.on { background: var(--surface-2); color: var(--text); font-weight: 700; }

.store-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.store-list { display: grid; gap: 10px; }
.store-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; display: block; }
.store-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.sc-cover { height: 96px; }
.sc-body { display: flex; gap: 12px; padding: 0 14px 14px; }
.sc-body .logo { margin-top: -26px; border: 3px solid var(--surface); box-shadow: var(--shadow); }
.sc-info { padding-top: 8px; min-width: 0; flex: 1; }
.sc-title { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.sc-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-meta { display: flex; gap: 10px; flex-wrap: wrap; color: #344054; margin-top: 4px; }
.store-list .store-card { display: flex; align-items: center; }
.store-list .sc-cover { width: 8px; height: auto; align-self: stretch; }
.store-list .sc-body { padding: 12px 14px; flex: 1; align-items: center; }
.store-list .sc-body .logo { margin-top: 0; border: 0; box-shadow: none; }
.store-list .sc-info { padding-top: 0; }

.prod-results { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pr-card { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 10px; text-decoration: none; }
.pr-card .pimg { width: 56px; height: 56px; font-size: 1.6rem; }

.feed { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 40px; }
.post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px; }
.post-head a { text-decoration: none; font-weight: 600; }
.post-img { aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 4.5rem; }
.post-body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.post-actions { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.like { border: 0; background: none; cursor: pointer; font-size: 1.3rem; padding: 0; }
.mk-foot { border-top: 1px solid var(--border); padding: 26px 0; margin-top: 30px; background: var(--surface); }
.mk-foot .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

/* =========================================================
   LOJA DO CLIENTE
   ========================================================= */
.store-cover { height: 150px; }
@media (min-width: 760px) { .store-cover { height: 210px; } }
.store-head { margin-top: -54px; position: relative; padding: 18px; display: grid; gap: 14px; grid-template-columns: auto 1fr; align-items: start; }
.store-head .store-logo { width: 76px; height: 76px; border-radius: 18px; font-size: 2.3rem; margin-top: -48px; border: 4px solid var(--surface); box-shadow: var(--shadow); }
.store-head h1 { margin-bottom: 2px; font-size: 1.4rem; }
.store-head-info p { margin-bottom: 8px; }
.store-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.store-head-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.store-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.store-facts div { background: var(--tint); border-radius: var(--r-sm); padding: 8px 12px; display: flex; flex-direction: column; font-size: .8rem; }
.store-facts span { color: var(--muted); }
@media (min-width: 760px) {
  .store-head { grid-template-columns: auto 1fr auto; }
  .store-head-actions { grid-column: auto; }
}
.cat-nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); margin-top: 14px; }
.cat-nav-in { display: flex; gap: 10px; padding-top: 10px; padding-bottom: 10px; align-items: center; flex-wrap: wrap; }
.cat-nav .search-wrap { flex: 1 1 220px; max-width: 320px; }
.cat-nav .chips { flex: 1 1 100%; }
@media (min-width: 760px) { .cat-nav .chips { flex: 1 1 0; } }
.menu-sec { padding-top: 22px; scroll-margin-top: 120px; }
.menu-sec h2 { font-size: 1.15rem; }
.prod-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .prod-grid { grid-template-columns: 1fr 1fr; } }
.prod-card { display: flex; gap: 12px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 12px; cursor: pointer; font: inherit; color: inherit; box-shadow: var(--shadow); transition: border-color .15s; width: 100%; }
.prod-card:hover { border-color: var(--primary); }
.prod-card.off { opacity: .55; cursor: not-allowed; }
.prod-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.prod-txt p { margin: 0; }
.prod-thumb { width: 92px; height: 92px; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.price b { color: var(--primary); font-size: 1rem; filter: brightness(.85); }
.price s { font-size: .82rem; }
.price.big b { font-size: 1.3rem; }
.pm-hero { width: 100%; height: 200px; border-radius: 0; font-size: 5rem; }
.opt-group { border: 0; padding: 0; margin: 16px 0; }
.opt-group legend { font-weight: 700; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; padding: 0; }
.opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); margin-bottom: 6px; cursor: pointer; }
.opt span:first-of-type { flex: 1; }
.opt input { accent-color: var(--primary); width: 18px; height: 18px; }
.opt:has(input:checked) { border-color: var(--primary); background: var(--tint); }
.cart-fab { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 50; display: flex; align-items: center; gap: 14px; background: var(--primary); color: var(--on-primary); border: 0; border-radius: 99px; padding: 14px 22px; font: 600 1rem inherit; cursor: pointer; box-shadow: var(--shadow-lg); width: calc(100% - 32px); max-width: 460px; }
.cart-fab span:nth-child(2) { flex: 1; text-align: left; }
.fab-count { background: rgba(255, 255, 255, .25); border-radius: 99px; min-width: 28px; height: 28px; display: grid; place-items: center; font-size: .85rem; padding: 0 6px; }
.cart-item { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item-r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sum { margin-top: 14px; display: grid; gap: 6px; font-size: .92rem; }
.sum div { display: flex; justify-content: space-between; }
.sum .total { font-size: 1.1rem; font-weight: 700; border-top: 1px dashed var(--border); padding-top: 8px; }
.seg-toggle { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-bottom: 14px; }
.seg-toggle label { cursor: pointer; }
.seg-toggle input { position: absolute; opacity: 0; }
.seg-toggle span { display: block; text-align: center; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-sm); font-weight: 600; }
.seg-toggle input:checked + span { border-color: var(--primary); background: var(--tint); color: var(--text); }
.done-box { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.done-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-size: 2rem; margin: 10px auto; }
.timeline { list-style: none; padding: 0; margin: 6px 0 14px; }
.timeline li { display: flex; gap: 12px; align-items: center; padding: 8px 0; color: var(--muted); position: relative; }
.timeline li span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); flex-shrink: 0; }
.timeline li.done { color: var(--text); }
.timeline li.done span { background: var(--ok); border-color: var(--ok); }
.timeline li.now { color: var(--text); font-weight: 700; }
.timeline li.now span { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 25%, transparent); }
.info-list { display: grid; gap: 10px; }
.info-list div { display: flex; gap: 10px; }
.empty-page { text-align: center; padding: 80px 16px; }
.empty-page .big { font-size: 3rem; }
.store-footer { text-align: center; padding: 40px 16px 110px; color: var(--muted); font-size: .85rem; }
.store-footer a { color: var(--brand); font-weight: 600; text-decoration: none; }

/* =========================================================
   PAINÉIS (lojista e super admin)
   ========================================================= */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.side { background: #101828; color: #d0d5dd; display: flex; flex-direction: column; }
.side-store { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: #fff; }
.side-store strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-store a { color: #98a2b3; font-size: .8rem; }
.side-nav { display: flex; overflow-x: auto; gap: 2px; padding: 0 8px 8px; scrollbar-width: none; }
.side-nav::-webkit-scrollbar { display: none; }
.side-nav a { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 9px 12px; border-radius: 9px; white-space: nowrap; font-size: .9rem; }
.side-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav a.on { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; }
.nav-count { margin-left: auto; background: #f04438; color: #fff; border-radius: 99px; font-size: .72rem; padding: 0 7px; min-width: 20px; text-align: center; }
.nav-count:empty { display: none; }
.side-foot { padding: 12px 16px; border-top: 1px solid rgba(255, 255, 255, .08); display: none; }
.side-foot select { width: 100%; margin-top: 6px; background: #1d2939; color: #fff; border-color: #344054; }
.app-main { flex: 1; min-width: 0; }
.app-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.app-top h1 { margin: 0; font-size: 1.25rem; }
.app-top-r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.view { padding: 16px; max-width: 1440px; }
.mobile-switch { padding: 0 16px 10px; }
.mobile-switch select { background: #1d2939; color: #fff; border-color: #344054; padding: 7px 10px; }
@media (min-width: 900px) {
  .app { flex-direction: row; }
  .side { width: 250px; position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
  .side-nav { flex-direction: column; overflow: visible; padding: 4px 10px; flex: 1; }
  .side-foot { display: block; }
  .mobile-switch { display: none; }
  .view { padding: 24px; }
  .app-top { padding: 18px 24px; }
}
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 18px; }
.kpi { padding: 16px; }
.kpi span { color: var(--muted); font-size: .82rem; display: block; }
.kpi strong { font-size: 1.45rem; letter-spacing: -.02em; display: block; margin-top: 2px; }
.kpi small { color: var(--muted); }
.grid2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.section-title { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.section-title h3 { margin: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { min-width: 0; }
.list-row .thumb { width: 48px; height: 48px; font-size: 1.4rem; }
.thumb.lg { width: 96px; height: 96px; font-size: 2.6rem; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 1px solid var(--border); background: var(--surface); padding: 7px 14px; border-radius: 99px; cursor: pointer; font: 500 .88rem inherit; white-space: nowrap; }
.tabs button.on { background: #101828; color: #fff; border-color: #101828; }
.orders { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.order { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.order.is-new { border-color: #84caff; box-shadow: 0 0 0 3px #d1e9ff; }
.order header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order-items { list-style: none; padding: 10px 0; margin: 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); display: grid; gap: 6px; font-size: .88rem; }
.order-items li { display: flex; justify-content: space-between; gap: 10px; }
.order-tot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.order-actions .btn-primary { flex: 1; }
.toolbar-panel { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar-panel .input { flex: 1 1 180px; width: auto; }
.inline-form { display: flex; gap: 8px; padding: 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.inline-form .input { flex: 1 1 200px; width: auto; }
.crow { display: flex; gap: 8px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.crow .input { flex: 1 1 180px; width: auto; }
.split { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr) 360px; } .preview-col { position: sticky; top: 16px; } }
.form { padding: 18px; }
.form h3:first-child { margin-top: 0; }
.img-pick { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.img-pick-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.swatch { width: 38px; height: 38px; border-radius: 10px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.color-in { height: 44px; padding: 4px; cursor: pointer; }
.opt-edit { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px; margin-bottom: 10px; background: var(--surface-2); display: grid; gap: 8px; }
.opt-edit .row3 { align-items: center; }

/* Pré-visualização (celular) */
.pv { border: 8px solid #101828; border-radius: 30px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow-lg); max-width: 340px; margin: 8px auto 0; }
.pv-cover { height: 90px; }
.pv-head { background: var(--surface); margin: -26px 10px 0; border-radius: 12px; padding: 10px; position: relative; box-shadow: var(--shadow); }
.pv-head .logo { width: 46px; height: 46px; margin-top: -30px; border: 3px solid var(--surface); font-size: 1.3rem; }
.pv-body { padding: 10px; display: grid; gap: 8px; }
.pv-prod { display: flex; gap: 8px; background: var(--surface); border-radius: 10px; padding: 8px; border: 1px solid var(--border); font-size: .8rem; }
.pv-prod .pimg { width: 54px; height: 54px; font-size: 1.4rem; }
.pv-cart { margin: 6px 10px 12px; border-radius: 99px; padding: 10px; text-align: center; font-weight: 700; font-size: .85rem; }

.link-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.link-box code { flex: 1 1 200px; padding: 10px 12px; font-size: .9rem; word-break: break-all; }
.qr { background: #fff; padding: 12px; border-radius: 12px; display: inline-block; border: 1px solid var(--border); }
.qr img, .qr canvas { width: 180px; height: 180px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.checklist .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; flex-shrink: 0; background: var(--surface-2); border: 1px solid var(--border); }
.checklist .ok .ic { background: var(--ok); color: #fff; border-color: var(--ok); }
.checklist .ok .t { text-decoration: line-through; color: var(--muted); }
.bill { padding: 18px; }
.bill-line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.bill-line.total { font-size: 1.15rem; font-weight: 800; border-bottom: 0; padding-top: 12px; }
.banner { padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 14px; }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); }
.cell-store { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; min-width: 220px; }

/* Kanban de pedidos */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { background: #eceef2; border-radius: var(--r); padding: 10px; min-height: 340px; border: 2px dashed transparent; transition: border-color .15s, background .15s; }
.kcol.over { border-color: var(--brand); background: #ffe1ee; }
.kcol-head { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.kcol-head strong { flex: 1; }
.kcol-sum { margin: 2px 0 10px 18px; }
.kdot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.kdot.info { background: var(--info); } .kdot.warn { background: #f79009; } .kdot.ok { background: #12b76a; } .kdot.danger { background: var(--danger); }
.kcol-body { display: grid; gap: 8px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; cursor: grab; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); display: grid; gap: 3px; transition: box-shadow .15s, transform .15s; }
.kcard:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kcard.dragging { opacity: .45; }
.kcard.is-new { border-color: #84caff; box-shadow: 0 0 0 3px #d1e9ff; }
.kcard-top { display: flex; justify-content: space-between; align-items: baseline; }
.kcard-name { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 4px; }
.kempty { color: var(--muted); font-size: .8rem; text-align: center; padding: 18px 6px; border: 1px dashed #c9ced6; border-radius: var(--r-sm); }
.clickable { cursor: pointer; }
.order.clickable:hover { border-color: #b2b9c6; }
.list-row.clickable:hover { background: var(--surface-2); }

/* Painel do pedido */
@media (min-width: 640px) { .modal.od-drawer { max-width: 560px; } }
.od { padding-top: 6px; }
.od-sec { padding: 14px 0; border-bottom: 1px solid var(--border); }
.od-sec:last-child { border-bottom: 0; }
.od-sec h3 { margin: 0 0 10px; font-size: .95rem; }
.od-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.od-steps button { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 6px 12px; font: 500 .8rem inherit; cursor: pointer; }
.od-steps button.on { background: #101828; color: #fff; border-color: #101828; }
.od-steps button.danger { color: var(--danger); }
.od-steps button.danger.on { background: var(--danger); color: #fff; border-color: var(--danger); }
.od .timeline li { align-items: flex-start; }
.od .timeline li span { margin-top: 4px; }

/* =========================================================
   PÁGINA DE VENDAS (lojistas.html)
   ========================================================= */
.lp { background: #fff; }
html:has(.lp) { scroll-behavior: smooth; scroll-padding-top: 70px; }
.btn.lg { padding: 14px 22px; font-size: 1rem; border-radius: 12px; }
.lp-nav { display: none; gap: 20px; flex: 1; justify-content: center; }
.lp-nav a { text-decoration: none; color: #344054; font-weight: 500; font-size: .92rem; }
.lp-nav a:hover { color: var(--brand); }
@media (min-width: 900px) { .lp-nav { display: flex; } }
.lp .topbar-in { justify-content: space-between; }
.lp-pill { display: inline-block; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: .78rem; padding: 5px 12px; border-radius: 99px; margin-bottom: 14px; }
.lp-hero { background: radial-gradient(circle at 90% 10%, #ffe1ee 0, transparent 40%), radial-gradient(circle at 70% 90%, #e6e5ff 0, transparent 35%), linear-gradient(180deg, #fff8fb, #fff); padding: 44px 0 56px; overflow: hidden; }
.lp-hero-in { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .lp-hero-in { grid-template-columns: 1.15fr .85fr; } .lp-hero { padding: 72px 0 84px; } }
.lp-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 16px; }
.lp-hero h1 span { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-lead { font-size: 1.1rem; color: #475467; max-width: 600px; }
.lp-cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 16px; }
.lp-checks { list-style: none; padding: 0; margin: 0; display: flex; gap: 16px; flex-wrap: wrap; color: #475467; font-size: .9rem; font-weight: 500; }
.lp-checks.light { color: #ffe1ee; flex-direction: column; gap: 8px; font-size: 1rem; }
.lp-mock { position: relative; max-width: 360px; margin: 0 auto; width: 100%; }
.lp-phone { transform: rotate(2deg); }
.lp-float { position: absolute; background: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow-lg); font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.lp-float-1 { top: 36%; left: -6%; animation: bob 4s ease-in-out infinite; }
.lp-float-2 { bottom: 12%; right: -4%; color: var(--ok); animation: bob 4s ease-in-out 2s infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .lp-float { animation: none; } }
@media (max-width: 480px) { .lp-float-1 { left: 0; } .lp-float-2 { right: 0; } }

.lp-sec { padding: 64px 0; }
.lp-alt { background: #f8f9fb; }
.lp-h2 { text-align: center; font-size: clamp(1.5rem, 3.4vw, 2.2rem); letter-spacing: -.025em; margin-bottom: 10px; }
.lp-sub { text-align: center; color: #475467; max-width: 640px; margin: 0 auto 32px; font-size: 1.05rem; }
.lp-grid3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.lp-grid4 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.lp-card { padding: 22px; }
.lp-card h3 { margin-top: 10px; font-size: 1.08rem; }
.lp-card p, .lp-step p, .lp-feat p { color: #475467; margin: 0; }
.lp-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; font-size: 1.4rem; }
.lp-ic.big { width: 72px; height: 72px; font-size: 2.2rem; flex-shrink: 0; }
.lp-segs { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.lp-seg { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow); }
.lp-seg span { font-size: 1.5rem; }
.lp-steps { counter-reset: s; margin-top: 28px; }
.lp-step { text-align: center; padding: 10px; }
.lp-step > span { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-grad); color: #fff; font-weight: 800; font-size: 1.2rem; display: grid; place-items: center; margin: 0 auto 12px; }
.lp-feat { background: #fff; border: 1px solid var(--border); border-radius: var(--r); padding: 18px; }
.lp-feat b { display: block; margin-bottom: 4px; }
.lp-market { margin-top: 22px; padding: 24px; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(135deg, var(--brand-soft), #fff); }
.lp-market > div { flex: 1 1 360px; }
.lp-market h3 { margin-top: 0; font-size: 1.2rem; }
.lp-market p { color: #475467; margin: 0; }
.lp-compare td, .lp-compare th { text-align: center; font-size: .95rem; }
.lp-compare td:first-child, .lp-compare th:first-child { text-align: left; }
.lp-compare td { color: #98a2b3; }
.lp-compare td:first-child { color: var(--text); }
.lp-compare .lp-us { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.lp-compare th.lp-us { color: var(--brand); }
.lp-story { display: flex; gap: 24px; align-items: center; max-width: 820px; flex-wrap: wrap; }
.lp-story > div:last-child { flex: 1 1 400px; }
.lp-story p { color: #475467; font-size: 1.05rem; }
.lp-plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 960px; margin: 0 auto; align-items: start; }
.lp-plan { padding: 24px; position: relative; }
.lp-plan.hl { border: 2px solid var(--brand); box-shadow: 0 12px 30px rgba(216, 27, 114, .18); }
.lp-plan-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 99px; }
.lp-plan h3 { margin-top: 0; }
.lp-price b { font-size: 2.2rem; letter-spacing: -.03em; }
.lp-price span { color: var(--muted); }
.lp-plan ul { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 8px; font-size: .92rem; }
.lp-signup { background: var(--brand-dark); color: #fff; }
.lp-signup-in { display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) { .lp-signup-in { grid-template-columns: .9fr 1.1fr; } }
.lp-signup-copy p { color: #ffe1ee; font-size: 1.1rem; }
.lp-form { padding: 24px; color: var(--text); }
.lp-faq { max-width: 760px; }
.lp-faq details { border: 1px solid var(--border); border-radius: var(--r); padding: 0 18px; margin-bottom: 10px; background: #fff; }
.lp-faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: '+'; font-size: 1.3rem; color: var(--brand); line-height: 1; }
.lp-faq details[open] summary::after { content: '−'; }
.lp-faq details p { color: #475467; margin: 0 0 16px; }
.lp-final { text-align: center; padding: 64px 0; background: #101828; color: #fff; }
.lp-final h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
.lp-final p { color: #d0d5dd; margin-bottom: 22px; }
.lp-final-btn { background: #fff; color: #101828; }

/* =========================================================
   REDE SOCIAL: stories, grade, reels, marcações e chat
   ========================================================= */
.clamp1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Anel de stories (estilo Instagram) */
.ring { border: 0; padding: 3px; border-radius: 20px; cursor: pointer; display: inline-grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(from 200deg, #f58529, #dd2a7b, #8134af, #515bd4, #f58529); }
.ring.seen { background: #d0d5dd; }
.ring .logo { border: 3px solid var(--surface); }
.ring .logo.xs { border-width: 2px; }
.store-logo-wrap { margin-top: -48px; align-self: start; }
.store-logo-wrap .store-logo { margin-top: 0; }
.store-logo-wrap .ring { border-radius: 22px; }

/* Fileira de stories no marketplace */
.tray { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: none; }
.tray::-webkit-scrollbar { display: none; }
.tray-item { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; width: 76px; flex-shrink: 0; font: inherit; color: var(--text); }
.tray-item .ring { border-radius: 50%; }
.tray-item .logo { width: 62px; height: 62px; border-radius: 50%; font-size: 1.6rem; }
.tray-name { font-size: .74rem; width: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Visualizador de stories */
.sv { position: fixed; inset: 0; background: rgba(0, 0, 0, .92); z-index: 150; display: grid; place-items: center; animation: fade .15s; }
.sv-box { position: relative; width: 100%; height: 100%; max-width: 440px; max-height: 100vh; background: #000; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 640px) { .sv-box { height: 92vh; border-radius: 16px; } }
.sv-bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.sv-bars i { flex: 1; height: 3px; background: rgba(255, 255, 255, .35); border-radius: 3px; overflow: hidden; }
.sv-bars i.done b { width: 100%; }
.sv-bars b { display: block; height: 100%; width: 0; background: #fff; }
.sv-bars b.run { animation: svp 5s linear forwards; }
@keyframes svp { to { width: 100%; } }
.sv-head { position: absolute; top: 22px; left: 12px; right: 12px; display: flex; align-items: center; gap: 10px; color: #fff; z-index: 3; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.sv-head a { color: #fff; text-decoration: none; }
.sv-time { font-size: .78rem; opacity: .9; }
.sv-x { background: none; border: 0; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; z-index: 4; position: relative; }
.sv-media { width: 100%; height: 100%; display: grid; place-items: center; }
.sv-m { width: 100%; height: 100%; object-fit: contain; }
.sv-cap { position: absolute; bottom: 24px; left: 16px; right: 16px; color: #fff; background: rgba(0, 0, 0, .45); padding: 10px 14px; border-radius: 12px; z-index: 3; text-align: center; font-weight: 600; }
.sv-credit { position: absolute; top: 72px; left: 12px; right: 12px; z-index: 3; color: #fff; font-size: .8rem; background: rgba(0, 0, 0, .4); padding: 6px 10px; border-radius: 99px; width: fit-content; }
.sv-prev, .sv-next { position: absolute; top: 70px; bottom: 80px; width: 40%; background: none; border: 0; z-index: 2; cursor: pointer; }
.sv-prev { left: 0; } .sv-next { right: 0; }

/* Abas do perfil da loja */
.prof-tabs { display: flex; gap: 4px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); }
.prof-tabs::-webkit-scrollbar { display: none; }
.prof-tabs button { border: 0; background: none; padding: 10px 14px; font: 600 .9rem inherit; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.prof-tabs button.on { color: var(--text); border-bottom-color: var(--primary); }
.prof-tabs small { font-weight: 500; color: var(--muted); }
#social { padding-top: 16px; padding-bottom: 40px; }

/* Grade estilo Instagram */
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.ig-grid.pad { padding: 12px; }
@media (min-width: 760px) { .ig-grid { gap: 6px; } }
.g-tile { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: #e4e7ec; cursor: pointer; overflow: hidden; display: block; }
.ig-grid.reels .g-tile { aspect-ratio: 9 / 16; }
.g-m { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-tile:hover .g-m { filter: brightness(.9); }
.g-ic { position: absolute; top: 8px; right: 8px; color: #fff; font-size: .9rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); pointer-events: none; }
.g-credit { position: absolute; left: 6px; bottom: 6px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .72rem; padding: 2px 8px; border-radius: 99px; }
.g-del { position: absolute; top: 6px; left: 6px; border: 0; background: rgba(255, 255, 255, .9); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; }
.media-missing { background: repeating-linear-gradient(45deg, #eef0f3, #eef0f3 8px, #e4e7ec 8px, #e4e7ec 16px); }
.post-modal .modal-head .logo { margin-right: 4px; }
.post-media { background: #000; display: grid; place-items: center; max-height: 60vh; }
.pm-m { width: 100%; max-height: 60vh; object-fit: contain; }
.post-img { border: 0; padding: 0; cursor: pointer; position: relative; background: #e4e7ec; aspect-ratio: 1; overflow: hidden; display: block; width: 100%; }
.post-m { width: 100%; height: 100%; object-fit: cover; }

/* Escolher mídia (upload) */
.pick-media { display: grid; place-items: center; border: 2px dashed var(--border); border-radius: var(--r); min-height: 180px; cursor: pointer; margin-bottom: 14px; overflow: hidden; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.pick-media.tall { min-height: 280px; }
.pick-media img, .pick-media video { max-height: 320px; width: 100%; object-fit: contain; display: block; }
.pick-media span { display: block; width: 100%; text-align: center; }

/* Stories no painel */
.st-row { display: flex; gap: 14px; overflow-x: auto; padding: 14px 16px; }
.st-item { width: 120px; flex-shrink: 0; display: grid; gap: 4px; }
.st-prev { border: 0; padding: 0; position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 9 / 16; background: #000; cursor: pointer; }
.st-m { width: 100%; height: 100%; object-fit: cover; }
.ment-prev { border: 0; padding: 0; background: none; cursor: pointer; }
.ment-prev .thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; display: block; }

/* Chat */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #ffe1ee; color: var(--brand); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.chat { display: grid; grid-template-columns: 1fr; height: calc(100vh - 190px); min-height: 440px; overflow: hidden; }
@media (min-width: 900px) { .chat { grid-template-columns: 320px 1fr; } }
.chat-list { border-right: 1px solid var(--border); overflow-y: auto; }
.chat-item { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; border-bottom: 1px solid var(--border); background: none; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; }
.chat-item:hover { background: var(--surface-2); }
.chat-item.on { background: var(--brand-soft); }
.chat-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chat-meta .nav-count { margin: 0; }
.chat-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.chat-back { display: inline-block; }
@media (min-width: 900px) { .chat-back { display: none; } }
@media (max-width: 899px) {
  .chat.has-cur .chat-list { display: none; }
  .chat:not(.has-cur) .chat-thread { display: none; }
}
.msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: #f5f6fa; }
.msg { max-width: 78%; align-self: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; padding: 7px 11px; }
.msg.me { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-color: transparent; border-radius: 14px 14px 4px 14px; }
.app .msg.me { background: var(--brand); color: #fff; }
.msg p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.msg time { display: block; font-size: .68rem; opacity: .7; text-align: right; margin-top: 2px; }
.msg-day { align-self: center; font-size: .72rem; color: var(--muted); background: #e9ebf0; padding: 2px 10px; border-radius: 99px; margin: 6px 0; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-form .input { flex: 1; border-radius: 99px; }
.quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 0; scrollbar-width: none; background: var(--surface); border-top: 1px solid var(--border); }
.quick button { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 5px 10px; font: .78rem inherit; cursor: pointer; white-space: nowrap; }
.chat-drawer .modal-body.msgs { padding: 14px; }
#chatBtn .nav-count { margin-left: 4px; }

/* Onboarding */
.onb-body { background: var(--brand-dark); min-height: 100vh; }
.onb { max-width: 520px; margin: 32px auto; padding: 26px; }
.onb .brand { margin-bottom: 18px; }
@media (max-width: 600px) { .onb { margin: 16px; } }
