/* ownership: product */
/* BeefFi v5 — Mercado no padrao InfinitePay (mesmos tokens do app: claro, neutro, lime so no destaque) + fotos de boi. */

/* Foto de perfil dos bois (em toda a app): aro neutro. */
.cow-photo { flex: none; border-radius: 50%; object-fit: cover; background: var(--tile); box-shadow: 0 0 0 1px var(--line-2); }
.k-item-ic svg.cow-avatar, .k-item > .cow-photo { width: 40px; height: 40px; }
.k-cow .cow-photo { width: 64px; height: 64px; }

.mkt { display: flex; flex-direction: column; gap: 16px; }
.mkt > * + * { margin-top: 0 !important; }

.mk-hero h1 { margin: 10px 0 0; font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--text); }
.mk-hero p { margin: 8px 0 0; font-size: 14px; font-weight: 400; color: var(--mute); }
.mk-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--pos); }
.mk-live i { width: 6px; height: 6px; border-radius: 50%; background: #2ec721; animation: mkPulse 1.8s ease-in-out infinite; }
.mk-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.mk-kpis span { display: flex; flex-direction: column; gap: 5px; padding: 14px; border-radius: 16px; background: var(--tile); min-width: 0; }
.mk-kpis b { font-size: 17px; font-weight: 700; color: var(--text); white-space: nowrap; }
.mk-kpis b.lime { color: var(--pos); }
.mk-kpis small { font-size: 12px; font-weight: 400; color: var(--mute); }

.mk-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.mk-chips::-webkit-scrollbar { display: none; }
.mk-chip { flex: none; min-height: 34px; padding: 0 14px; border-radius: 17px; font-size: 13.5px; font-weight: 500; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); transition: transform 0.15s, background 0.2s; }
.mk-chip:active { transform: scale(0.95); }
.mk-chip.on { background: var(--tile-2); border-color: var(--text); }

