/* ============================================================
   Plataforma de ofertas — componentes próprios
   (o resto do visual vem de style.css, igual ao Digital Hub)
   ============================================================ */
.ostack { display: grid; gap: 22px; min-width: 0; }
a.avatar { text-decoration: none; }
textarea { font: inherit; font-size: 13px; color: var(--text); background: var(--card); border: 1px solid var(--border-2); border-radius: 10px; padding: 9px 12px; resize: vertical; min-width: 0; }
textarea:focus { outline: 2px solid var(--accent-line); border-color: var(--accent); }
.nowrap { flex-wrap: nowrap; }
.row.end { justify-content: flex-end; }
.up { color: var(--pos); }
.down { color: var(--bad); }
.flat { color: var(--muted); }

/* ---------- menu: Ofertas com nichos ---------- */
.ws-head { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 2px 12px 6px; }
.nav-parent { padding: 0; gap: 0; }
.nav-parent > a { display: flex; align-items: center; gap: 12px; flex: 1; padding: 8px 11px; color: inherit; text-decoration: none; min-width: 0; }
.nav-caret { border: 0; background: none; color: var(--muted); width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; border-radius: 8px; margin-right: 2px; }
.nav-caret:hover { color: var(--text); background: var(--hover); }
.nav-caret svg.i { width: 15px !important; height: 15px !important; transition: transform .18s; }
.nav-group:not(.open) .nav-caret svg.i { transform: rotate(-90deg); }
.nav-sub { display: none; flex-direction: column; gap: 1px; margin: 2px 0 4px 18px; padding-left: 10px; border-left: 1px solid var(--border); }
.nav-group.open .nav-sub { display: flex; }
.nav-subitem { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: 12.5px; min-width: 0; }
.nav-subitem:hover { background: var(--hover); color: var(--text); }
.nav-subitem.active { background: var(--raise, var(--card-3)); color: var(--text); box-shadow: var(--raise-shadow, none); }
.nav-subitem .ne { width: 18px; text-align: center; flex: none; font-size: 13px; }
.nav-subitem .nn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-subitem .nc { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- hero do Início ---------- */
.ohero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 30px 32px; position: relative; overflow: hidden;
  background: radial-gradient(700px 360px at 100% 0%, rgba(255,255,255,.07), transparent 60%), linear-gradient(180deg, var(--card-2), var(--card)); }
:root[data-theme="light"] .ohero { background: radial-gradient(700px 360px at 100% 0%, rgba(0,0,0,.05), transparent 60%), var(--card); }
.ohero h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.05; letter-spacing: -.045em; font-weight: 650; margin: 12px 0 10px; }
.ohero h2 em { font-style: normal; color: var(--muted); }
.ohero p { margin: 0 0 18px; max-width: 520px; font-size: 14px; line-height: 1.55; }
.ohero .eyebrow-sm { display: inline-flex; align-items: center; gap: 6px; }
.ohero .eyebrow-sm svg.i { width: 13px; height: 13px; }
.ohero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ohero-stats .mini .v { font-size: 26px; margin-top: 8px; }
.ohero-stats .mini .v.sm { font-size: 18px; }

/* ---------- seções e grade de ofertas ---------- */
.osec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 12px; }
.osec-head h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: center; gap: 9px; }
.osec-head h2 svg.i { width: 17px; height: 17px; color: var(--muted); }
.osec-head .link-quiet { font-size: 12px; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.osec-head .link-quiet svg.i { width: 13px; height: 13px; }
.ogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 14px; }
.ogrid.rail { grid-auto-flow: column; grid-auto-columns: minmax(212px, 232px); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; margin: -2px -2px 0; scrollbar-width: thin; }
.ogrid.rail > * { scroll-snap-align: start; }
.ocount { font-size: 12.5px; margin: 0 2px 10px; }
#flist.loading { opacity: .55; transition: opacity .15s; }

