:root{
  --bg:#f7f8fc; --card:#fff; --border:#ebedf3; --text:#1c1f27; --muted:#7b8190;
  --purple:#7b2ff7; --blue:#2d6ae3; --gray:#9aa1ae;
  --shadow: 0 10px 24px rgba(16,24,40,.06);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}
.container{max-width:1360px;margin:28px auto;padding:0 16px}

/* layout desktop */
.board{display:flex;gap:24px;align-items:stretch}
.panel{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:22px;box-shadow:var(--shadow)}
.panel.left{flex:0 0 670px}
.panel.right{flex:1 1 auto;min-width:0}

.panel-title{display:flex;align-items:center;gap:10px}
.panel-title h2{margin:0;font-size:22px}
.muted{color:var(--muted);margin:8px 0 14px}

/* filtros desktop */
.filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.input{width:340px;max-width:100%;background:#f6f7fb;border:1px solid var(--border);border-radius:10px;padding:10px 12px;color:#3a4050}
.input::placeholder{color:#a0a7b6}
.input-month{width:180px}
.btn-hidden{display:none}

/* pódio desktop */
.podium-cols{display:grid;grid-template-columns:repeat(3,minmax(140px,1fr));gap:16px;margin:18px 0 22px}
.col{display:flex;flex-direction:column;gap:16px}
.col-first{transform:translateY(-12px)}
.person{display:flex;flex-direction:column;align-items:center;gap:10px}
.person-name{min-height:46px;line-height:22px;margin-bottom:6px;display:flex;align-items:flex-end;justify-content:center;text-align:center;font-weight:700;text-transform:uppercase}
.photo{width:112px;height:112px;border-radius:50%;background:#f5f7fb;overflow:hidden;display:grid;place-items:center}
.photo img{width:100%;height:100%;object-fit:cover}
.ring-blue{box-shadow: inset 0 0 0 4px #fff, 0 0 0 4px #2d6ae3}
.ring-gold-purple{box-shadow: inset 0 0 0 4px #fff, 0 0 0 4px #7b2ff7}
.ring-orange{box-shadow: inset 0 0 0 4px #fff, 0 0 0 4px #ffb84d}
.score{height:100px;display:flex;align-items:center;justify-content:center;padding:10px 12px;border-radius:22px;color:#fff;font-weight:800;box-shadow:0 12px 24px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.35)}
.score-blue{background:linear-gradient(180deg,#3b7bf2 0%,#2d6ae3 100%);border:1px solid rgba(36,98,222,.55)}
.score-purple{background:linear-gradient(180deg,#7b38ff 0%,#6a2cf0 100%);border:1px solid rgba(106,44,240,.55)}
.score-gray{background:linear-gradient(180deg,#a6aebb 0%,#8f96a4 100%);border:1px solid rgba(130,138,150,.55)}
.score-value{font-size:clamp(22px,1.2vw + 12px,30px)}

/* outros — versão GRID */
.others-title{margin:22px 0 12px}
.other-item{
  display:grid;
  grid-template-columns: 56px 32px 1fr auto;
  align-items:center;
  gap:12px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px 14px;
  margin-bottom:10px;
}
.other-item .chip{justify-self:center;width:56px;text-align:center}
.row-left{ display:contents; }
.avatar-sm{width:32px;height:32px;border-radius:50%;background:#f3f5fa;display:grid;place-items:center;overflow:hidden}
.avatar-sm img{width:32px;height:32px;border-radius:50%;object-fit:cover}
.row-left .avatar-sm{ grid-column:2; }
.row-left .other-name{ grid-column:3; font-weight:700;text-transform:uppercase; }
.other-val{ grid-column:4; justify-self:end; font-weight:700;color:#7b2ff7; }

/* tabela desktop */
.right-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;flex-wrap:wrap}
.r-title{margin:0;font-size:20px}
.table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:12px}
.table{min-width:1180px;width:100%;border-collapse:separate;border-spacing:0;font-size:14px}
.table thead tr{box-shadow:inset 0 -1px var(--border)}
.table th{color:#76809c;font-weight:600;white-space:nowrap;padding:12px 16px;text-align:left}
.table td{padding:14px 16px;text-align:left;vertical-align:middle;background:#fff;border-top:1px solid var(--border)}
.table tbody tr:first-child td{border-top:1px solid var(--border)}
.person-cell{display:flex;align-items:center;gap:10px}
.person-cell .name{text-transform:uppercase;overflow:hidden;text-overflow:ellipsis;display:block}
.right{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.table th.right,.table td.right{padding-right:16px}

/* HERO */
.hero{display:flex;flex-direction:column;align-items:center;justify-content:center;margin:8px auto 18px;text-align:center;gap:10px}
.hero-badge{position:relative;display:inline-flex;align-items:center;gap:10px;padding:14px 22px;border-radius:18px;border:1px solid #ecf0fb;background:linear-gradient(180deg,#ffffff 0%, #f7f9ff 100%)}
.hero-title{margin:0;font-size:clamp(20px,2.4vw,32px);font-weight:900;letter-spacing:.2px;color:#0f172a;white-space:nowrap}
.hero-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:linear-gradient(180deg,#7b2ff7 0%, #2d6ae3 100%);color:#fff}
.hero-badge::after{content:"";position:absolute;left:18px;right:18px;bottom:-8px;height:5px;border-radius:999px;background:linear-gradient(90deg,#7b2ff7 0%, #2d6ae3 100%)}
.hero-sub{margin:0;font-size:clamp(12.5px,1.2vw,15px);color:#5b6479;}
.board{margin-top:6px}

/* ===== MOBILE (≤ 720px) ===== */
@media (max-width:720px){
  html,body{overflow-x:hidden}
  .container{padding:0 12px}

  .board{display:block !important; margin-top:6px}
  .panel{display:block !important; width:100% !important; min-height:0 !important; margin:0 0 14px !important; overflow:visible}

  .right-head{
    position:sticky; top:8px; z-index:7;
    display:block; padding:14px 12px 12px; margin:0 0 12px;
    border-radius:14px;
    background:linear-gradient(180deg,#7b2ff7 0%, #2d6ae3 100%); color:#fff;
    box-shadow:0 8px 18px rgba(45,106,227,.18), inset 0 1px 0 rgba(255,255,255,.35);
  }
  .right-head > div{width:100%; text-align:center}
  .right-head .r-title{margin:0 0 4px; font-size:18px; font-weight:800}
  .right-head .muted{margin:0 0 8px; color:rgba(255,255,255,.92)}

  .filters{display:grid; grid-template-columns:1fr; gap:8px}
  .filters .input{width:100%}
  .filters .input-month{height:42px; border-radius:10px; background:#fff; border:1px solid #e6e8f0; padding:0 10px}
  .filters #search{
    height:44px; border-radius:999px; background:#fff; border:1px solid #e6e8f0; padding:0 12px 0 40px;
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa1ae' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
    background-repeat:no-repeat; background-position:12px center; background-size:16px 16px;
  }

  /* pódio → carrossel curto */
  .podium-cols{
    display:flex; gap:10px; overflow-x:auto; padding:8px 10px; margin:6px 0 10px;
    scroll-snap-type:none;
    scroll-padding-left:10px;
  }
  .podium-cols .col{
    min-width:90%; flex:0 0 auto;
    scroll-snap-align:start;
  }
  .col-first{transform:none}
  .person{gap:6px}
  .photo{width:80px; height:80px}
  .score{height:76px; border-radius:14px}
  .score-value{font-size:clamp(17px,4.8vw,22px)}

  /* === tabela -> cartões === */
  .table{min-width:0; border-collapse:separate}
  .table thead{display:none}
  .table-wrap{overflow:visible}
  .table tbody{display:flex; flex-direction:column; gap:10px; width:100%}
  .table tbody tr{
    display:flex;
    flex-wrap:wrap;
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    padding:14px;
    box-shadow:var(--shadow);
    width:100%;
    max-width:100%;
  }

  .table td{
    display:flex; align-items:center; justify-content:space-between;
    width:100%; gap:8px; padding:0 12px; border:0; font-size:14px;
  }
  .table td::before{
    content:attr(data-label);
    color:#76809c; font-weight:600; font-size:12px;
    flex:0 0 44%; text-align:left; min-width:0;
  }
  .table td > *{flex:1 1 56%; min-width:0; text-align:right}

  td[data-label="Data"],
  td[data-label="Projeto"],
  td[data-label="Tipo"],
  td[data-label="Suporte"],
  td[data-label="Lançador"]{
    margin-top:6px; min-height:46px;
    background:#f6f7fb; border:1px solid var(--border); border-radius:12px;
    padding:8px 12px;
  }

  /* chip do tipo */
  td[data-label="Tipo"] > *{display:flex; justify-content:center; align-items:center}
  td[data-label="Tipo"] .tag{
    display:inline-flex; align-items:center; justify-content:center;
    width:auto; max-width:100%; min-height:28px; border-radius:999px;
    font-weight:800; font-size:12.5px; padding:6px 12px;
    white-space:nowrap;
  }

  /* blocos numéricos */
  td[data-label="Leads"],
  td[data-label="Pico de audiência"],
  td[data-label="Carrinho ao vivo"],
  td[data-label="Audiência perdida"],
  td[data-label="Vendas"],            /* << ADICIONADO */
  td[data-label="Conversão"]{
    margin-top:6px; height:46px;
    background:#f6f7fb; border:1px solid var(--border); border-radius:12px;
    padding:0 12px;
  }

  .table td.person-cell .avatar-sm{order:2; flex:0 0 auto}
  .table td.person-cell .name{order:1; max-width:calc(100% - 34px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:right}

  #data-body{width:315px !important; max-width:100%; margin:0 auto;}

  .podium-cols{ -ms-overflow-style:none; scrollbar-width:none; }
  .podium-cols::-webkit-scrollbar{ display:none; height:0; width:0; background:transparent; }
}

@media (max-width:420px){
  .container{padding:0 8px}
  .right-head{padding:12px 10px 10px}
  .filters .input-month{height:40px}
  .filters #search{height:42px}
  .podium-cols{gap:8px;}
  .table tbody tr{padding:10px}
  td[data-label="Leads"],
  td[data-label="Pico de audiência"],
  td[data-label="Carrinho ao vivo"],
  td[data-label="Audiência perdida"],
  td[data-label="Vendas"],            /* << ADICIONADO */
  td[data-label="Conversão"]{height:44px}
}

/* utilidades */
.concurso-text{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;word-break:break-word}
.tag{display:inline-block;padding:2px 8px;border-radius:999px;font-weight:700;font-size:12px}
.tag-pre{background:#ffe9ef;color:#c21c52}
.tag-pos{background:#e8f2ff;color:#2253c9}

/* ====== PODIUM COLORS ====== */
.ring-gold-purple{ box-shadow: inset 0 0 0 4px #fff, 0 0 0 4px #F5C542; }
.score-purple{
  background: linear-gradient(180deg, #FFD65A 0%, #F5B11F 100%);
  border: 1px solid rgba(245, 177, 31, .55);
}
.ring-blue{ box-shadow: inset 0 0 0 4px #fff, 0 0 0 4px #BFC6D5; }
.score-blue{
  background: linear-gradient(180deg, #C9CFDB 0%, #A9B2C3 100%);
  border: 1px solid rgba(169, 178, 195, .55);
}
.ring-orange{ box-shadow: inset 0 0 0 4px #fff, 0 0 0 4px #C97A36; }
.score-gray{
  background: linear-gradient(180deg, #E4A66A 0%, #C97A36 100%);
  border: 1px solid rgba(201, 122, 54, .55);
}

/* Anchor como botão */
a.form{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  text-decoration: none;
  color: black;
  background-color: white;
  border: none;
  padding: 8px 14px;
  margin: 5px;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
  transition: background-color .2s ease, border-color .2s ease,
              box-shadow .2s ease, transform .02s ease-in-out;
}
a.form:hover{ background-color: white; }
a.form:active{ transform: translateY(1px); }
a.form:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(34,83,201,.35), 0 1px 2px rgba(0,0,0,.1);
}
a.form:visited{ color: black; }
a.form[aria-disabled="true"]{ opacity: .6; pointer-events: none; }
a.form--ghost{ background: transparent; color: #2253c9; border:1px solid #2253c9; }
a.form--ghost:hover{ background: rgba(34,83,201,.08); }
.form{ background-color: white; color: black; font-family: emoji; border: none; }