.mk-list { display: flex; flex-direction: column; gap: 12px; }
.mk-card { display: block; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); animation: kRise 0.4s cubic-bezier(0.19, 1, 0.22, 1) backwards; animation-delay: calc(var(--i, 0) * 50ms); transition: transform 0.2s; }
.mk-card:active { transform: scale(0.985); }
.mk-photo { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tile); }
.mk-card.hero .mk-photo { aspect-ratio: 4 / 3; }
.mk-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, transparent 35%, rgba(0, 0, 0, 0.72) 100%); pointer-events: none; }
.mk-rar { position: absolute; z-index: 2; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 10.5px; color: var(--text); background: rgba(255, 255, 255, 0.92); }
.mk-rar em { font-style: normal; font-size: 12px; font-weight: 500; }
.mk-price { position: absolute; z-index: 2; top: 10px; right: 10px; display: flex; flex-direction: column; align-items: flex-end; padding: 5px 11px; border-radius: 14px; background: var(--lime); color: var(--on-lime); }
.mk-price b { font-size: 14px; font-weight: 700; }
.mk-price small { font-size: 10.5px; font-weight: 400; }
.mk-id { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 11px; display: flex; flex-direction: column; gap: 1px; }
.mk-id b { font-size: 20px; font-weight: 700; color: #fff; }
.mk-id small { font-size: 12.5px; font-weight: 400; color: rgba(255, 255, 255, 0.85); }

.mk-body { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.mk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mk-stats span { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 12px; background: var(--tile); }
.mk-stats small { font-size: 11.5px; font-weight: 400; color: var(--mute); }
.mk-stats b { font-size: 13.5px; font-weight: 700; color: var(--text); white-space: nowrap; }
.mk-fund { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 400; color: var(--mute); }
.mk-fund b { color: var(--text); font-weight: 700; }
.mk-track { height: 6px; border-radius: 3px; background: var(--tile-2); overflow: hidden; }
.mk-track i { display: block; height: 100%; width: max(var(--p), 2%); border-radius: 3px; background: #2ec721; }
.mk-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mk-foot small { font-size: 12px; font-weight: 400; color: var(--mute); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-go { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 17px; font-size: 13px; font-weight: 500; color: var(--text); background: var(--tile-2); }
.mk-go .ico { width: 15px; height: 15px; stroke-width: 2; }

@keyframes mkPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .mk-card, .mk-live i { animation: none !important; } }

/* Meu Curral: ficha rapida do boi na folha de baixo (mesma .sheet do app, tokens claros; lime so no destaque). */
.cow-card { gap: 14px; max-height: 86dvh; overflow-y: auto; }
.cow-head { display: flex; align-items: center; gap: 12px; }
.cow-head .cow-photo { width: 64px; height: 64px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line-2); }
.cow-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cow-id b { font-size: 20px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cow-id small { font-size: 12.5px; font-weight: 400; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cow-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cow-name .k-tag { flex: none; }
.cow-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cow-buy { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--tile); }
.cow-buy-t { font-size: 13px; font-weight: 500; color: var(--mute); }
.k-chip.lime { display: inline-flex; flex-direction: column; align-items: center; min-height: 52px; justify-content: center; border: 0; background: var(--lime); color: var(--on-lime); font-weight: 700; }
.k-chip.lime small { font-size: 11px; font-weight: 400; }
.cow-card .k-btn-row { display: flex; gap: 10px; }
.cow-card .k-btn-row .k-cta { flex: 1.4; }
.cow-card .k-btn-row .k-btn2 { flex: 1; width: auto; }

/* Voo guiado do drone: etapas, telemetria enxuta e mini-mapa (paleta do app; lime so no que esta em foco). */
.drone-steps { position: absolute; z-index: 3; left: 14px; right: 62px; top: 52px; display: none; gap: 6px; }
.curral-card[data-cam='drone'] .drone-steps { display: flex; }
.curral-card.immersive .drone-steps { margin-top: env(safe-area-inset-top); }
.drone-step { position: relative; flex: 1; height: 30px; padding: 0 8px; border-radius: 15px; overflow: hidden; font: 700 11px var(--mono); letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.75); background: rgba(10, 12, 18, 0.72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.drone-step i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: rgba(255, 255, 255, 0.16); transition: width 0.2s linear; }
.drone-step span { position: relative; }
.drone-step.on { color: var(--lime); box-shadow: inset 0 0 0 1.5px var(--lime); }
.drone-step.done { color: #fff; }
.drone-step:active { transform: scale(0.96); }
.cam-tag b { font-weight: 700; }
.drone-map { position: absolute; right: 14px; bottom: 108px; width: 132px; height: auto; border-radius: 12px; background: rgba(7, 10, 18, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.curral-card.immersive .drone-map, .curral-card.immersive .telemetry { bottom: calc(108px + env(safe-area-inset-bottom)); }
.dm-pen { fill: rgba(255, 255, 255, 0.06); stroke: rgba(255, 255, 255, 0.55); stroke-width: 0.5; }
.dm-route { fill: none; stroke: rgba(255, 255, 255, 0.3); stroke-width: 0.4; stroke-dasharray: 1.4 1.2; }
.dm-trough { fill: rgba(255, 255, 255, 0.5); }
.dm-water { fill: rgba(255, 255, 255, 0.26); }
.dm-cow { fill: rgba(255, 255, 255, 0.7); }
.dm-cow.mine { fill: var(--lime); }
.dm-cone { fill: rgba(255, 255, 255, 0.14); }
.dm-arrow { fill: #fff; stroke: #0b0f19; stroke-width: 0.4; stroke-linejoin: round; }

/* Foco nos seus bois: filtro "so os meus" (lime = destaque) e mini-mapa com os bois dos outros esmaecidos. */
.curral-filter { position: absolute; z-index: 3; left: 14px; top: 100px; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px 0 10px; border-radius: 16px; font-size: 12.5px; font-weight: 600; color: #fff; background: rgba(10, 12, 18, 0.72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); transition: transform 0.15s, background 0.2s; }
.curral-filter .ico { width: 16px; height: 16px; }
.curral-filter:active { transform: scale(0.95); }
.curral-filter.on, .curral-filter[aria-pressed='true'] { color: var(--on-lime); background: var(--lime); box-shadow: none; }
.curral-card[data-cam='drone'] .curral-filter, .curral-card[data-cam='live'] .curral-filter { display: none; }
.curral-card.immersive .curral-filter { margin-top: env(safe-area-inset-top); }
.drone-map .dm-cow:not(.mine) { opacity: 0.45; }
.drone-map.mine-only .dm-cow:not(.mine) { display: none; }
.dm-cow.mine { stroke: rgba(7, 10, 18, 0.7); stroke-width: 0.3; }

/* v5.1 — 100 fracoes por boi: a grade do onboarding tem 100 quadradinhos (1% cada), 10 por linha. */
.ob-fractions { grid-template-columns: repeat(10, 1fr); gap: 3px; }
.ob-fractions i { border-radius: 4px; }

/* v5.2 — compra de lote (Mercado e tela do lote): so tokens ja existentes. */
.lot-offers { display: flex; flex-direction: column; gap: 12px; }
.lot-card { color: inherit; text-decoration: none; transition: transform var(--fast); }
.lot-card:active { transform: scale(0.985); }
.lot-card .k-item { min-height: 0; padding: 0; }
.k-item-ic.big { width: 64px; height: 64px; border-radius: 50%; flex: none; }
.k-item-ic.big .ico { width: 28px; height: 28px; }
.neg-text { color: var(--neg); }
.lot-sum { display: flex; flex-direction: column; gap: 12px; }

/* v5.3 — simulador: modo (fracoes/lote), premissas editaveis, faixa de GMD, custos, estresse da @ e as duas regras. */
.sim-mode { margin-bottom: 4px; }
.sim-premises { display: flex; flex-direction: column; gap: 12px; }
.sim-premises .k-item { min-height: 0; padding: 0; }
.sim-pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sim-mini { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 400; color: var(--mute); min-width: 0; }
.sim-mini input { min-height: 46px; padding: 0 12px; font-size: 15px; }
.sim-mini small { font-size: 11px; color: var(--mute); }
.sim-trio { margin-top: 2px; }
.sim-vs { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; font-size: 13px; color: var(--soft); }
.sim-vs b { font-size: 15px; font-weight: 600; color: var(--text); }
.sim-vs.win b { color: var(--pos); } .sim-vs.lose b { color: var(--neg); }
.sim-bands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sim-bands .k-stat b { font-size: 14px; white-space: normal; overflow: visible; text-overflow: clip; }
.sim-bands .k-stat b.pos { color: var(--pos); } .sim-bands .k-stat b.neg { color: var(--neg); }
.sim-bands .k-stat.on { box-shadow: inset 0 0 0 2px var(--lime); }
.sim-opts { display: flex; flex-direction: column; gap: 12px; }
.sim-opt .k-item { min-height: 0; padding: 0; }
.sim-opt.on { box-shadow: inset 0 0 0 2px var(--lime); }
