/* Painel Ofertinhas: "ateliê". Linho no fundo, lateral em brim índigo com costura,
   fios coloridos por loja. Fontes locais (a CSP não deixa carregar de fora). */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Cores do Vivendo de Bordado (variáveis --base-color-brand do site) */
  --linho: #eaf6ec; --linho-fio: rgba(6, 39, 31, .035); --papel: #ffffff; --papel-2: #f3faf4;
  --tinta: #0d0a08; --tinta-2: #346f59; --risco: #d6e8da;
  --brim: #06271f; --brim-2: #163328; --brim-tinta: #fdfefd; --brim-apagado: #addcb8;
  --acento: #3b7e65; --acento-suave: #eaf6ec; --acafrao: #addcb8; --sobre-acento: #ffffff;
  --amazon: #2f4858; --shopee: #c8643b; --mercadolivre: #b8860b;
  --barra: #3b7e65; --erro: #3b0b0b; --erro-fundo: #f8e4e4; --foco: #2d62ff;
  --sombra: 0 1px 0 rgba(6, 39, 31, .05), 0 10px 30px -18px rgba(6, 39, 31, .35);
  --titulo: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --sans: "Hanken Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --linho: #04150f; --linho-fio: rgba(255, 255, 255, .02); --papel: #0b241c; --papel-2: #163328;
  --tinta: #fdfefd; --tinta-2: #addcb8; --risco: #24463a;
  --brim: #021009; --brim-2: #06271f; --acento: #addcb8; --acento-suave: #163328; --sobre-acento: #06271f;
  --amazon: #8fb3c9; --shopee: #ee9a72; --mercadolivre: #e6c04a; --barra: #addcb8; --erro: #f8e4e4; --erro-fundo: #3b0b0b; --foco: #7d9cff;
  --sombra: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 30px -18px rgba(0, 0, 0, .8); color-scheme: dark; } }
:root[data-theme="dark"] {
  --linho: #04150f; --linho-fio: rgba(255, 255, 255, .02); --papel: #0b241c; --papel-2: #163328;
  --tinta: #fdfefd; --tinta-2: #addcb8; --risco: #24463a;
  --brim: #021009; --brim-2: #06271f; --acento: #addcb8; --acento-suave: #163328; --sobre-acento: #06271f;
  --amazon: #8fb3c9; --shopee: #ee9a72; --mercadolivre: #e6c04a; --barra: #addcb8; --erro: #f8e4e4; --erro-fundo: #3b0b0b; --foco: #7d9cff;
  --sombra: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 30px -18px rgba(0, 0, 0, .8); color-scheme: dark; }

* { box-sizing: border-box; }
html { background: var(--linho); }
body {
  margin: 0; color: var(--tinta); font: 15px/1.5 var(--sans); font-variant-numeric: tabular-nums;
  background-color: var(--linho);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--acafrao) 14%, transparent), transparent 70%),
    repeating-linear-gradient(0deg, var(--linho-fio) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, var(--linho-fio) 0 1px, transparent 1px 4px);
  min-height: 100vh;
}
a { color: var(--acento); }
small { color: var(--tinta-2); font-weight: 400; font-size: .82em; }

/* ---------- lateral ---------- */
.com-menu { display: grid; grid-template-columns: 248px minmax(0, 1fr); align-items: start; }
.lateral {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px;
  padding: 22px 16px; color: var(--brim-tinta);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, var(--brim-2), var(--brim));
}
.lateral::after { /* a costura */
  content: ""; position: absolute; inset: 8px; border: 1.5px dashed rgba(173, 220, 184, .28);
  border-radius: 14px; pointer-events: none;
}
.marca { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; padding: 6px 8px; }
.marca b { display: block; font: 700 22px/1.1 var(--titulo); letter-spacing: .01em; }
.marca small { display: block; color: var(--brim-apagado); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.carretel { /* carretel de linha */
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: repeating-radial-gradient(circle, #addcb8 0 2px, #3b7e65 2px 3.5px);
  box-shadow: 0 0 0 3px var(--brim), 0 0 0 4.5px rgba(173,220,184,.45);
}
.lateral nav { display: flex; flex-direction: column; gap: 2px; }
.lateral nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--brim-tinta); text-decoration: none; font-weight: 600; position: relative;
  transition: background .2s, transform .2s;
}
.lateral nav a i { font-style: normal; width: 20px; text-align: center; color: var(--brim-apagado); transition: color .2s; }
.lateral nav a:hover { background: rgba(255,255,255,.06); transform: translateX(2px); }
.lateral nav a[aria-current] { background: rgba(173, 220, 184, .14); color: #fff; }
.lateral nav a[aria-current] i { color: var(--acafrao); }
.lateral nav a[aria-current]::before {
  content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--acafrao);
}
.lateral-pe { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding: 12px; font-size: 13px;
              border-top: 1.5px dashed rgba(173,220,184,.22); }
