/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg:        #ede8ff;
  --bg2:       #f5f2ff;
  --card:      #ffffff;
  --border:    rgba(180,160,255,.25);
  --text:      #2d2150;
  --muted:     #9188b8;
  --purple:    #7c5cbf;
  --purple2:   #a78bda;
  --pink:      #f472b6;
  --pink2:     #fda4cf;
  --yellow:    #fbbf24;
  --yellow2:   #fde68a;
  --green:     #34d399;
  --green2:    #a7f3d0;
  --orange:    #fb923c;
  --orange2:   #fed7aa;
  --red:       #f87171;
  --cyan:      #22d3ee;
  --radius:    20px;
  --radius-sm: 12px;
  --shadow:    0 4px 20px rgba(124,92,191,.12);
  --shadow-lg: 0 8px 32px rgba(124,92,191,.18);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--purple2); border-radius: 3px; }

/* ===== NAVBAR ===== */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(124,92,191,.08);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
  color: var(--purple);
}
.nav-brand .logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(124,92,191,.3);
}
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  transition: all .2s;
}
.nav-links a:hover { background: var(--bg); color: var(--purple); }
.nav-links a.active { background: linear-gradient(135deg,var(--purple),var(--purple2)); color: #fff; box-shadow: 0 4px 12px rgba(124,92,191,.3); }

/* ===== PAGE ===== */
.page { max-width: 1280px; margin: 0 auto; padding: 32px 24px; }

/* ===== PAGE HEADER ===== */
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 26px; font-weight: 900; color: var(--text); }
.page-header p { color: var(--muted); margin-top: 4px; font-weight: 600; }

