﻿:root {
  --bg-0: #eff4fb;
  --bg-1: #e5edf8;
  --bg-2: #d4e5f7;
  --card: #ffffff;
  --line: #d4e1f4;
  --text: #1d3f76;
  --muted: #5f7fae;
  --accent: #5f86e3;
  --accent-2: #2aa7ea;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(104, 146, 228, 0.32) 0%, transparent 38%),
    radial-gradient(circle at 85% 25%, rgba(45, 163, 235, 0.2) 0%, transparent 40%),
    linear-gradient(155deg, var(--bg-0), var(--bg-1) 55%, var(--bg-2));
  overflow-x: hidden;
  animation: pageGlow 1.1s ease;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.2px;
}

p {
  color: var(--muted);
}

.bg-shape {
  position: fixed;
  width: 280px;
  height: 280px;
  filter: blur(26px);
  border-radius: 999px;
  opacity: 0.35;
  pointer-events: none;
}

.bg-shape-1 {
  top: -60px;
  left: -80px;
  background: #2f7bd8;
}

.bg-shape-2 {
  bottom: -70px;
  right: -60px;
  background: #1db6a2;
}

.app-shell {
  width: min(1200px, 95vw);
  margin: 36px auto;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 38px rgba(56, 93, 159, 0.14);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(56, 93, 159, 0.2);
  border-color: #b5cbef;
}

.brand-logo {
  height: 48px;
  width: auto;
  display: block;
  margin-bottom: 12px;
}

.topbar-logo {
  height: 36px;
  margin-bottom: 8px;
}

.auth-card {
  width: min(520px, 94vw);
  margin: 5vh auto;
  padding: 28px;
  animation: rise 0.45s ease;
}

.stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.stack.compact {
  gap: 8px;
}