.quem { color: var(--brim-apagado); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sair { color: var(--brim-tinta); }

/* ---------- conteúdo ---------- */
main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 32px 56px; min-width: 0; }
.barra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 8px; }
.filtros { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 4px; gap: 2px; background: var(--papel); border: 1px solid var(--risco); border-radius: 999px; box-shadow: var(--sombra); }
.filtros a, .filtros-sec a { white-space: nowrap; text-decoration: none; padding: 6px 14px; border-radius: 999px; color: var(--tinta-2); font-weight: 600; font-size: 14px; transition: background .2s, color .2s; }
.filtros a:hover { color: var(--tinta); }
.filtros a[aria-current], .filtros-sec a[aria-current] { background: var(--brim-2); color: var(--brim-tinta); }
.periodo { flex-basis: 100%; margin: 0; color: var(--tinta-2); font-size: 13px; }
.periodo b { color: var(--tinta); }
.escolher-dia { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 14px; background: var(--papel); border: 1px solid var(--risco); border-radius: 999px; box-shadow: var(--sombra); }
.escolher-dia.ativo { border-color: var(--acento); box-shadow: 0 0 0 1px var(--acento), var(--sombra); }
.escolher-dia label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--tinta-2); }
.escolher-dia input { padding: 5px 8px; border-radius: 999px; font-size: 14px; background: var(--linho); }
button.sec { padding: 6px 14px; font-size: 14px; background: var(--brim-2); color: var(--brim-tinta); }
.atualizar-link { margin-left: auto; text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 999px;
                  border: 1.5px dashed var(--acento); color: var(--acento); transition: background .2s; }
.atualizar-link:hover { background: var(--acento-suave); }