/* ===== HERO BANNER (index) ===== */
.hero-banner {
  background: linear-gradient(135deg, #9b72ef 0%, #c084fc 50%, #f472b6 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.hero-banner::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  right: -60px; top: -80px;
}
.hero-banner-text h2 { font-size: 22px; font-weight: 900; color: #fff; }
.hero-banner-text p  { color: rgba(255,255,255,.85); font-size: 14px; font-weight: 600; margin-top: 4px; }
.hero-banner-emoji  { font-size: 56px; position: relative; z-index: 1; }

/* ===== GRID ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
@media(max-width:900px){ .grid-3,.grid-4{ grid-template-columns: repeat(2,1fr); } }
@media(max-width:600px){ .grid-3,.grid-4,.grid-2{ grid-template-columns: 1fr; } }

/* ===== CARD ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ===== STAT CARD (coloridos) ===== */
.stat-card {
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow);
  border: none;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: attr(data-emoji);
  position: absolute;
  right: 14px; top: 14px;
  font-size: 28px;
  opacity: .25;
}
.stat-card.purple { background: linear-gradient(135deg,#ede9fe,#ddd6fe); }
.stat-card.pink   { background: linear-gradient(135deg,#fdf2f8,#fce7f3); }
.stat-card.yellow { background: linear-gradient(135deg,#fffbeb,#fef3c7); }
.stat-card.green  { background: linear-gradient(135deg,#ecfdf5,#d1fae5); }
.stat-card.orange { background: linear-gradient(135deg,#fff7ed,#fed7aa); }
.stat-card.cyan   { background: linear-gradient(135deg,#ecfeff,#cffafe); }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 700; }
.stat-value { font-size: 28px; font-weight: 900; color: var(--text); }
.stat-change { font-size: 12px; font-weight: 700; }
.stat-change.up   { color: #059669; }
.stat-change.down { color: #dc2626; }
.stat-change.neutral { color: var(--muted); }

/* ===== PROFILE CARD (index) ===== */
.profile-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .22s, box-shadow .22s, border-color .22s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.profile-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--purple2); }
.profile-card-top {
  padding: 28px 24px 20px;
  text-align: center;
  position: relative;
}
.profile-avatar-wrap {
  width: 80px; height: 80px;
  border-radius: 50%;
  margin: 0 auto 14px;
  position: relative;
}
.profile-avatar-wrap img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(124,92,191,.2);
}
.profile-avatar-fallback {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 900; color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.profile-card-top h2 { font-size: 17px; font-weight: 900; color: var(--text); }
.profile-card-top .handle { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 2px; }
.profile-card-body { padding: 0 22px 20px; flex: 1; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.ps-item {
  background: var(--bg2);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}
.ps-item .val { font-size: 18px; font-weight: 900; color: var(--text); }
.ps-item .lbl { font-size: 11px; color: var(--muted); font-weight: 700; }
.profile-card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg2);
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 800;
}
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-orange { background: #fed7aa; color: #9a3412; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-pink   { background: #fce7f3; color: #9d174d; }
.badge-cyan   { background: #cffafe; color: #164e63; }

/* ===== RANKING TABLE ===== */
.rank-table { width: 100%; border-collapse: collapse; }
.rank-table th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); text-align: left; padding: 10px 14px;
  border-bottom: 2px solid var(--border); font-weight: 800;
}
.rank-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.rank-table tr:last-child td { border-bottom: none; }
.rank-table tr:hover td { background: var(--bg2); }
.rank-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900;
}
.rank-1 { background: linear-gradient(135deg,#fbbf24,#f59e0b); color: #fff; box-shadow: 0 2px 8px rgba(251,191,36,.4); }
.rank-2 { background: linear-gradient(135deg,#9ca3af,#6b7280); color: #fff; }
.rank-3 { background: linear-gradient(135deg,#fb923c,#ea580c); color: #fff; }
.rank-other { background: var(--bg); color: var(--muted); }

/* ===== PRODUCT CARD ===== */
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 14px 16px 8px; }
.product-name { font-weight: 800; font-size: 14px; margin-bottom: 6px; line-height: 1.3; color: var(--text); }
.product-price { font-size: 20px; font-weight: 900; color: var(--purple); }
.product-sales { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 600; }
.product-footer { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }

/* ===== COPY BOX ===== */
.copy-box {
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.copy-box-text { flex: 1; font-size: 13px; color: var(--text); line-height: 1.5; font-weight: 600; }
.copy-btn {
  background: var(--purple);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'Nunito', sans-serif;
}
.copy-btn:hover { background: var(--purple2); transform: scale(1.05); }
.copy-btn.copied { background: #059669; }

/* ===== TAG PILLS ===== */
.tags-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  color: var(--purple);
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
  user-select: none;
}
.tag-pill:hover { background: var(--purple); color: #fff; border-color: var(--purple); transform: scale(1.05); }
.tag-pill.copied { background: #059669; border-color: #059669; color: #fff; }

/* ===== CHART ===== */
.chart-wrap    { position: relative; height: 260px; }
.chart-wrap-sm { position: relative; height: 200px; }

/* ===== PROFILE HERO (perfil page) ===== */
.profile-hero {
  background: linear-gradient(135deg,#9b72ef 0%,#c084fc 60%,#f472b6 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.profile-hero::before {
  content:''; position:absolute; width:250px; height:250px;
  background:rgba(255,255,255,.1); border-radius:50%;
  right:-40px; bottom:-60px;
}
.hero-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 4px solid rgba(255,255,255,.6);
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  object-fit: cover;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; font-weight: 900; color: #fff;
}
.hero-avatar img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.hero-info h1 { font-size: 24px; font-weight: 900; color: #fff; }
.hero-info .handle { color: rgba(255,255,255,.8); font-size: 14px; font-weight: 700; margin-top: 2px; }
.hero-info .badges { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.hero-meta { margin-left: auto; text-align: right; position: relative; z-index: 1; }
.hero-meta .earning { font-size: 32px; font-weight: 900; color: #fff; }
.hero-meta .earning-lbl { font-size: 13px; color: rgba(255,255,255,.75); font-weight: 700; }
.hero-meta .rank-info { font-size: 12px; color: rgba(255,255,255,.75); font-weight: 700; margin-top: 6px; }
@media(max-width:600px){ .profile-hero{flex-direction:column; align-items:flex-start;} .hero-meta{margin-left:0;text-align:left;} }

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 16px; font-weight: 900; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px; color: var(--text);
}
.section-title::after { content:''; flex:1; height:2px; background:var(--border); border-radius:2px; }

/* ===== TABS ===== */
.tabs { display:flex; gap:6px; border-bottom:2px solid var(--border); margin-bottom:24px; }
.tab-btn {
  padding: 10px 20px;
  background: none; border: none; border-bottom: 3px solid transparent;
  color: var(--muted); font-size: 14px; font-weight: 800;
  cursor: pointer; transition: all .2s; margin-bottom: -2px;
  font-family: 'Nunito', sans-serif; border-radius: 8px 8px 0 0;
}
.tab-btn.active { color: var(--purple); border-bottom-color: var(--purple); background: rgba(124,92,191,.06); }
.tab-btn:hover { color: var(--purple); }
.tab-pane { display:none; }
.tab-pane.active { display:block; }

/* ===== PROGRESS BAR ===== */
.progress-bar-wrap { margin-bottom: 10px; }
.progress-label { display:flex; justify-content:space-between; font-size:13px; margin-bottom:5px; font-weight:700; }
.progress-track { height:10px; background:var(--bg2); border-radius:5px; overflow:hidden; }
.progress-fill  { height:100%; border-radius:5px; transition:width 1s ease; }

/* ===== ALERT ===== */
.alert {
  border-radius: var(--radius-sm);
  padding: 14px 18px; font-size: 14px; font-weight: 700;
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px;
}
.alert-warning { background:#fffbeb; border:1.5px solid #fde68a; color:#92400e; }
.alert-danger  { background:#fff1f2; border:1.5px solid #fecdd3; color:#9f1239; }
.alert-info    { background:#eff6ff; border:1.5px solid #bfdbfe; color:#1e40af; }
.alert-success { background:#ecfdf5; border:1.5px solid #a7f3d0; color:#065f46; }

/* ===== MISC ===== */
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.text-purple { color: var(--purple); }
.text-pink   { color: var(--pink); }
.text-green  { color: #059669; }
.text-yellow { color: var(--yellow); }
.text-muted  { color: var(--muted); }
.fw-900 { font-weight: 900; }
.fw-700 { font-weight: 700; }
.fs-12  { font-size: 12px; }
.fs-13  { font-size: 13px; }

/* ===== TOAST ===== */
#toast {
  position: fixed; bottom: 28px; right: 28px;
  background: linear-gradient(135deg,var(--purple),var(--pink));
  color: #fff; padding: 12px 22px; border-radius: 50px;
  font-weight: 800; font-size: 14px;
  opacity: 0; transform: translateY(20px);
  transition: all .3s; pointer-events: none; z-index: 9999;
  box-shadow: 0 4px 20px rgba(124,92,191,.4);
}
#toast.show { opacity:1; transform:translateY(0); }

/* ===== COUNTDOWN (HMC) ===== */
.countdown-box {
  background: linear-gradient(135deg,#fef3c7,#fde68a);
  border: 2px solid #fbbf24;
  border-radius: var(--radius);
  padding: 24px 28px;
  text-align: center;
  margin-bottom: 28px;
}
.countdown-label { font-size:14px; font-weight:800; color:#92400e; margin-bottom:8px; }
.countdown-value { font-size:40px; font-weight:900; color:#78350f; }
.countdown-sub   { font-size:13px; color:#a16207; font-weight:700; margin-top:6px; }