/* ---------- card de oferta ---------- */
.offer { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; min-width: 0;
  box-shadow: var(--shadow); transition: transform .16s, border-color .16s, box-shadow .16s; }
.offer:hover, .offer:focus-visible { transform: translateY(-2px); border-color: var(--border-2); box-shadow: 0 12px 30px rgba(0,0,0,.28); outline: none; }
.offer-media { position: relative; aspect-ratio: 1 / 1; background: var(--card-3); overflow: hidden; }
.offer-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); }
.noimg svg.i { width: 34px; height: 34px; opacity: .5; }
.wm { position: absolute; inset: 0; background-image: var(--wm); background-repeat: repeat; pointer-events: none; mix-blend-mode: difference; opacity: .9; }
.obadge { position: absolute; top: 10px; left: 10px; right: 48px; width: fit-content; max-width: calc(100% - 58px); background: #ff6a1a; color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; box-shadow: 0 4px 14px rgba(255,106,26,.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.osave { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 10px; border: 0; display: grid; place-items: center; cursor: pointer;
  background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(6px); transition: background .15s, transform .15s; }
.osave:hover { background: rgba(0,0,0,.75); transform: scale(1.05); }
.osave svg.i { width: 16px; height: 16px; }
.osave.on { background: #fff; color: #000; }
.osave.on svg.i, .save-big.on svg.i { fill: currentColor; }
.offer-body { padding: 12px 13px 13px; display: grid; gap: 7px; min-width: 0; }
.offer-body h3 { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.offer-meta { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-2); min-width: 0; }
.offer-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flag { border-radius: 3px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(127,127,127,.25); vertical-align: middle; }
.offer-ads { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-2); }
.ads-n { display: inline-flex; align-items: center; gap: 5px; }
.ads-n b { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.ads-n svg.i, .od-kpis svg.i { width: 15px; height: 15px; color: #ff7a2f; }
.gchip { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; padding: 2px 7px 2px 5px; border-radius: 999px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gchip svg.i { width: 12px; height: 12px; }
.gchip.up { color: var(--pos); background: var(--pos-soft); }
.gchip.down { color: var(--bad); background: var(--bad-soft); }
.spark { width: 100%; height: 30px; display: block; }
.spark .l { fill: none; stroke-width: 1.75; vector-effect: non-scaling-stroke; }
.spark .a { opacity: .14; }
.spark.up .l { stroke: var(--pos); } .spark.up .a { fill: var(--pos); }
.spark.down .l { stroke: var(--bad); } .spark.down .a { fill: var(--bad); }
.spark.flat .l { stroke: var(--muted); } .spark.flat .a { fill: var(--muted); }
.otags { display: flex; flex-wrap: wrap; gap: 5px; }
.otag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--text-2); background: var(--card-3); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.otag svg.i { width: 11px; height: 11px; }

/* ---------- filtros ---------- */
.ofilters { padding: 14px 16px; display: grid; gap: 10px; }
.ofrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.ofrow .search { max-width: 460px; flex: 1 1 260px; }
.ofrow.selects { justify-content: flex-start; }
.ofrow.selects select { flex: 0 1 auto; max-width: 210px; }
.seg button { white-space: nowrap; }

/* ---------- detalhe da oferta ---------- */
.modal-card.xl { max-width: 1060px; padding: 0; }
.od { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); min-height: 0; }
.od-media { padding: 22px; background: var(--card); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.od-img { position: relative; border-radius: 12px; overflow: hidden; background: var(--card-3); aspect-ratio: 1 / 1; }
.od-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.od-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.od-actions .btn:only-child { grid-column: 1 / -1; }
.save-big.on { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.od-admin { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px dashed var(--border-2); }
.od-info { padding: 22px 24px; display: grid; gap: 16px; align-content: start; min-width: 0; }
.od-info .mhead { margin-bottom: 0; }
.od-info h2 { font-size: 22px; letter-spacing: -.03em; line-height: 1.2; margin: 6px 0 0; }
.od-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.od-kpis .mini .v { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.od-block { display: grid; gap: 8px; min-width: 0; }
.od-block .lbl { margin-bottom: 0; }
.od-chart { height: 190px; }
.od-desc { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }
.olink { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); min-width: 0; }
.ol-l { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; width: 104px; flex: none; }
.ol-l svg.i { width: 14px; height: 14px; color: var(--muted); }
.ol-u { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: 12px; text-decoration: none; font-family: var(--mono); }
.ol-u:hover { color: var(--text); text-decoration: underline; }
.olink .btn.small { padding: 5px 9px; }
.olink .btn svg.i { width: 13px; height: 13px; }
.crgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.crgrid.sm { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.cr { display: grid; gap: 6px; min-width: 0; }
.cr-img { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: var(--card-3); border: 1px solid var(--border); }
.cr-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cr-img .cr-link { height: 100%; border: 0; }
.cr-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.25); }
.cr-link { display: grid; place-items: center; align-content: center; gap: 6px; aspect-ratio: 1 / 1; border-radius: 10px; border: 1px solid var(--border); background: var(--card-3); color: var(--text-2); text-decoration: none; font-size: 12px; }
.cr-cap { margin: 0; font-size: 11.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cr-add { display: grid; place-items: center; align-content: center; gap: 4px; aspect-ratio: 1 / 1; border-radius: 10px; border: 1px dashed var(--border-2); color: var(--text-2); cursor: pointer; font: inherit; font-size: 11.5px; background: none; }
.cr-add:hover { color: var(--text); border-color: var(--text-2); }

/* ---------- tabelas (histórico e cadastro) ---------- */
.otable tr.clickable { cursor: pointer; }
.otable tr.clickable:hover td { background: var(--hover); }
.ocell { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.ocell.link { cursor: pointer; }
.ocell.link:hover span { text-decoration: underline; }
.ocell img, .thumb-ph { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: var(--card-3); display: grid; place-items: center; color: var(--muted); }
.thumb-ph svg.i { width: 16px; height: 16px; }
.ocell span { font-weight: 500; line-height: 1.3; }
.ads-in { width: 92px; padding: 6px 9px; font-variant-numeric: tabular-nums; transition: border-color .2s, box-shadow .2s; }
.ads-in.ok { border-color: var(--pos); box-shadow: 0 0 0 3px var(--pos-soft); }
td.stale { color: var(--warn); }
.mcell { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.mcell .pill { margin-top: 3px; padding: 1px 8px; font-size: 10.5px; }

/* ---------- formulário de oferta ---------- */
.upl-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: stretch; }
.upl-side { display: grid; gap: 14px; align-content: start; }
.upl { position: relative; aspect-ratio: 1 / 1; border: 1px dashed var(--border-2); border-radius: 12px; display: grid !important; place-items: center; cursor: pointer; overflow: hidden; background: var(--card); transition: border-color .15s; }
.upl:hover, .upl.drag { border-color: var(--text-2); }
.upl img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upl-ph { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 10px; color: var(--text-2); font-size: 12px; }
.upl-ph small { color: var(--muted); font-size: 10.5px; }
.upl.has .upl-ph { position: absolute; inset: auto 0 0 0; background: rgba(0,0,0,.6); color: #fff; padding: 6px; opacity: 0; transition: opacity .15s; }
.upl.has .upl-ph small, .upl.has .upl-ph svg { display: none; }
.upl.has:hover .upl-ph { opacity: 1; }
.upl.busy::after { content: 'Enviando…'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; }
.chk.feat { align-self: end; padding-bottom: 8px; }
.cr-edit .cr .btn { justify-self: start; padding: 3px 6px; }

/* ---------- vazio ---------- */
.empty.big { display: grid; justify-items: center; gap: 6px; padding: 44px 18px; }
.empty.big > svg.i { width: 34px; height: 34px; color: var(--muted); }
.empty.big h3 { margin: 6px 0 0; color: var(--text); font-size: 17px; }
.empty.big p { margin: 0 0 10px; }

/* ---------- celular ---------- */
@media (max-width: 1100px) {
  .ohero { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .od { grid-template-columns: 1fr; }
  .od-media { border-right: 0; border-bottom: 1px solid var(--border); }
  .od-img { max-width: 420px; width: 100%; margin: 0 auto; }
}
@media (max-width: 640px) {
  .ohero { padding: 22px 18px; gap: 18px; }
  .ohero-stats .mini .v { font-size: 21px; }
  .ogrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ogrid.rail { grid-template-columns: none; grid-auto-columns: 46%; }
  .offer-body { padding: 10px; gap: 6px; }
  .offer-body h3 { font-size: 12.5px; }
  .otags .otag:nth-child(n+3) { display: none; }
  .ofrow .search { max-width: none; flex-basis: 100%; }
  .ofrow .seg { width: 100%; overflow-x: auto; }
  .ofrow .seg button { flex: 1; }
  .ofrow.selects select { flex: 1 1 calc(50% - 5px); max-width: none; }
  .modal-card.xl { max-height: calc(100dvh - 16px); }
  .od-media, .od-info { padding: 16px; }
  .od-info h2 { font-size: 19px; }
  .ol-l { width: auto; }
  .ol-l + .ol-u { display: none; }
  .olink { justify-content: space-between; }
  .olink .ol-l { flex: 1; }
  .upl-row { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
  .ads-in { width: 100%; }
}

/* a grade nunca passa da largura da tela (o trilho de cards rola por dentro) */
#view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.ostack { grid-template-columns: minmax(0, 1fr); }
.osection, .ogrid { min-width: 0; }
@media (max-width: 640px) {
  .od-img { max-width: 240px; }
  .od-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px; }
  .od-kpis .mini { padding: 10px; }
  .od-kpis .mini .v { font-size: 16px; }
  .od-kpis .mini .l { font-size: 10px; }
}

/* ---------- notificações ---------- */
.icon-btn.bell { position: relative; }
.icon-btn.bell .bdot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #ff5a3c; box-shadow: 0 0 0 2px var(--card); }
.pushbox { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pb-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--card-3); border: 1px solid var(--border-2); flex: none; color: var(--text-2); }
.pushbox.on .pb-ico { color: var(--pos); background: var(--pos-soft); border-color: var(--pos-line); }
.pb-txt { display: grid; gap: 3px; flex: 1 1 220px; min-width: 0; }
.pb-txt b { font-size: 14px; }
.pb-act { display: flex; gap: 8px; flex-wrap: wrap; }
.push-hint { position: relative; padding: 16px 52px 16px 18px; border-color: var(--border-2);
  background: radial-gradient(500px 200px at 0% 0%, rgba(255,90,60,.10), transparent 70%), linear-gradient(180deg, var(--card-2), var(--card)); }
.push-hint .ph-x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: 0; background: none; }
.notify-chk { padding: 10px 12px; border: 1px dashed var(--border-2); border-radius: 10px; margin: 0 !important; }
@media (max-width: 640px) {
  .pb-act { width: 100%; }
  .pb-act .btn.primary { width: 100%; }
}

/* ---------- marca: logo + selo SPY ---------- */
.brand-lock { display: inline-flex; align-items: center; gap: 8px; }
.spy-tag { font-family: var(--mono); font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .14em; line-height: 1;
  padding: 4px 6px 3px; border-radius: 6px; border: 1px solid var(--border-2); color: var(--text); background: var(--card-3); }
.sidebar .logo img { width: 150px; }
.login-card .logo { display: flex; justify-content: center; }
.login-card .logo img { width: 210px; margin: 0; }

/* ---------- login: primeiro acesso ---------- */
.link-btn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 13px; color: var(--text-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; justify-self: center; }
.link-btn:hover { color: var(--text); }
