:root {
  --bg: #0a0d13;
  --bg-glow: #6c5ce7;
  --surface: #121723;
  --surface-2: #19202e;
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.13);
  --text: #e9edf5;
  --text-2: #98a2b6;
  --text-3: #616d83;
  --green: #25d07e;
  --green-bg: rgba(37, 208, 126, 0.12);
  --tiktok: #ff3b6b;
  --ig: #8b7bf0;
  --yt: #ff4d4d;
  --x: #1d9e75;
  --fb: #3b82f6;
  --kwai: #f5a623;
  --radius: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(108, 92, 231, 0.18), transparent 60%),
    radial-gradient(700px 400px at -10% 10%, rgba(37, 208, 126, 0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

/* Sidebar */
.sidebar {
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  background: rgba(10, 13, 19, 0.4);
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #6c5ce7, #25d07e);
  display: grid; place-items: center; font-size: 21px; color: #fff;
}
.brand-name { font-weight: 600; font-size: 17px; letter-spacing: -0.2px; }
.brand-tag { font-size: 11px; color: var(--text-3); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); text-decoration: none; font-size: 14.5px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-item i { font-size: 19px; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); }
.nav-item.active i { color: var(--green); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 6px; }
.demo-tag {
  font-size: 11px; color: var(--text-3);
  border: 1px dashed var(--border-2); border-radius: 7px;
  padding: 5px 8px; text-align: center;
}

/* Main */
.main { padding: 26px 30px 40px; max-width: 1280px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { font-size: 23px; font-weight: 600; letter-spacing: -0.4px; }
.sub { color: var(--text-2); font-size: 14px; margin-top: 3px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 8px 13px; border-radius: 999px; font-size: 13px; color: var(--text-2);
}
.chip i { font-size: 16px; }
a.btn-logout { text-decoration: none; cursor: pointer; transition: color .15s, border-color .15s; }
a.btn-logout:hover { color: #ff6b6b; border-color: rgba(255,107,107,.45); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border-2);
  display: grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--text);
}

/* Live indicator */
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 13px; font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(37,208,126,.5); animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,208,126,.5); } 70% { box-shadow: 0 0 0 7px rgba(37,208,126,0); } 100% { box-shadow: 0 0 0 0 rgba(37,208,126,0); } }
@keyframes fadein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h2 { font-size: 15px; font-weight: 600; }
.muted { color: var(--text-2); font-size: 13px; }
.muted.small { font-size: 12px; margin-top: 12px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: center; margin-bottom: 16px; }
.hero-money .label { color: var(--text-2); font-size: 13px; }
.big { font-size: 46px; font-weight: 600; letter-spacing: -1.5px; line-height: 1.05; margin: 4px 0 14px; }
.hero-subs { display: flex; gap: 26px; }
.hero-subs > div { display: flex; flex-direction: column; gap: 3px; }
.hero-subs strong { font-size: 19px; font-weight: 600; }
.hero-subs .label { font-size: 12px; }
.pos { color: var(--green); }
.hero-chart { position: relative; height: 150px; }
.big-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.mom { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 999px; color: var(--green); background: var(--green-bg); white-space: nowrap; }
.mom i { font-size: 14px; }
.month-progress { margin: 2px 0 16px; max-width: 360px; }
.mp-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.mbar { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.mbar span { display: block; height: 100%; background: linear-gradient(90deg, #6c5ce7, #25d07e); border-radius: 999px; transition: width .6s ease; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi .label { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12.5px; }
.kpi .label i { font-size: 15px; }
.kpi .val { font-size: 26px; font-weight: 600; letter-spacing: -0.6px; margin: 9px 0 5px; }
.delta { font-size: 12px; display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); }
.delta.pos { color: var(--green); }
.delta i { font-size: 14px; }

/* Grid bottom */
.grid-2 { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; margin-bottom: 16px; }
/* Receita por fonte */
.sources { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 14px; }
.src-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.src-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 17px; flex: 0 0 auto; }
.src-name { font-size: 14px; font-weight: 500; }
.src-prog { font-size: 11.5px; color: var(--text-3); }
.src-val { font-size: 21px; font-weight: 600; letter-spacing: -0.4px; }
.src-val span { font-size: 12px; font-weight: 400; color: var(--text-3); }
.src-meta { font-size: 12px; color: var(--text-2); margin: 5px 0 10px; }
.bar { height: 5px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; }

/* Contas por plataforma */
.platlist { display: flex; flex-direction: column; }
.plat-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); }
.plat-row:first-child { border-top: none; }
.plat-name { flex: 1; font-size: 14px; font-weight: 500; }
.plat-count { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
.plat-on { width: 66px; text-align: right; font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }

/* Feed */
.feed { display: flex; flex-direction: column; }
.feeditem { display: flex; align-items: center; gap: 13px; padding: 11px 0; border-top: 1px solid var(--border); animation: fadein 0.4s ease; }
.feeditem:first-child { border-top: none; }
.feed-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 16px; flex: 0 0 auto; }
.feed-body { flex: 1; min-width: 0; }
.feed-title { font-size: 14px; }
.feed-meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.feed-earn { font-size: 14px; font-weight: 600; color: var(--green); }

.foot { margin-top: 24px; color: var(--text-3); font-size: 12px; text-align: center; }

/* Responsivo */
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } .sources { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; height: auto; position: static; align-items: center; padding: 14px 16px; overflow-x: auto; }
  .nav { flex-direction: row; }
  .nav-item span { display: none; }
  .sidebar-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  .hero, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) { .kpis { grid-template-columns: repeat(2, 1fr); } .sources { grid-template-columns: repeat(2, 1fr); } .big { font-size: 38px; } .main { padding: 18px; } }