.auth-switch {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-tab {
  background: #f4f8ff;
  color: var(--text);
  border: 1px solid #d5e2f6;
}

.auth-tab.active {
  background: linear-gradient(115deg, #5f86e3, #8ca8ee);
  color: #f5f8ff;
  border-color: transparent;
}

input,
select,
button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

input,
select {
  background: #f7faff;
  color: var(--text);
  border: 1px solid #d5e3f7;
}

button {
  background: linear-gradient(115deg, #5f86e3, #8ca8ee);
  color: #f5f8ff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn-ghost {
  width: auto;
  background: rgba(255, 255, 255, 0.16);
  color: #f5f8ff;
  border: 1px solid rgba(229, 239, 255, 0.55);
}

.topbar {
  background: linear-gradient(105deg, #1ea5dd 0%, #1f8fd7 52%, #2d78dc 100%);
  border-color: rgba(122, 176, 248, 0.42);
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  animation: rise 0.4s ease;
}

.topbar h2,
.topbar p {
  color: #f4f8ff;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(134, 200, 255, 0.5);
  animation: avatarPulse 2.8s ease-in-out infinite;
}

.menu-bar {
  margin-top: 12px;
  padding: 10px;
}

.menu-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.menu-tab {
  width: auto;
  padding: 10px 14px;
  background: #f4f8ff;
  color: #3b66b9;
  border: 1px solid #d5e2f6;
}

.menu-tab.active {
  background: linear-gradient(115deg, #5f86e3, #8ca8ee);
  color: #f4f8ff;
  animation: tabPulse 0.35s ease;
}

.stats-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 16px;
  animation: rise 0.5s ease;
}

.stat .value {
  margin-top: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.6rem;
}

.panel-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.panel {
  padding: 16px;
  animation: rise 0.55s ease;
}

.panel.wide {
  grid-column: span 2;
}

.panel-enter {
  animation: panelSwap 0.38s cubic-bezier(0.2, 0.85, 0.2, 1);
}

.row-form {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 2fr 1fr 2fr auto;
  gap: 8px;
}

.list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.item {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #d8e5f8;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.reward-card {
  align-items: stretch;
}

.reward-media {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #edf5ff;
  border: 1px solid #d8e6fa;
  color: var(--muted);
  font-size: 0.78rem;
  flex-shrink: 0;
}

.reward-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f4f8ff;
}

.reward-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reward-card.expanded .reward-description {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.reward-countdown {
  color: var(--accent-2);
  font-weight: 700;
}

.item .meta {
  font-size: 0.86rem;
  color: var(--muted);
}

.item .actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.item .actions button {
  width: auto;
  padding: 9px 12px;
}

.deliver-check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.86rem;
  color: var(--text);
}

.deliver-check input {
  width: 16px;
  height: 16px;
}

.report-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-filters {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.campaign-form {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ranking-me {
  border-color: rgba(126, 247, 200, 0.55);
  box-shadow: inset 0 0 0 1px rgba(126, 247, 200, 0.18);
}

.ranking-top {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 222, 135, 0.7);
  background:
    linear-gradient(120deg, rgba(71, 51, 12, 0.35), rgba(167, 120, 22, 0.14)),
    rgba(4, 14, 30, 0.72);
}

.ranking-top strong {
  color: #ffe6a3;
}

.ranking-top .meta {
  color: #f7d891;
}

.ranking-top-1 {
  border-color: rgba(255, 228, 122, 0.95);
  box-shadow:
    inset 0 0 0 1px rgba(255, 230, 143, 0.36),
    0 0 24px rgba(255, 208, 86, 0.3);
}

.ranking-top-2 {
  border-color: rgba(255, 218, 122, 0.82);
}

.ranking-top-3 {
  border-color: rgba(255, 206, 116, 0.72);
}

.energy-rays {
  position: absolute;
  width: 140px;
  height: 140px;
  right: -44px;
  top: -52px;
  border-radius: 999px;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 227, 141, 0.62) 0deg 7deg,
    rgba(255, 227, 141, 0) 7deg 20deg
  );
  opacity: 0.8;
  animation: energySpin 2.2s linear infinite, energyBlink 0.8s steps(2, end) infinite;
  pointer-events: none;
}

.energy-rays::after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 999px;
  background: rgba(7, 20, 42, 0.9);
}

.hint {
  margin-top: 16px;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.small {
  font-size: 0.84rem;
  margin: 8px 0 0;
}

.rules-status {
  margin-top: 10px;
}

.rules-box {
  margin-top: 12px;
  border: 1px solid #d9e6f8;
  border-radius: 12px;
  padding: 12px;
  background: #f7fbff;
  display: grid;
  gap: 8px;
}

.rules-box.compact {
  margin-top: 8px;
  max-height: 180px;
  overflow: auto;
}

.rules-box p {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text);
}

.checkbox-line input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.tag {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.tag.ok {
  color: #073320;
  background: #7ef7c8;
}

.tag.warn {
  color: #3f2600;
  background: #ffdca8;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(26, 53, 95, 0.34);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 16px;
  animation: fadeIn 0.25s ease;
}

.modal-card {
  width: min(480px, 92vw);
  padding: 18px;
  animation: modalSpring 0.35s cubic-bezier(0.2, 0.85, 0.2, 1);
}

.reward-preview-card {
  width: min(700px, 94vw);
}

.reward-preview-image-wrap {
  margin-top: 12px;
  border-radius: 12px;
  min-height: 240px;
  max-height: 58vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #edf5ff;
  border: 1px solid #d7e6fa;
}

.reward-preview-image {
  width: 100%;
  height: 100%;
  max-height: 58vh;
  object-fit: contain;
  animation: imageReveal 0.42s cubic-bezier(0.2, 0.85, 0.2, 1);
}

.modal-actions {
  display: flex;
  gap: 8px;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1f79d7;
  color: #f6fbff;
  border: 1px solid #87b6f2;
  border-radius: 10px;
  padding: 10px 14px;
  z-index: 60;
}

.hidden {
  display: none !important;
}

.clickable,
button {
  transition: transform 0.18s ease, filter 0.18s ease;
}

.press {
  transform: scale(0.98);
}

.stagger-item {
  opacity: 0;
  animation: staggerIn 0.45s cubic-bezier(0.2, 0.85, 0.2, 1) forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panelSwap {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageGlow {
  from {
    filter: saturate(1.3);
  }
  to {
    filter: saturate(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSpring {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes staggerIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tabPulse {
  0% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes avatarPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(78, 210, 255, 0.22);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(78, 210, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(78, 210, 255, 0);
  }
}

@keyframes imageReveal {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes energySpin {
  from {
    transform: rotate(0deg) scale(0.96);
    filter: drop-shadow(0 0 3px rgba(255, 210, 99, 0.42));
  }
  50% {
    transform: rotate(180deg) scale(1);
    filter: drop-shadow(0 0 10px rgba(255, 218, 122, 0.65));
  }
  to {
    transform: rotate(360deg) scale(0.96);
    filter: drop-shadow(0 0 3px rgba(255, 210, 99, 0.42));
  }
}

@keyframes energyBlink {
  0% {
    opacity: 0.95;
  }
  20% {
    opacity: 0.5;
  }
  45% {
    opacity: 1;
  }
  60% {
    opacity: 0.55;
  }
  100% {
    opacity: 0.92;
  }
}

@media (max-width: 980px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

  .panel.wide {
    grid-column: auto;
  }

  .row-form {
    grid-template-columns: 1fr;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }

  .report-filters {
    grid-template-columns: 1fr;
  }

  .campaign-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .app-shell {
    width: 94vw;
    margin: 18px auto 28px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .item {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── TIER BANNER ──────────────────────────────────────────────────────────── */
.tier-banner {
  background: linear-gradient(135deg, #eef4fb 0%, #dce8f8 100%);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 4px;
}
.tier-banner-inner { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.tier-badge {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: white; border-radius: 12px; padding: 10px 14px;
  border: 2px solid var(--tier-color, #cd7f32);
  min-width: 72px; text-align: center;
}
.tier-icon { font-size: 1.5rem; line-height: 1; color: var(--tier-color, #cd7f32); }
.tier-name { font-weight: 700; font-size: 0.85rem; color: var(--tier-color, #cd7f32); letter-spacing: 0.04em; }
.tier-info { flex: 1; min-width: 200px; }
.tier-progress-wrap { margin-bottom: 6px; }
.tier-progress-bar {
  position: relative; height: 10px; background: var(--bg-2); border-radius: 99px; overflow: hidden; margin-bottom: 4px;
}
.tier-progress-fill {
  position: absolute; left: 0; top: 0; height: 100%; width: var(--pct, 0%);
  background: linear-gradient(90deg, var(--color, #cd7f32), color-mix(in srgb, var(--color, #cd7f32) 70%, white));
  border-radius: 99px; transition: width 0.6s ease;
}
.tier-progress-label { font-size: 0.78rem; color: var(--muted); }
.tier-benefits-details { margin-top: 4px; }
.tier-benefits-details summary { font-size: 0.8rem; color: var(--accent); cursor: pointer; }
.tier-benefits-list { margin: 6px 0 0 16px; padding: 0; font-size: 0.8rem; color: var(--text); }
.tier-benefits-list li { margin: 3px 0; }

/* ── FILTER BAR ────────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; align-items: center;
}
.filter-chip {
  padding: 4px 12px; border-radius: 99px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--muted); font-size: 0.8rem; cursor: pointer; transition: all 0.15s;
}
.filter-chip.active, .filter-chip:hover {
  background: var(--accent); color: white; border-color: var(--accent);
}
.can-afford-toggle {
  display: flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--muted);
  cursor: pointer; padding: 4px 8px; border-radius: 99px; border: 1.5px solid var(--line);
  background: var(--card); transition: all 0.15s; white-space: nowrap; flex-shrink: 0;
}
.can-afford-toggle:has(input:checked) { background: #ecfdf5; border-color: #34d399; color: #065f46; }

/* ── ANNOUNCEMENT POPUP ──────────────────────────────────────────────────────── */
.ann-popup-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.ann-popup-header h3 { margin: 0; flex: 1; }
.ann-popup-body { margin-top: 10px; font-size: 0.92rem; color: var(--text); line-height: 1.6; white-space: pre-line; max-height: 50vh; overflow-y: auto; }

/* ── REWARD TAGS ────────────────────────────────────────────────────────────── */
.reward-category-tag {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  background: var(--bg-2); color: var(--muted); font-size: 0.75rem; font-weight: 600;
}
.tier-required-tag {
  display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 0.75rem; font-weight: 600;
}
.tier-required-tag.ok { background: #ecfdf5; color: #065f46; }
.tier-required-tag.locked { background: #fef3c7; color: #92400e; }
.pts-low { color: #ef4444; }
.reward-card.tier-locked { opacity: 0.75; }
.reward-card.tier-locked button[disabled] { background: var(--bg-2); color: var(--muted); cursor: not-allowed; }

/* ── MISSIONS ────────────────────────────────────────────────────────────── */
.mission-card { flex-direction: column; align-items: stretch; }
.mission-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.mission-badge {
  font-size: 0.75rem; padding: 2px 8px; border-radius: 99px; background: var(--bg-2); color: var(--muted); white-space: nowrap;
}
.mission-active .mission-badge { background: #eff6ff; color: #1d4ed8; }
.mission-done .mission-badge { background: #ecfdf5; color: #065f46; }
.mission-ended .mission-badge { background: var(--bg-2); color: var(--muted); }
.mission-progress-wrap { margin: 8px 0 4px; }
.mission-progress-bar {
  position: relative; height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; margin-bottom: 3px;
}
.mission-progress-fill {
  position: absolute; left: 0; top: 0; height: 100%; width: var(--mpct, 0%);
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width 0.6s ease;
}
.mission-progress-label { font-size: 0.78rem; color: var(--muted); }

/* ── ANNOUNCEMENTS ──────────────────────────────────────────────────────────── */
.announcement-card { flex-direction: column; align-items: stretch; border-left: 4px solid var(--accent); }
.ann-promotion { border-left-color: #f59e0b; }
.ann-event { border-left-color: #8b5cf6; }
.ann-challenge { border-left-color: #10b981; }
.announcement-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.ann-icon { font-size: 1.1rem; }
.ann-body { font-size: 0.9rem; color: var(--text); line-height: 1.5; white-space: pre-line; }

/* ── TAB BADGE ─────────────────────────────────────────────────────────────── */
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: #ef4444; color: white; border-radius: 99px;
  font-size: 0.65rem; font-weight: 700; min-width: 16px; height: 16px; padding: 0 4px;
  margin-left: 4px; vertical-align: middle;
}

/* ── HISTORY ITEMS ─────────────────────────────────────────────────────────── */
.history-credit strong { color: #059669; }
.history-debit strong { color: #dc2626; }
.history-redeem strong { color: #7c3aed; }

/* ── CHART ──────────────────────────────────────────────────────────────────── */
.chart-wrap {
  background: white; border-radius: 12px; border: 1.5px solid var(--line);
  padding: 14px; margin-bottom: 8px; height: 180px; position: relative;
}
.chart-wrap canvas { max-height: 100%; }

/* ── ONBOARDING MODAL ───────────────────────────────────────────────────────── */
.onboarding-card { max-width: 440px; width: 100%; padding: 28px; }
.onboarding-step { text-align: center; padding: 8px 0 16px; }
.onboarding-icon { font-size: 3rem; margin-bottom: 10px; }
.onboarding-step h3 { font-size: 1.15rem; color: var(--text); margin: 0 0 10px; }
.onboarding-step p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.onboarding-footer { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.onboarding-dots { display: flex; gap: 6px; }
.onboarding-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background 0.2s; }
.onboarding-dot.active { background: var(--accent); }
.onboarding-nav { display: flex; gap: 10px; justify-content: center; }

/* ── REWARD GRID ────────────────────────────────────────────────────────────── */
.rewards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
@media (max-width: 700px) {
  .rewards-grid { grid-template-columns: 1fr; }
}

/* Novo card de prêmio */
.reward-card-new {
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: 16px;
  border: 1.5px solid #d8e5f8;
  background: #ffffff;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.reward-card-new:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(56,93,159,0.18);
  border-color: #a8c4f0;
}
.reward-card-img {
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: #edf5ff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reward-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.reward-card-new:hover .reward-card-img img {
  transform: scale(1.06);
}
.reward-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #edf5ff 0%, #dce8f8 100%);
}
.reward-placeholder-icon {
  font-size: 3.2rem;
  opacity: 0.55;
  filter: drop-shadow(0 2px 4px rgba(56,93,159,0.15));
}
.reward-card-body {
  padding: 12px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.reward-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4px 8px;
}
.reward-card-title {
  font-size: 0.95rem;
  color: var(--text);
  flex: 1;
  min-width: 120px;
}
.reward-card-desc {
  margin: 2px 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reward-card-new.expanded .reward-card-desc {
  -webkit-line-clamp: unset;
  overflow: visible;
}
.reward-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.reward-pts-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(120deg, #4a79e0, #7ba4ee);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(74,121,224,0.25);
}
.reward-stock-info {
  font-size: 0.78rem;
  color: var(--muted);
}
.reward-card-action {
  padding: 10px 14px 14px;
}
.btn-redeem {
  width: 100%;
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  background: linear-gradient(120deg, #4a79e0, #7ba4ee);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(74,121,224,0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.btn-redeem:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(74,121,224,0.35);
  filter: brightness(1.06);
}
.btn-redeem-disabled {
  background: var(--bg-2);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}
.btn-redeem-disabled:hover {
  transform: none;
  filter: none;
  box-shadow: none;
}
.btn-redeem-locked {
  background: #fef3c7;
  color: #92400e;
  box-shadow: none;
  cursor: not-allowed;
}
.btn-redeem-locked:hover {
  transform: none;
  filter: none;
  box-shadow: none;
}

/* Featured badge */
.featured-badge {
  font-size: 0.75rem;
  color: #d97706;
  font-weight: 700;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 2px 8px;
  border-radius: 99px;
}

/* ── EDIT REWARD MODAL ──────────────────────────────────────────────────────── */
.edit-reward-modal-card {
  width: min(540px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
}

.btn-cancel-modal {
  background: #f4f8ff;
  color: var(--text);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn-cancel-modal:hover {
  background: #e8f0fd;
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
  filter: none;
}

/* ── CATEGORY IMAGE ─────────────────────────────────────────────────────────── */
.tier-banner-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
}

/* "Minha Posição" — imagem centralizada, sem número */
.my-position-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px;
  background: linear-gradient(135deg, #f0f6ff 0%, #dce8f8 100%);
  border-radius: 14px;
  border: 1.5px solid rgba(140,185,255,0.4);
  box-shadow: 0 6px 22px rgba(56,93,159,0.1);
  animation: rise 0.45s ease;
  text-align: center;
}
.my-position-category-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.my-position-category-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 16px;
  animation: tierIconPulse 2.6s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}
.my-position-progress-wrap {
  width: 100%;
  max-width: 320px;
  margin-top: 4px;
}
.my-tier-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 99px;
  border: 2px solid var(--tier-color, #cd7f32);
  color: var(--tier-color, #cd7f32);
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.85);
}

/* ── LAYOUT IMPROVEMENTS ────────────────────────────────────────────────────── */

/* Login card — glassmorphism reforçado */
.auth-card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(28px) saturate(1.6);
  border: 1.5px solid rgba(190,215,255,0.5);
  box-shadow: 0 24px 60px rgba(40,80,160,0.18), 0 1px 0 rgba(255,255,255,0.85) inset;
}

/* Auth title polish */
.auth-card h1 {
  font-size: 1.55rem;
  background: linear-gradient(120deg, #2d6cd4, #5f86e3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2px;
}

/* Stats cards — gradientes sutis */
.stat {
  background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 100%);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  top: -18px;
  right: -18px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95,134,227,0.12), transparent 70%);
}
.stat .value {
  background: linear-gradient(120deg, #2d6cd4, #5f86e3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.8rem;
  font-weight: 800;
}

/* Menu tabs — indicador animado e visual mais moderno */
.menu-bar {
  padding: 8px 10px;
  background: linear-gradient(105deg, rgba(255,255,255,0.95), rgba(240,248,255,0.95));
}
.menu-tab {
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}
.menu-tab:hover:not(.active) {
  background: #e8f0fd;
  color: var(--accent);
  transform: translateY(-1px);
}
.menu-tab.active {
  background: linear-gradient(120deg, #4a79e0, #7ba4ee);
  color: #fff;
  box-shadow: 0 4px 12px rgba(74,121,224,0.3);
  transform: translateY(-1px);
}

/* Reward cards — hover mais marcante, layout melhorado */
.reward-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.reward-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(56,93,159,0.18);
  border-color: #a8c4f0;
}
.reward-media {
  width: 100px;
  height: 100px;
  border-radius: 12px;
}
.reward-media img {
  object-fit: cover;
  transition: transform 0.3s ease;
}
.reward-card:hover .reward-media img {
  transform: scale(1.05);
}

/* Buttons — scale on hover mais polido */
button:not(.btn-ghost):not(.filter-chip):not(.menu-tab):not(.auth-tab) {
  background: linear-gradient(120deg, #4a79e0, #7ba4ee);
  box-shadow: 0 4px 14px rgba(74,121,224,0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
button:not(.btn-ghost):not(.filter-chip):not(.menu-tab):not(.auth-tab):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74,121,224,0.32);
  filter: brightness(1.05);
}

/* Tier banner — mais visual */
.tier-banner {
  background: linear-gradient(135deg, #f0f6ff 0%, #dce8f8 60%, #cde3ff 100%);
  border: 1.5px solid rgba(140,185,255,0.35);
  box-shadow: 0 6px 24px rgba(56,93,159,0.1);
  animation: rise 0.5s ease;
}
.tier-badge {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}
.tier-badge:hover { transform: scale(1.04); }
.tier-icon {
  font-size: 1.9rem;
  animation: tierIconPulse 2.4s ease-in-out infinite;
}

/* (my-position-card styles defined above in CATEGORY IMAGE section) */

/* Fade-in panels */
@keyframes tierIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Panel cards fade-in on show */
.panel-enter {
  animation: panelFadeIn 0.38s cubic-bezier(0.2, 0.85, 0.2, 1);
}
@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Item hover polish */
.item {
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.18s ease;
}
.item.clickable:hover, .item:has(button):hover {
  border-color: #b8d0f2;
  box-shadow: 0 4px 14px rgba(56,93,159,0.1);
}

/* Topbar — sombra mais suave */
.topbar {
  box-shadow: 0 8px 28px rgba(18,65,140,0.2);
}

/* Responsive: brand-logo on mobile */
@media (max-width: 600px) {
  .brand-logo { height: 38px; }
  .topbar-logo { height: 28px; }
  .my-position-category-img { width: 110px; height: 110px; }
}

/* ===== Admin dinâmico (admin-plus.js) ===== */
.btn-link { background: none; border: none; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 4px 0; font-weight: 600; box-shadow: none; }
.ap-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ap-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-top: 12px; }
.ap-chart-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fbfdff; }
.ap-chart-box h4 { margin: 0 0 8px; }
.ap-chart { position: relative; height: 260px; }
.ap-chart-mid { height: 220px; }
.ap-chart-sm { position: relative; height: 160px; margin: 10px 0; }
.ap-filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; margin: 10px 0; }
@media (max-width: 760px) { .ap-filters { grid-template-columns: 1fr; } }
.ap-table { display: grid; gap: 2px; }
.ap-tr { display: grid; grid-template-columns: 2.4fr 1.1fr 0.7fr 0.9fr 0.9fr 1.4fr; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.ap-tr.clickable:hover { border-color: var(--accent); cursor: pointer; background: #f4f8ff; }
.ap-th { background: transparent; border: none; font-size: 12px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
@media (max-width: 860px) { .ap-tr { grid-template-columns: 1fr 1fr; } .ap-th { display: none; } }
.ap-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ap-row.clickable:hover { background: #f4f8ff; cursor: pointer; }
.ap-grow { flex: 1; min-width: 0; }
.ap-rank { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.ap-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e8effa; color: var(--text); white-space: nowrap; }
.ap-tier-Bronze { background: #f3e2d1; color: #8a4f17; }
.ap-tier-Prata { background: #e5e9ef; color: #475569; }
.ap-tier-Ouro { background: #fdecc8; color: #92600a; }
.ap-tier-Diamante { background: #d9f4fb; color: #0e6d86; }
.ap-access-liberado { background: #d7f5e6; color: #0f7a46; }
.ap-access-provisoria { background: #fff1cc; color: #8a6200; }
.ap-access-pendente { background: #eef1f6; color: #64748b; }
.ap-off { background: #fde2e2; color: #a12020; }
.ap-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 10px 0; }
.ap-details { margin-top: 14px; }
.ap-details summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.ap-modal-wide { max-width: 920px; width: 96vw; max-height: 92vh; overflow-y: auto; position: relative; }
.ap-close { position: absolute; top: 10px; right: 10px; }
.ap-detail-head { display: flex; justify-content: space-between; gap: 16px; padding-right: 40px; }
.ap-detail-head h3 { margin: 0 0 4px; }
.ap-bigpoints { text-align: center; min-width: 110px; }
.ap-bigpoints .value { font-size: 40px; font-weight: 800; color: var(--accent); font-family: "Space Grotesk", sans-serif; }
.ap-mini { margin: 12px 0; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.ap-tabs { display: flex; gap: 6px; margin: 14px 0 6px; border-bottom: 1px solid var(--line); }
.ap-tab { background: none; border: none; border-bottom: 3px solid transparent; padding: 8px 10px; color: var(--muted); font-weight: 700; cursor: pointer; box-shadow: none; border-radius: 0; }
.ap-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.ap-scroll { max-height: 320px; overflow-y: auto; }
.ap-pos { color: #0f7a46; }
.ap-neg { color: #b42318; }
.ap-alert { background: #fff4e5; border: 1px solid #f5c26b; color: #8a5300; padding: 10px 12px; border-radius: 10px; margin: 8px 0; }
.ap-ok { background: #e7f8ef; border: 1px solid #9ad8b6; color: #0f7a46; padding: 10px 12px; border-radius: 10px; margin: 8px 0; }
.ap-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; }
.ap-col { background: #f3f7fd; border: 1px dashed var(--line); border-radius: 12px; padding: 10px; min-height: 200px; transition: background .15s; }
.ap-col.ap-over { background: #e3edfd; border-color: var(--accent); }
.ap-col-head { font-weight: 800; margin-bottom: 8px; display: flex; justify-content: space-between; }
.ap-count { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; }
.ap-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; cursor: grab; box-shadow: 0 2px 6px rgba(29, 63, 118, .06); }
.ap-card.ap-late { border-left: 4px solid #ef4444; }
.ap-card.ap-dragging { opacity: .5; }
.ap-card-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ap-card-actions button { padding: 4px 8px; font-size: 12px; }
.ap-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 20px 0; }
.ap-msg-preview { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fbfdff; }
.ap-msg-preview pre { white-space: pre-wrap; font-family: inherit; margin: 6px 0 0; }
#apMsgBody { font-family: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line); }
#loginForm .btn-link, .btn-link {
  background: none !important; box-shadow: none !important; border: none !important;
  color: var(--accent) !important; padding: 4px 0 !important; min-height: 0 !important;
  width: auto !important; justify-self: center; align-self: center; font-size: 14px; font-weight: 600;
  text-decoration: underline; cursor: pointer;
}
