:root{
  /* Paleta idêntica ao painel Achado em Conta */
  --bg: #0d0f14;
  --surface: #13161e;
  --surface-raised: #1a1e29;
  --ink: #e8eaf0;
  --muted: #6b7280;
  --amber: #a8d8ff;       /* accent do painel (preço, ações primárias) */
  --amber-ink: #0d0f14;   /* texto sobre o accent claro */
  --coral: #f87171;       /* red do painel (badges de desconto/urgência) */
  --line: #242836;
  --green: #4ade80;
  --yellow: #ffcc00;
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*{ box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html,body{ margin:0; padding:0; }

body{
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(28px + var(--safe-bottom));
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Topbar ---------- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + var(--safe-top)) 18px 12px;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(14,27,22,0.85));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar__brand{ display:flex; align-items:center; gap:10px; }
.brand-logo{ height: 32px; width: auto; object-fit: contain; flex-shrink: 0; }
.logo-tag{
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: var(--amber);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.logo-name{
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
}
.logo-name span{ color: var(--amber); }
.topbar__status{
  display:flex; align-items:center; gap:6px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 500;
}
.pulse-dot{
  width:7px; height:7px; border-radius:50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(74,222,128,0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(74,222,128,0.55); }
  70%{ box-shadow: 0 0 0 7px rgba(74,222,128,0); }
  100%{ box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

/* ---------- Chips (nicho filter) ---------- */
.chips{
  display:flex;
  gap: 8px;
  padding: 12px 18px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 54px;
  z-index: 19;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.chips::-webkit-scrollbar{ display:none; }
.chip{
  flex: 0 0 auto;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.chip.is-active{
  background: var(--amber);
  color: var(--amber-ink);
  border-color: var(--amber);
}

/* ---------- Feed ---------- */
.feed{
  padding: 18px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 560px;
  margin: 0 auto;
}

/* Signature element: price-tag card with punch hole + perforation */
.deal{
  position: relative;
  padding-left: 14px;
  animation: rise .35s ease both;
}
@keyframes rise{
  from{ opacity: 0; transform: translateY(6px); }
  to{ opacity: 1; transform: translateY(0); }
}
.deal__hole{
  position: absolute;
  left: -3px;
  top: 26px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line);
  z-index: 2;
}
.deal__card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.deal__media{
  position: relative;
  aspect-ratio: 16/10;
  background: var(--surface-raised);
}
.deal__media img{
  width:100%; height:100%; object-fit: cover; display:block;
}
.deal__badge{
  position:absolute; top:10px; left:10px;
  background: var(--coral);
  color: #1a0505;
  font-family:'DM Mono', monospace;
  font-weight:600;
  font-size: 12px;
  padding: 4px 9px 3px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}
.deal__store{
  position:absolute; top:10px; right:10px;
  background: rgba(13,15,20,0.82);
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.deal__body{ padding: 14px 16px 16px; }
.deal__title{
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 8px;
  color: var(--ink);
}
.deal__prices{
  display:flex; align-items: baseline; gap: 9px;
  margin-bottom: 12px;
  font-family: 'Inter', sans-serif;
}
.deal__price{
  font-size: 25px;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: 0.2px;
}
.deal__price-old{
  font-size: 14px;
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 500;
}

.deal__perf{
  border: none;
  border-top: 2px dashed var(--line);
  margin: 0 0 12px;
}

.deal__actions{
  display:flex;
  gap: 10px;
  align-items: stretch;
}
.deal__coupon{
  flex: 1 1 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 6px;
  background: var(--surface-raised);
  border: 1px dashed var(--muted);
  border-radius: 8px;
  padding: 0 10px;
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0.5px;
  cursor: pointer;
  min-height: 42px;
}
.deal__coupon svg{ flex: 0 0 auto; opacity: 0.7; }
.deal__coupon:active{ background: var(--surface); }
.deal__go{
  flex: 0 0 auto;
  display:flex; align-items:center; gap:6px;
  background: var(--amber);
  color: var(--amber-ink);
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  min-height: 42px;
  text-decoration: none;
  cursor: pointer;
}
.deal__go:active{ filter: brightness(0.94); }

.deal__no-coupon{
  flex: 1 1 auto;
  display:flex; align-items:center;
  font-size: 12.5px;
  color: var(--muted);
  font-style: italic;
}

/* ---------- Skeleton loading ---------- */
.skeleton .deal__card{ background: var(--surface); }
.skeleton .deal__media{
  background: linear-gradient(90deg, var(--surface-raised) 25%, var(--surface) 37%, var(--surface-raised) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer{
  0%{ background-position: 100% 0; }
  100%{ background-position: 0 0; }
}

/* ---------- Empty state ---------- */
.empty-state{
  text-align:center;
  padding: 60px 24px;
  color: var(--muted);
}
.empty-state__icon{ width:56px; height:56px; margin-bottom: 14px; opacity: .6; }
.empty-state p{ margin: 4px 0; }
.empty-state__sub{ font-size: 13px; }

/* ---------- Toast ---------- */
.toast{
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translate(-50%, 12px);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 40;
}
.toast.is-visible{
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Notify FAB ---------- */
.notify-fab{
  position: fixed;
  right: 18px;
  bottom: calc(20px + var(--safe-bottom));
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--amber);
  display:flex; align-items:center; justify-content:center;
  cursor: pointer;
  z-index: 30;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.notify-fab.is-on{
  background: var(--amber);
  color: var(--amber-ink);
}

@media (min-width: 640px){
  .feed{ padding-top: 22px; }
}