.cabeca { margin: 26px 0 18px; }
.sobre { margin: 0; color: var(--acento); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1 { font: 700 clamp(30px, 4vw, 42px)/1.05 var(--titulo); margin: 6px 0 0; letter-spacing: -.01em; text-wrap: balance; }
h2 { font: 700 21px/1.2 var(--titulo); margin: 36px 0 14px; display: flex; align-items: center; gap: 12px; }
h2::after { content: ""; flex: 1; border-top: 1.5px dashed var(--risco); }
h2 small { font-family: var(--sans); }
.intro, .nota { color: var(--tinta-2); max-width: 70ch; }
.nota { font-size: 13px; margin-top: 14px; }

/* destaque (número principal) */
.destaque {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px;
  padding: 28px 30px; border-radius: 20px; color: var(--brim-tinta); overflow: hidden;
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(173, 220, 184, .22), transparent 70%),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.03) 0 2px, transparent 2px 7px),
    linear-gradient(135deg, var(--brim-2), var(--brim));
  box-shadow: var(--sombra);
}
.destaque::after { content: ""; position: absolute; inset: 9px; border: 1.5px dashed rgba(173,220,184,.3); border-radius: 13px; pointer-events: none; }
.destaque .rotulo { color: var(--brim-apagado); }
.valor-grande { font: 700 clamp(40px, 6vw, 64px)/1 var(--titulo); margin: 8px 0 12px; color: #fff; letter-spacing: -.02em; }
.destaque .confirmada { color: var(--brim-apagado); }
.destaque .confirmada b { color: var(--acafrao); }
.destaque-lado { margin: 0; display: grid; gap: 14px; align-content: center; }
.destaque-lado div { padding: 12px 16px; border-radius: 12px; background: rgba(255,255,255,.06); }
.destaque-lado dt { font-size: 13px; color: var(--brim-apagado); }
.destaque-lado dt small { color: var(--brim-apagado); opacity: .8; }
.destaque-lado dd { margin: 2px 0 0; font: 700 28px/1.1 var(--titulo); color: #fff; }

/* cards de loja */
.rotulo { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-2); }
.lojas { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.loja {
  --cor: var(--acento); position: relative; padding: 22px 22px 18px; border-radius: 18px; background: var(--papel);
  border: 1px solid var(--risco); box-shadow: var(--sombra); overflow: hidden; transition: transform .25s, box-shadow .25s;
}
.loja:hover { transform: translateY(-3px); }
.loja::before { /* fita no topo, com pontos de costura */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: linear-gradient(90deg, transparent 0 4px, rgba(255,255,255,.75) 4px 10px, transparent 10px) 0 3px / 14px 2px repeat-x, var(--cor);
}
.loja-amazon { --cor: var(--amazon); } .loja-shopee { --cor: var(--shopee); } .loja-mercadolivre { --cor: var(--mercadolivre); }
.loja header { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; }
.loja h3 { margin: 0; font: 700 20px/1.2 var(--titulo); white-space: nowrap; }
.fio { width: 12px; height: 12px; border-radius: 50%; background: var(--cor); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cor) 20%, transparent); }
.fatia { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--cor); background: color-mix(in srgb, var(--cor) 12%, transparent); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.loja .valor { margin: 4px 0 4px; font: 700 clamp(34px, 3.4vw, 42px)/1.05 var(--titulo); letter-spacing: -.02em; }
.vazio-valor { color: var(--tinta-2); }
.confirmada { margin: 0; color: var(--tinta-2); font-size: 14px; }
.confirmada b { color: var(--tinta); }
.trilho { display: block; width: 100%; height: 6px; margin: 16px 0 14px; }
.trilho .fundo { fill: var(--papel-2); }
.trilho .cheio { fill: var(--cor); transform-box: fill-box; transform-origin: left; animation: puxa 1s .5s cubic-bezier(.2,.8,.2,1) both; }
.loja dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding-top: 12px; border-top: 1.5px dashed var(--risco); }
.loja dt { font-size: 12px; color: var(--tinta-2); }
.loja dd { margin: 2px 0 0; font-weight: 700; font-size: 15px; white-space: nowrap; }
.ponto { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: var(--acento); }
.ponto-amazon { background: var(--amazon); } .ponto-shopee { background: var(--shopee); } .ponto-mercadolivre { background: var(--mercadolivre); }

/* kpis */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.kpi { background: var(--papel); border: 1px solid var(--risco); border-radius: 14px; padding: 14px 16px; box-shadow: var(--sombra); }
.kpi span { display: block; color: var(--tinta-2); font-size: 13px; }
.kpi b { display: block; font: 700 26px/1.15 var(--titulo); margin-top: 6px; }

/* tabelas */
.tabela { overflow-x: auto; background: var(--papel); border: 1px solid var(--risco); border-radius: 14px; box-shadow: var(--sombra); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--risco); text-align: right; font-size: 14px; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--tinta-2); font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; background: var(--papel-2); }
tbody tr { transition: background .15s; }
tbody tr:hover { background: color-mix(in srgb, var(--acafrao) 8%, transparent); }
tr:last-child td { border-bottom: 0; }
.vazio { color: var(--tinta-2); text-align: center !important; padding: 22px; }
.filtros-sec { color: var(--tinta-2); }

/* gráficos */
.grafico { background: var(--papel); border: 1px solid var(--risco); border-radius: 14px; padding: 14px 14px 6px; box-shadow: var(--sombra); }
.chart { display: block; width: 100%; height: 180px; }
.chart rect { fill: var(--barra); transform-box: fill-box; transform-origin: bottom; animation: cresce .7s cubic-bezier(.2,.8,.2,1) both; }
.chart rect:nth-child(3n+1) { animation-delay: .25s; } .chart rect:nth-child(3n+2) { animation-delay: .32s; } .chart rect:nth-child(3n) { animation-delay: .39s; }
.chart rect:hover { fill: var(--acafrao); }
.eixo { display: flex; justify-content: space-between; padding: 6px 2px 4px; color: var(--tinta-2); font-size: 12px; }

/* parcial de hoje */
.parcial { margin-top: 40px; padding: 18px 20px; border: 1.5px dashed var(--acento); border-radius: 16px; background: color-mix(in srgb, var(--acento) 5%, transparent); }
.parcial h2 { margin: 0 0 12px; font-size: 18px; flex-wrap: wrap; }
.parcial h2::after { display: none; }
.parcial ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 20px; margin: 0; padding: 0; list-style: none; }
.parcial span { display: block; font-size: 12px; color: var(--tinta-2); }
.parcial b { font-size: 16px; }

