:root{--navy:#102f47;--blue:#156d9f;--paper:#f3f7f8;--white:#fff;--ink:#15232b;--muted:#617583;--line:#d4e0e5;--yellow:#f5bb4d;--green:#167451;--red:#ae3d3d}
*{box-sizing:border-box}
html{background:var(--paper)}
body{margin:0;color:var(--ink);font-family:Avenir,"Avenir Next","Segoe UI",sans-serif;line-height:1.45}
a{color:var(--blue);font-weight:700;text-decoration:none}
a:hover{text-decoration:underline}
button,input,summary{font:inherit}
button{cursor:pointer}
a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible,[role=button]:focus-visible{outline:3px solid var(--yellow);outline-offset:3px}
.app-shell{min-height:100vh;display:grid;grid-template-columns:248px minmax(0,1fr)}
.app-sidebar{background:var(--navy);color:#fff;min-height:100vh;padding:28px 20px;display:flex;flex-direction:column;gap:42px;position:sticky;top:0;height:100vh}
.brand{color:#fff;display:flex;align-items:center;gap:12px;text-decoration:none}
.brand:hover{text-decoration:none}
.brand-mark{display:grid;place-items:center;width:44px;height:44px;border:2px solid var(--yellow);font:800 16px/1 "Arial Narrow",sans-serif;letter-spacing:-1px}
.brand-copy{display:grid;line-height:1.05;letter-spacing:.02em}
.brand-copy strong{font-size:16px}
.brand-copy small{font-size:14px;color:#bbd0dc}
.primary-nav{display:grid;gap:8px}
.primary-nav a,.logout-button{display:flex;gap:12px;align-items:center;width:100%;padding:12px;border:0;background:transparent;color:#c3d6df;text-align:left;font-size:14px;font-weight:700}
.primary-nav a:hover,.primary-nav a[aria-current=page]{background:#1a425c;color:#fff;text-decoration:none}
.primary-nav a[aria-current=page]{border-left:3px solid var(--yellow);padding-left:9px}
.icon{display:block;flex:0 0 auto}
.sidebar-footer{margin-top:auto;color:#bbd0dc;font-size:12px}
.sidebar-footer p{max-width:185px;margin:0 0 14px}
.sidebar-footer small{color:#7fa0b1}
.sidebar-footer form{margin-top:22px}
.logout-button:hover{color:#fff}
.app-shell main{min-width:0;width:min(1380px,100%);margin:0 auto;padding:54px 58px 90px}
.home-header,.section-heading{display:flex;justify-content:space-between;gap:28px;align-items:flex-start}
.home-header{padding-bottom:36px;border-bottom:1px solid var(--line);margin-bottom:30px}
.eyebrow{margin:0 0 9px;color:var(--blue);font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
h1,h2,h3{font-family:"Arial Narrow","Avenir Next Condensed",sans-serif;color:var(--navy);line-height:1.03;margin:0}
h1{font-size:clamp(38px,5vw,68px);letter-spacing:-2px;max-width:780px}
h2{font-size:30px;letter-spacing:-.7px}
.lede{color:var(--muted);max-width:710px;margin:14px 0 0}
.engine-card{min-width:230px;display:grid;gap:3px;padding:18px;background:#fff;border:1px solid var(--line);border-top:5px solid var(--yellow)}
.engine-card .icon{color:var(--blue)}
.engine-card span,.engine-card small{font-size:12px;color:var(--muted)}
.engine-card strong{color:var(--navy);font-size:18px}
.upload-panel,.catalog-history,.panel{background:var(--white);border:1px solid var(--line);padding:32px;margin-bottom:28px}
.upload-panel{border-top:6px solid var(--yellow)}
.section-heading>p{color:var(--muted);font-size:13px;max-width:280px;margin:4px 0}
.mining-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:0;margin:30px 0 25px;list-style:none}
.mining-steps li{display:flex;gap:11px;align-items:flex-start;padding:14px;background:var(--paper)}
.step-number{display:grid;place-items:center;flex:0 0 auto;width:28px;height:28px;background:var(--navy);color:white;border-radius:50%;font-weight:800}
.mining-steps strong,.mining-steps small{display:block}
.mining-steps small{color:var(--muted);font-size:12px;margin-top:3px}
#catalog-upload{display:grid;gap:18px}
.drop-zone{min-height:180px;display:grid;place-content:center;justify-items:center;gap:7px;padding:24px;text-align:center;background:#fbfdfe;border:2px dashed #aabec9;color:var(--muted);cursor:pointer;transition:border-color .2s,background .2s}
.drop-zone .icon{color:var(--blue)}
.drop-zone strong{color:var(--navy)}
.drop-zone small{font-size:12px}
.drop-zone.is-dragging,.drop-zone.has-file{border-color:var(--blue);background:#edf7fb}
#catalog-file:focus + .drop-zone{outline:3px solid var(--yellow);outline-offset:3px}
.advanced-options summary{width:max-content;color:var(--blue);font-weight:800;cursor:pointer}
.advanced-options summary::marker{color:var(--blue)}
.advanced-options-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:14px;padding:18px;background:var(--paper);border-left:4px solid var(--navy)}
label{display:grid;gap:7px;color:var(--muted);font-size:13px;font-weight:700}
input{width:100%;padding:11px 12px;color:var(--ink);border:1px solid #aabdc7;background:white}
.hint{margin:12px 0 0;color:var(--muted);font-size:12px}
.btn{display:inline-flex;justify-content:center;align-items:center;gap:8px;justify-self:start;min-height:48px;padding:12px 18px;border:0;background:var(--navy);color:#fff;font-weight:800}
.btn:hover{background:var(--blue);text-decoration:none}
.btn.signal{background:var(--yellow);color:#2b250e}
.btn.signal:hover{background:#ffd06e}
.refresh-link{display:inline-flex;align-items:center;gap:7px;padding:9px 0}
.table-wrap{overflow-x:auto;max-width:100%;margin-top:22px}
table{width:100%;border-collapse:collapse;min-width:720px}
th,td{padding:14px 11px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}
th{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.06em}
td{font-size:14px}
.catalog-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}
.report-link{font-size:13px}
.badge{display:inline-flex;padding:4px 8px;border:1px solid currentColor;color:var(--muted);font-size:11px;font-weight:800}
.pronto,.COMPRA_EXCELENTE,.ALTA_OPORTUNIDADE,.ALTA{color:var(--green)}
.erro,.COMPRA_RUIM,.AJUSTAR_MARKUP,.DESCARTAR,.BAIXA{color:var(--red)}
.catalog-menu{position:relative}
.catalog-menu summary{display:grid;place-items:center;list-style:none;width:32px;height:32px;margin-left:auto;border:1px solid var(--line);cursor:pointer}
.catalog-menu summary::-webkit-details-marker{display:none}
.catalog-menu form{margin-top:8px;padding:8px;background:#fff;border:1px solid var(--line)}
.delete-link{border:0;background:transparent;color:var(--red);white-space:nowrap;font-size:13px;font-weight:800}
.notice{padding:12px 14px;background:#e6f2f8;border-left:4px solid var(--blue);font-size:13px}
.notice.ok{background:#e5f5ee;border-color:var(--green)}
.empty-state{display:grid;justify-items:center;padding:46px 18px;text-align:center;color:var(--muted);border:1px dashed var(--line);margin-top:22px}
.empty-state .icon{color:var(--blue)}
.empty-state p{margin:10px 0 2px;color:var(--navy);font-weight:800}
.empty-state small{font-size:12px}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.topline{display:flex;justify-content:space-between;gap:24px;align-items:end;margin-bottom:34px;border-bottom:1px solid var(--line);padding-bottom:22px}
.topline>div,.home-header>div{min-width:0}
.lede,.drop-zone,.produto-cell,.anuncio-titulo,.anuncio-motivo,.detalhe-inner{overflow-wrap:anywhere}
.drop-zone{grid-template-columns:minmax(0,1fr)}
.auth-header{max-width:820px}.auth-panel{max-width:560px}.auth-form{display:grid;gap:18px;margin-top:24px}.auth-form .btn{justify-self:stretch}
.settings-panel{max-width:820px}
.status-key{border-left:5px solid var(--yellow);padding:8px 0 8px 14px;font-size:13px;min-width:170px}
.status-key strong{display:block;color:var(--navy)}
.grid-form{display:grid;grid-template-columns:minmax(240px,1fr) max-content;gap:16px;align-items:end;margin-top:24px}
.grid-form .advanced-options{grid-column:1/-1}
.panel.signal{border-top:6px solid var(--yellow)}
.empty{padding:28px 0;color:var(--muted)}
.setting-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}
.setting-value{font:800 36px/1 "Arial Narrow",sans-serif;color:var(--navy)}
.setting-editor{margin-top:18px}
.setting-form{display:grid;grid-template-columns:minmax(160px,220px) max-content;align-items:end;gap:12px;margin-top:14px;padding:16px;background:var(--paper)}
.percent-input{display:grid;grid-template-columns:1fr 36px;align-items:center;background:white;border:1px solid #a9bbc5}
.percent-input input{border:0}
.percent-input>span{text-align:center;color:var(--muted);font-weight:750}
.demanda-badge{align-items:center;gap:8px;border:0;padding:7px 10px}
.demand-bars{display:flex;align-items:end;gap:2px;width:18px;height:18px}.demand-bars i{display:block;width:4px;border-radius:1px;background:currentColor}.demand-bars i:nth-child(1){height:7px}.demand-bars i:nth-child(2){height:12px}.demand-bars i:nth-child(3){height:17px}
.demanda-badge.ALTA{color:#0b5f42;background:#d8f3e8}
.demanda-badge.MEDIA{color:#70420a;background:#fff0bd}
.demanda-badge.BAIXA{color:#8f2727;background:#fde0e0}
.demanda-badge.INDETERMINADA{color:#52636e;background:#e8eef1}
.recommendation-badge{justify-content:center;min-width:112px;border:0;padding:7px 10px}
.recommendation-badge.COMPRA_EXCELENTE{color:#0b5f42;background:#c9f0dc}
.recommendation-badge.COMPRA_MEDIANA{color:#70420a;background:#ffe7a0}
.recommendation-badge.COMPRA_RUIM{color:#8f2727;background:#ffd5d5}
.recommendation-badge.DADOS_INSUFICIENTES{color:#52636e;background:#e8eef1}
.foto-produto,.anuncio-foto{object-fit:contain;background:#edf2f4;border:1px solid var(--line)}
.foto-produto{width:84px;height:84px}
.produto-cell{display:flex;align-items:center;gap:12px}
.linha-produto{cursor:pointer}
.linha-produto:hover{background:#f8fbfc}
.linha-detalhe{display:none}
.linha-detalhe.aberta{display:table-row}
.detalhe-inner{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr);gap:28px;padding:18px 4px}
.anuncio-card{display:grid;grid-template-columns:96px minmax(0,1fr);gap:14px;padding:12px;background:#f8fbfc;border:1px solid var(--line)}
.anuncio-foto{width:96px;height:96px}
.anuncio-metricas{display:grid;grid-template-columns:repeat(4,minmax(100px,1fr));gap:8px}
.progress{height:12px;background:#dfe8ed;margin-top:18px}
.progress>div{height:100%;background:var(--yellow);transition:width .4s}
@media(max-width:850px){.app-shell{grid-template-columns:1fr;grid-template-rows:auto 1fr}
.app-sidebar{position:static;min-height:0;height:auto;flex-direction:row;align-items:center;padding:12px 18px;gap:18px}
.brand-copy,.sidebar-footer p{display:none}
.sidebar-footer{display:block;margin:0}
.sidebar-footer form{margin-top:0}
.logout-button{width:auto;padding:8px;font-size:12px}
.primary-nav{display:flex;gap:3px;margin-left:auto}
.primary-nav a{width:auto;padding:8px;font-size:12px}
.primary-nav a[aria-current=page]{border-left:0;border-bottom:3px solid var(--yellow);padding:8px 8px 5px}
.app-shell main{padding:32px 18px 72px}
.home-header,.section-heading{display:block}
.engine-card{margin-top:22px}
.mining-steps{grid-template-columns:1fr}
.section-heading>p{margin:10px 0 0}
.advanced-options-fields{grid-template-columns:1fr}
.topline{display:block}
.status-key{margin-top:20px}
.grid-form,.setting-form{grid-template-columns:1fr}
.detalhe-inner{grid-template-columns:1fr}
.anuncio-metricas{grid-template-columns:repeat(2,minmax(100px,1fr))}
}
@media(max-width:520px){h1{font-size:42px}
.upload-panel,.catalog-history,.panel{padding:22px 16px}
.app-sidebar{padding-inline:14px}
.app-sidebar{gap:8px}
.primary-nav a{gap:6px}
.primary-nav span{display:inline}
.mining-steps{margin-inline:0}
.anuncio-card{grid-template-columns:72px minmax(0,1fr)}
.anuncio-foto{width:72px;height:72px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}
}

/* Componentes já usados nas telas de sistema e relatório. */
.btn.quiet{min-height:40px;padding:10px 14px;background:transparent;color:var(--navy);border:1px solid var(--line)}
.btn.quiet:hover{background:var(--paper)}
.price-card{min-width:150px;display:grid;gap:3px;padding:10px 12px;background:var(--paper);border-left:3px solid #9fb5c1}
.price-card.goboox{background:#fff4d7;border-left-color:var(--yellow)}
.price-card>span:first-child,.price-card>small,.market-price>small{font-size:10px;color:var(--muted)}
.price-card strong,.market-price>strong{font-size:18px;color:var(--navy);white-space:nowrap}
.price-card strong small{font-size:11px;color:var(--muted)}
.markup-pill{justify-self:start;padding:2px 7px;background:#fff;border:1px solid #e9c764;color:var(--navy)!important;font-weight:750}
.market-price{min-width:180px;display:grid;gap:4px}
.marketplace-logos{display:flex;align-items:center;gap:7px;white-space:nowrap}
.logo-market{display:inline-flex;align-items:center;gap:3px;font-size:8px;font-weight:750;font-style:normal}
.logo-market i{font-style:normal}
.logo-ml{color:#2854a1}.logo-ml i{display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:#ffe600;color:#2854a1;font-size:11px}
.logo-shopee{color:#ee4d2d}.logo-shopee i{display:grid;place-items:center;width:15px;height:15px;border:2px solid currentColor;font-size:9px}
.logo-amazon{position:relative;color:#111827;padding-bottom:3px}.logo-amazon i{position:absolute;left:2px;right:0;bottom:0;height:2px;background:#f59e0b;transform:skewX(-24deg)}
.metric-note{display:inline-block;margin-top:5px;color:var(--muted);font-size:10px;white-space:nowrap}
.tabela-produtos{min-width:1050px}.tabela-produtos th:first-child,.tabela-produtos td:first-child{min-width:220px}
.produto-cell .hint{display:inline-block;margin-top:4px}
.anuncios-lista{display:grid;gap:10px;margin-top:14px}
.anuncio-foto.sem-foto{display:grid;place-items:center;color:var(--muted);font-size:11px;text-align:center}
.anuncio-conteudo{min-width:0;display:grid;gap:7px}.anuncio-status{justify-self:start;padding:2px 7px;background:#d8f3e8;color:#0b5f42;font-size:10px;font-weight:750}.nao-confirmado{opacity:.66}.nao-confirmado .anuncio-status{background:#e8eef1;color:#52636e}
.anuncio-titulo{color:var(--navy);font-size:14px;line-height:1.25}.anuncio-metricas span{display:grid;gap:2px}.anuncio-metricas small,.anuncio-motivo{color:var(--muted);font-size:10px}.anuncio-metricas b{font-size:12px}.anuncio-link{justify-self:start;font-size:12px}
.kv-linha{display:flex;justify-content:space-between;gap:16px;padding:7px 0;border-bottom:1px solid #e7eef2;font-size:13px}

/* Resumo e exploração progressiva do relatório. */
[hidden]{display:none!important}
select{font:inherit;width:100%;min-height:44px;padding:11px 12px;color:var(--ink);border:1px solid #aabdc7;background:white}
select:focus-visible{outline:3px solid var(--yellow);outline-offset:3px}
.report-back{display:inline-block;margin-bottom:20px;font-size:13px}
.report-status{border-top:6px solid var(--yellow)}
.report-status.is-complete{border-top-color:var(--green)}
.report-status-heading{display:flex;align-items:center;gap:16px}
.success-check{display:grid;place-items:center;flex:0 0 auto;width:46px;height:46px;background:#d8f3e8;color:var(--green);border-radius:50%;font-size:28px;font-weight:800}
.is-complete .progress>div{background:var(--green)}
.report-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:26px 0;border-block:1px solid var(--line)}
.report-summary>div{padding:20px 18px;border-right:1px solid var(--line)}
.report-summary>div:first-child{padding-left:0}.report-summary>div:last-child{border-right:0}
.report-summary dt{color:var(--muted);font-size:12px}.report-summary dd{margin:8px 0 0;font-size:30px;line-height:1.2;color:var(--navy);font-weight:800}.report-summary .summary-duration{font-size:23px}
.eta-card{display:grid;gap:6px;padding:18px;background:var(--paper);border-left:3px solid var(--blue);margin:20px 0}.eta-card span,.eta-card small{font-size:12px;color:var(--muted)}.eta-card strong{color:var(--navy);font-size:22px}
.report-filters{display:grid;grid-template-columns:2fr 1fr 1fr;gap:14px;margin-top:24px;padding:18px;background:var(--paper)}
.report-filters label{min-width:0}.report-filters input{min-height:44px}
.report-products .table-wrap{margin-top:18px}
.report-products .linha-produto{cursor:default}
.detail-toggle{position:relative;min-height:44px;padding:10px 12px;border:1px solid var(--line);background:white;color:var(--blue);font-size:12px;font-weight:800;white-space:nowrap}.detail-toggle:hover,.detail-toggle[aria-expanded=true]{background:#e6f2f8;border-color:var(--blue)}
.report-pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:20px;color:var(--muted);font-size:12px}
.report-pagination p{margin:0}#pagination{display:flex;align-items:center;gap:12px}#pagination button{min-height:44px;padding:8px 12px;background:white;border:1px solid var(--line);color:var(--navy);font-size:12px;font-weight:800}#pagination button:disabled{opacity:.45;cursor:default}
@media(max-width:1000px){.report-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.report-summary>div{padding:16px!important}.report-summary>div:nth-child(2){border-right:0}.report-filters{grid-template-columns:1fr 1fr}.report-filters>label:first-child{grid-column:1/-1}}
@media(max-width:520px){.report-filters{grid-template-columns:1fr;padding:14px}.report-filters>label:first-child{grid-column:auto}.report-pagination{flex-direction:column;align-items:flex-start}.report-summary dd{font-size:25px}.report-summary .summary-duration{font-size:19px}}

/* No desktop, a decisão inteira cabe na linha sem deslocar a identificação. */
@media(min-width:1200px){
  .tabela-produtos{min-width:0;table-layout:fixed}
  .tabela-produtos th,.tabela-produtos td{padding:14px 7px;overflow-wrap:anywhere}
  .tabela-produtos th:first-child,.tabela-produtos td:first-child{min-width:0;width:22%}
  .tabela-produtos th:nth-child(2){width:15%}
  .tabela-produtos th:nth-child(3){width:12%}
  .tabela-produtos th:nth-child(4){width:17%}
  .tabela-produtos th:nth-child(5){width:11%}
  .tabela-produtos th:nth-child(6){width:13%}
  .tabela-produtos th:nth-child(7){width:10%}
  .tabela-produtos .price-card,.tabela-produtos .market-price{min-width:0}
  .tabela-produtos .price-card{padding:10px 7px}
  .tabela-produtos .price-card strong,.tabela-produtos .market-price>strong{font-size:16px;white-space:normal}
  .tabela-produtos .marketplace-logos{flex-wrap:wrap}
  .tabela-produtos .recommendation-badge{min-width:0}
  .tabela-produtos .detail-toggle{padding:10px 7px;font-size:11px}
  .tabela-produtos .metric-note{white-space:normal}
  .tabela-produtos .produto-cell>div{min-width:0}
  .tabela-produtos .foto-produto{width:64px;height:64px;flex:0 0 auto}
  .tabela-produtos .anuncio-metricas{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* Cartões preservam os mesmos produtos, botões e áreas de detalhe da tabela. */
@media(max-width:850px){
  .report-products .table-wrap{overflow:visible}
  .tabela-produtos,.tabela-produtos tbody{display:block;min-width:0;width:100%}
  .tabela-produtos thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
  .tabela-produtos .linha-produto{display:grid;grid-template-columns:minmax(0,1fr);padding:4px 14px;margin-top:20px;border:1px solid var(--line);border-top:4px solid var(--navy);background:var(--white)}
  .tabela-produtos td,.tabela-produtos td:first-child{display:block;min-width:0;padding:13px 0}
  .tabela-produtos .linha-produto td:last-child{border:0}
  .linha-produto td[data-label]::before{content:attr(data-label);display:block;margin-bottom:8px;color:var(--muted);font-size:11px;font-weight:800}
  .price-card,.market-price{min-width:0}
  .price-card{padding:10px}
  .produto-cell>div{min-width:0}
  .foto-produto{flex:0 0 auto;width:72px;height:72px}
  .detail-toggle{width:100%}
  .tabela-produtos .linha-detalhe.aberta{display:block;padding:0 14px;border:1px solid var(--line);border-top:0;background:var(--paper)}
  .linha-detalhe>td{border:0}
  .detalhe-inner{padding:10px 0;gap:24px}
  .anuncio-metricas{grid-template-columns:repeat(2,minmax(0,1fr))}
  .anuncio-card{gap:10px;padding:10px}
  .metric-note{white-space:normal}
  .kv-linha>*{min-width:0}
}

/* Relatório v2: fluxo de leitura e evidências em painel lateral. */
.report-page{max-width:1480px;margin:0 auto}
.report-hero{display:flex;justify-content:space-between;align-items:flex-end;gap:28px;padding-bottom:24px;margin-bottom:22px;border-bottom:1px solid var(--line)}
.report-title{min-width:0}.report-title h1{font-size:clamp(38px,4.2vw,62px)}
.report-hero-actions{display:flex;align-items:center;gap:18px;flex:0 0 auto}
.report-hero-actions .status-key{min-width:190px}
.report-status{padding-block:24px}.report-status .progress{height:8px}
.report-section-heading{align-items:end}
.product-meta{display:block;margin-top:5px;color:var(--muted);font-size:11px}
.produto-sem-foto{display:grid;place-items:center;color:var(--navy);font-size:13px;font-weight:800}
.goboox-label{display:flex;align-items:center;gap:7px;color:var(--navy)!important;font-weight:800}
.goboox-label img{width:24px;height:24px;border-radius:6px;object-fit:cover;background:#1d1e25}
.market-price>span{color:var(--muted);font-size:10px}
.linha-produto>td:nth-child(5){display:table-cell}
.linha-produto>td:nth-child(5) .metric-note{display:block}
.detail-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:128px;color:var(--navy);border:2px solid #7095c7;border-radius:6px;padding:9px 10px 9px 14px;font-size:14px}
.detail-toggle::after{content:none}
.ad-count{display:grid;place-items:center;flex:0 0 auto;width:30px;height:30px;padding:0;border-radius:50%;background:#092f63;color:#fff;font-size:14px;font-weight:800}
body.drawer-open{overflow:hidden}
.linha-detalhe.aberta{display:table-row}
.linha-detalhe>td{padding:0;border:0}
.drawer-backdrop{position:fixed;inset:0;z-index:50;display:flex;justify-content:flex-end;background:rgba(7,31,47,.48);backdrop-filter:blur(2px)}
.ads-drawer{width:min(680px,94vw);height:100%;overflow-y:auto;background:#fff;box-shadow:-16px 0 44px rgba(8,37,55,.18);padding:28px 20px 22px;outline:0}
.drawer-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:0 8px 14px;border-bottom:0}
.drawer-product{display:flex;align-items:center;gap:16px;min-width:0}.drawer-product>div{min-width:0}
.drawer-product-photo{display:block;flex:0 0 auto;width:70px;height:70px;object-fit:contain;background:#fff;border:1px solid var(--line);border-radius:5px}
.drawer-header h2{font-family:Avenir,"Avenir Next","Segoe UI",sans-serif;font-size:25px;line-height:1.15;letter-spacing:-.6px;max-width:500px}.drawer-header p{margin:7px 0 0;color:#6177a2;font-size:14px}
.drawer-close,.dialog-close{display:grid;place-items:center;flex:0 0 auto;width:40px;height:40px;border:1px solid var(--line);background:#fff;color:var(--navy);font-size:25px;line-height:1}
.drawer-close:hover,.dialog-close:hover{background:var(--paper)}
.drawer-price-flow{display:grid;grid-template-columns:1fr 28px 1fr 28px 1fr;align-items:center;gap:5px;margin:0 0 6px;padding:16px 18px;border:1px solid #cad8ed;border-radius:6px;background:linear-gradient(90deg,#fff 0%,#f8fbff 48%,#fff 100%)}
.flow-item{display:flex;align-items:center;gap:12px;min-width:0}.flow-item>span:last-child{display:grid;gap:3px;min-width:0}.flow-item small{color:#15376d;font-size:10px}.flow-item strong{color:#082b6b;font-size:18px;white-space:nowrap}.flow-item strong em{color:#496792;font-size:11px;font-style:normal;font-weight:500}
.flow-icon{display:grid;place-items:center;flex:0 0 auto;width:28px;height:28px;color:#082b88;font-size:29px;font-weight:800}.cube-icon{transform:rotate(45deg)}
.flow-goboox{flex:0 0 auto;width:46px;height:28px;object-fit:contain;border-radius:5px;background:#1d1e25}
.flow-chart{display:flex;align-items:end;gap:5px;flex:0 0 auto;width:34px;height:34px}.flow-chart i{display:block;width:4px;background:#082b88}.flow-chart i:nth-child(1){height:13px}.flow-chart i:nth-child(2){height:23px}.flow-chart i:nth-child(3){height:32px}
.flow-arrow{color:#6d94c7;font-size:28px;text-align:center;font-weight:300}
.confirmed-average{margin:8px 0 16px;color:#627799;font-size:13px}
.ad-tabs{display:flex;gap:10px;margin:0 0 14px;border-bottom:0}
.ad-tabs button{display:flex;align-items:center;gap:8px;min-height:42px;padding:9px 16px;border:1px solid #d4dfef;border-radius:7px;background:#f7f9fd;color:#17376f;font-size:12px;font-weight:800}
.ad-tabs button[aria-selected=true]{border-color:#0b376c;background:#0b376c;color:#fff}
.ad-tabs span{display:grid;place-items:center;min-width:21px;height:21px;padding:0 6px;border-radius:50%;background:#e8eef7;color:#17376f;font-size:10px}.ad-tabs button[aria-selected=true] span{background:#53729a;color:#fff}
.drawer-note{display:flex;align-items:center;gap:10px;padding:11px 13px;margin:14px 0 0;background:#eaf3ff;border:0;border-radius:6px;color:#244b7d;font-size:11px}.drawer-note>span{display:grid;place-items:center;flex:0 0 auto;width:18px;height:18px;border-radius:50%;background:#7094cf;color:#fff;font-weight:800}
.ads-drawer .anuncios-lista{gap:9px;margin-top:0}
.ads-drawer .anuncio-card{grid-template-columns:86px minmax(0,1fr);padding:10px;background:#fff;border-color:#d5e0ef;border-radius:7px}
.ads-drawer .anuncio-foto{width:86px;height:86px;border:0;border-radius:5px;background:#f2f5f8}
.ad-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.marketplace-mark{display:inline-flex;align-items:center;gap:7px;color:#193a71;font-size:11px;font-weight:800}.marketplace-mark i{display:grid;place-items:center;flex:0 0 auto;width:24px;height:24px;font-style:normal}
.marketplace-ml i{border-radius:50%;background:#ffe300}.marketplace-ml i::after{content:"↔";color:#2854a1;font-size:15px;font-weight:900}
.marketplace-shopee{color:#ee4d2d}.marketplace-shopee i{border:2px solid currentColor;border-radius:2px}.marketplace-shopee i::after{content:"S";font-size:13px}
.marketplace-amazon{color:#111827}.marketplace-amazon i::after{content:"a";font-size:23px;font-weight:800}.marketplace-other i{background:#eef2f6;border-radius:4px}
.anuncio-status{display:inline-flex;align-items:center;gap:7px;justify-self:end;border-radius:12px;padding:4px 10px;background:#d8f3e8;color:#0b6947;font-size:10px;font-weight:750;white-space:nowrap}.anuncio-status b{display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#13805a;color:white;font-size:11px}
.ads-drawer .nao-confirmado{opacity:1}.ads-drawer .nao-confirmado .anuncio-status{background:#fde3e6;color:#ad2635}.ads-drawer .nao-confirmado .anuncio-status b{background:#c22737}
.ads-drawer .anuncio-titulo{font-size:13px}.ads-drawer .anuncio-metricas{display:flex;gap:18px;padding:0;border:0}.ads-drawer .anuncio-metricas span{display:flex;align-items:center;gap:4px}.ads-drawer .anuncio-metricas small{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.ads-drawer .anuncio-metricas b{color:#536b90;font-size:11px;font-weight:500}.ads-drawer .anuncio-metricas span:first-child b{color:#082b6b;font-size:18px;font-weight:800}
.ads-drawer .anuncio-metricas span:nth-child(2)::before{content:"▥";color:#3b669c;font-size:11px}.ads-drawer .anuncio-metricas span:nth-child(3)::before{content:"◉";color:#3b669c;font-size:10px}
.ads-drawer .anuncio-metricas span:nth-child(4){display:none}
.ad-card-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px}.ads-drawer .anuncio-motivo{margin:0;color:#75839a;line-height:1.3}.ads-drawer .anuncio-link{flex:0 0 auto;padding:8px 12px;border:1px solid #cad9ef;border-radius:5px;color:#173f83;font-size:11px}
.drawer-economy{margin-top:24px;padding:20px;background:var(--paper);border-top:4px solid var(--yellow)}
.drawer-economy h3{font-size:20px}.drawer-economy>p{color:var(--muted);font-size:12px}

.download-dialog{width:min(720px,calc(100vw - 32px));max-height:calc(100vh - 32px);padding:0;border:0;box-shadow:0 24px 70px rgba(8,37,55,.28);color:var(--ink)}
.download-dialog::backdrop{background:rgba(7,31,47,.55);backdrop-filter:blur(2px)}
.download-dialog form{padding:28px}
.download-dialog header{display:flex;justify-content:space-between;gap:18px;padding-bottom:20px;border-bottom:1px solid var(--line)}
.download-dialog header p:last-child{margin:8px 0 0;color:var(--muted);font-size:13px}
.download-dialog fieldset{padding:0;margin:22px 0 0;border:0}.download-dialog legend{margin-bottom:10px;color:var(--navy);font-weight:800}
.choice-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.choice-grid label,.format-choices label{position:relative;display:block;cursor:pointer}
.choice-grid input,.format-choices input{position:absolute;width:1px;height:1px;opacity:0}
.choice-grid span{display:grid;place-items:center;min-height:46px;padding:8px;border:1px solid var(--line);background:#fff;color:var(--muted);font-size:12px;font-weight:800}
.choice-grid input:checked+span{border-color:var(--navy);background:#eaf1f5;color:var(--navy);box-shadow:inset 0 0 0 1px var(--navy)}
.choice-grid input:focus-visible+span,.format-choices input:focus-visible+span{outline:3px solid var(--yellow);outline-offset:3px}
.format-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.format-choices label>span{display:grid;gap:3px;min-height:78px;padding:15px;border:1px solid var(--line);background:#fff}
.format-choices strong{color:var(--navy)}.format-choices small{color:var(--muted);font-weight:500}
.format-choices input:checked+span{border-color:var(--yellow);background:#fff7df;box-shadow:inset 4px 0 0 var(--yellow)}
.download-dialog footer{display:flex;justify-content:flex-end;gap:10px;margin-top:26px;padding-top:20px;border-top:1px solid var(--line)}

@media(min-width:1200px){
  .report-page{max-width:1480px}
  .tabela-produtos th:first-child,.tabela-produtos td:first-child{width:20%}
  .tabela-produtos th:nth-child(2){width:15%}.tabela-produtos th:nth-child(3){width:12%}.tabela-produtos th:nth-child(4){width:14%}.tabela-produtos th:nth-child(5){width:12%}.tabela-produtos th:nth-child(6){width:13%}.tabela-produtos th:nth-child(7){width:14%}
  .tabela-produtos .detail-toggle{min-width:0;width:100%}
}
@media(max-width:850px){
  .report-hero{display:block}.report-hero-actions{justify-content:space-between;margin-top:22px}.report-hero-actions .status-key{margin-top:0}
  .linha-produto>td:nth-child(5){display:block}
  .ads-drawer{width:min(620px,100vw);padding:22px 18px}
  .drawer-header h2{font-size:23px}
}
@media(max-width:520px){
  .report-hero-actions{align-items:stretch;flex-direction:column}.download-trigger{width:100%}
  .report-status{padding-block:20px}.report-summary{grid-template-columns:1fr 1fr}
  .choice-grid{grid-template-columns:1fr 1fr}.format-choices{grid-template-columns:1fr}
  .download-dialog form{padding:22px 16px}.download-dialog footer{display:grid;grid-template-columns:1fr 1fr}.download-dialog footer .btn{width:100%;padding-inline:9px}
  .ads-drawer .anuncio-card{grid-template-columns:70px minmax(0,1fr)}.ads-drawer .anuncio-foto{width:70px;height:70px}
  .ads-drawer .anuncio-metricas{grid-template-columns:1fr 1fr}.drawer-header h2{font-size:21px}
  .drawer-price-flow{grid-template-columns:1fr;padding:14px}.flow-arrow{display:none}.flow-item{padding:4px 0}.flow-item strong{white-space:normal}
  .ad-tabs{flex-wrap:wrap}.ad-tabs button{padding-inline:12px}.ad-card-top{align-items:flex-start;flex-wrap:wrap}.anuncio-status{justify-self:start;white-space:normal}
  .ad-card-bottom{align-items:flex-start;flex-direction:column}.ads-drawer .anuncio-link{align-self:stretch;text-align:center}
}

/* Tela inicial v3: envio em primeiro plano, progresso compacto e saída clara. */
.home-header-compact{padding-bottom:18px;margin-bottom:20px;border-bottom:0}
.home-header-compact h1{font-size:clamp(38px,4.2vw,58px)}
.upload-panel-primary{padding:22px 24px 18px;margin-bottom:18px;border-top-width:6px}
.upload-heading{margin-bottom:16px}.upload-heading .eyebrow{margin-bottom:6px}
.upload-drop-zone{min-height:190px;gap:6px;background:#fff}.upload-drop-zone>strong{font-size:18px}
.upload-select-cta{display:inline-flex;align-items:center;gap:8px;min-height:46px;margin-top:10px;padding:11px 28px;background:var(--yellow);color:#2b250e;font-weight:800}
.upload-drop-zone:hover .upload-select-cta{background:#ffd06e}
.upload-footer{display:grid;gap:12px;margin-top:14px}
.server-note{display:flex;align-items:center;gap:8px;margin:0;color:var(--muted);font-size:12px}
.server-note>span{display:grid;place-items:center;flex:0 0 auto;width:19px;height:19px;border:2px solid var(--blue);border-radius:50%;color:var(--blue);font-size:11px;font-weight:900}
.upload-controls{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.upload-controls .advanced-options{flex:1;min-width:0}
.upload-submit{display:none;flex:0 0 auto}#catalog-upload.has-file .upload-submit{display:inline-flex}
.active-catalogs{margin-bottom:18px;background:#fff;border:1px solid var(--line)}
.compact-section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 20px 12px;border-bottom:1px solid var(--line)}
.compact-section-heading h2{font-size:24px}.compact-section-heading p{margin:4px 0 0;color:var(--muted);font-size:12px}.compact-section-heading>a{font-size:12px}
.active-catalog-list{padding:0 18px}
.active-catalog-row{display:grid;grid-template-columns:minmax(210px,1.35fr) minmax(220px,1.4fr) minmax(180px,1.1fr) minmax(120px,.7fr) auto;align-items:center;gap:18px;min-height:74px;padding:10px 0;border-bottom:1px solid var(--line)}
.active-catalog-row:last-child{border-bottom:0}.active-catalog-identity{display:grid;gap:7px;min-width:0}
.active-catalog-identity>strong{overflow:hidden;color:var(--navy);font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.live-status{display:inline-flex;align-items:center;gap:7px;width:max-content;padding:4px 9px;border-radius:4px;background:#e3f1ff;color:#0868c6;font-size:10px;font-weight:900}
.live-status i{width:8px;height:8px;border-radius:50%;background:currentColor;box-shadow:0 0 0 4px rgba(21,109,159,.12)}
[data-catalog-status=finishing] .live-status{background:#fff1cf;color:#9a6500}[data-catalog-status=waiting] .live-status{background:#edf1f3;color:var(--muted)}[data-catalog-status=attention] .live-status{background:#fde8e8;color:var(--red)}
.active-catalog-progress{display:grid;gap:6px;min-width:0}.progress-summary{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.progress-summary strong{color:var(--navy);font-size:20px;line-height:1}.progress-summary span{color:var(--muted);font-size:11px;white-space:nowrap}
.home-progress-track{height:9px;overflow:hidden;border-radius:999px;background:#dce6eb}.home-progress-track>span{display:block;height:100%;border-radius:inherit;background:repeating-linear-gradient(120deg,#1684e8 0,#1684e8 10px,#3aa0f4 10px,#3aa0f4 18px);transition:width .45s ease}
[data-catalog-status=finishing] .home-progress-track>span{background:repeating-linear-gradient(120deg,#f2ad22 0,#f2ad22 10px,#ffc84f 10px,#ffc84f 18px)}
.active-catalog-stage,.active-catalog-eta{display:grid;gap:3px;min-width:0}.active-catalog-stage small,.active-catalog-eta small{color:var(--muted);font-size:10px}
.active-catalog-stage strong,.active-catalog-eta strong{overflow:hidden;color:var(--navy);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.active-catalog-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.active-catalog-action{min-height:40px;padding:9px 16px;font-size:12px}.compact-empty{margin:0;padding:16px 20px;color:var(--muted);font-size:13px}
.completed-catalogs{padding:18px 20px 14px}.completed-heading{align-items:center}.completed-heading h2{font-size:27px}.completed-heading p{margin:4px 0 0;color:var(--muted);font-size:12px}
.completed-catalog-list{display:grid;margin-top:14px}.completed-catalog-row{display:grid;grid-template-columns:130px minmax(230px,1fr) 135px minmax(390px,auto);align-items:center;gap:16px;min-height:72px;padding:10px 12px;border:1px solid var(--line);border-bottom:0;background:#fff}
.completed-catalog-row:last-child{border-bottom:1px solid var(--line)}.completed-status{display:inline-flex;align-items:center;gap:7px;width:max-content;padding:5px 9px;border-radius:4px;background:#dcf5e8;color:var(--green);font-size:10px;font-weight:900}
.completed-status b{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#19a461;color:#fff;font-size:11px}
.completed-catalog-name,.completed-product-count{display:grid;gap:4px;min-width:0}.completed-catalog-name strong{overflow:hidden;color:var(--navy);font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.completed-catalog-name small,.completed-product-count span{color:var(--muted);font-size:10px}.completed-product-count strong{color:var(--navy);font-size:20px;line-height:1}
.completed-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.completed-actions .btn{min-height:40px;padding:9px 13px;font-size:11px;white-space:nowrap}
.completed-primary{background:var(--navy)}.completed-secondary{background:#fff!important}.completed-actions .catalog-menu summary{margin:0}
@media(max-width:1180px){.active-catalog-row{grid-template-columns:minmax(190px,1fr) minmax(190px,1fr) minmax(160px,.8fr) auto}.active-catalog-eta{display:none}.completed-catalog-row{grid-template-columns:120px minmax(210px,1fr) 110px minmax(300px,auto)}.completed-actions .completed-secondary{display:none}}
@media(max-width:850px){.home-header-compact{padding-bottom:8px;margin-bottom:16px}.upload-panel-primary{padding:20px 16px}.upload-drop-zone{min-height:210px;padding:20px 14px}.upload-controls{display:grid;grid-template-columns:1fr}#catalog-upload.has-file .upload-submit{width:100%}.compact-section-heading{align-items:flex-start}.active-catalog-list{padding:0 14px}.active-catalog-row{grid-template-columns:minmax(0,1fr) auto;padding:16px 0;gap:13px}.active-catalog-identity,.active-catalog-progress,.active-catalog-stage{grid-column:1/-1}.active-catalog-eta{display:grid;grid-column:1}.active-catalog-actions{grid-column:2;grid-row:4}.completed-catalogs{padding:18px 14px}.completed-heading{display:flex}.completed-catalog-row{grid-template-columns:minmax(0,1fr) auto;padding:14px;gap:12px;border-bottom:1px solid var(--line);margin-bottom:10px}.completed-status{grid-column:1}.completed-catalog-name{grid-column:1/-1}.completed-product-count{grid-column:1}.completed-actions{grid-column:1/-1;justify-content:stretch}.completed-actions .btn{flex:1}.completed-actions .completed-secondary{display:inline-flex}}
@media(max-width:520px){.home-header-compact h1{font-size:38px}.upload-select-cta{width:100%;justify-content:center;padding-inline:14px}.server-note{align-items:flex-start}.compact-section-heading{display:grid}.progress-summary{align-items:flex-start}.progress-summary span{white-space:normal;text-align:right}.completed-heading{display:grid;grid-template-columns:1fr auto}.completed-heading>div{min-width:0}.completed-actions{display:grid;grid-template-columns:1fr auto}.completed-actions .completed-primary{grid-column:1/-1}.completed-actions .completed-secondary{grid-column:1}}
@media(prefers-reduced-motion:no-preference){[data-catalog-status=mining] .live-status i{animation:home-live-pulse 1.8s ease-out infinite}[data-catalog-status=mining] .home-progress-track>span{animation:home-progress-move .9s linear infinite}}
@keyframes home-live-pulse{0%{box-shadow:0 0 0 0 rgba(21,109,159,.35)}70%{box-shadow:0 0 0 7px rgba(21,109,159,0)}100%{box-shadow:0 0 0 0 rgba(21,109,159,0)}}
@keyframes home-progress-move{to{background-position:18px 0}}

.budget-panel .report-summary{margin:20px 0 16px}
.budget-meter{margin-top:0}.budget-meter>div{background:var(--yellow)}
.budget-badge{display:flex;width:max-content;margin-top:8px;border:0;padding:5px 8px;background:#fff1c5;color:#6b4a00}
.budget-choice{display:flex;align-items:flex-start;gap:10px;color:var(--ink);font-weight:700}.budget-choice input{width:auto;margin-top:3px}
@media(max-width:1180px){.advanced-options-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){.advanced-options-fields{grid-template-columns:1fr}}
.report-filters:has(#budget-filter){grid-template-columns:2fr 1fr 1fr 1fr}
@media(max-width:1000px){.report-filters:has(#budget-filter){grid-template-columns:1fr 1fr}}
@media(max-width:520px){.report-filters:has(#budget-filter){grid-template-columns:1fr}}