/* botão Atualizar */
.atualizar { background: var(--papel); border: 1.5px dashed var(--risco); border-radius: 16px; padding: 18px 20px; margin: 16px 0 24px; }
.atualizar ul { margin: 12px 0 0; padding-left: 18px; }
.atualizar .fontes { color: var(--tinta-2); font-size: 14px; }
.atualizar button[disabled] { opacity: .7; cursor: wait; }
.aviso { color: var(--acento); margin: 8px 0 0; }

/* login e convite */
.sem-menu main { display: grid; place-items: center; min-height: 100vh; }
.cartao { position: relative; background: var(--papel); border: 1px solid var(--risco); border-radius: 20px; padding: 32px; box-shadow: var(--sombra); width: min(400px, 100%); }
.cartao::after { content: ""; position: absolute; inset: 8px; border: 1.5px dashed var(--risco); border-radius: 14px; pointer-events: none; }
.cartao h1 { font-size: 30px; margin-bottom: 8px; }
.login, .login form { display: flex; flex-direction: column; gap: 14px; }
.login label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input { font: inherit; padding: 11px 12px; border: 1px solid var(--risco); border-radius: 10px; background: var(--linho); color: var(--tinta); position: relative; z-index: 1; }
input:focus, a:focus-visible, button:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; }
button { font: inherit; font-weight: 700; padding: 12px 18px; border: 0; border-radius: 999px; background: var(--acento); color: var(--sobre-acento); cursor: pointer;
         position: relative; z-index: 1; transition: transform .15s, filter .15s; }
button:hover { filter: brightness(1.08); } button:active { transform: scale(.98); }
.erro { color: var(--erro); background: var(--erro-fundo); padding: 8px 12px; border-radius: 10px; margin: 0; }

/* ---------- movimento ---------- */
@keyframes surge { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes cresce { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes puxa { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.surge { animation: surge .6s cubic-bezier(.2,.8,.2,1) both; }
main > .surge:nth-child(2) { animation-delay: .06s; } main > .surge:nth-child(3) { animation-delay: .12s; }
main > .surge:nth-child(4) { animation-delay: .18s; } main > .surge:nth-child(5) { animation-delay: .24s; }
main > .surge:nth-child(n+6) { animation-delay: .3s; }
.lojas > :nth-child(1) { animation-delay: .2s; } .lojas > :nth-child(2) { animation-delay: .3s; } .lojas > :nth-child(3) { animation-delay: .4s; }
.kpis > :nth-child(2) { animation-delay: .38s; } .kpis > :nth-child(3) { animation-delay: .44s; }
.kpis > :nth-child(4) { animation-delay: .5s; } .kpis > :nth-child(n+5) { animation-delay: .56s; }
.lateral nav a { animation: surge .5s cubic-bezier(.2,.8,.2,1) both; }
.lateral nav a:nth-child(2) { animation-delay: .04s; } .lateral nav a:nth-child(3) { animation-delay: .08s; }
.lateral nav a:nth-child(4) { animation-delay: .12s; } .lateral nav a:nth-child(5) { animation-delay: .16s; } .lateral nav a:nth-child(6) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- celular ---------- */
@media (max-width: 860px) {
  .com-menu { display: block; }
  .lateral { position: sticky; top: 0; z-index: 5; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 16px; }
  .lateral::after { inset: 4px; border-radius: 10px; }
  .marca { padding: 2px; } .marca b { font-size: 18px; } .marca small { display: none; } .carretel { width: 26px; height: 26px; }
  .lateral-pe { margin: 0 0 0 auto; border: 0; padding: 0; gap: 10px; } .quem { display: none; }
  .lateral nav { order: 3; flex-basis: 100%; flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
  .lateral nav a { white-space: nowrap; padding: 7px 11px; }
  .lateral nav a[aria-current]::before { left: 10px; right: 10px; top: auto; bottom: 0; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  main { padding: 16px 16px 40px; }
  .atualizar-link { margin-left: 0; }
  .filtros a { padding: 6px 11px; }
  .destaque { grid-template-columns: 1fr; padding: 22px; }
  .destaque-lado { grid-template-columns: 1fr 1fr; }
  th, td { padding: 8px 10px; font-size: 13px; }
}
