/* Win7 Med · MetaX — identidade: petróleo + as 4 cores do 7, fonte Outfit, batimento como assinatura. */
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --petroleo: #0b4f6c;
  --petroleo-fundo: #082f44;
  --petroleo-noite: #061f2e;
  --petroleo-claro: #1e88b8;
  --petroleo-gelo: #e3eff5;
  --tinta: #0e1a22;
  --texto: #3b5160;
  --apagado: #627a89;
  --fundo: #eef3f6;
  --cartao: #ffffff;
  --linha: #d7e2e8;
  --linha-forte: #b9cad3;
  --w7-amarelo: #f5b71a;
  --w7-vermelho: #e23b3b;
  --w7-verde: #27a548;
  --w7-azul: #2f7cc1;
  --bom: #1f8a3c;
  --bom-fundo: #e6f4ea;
  --atencao: #8a5f00;
  --atencao-fundo: #fdf3d8;
  --critico: #c62f2f;
  --critico-fundo: #fbe7e7;
  --fonte: "Outfit", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --raio-g: 18px;
  --raio: 12px;
  --raio-p: 8px;
  --sombra: 0 1px 2px rgba(8, 47, 68, .06), 0 8px 24px -12px rgba(8, 47, 68, .18);
  --lateral: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fundo); color: var(--tinta); font-family: var(--fonte); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--petroleo); }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--petroleo-claro) 55%, transparent); outline-offset: 2px; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { opacity: .9; animation: respira 1.6s ease-in-out infinite; }
@keyframes respira { 50% { opacity: .45; } }

/* Faixa das 4 cores do 7 (marca) */
.faixa-7 { display: flex; height: 4px; }
.faixa-7 i { flex: 1; }
.faixa-7 i:nth-child(1) { background: var(--w7-amarelo); }
.faixa-7 i:nth-child(2) { background: var(--w7-vermelho); }
.faixa-7 i:nth-child(3) { background: var(--w7-verde); }
.faixa-7 i:nth-child(4) { background: var(--w7-azul); }

/* ───────── Botões e campos ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; background: var(--petroleo); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--petroleo-fundo); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.sec { background: var(--cartao); color: var(--petroleo); border-color: var(--linha-forte); }
.btn.sec:hover { border-color: var(--petroleo); }
.btn.fantasma { background: transparent; color: var(--petroleo); padding: 0 10px; }
.btn.fantasma:hover { background: var(--petroleo-gelo); }
.btn.perigo { background: var(--cartao); color: var(--critico); border-color: #eab8b8; }
.btn.perigo:hover { background: var(--critico-fundo); }
.btn.peq { min-height: 34px; padding: 0 14px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }

.campo { display: grid; gap: 6px; }
.campo label { font-size: 13.5px; font-weight: 600; color: var(--texto); }
.campo input, .campo select, .campo textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--linha-forte); border-radius: var(--raio-p); background: #fff; transition: border-color .15s, box-shadow .15s; }
.campo textarea { min-height: 96px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--petroleo-claro); box-shadow: 0 0 0 4px color-mix(in srgb, var(--petroleo-claro) 18%, transparent); }
.campo .ajuda { font-size: 13px; color: var(--apagado); }
.campo.erro input, .campo.erro select, .campo.erro textarea { border-color: var(--critico); }
.erro-msg { color: var(--critico); font-size: 13.5px; }
.form { display: grid; gap: 16px; }
.form .acoes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--raio-p); font-size: 14px; }
.aviso.erro { background: var(--critico-fundo); color: #7d1d1d; }
.aviso.atencao { background: var(--atencao-fundo); color: #5e4100; }
.aviso.ok { background: var(--bom-fundo); color: #14532a; }
.aviso.info { background: var(--petroleo-gelo); color: var(--petroleo-fundo); }
.aviso strong { font-weight: 700; }

/* ───────── Entrada ───────── */
.entrada { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.entrada-marca { position: relative; background: var(--petroleo-fundo); color: #d9ebf4; padding: 48px clamp(28px, 5vw, 72px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.entrada-marca .logo { width: min(300px, 70%); }
.entrada-marca h1 { font-size: clamp(30px, 3.4vw, 46px); font-weight: 600; color: #fff; max-width: 15ch; margin-top: 40px; }
.entrada-marca p { margin-top: 14px; max-width: 42ch; font-size: 17px; color: #a9cadb; font-weight: 300; }
.entrada-marca .ecg { position: absolute; left: 0; right: 0; bottom: 9%; height: 110px; opacity: .9; pointer-events: none; }
.entrada-marca .rodape { font-size: 13px; color: #7fa6bb; position: relative; }
.ecg path.trilho { fill: none; stroke: rgba(150, 205, 232, .18); stroke-width: 2; }
.ecg path.pulso { fill: none; stroke: #96cde8; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 260 1400; animation: corre 3.2s linear infinite; }
@keyframes corre { from { stroke-dashoffset: 1660; } to { stroke-dashoffset: 0; } }
.entrada-form { display: grid; place-items: center; padding: 40px 24px; background: var(--cartao); }
.entrada-form .caixa { width: min(400px, 100%); }
.entrada-form h2 { font-size: 28px; font-weight: 600; }
.entrada-form .sub { color: var(--apagado); margin: 8px 0 28px; }
.entrada-form .logo-movel { display: none; width: 170px; margin-bottom: 28px; }
.entrada-form .btn { width: 100%; min-height: 50px; font-size: 16px; }

/* ───────── Casca (admin com lateral; cliente com topo) ───────── */
.casca { min-height: 100vh; display: grid; grid-template-columns: var(--lateral) minmax(0, 1fr); }
.lateral { position: sticky; top: 0; height: 100vh; background: var(--petroleo-fundo); color: #cfe4ef; display: flex; flex-direction: column; padding: 22px 16px; gap: 20px; }
.lateral .logo { width: 150px; margin: 4px 8px 0; }
.lateral nav { display: grid; gap: 2px; }
.lateral nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #cfe4ef; text-decoration: none; font-weight: 500; }
.lateral nav a svg { width: 19px; height: 19px; opacity: .8; }
.lateral nav a:hover { background: rgba(255, 255, 255, .06); }
.lateral nav a.ativo { background: rgba(150, 205, 232, .14); color: #fff; }
.lateral nav a.ativo svg { opacity: 1; color: #96cde8; }
.lateral .grupo { font-size: 12px; color: #7fa6bb; padding: 0 12px; margin-top: 6px; }
.lateral .eu { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .08); padding: 14px 8px 0; font-size: 14px; }
.lateral .eu strong { display: block; color: #fff; font-weight: 600; }
.lateral .eu span { color: #7fa6bb; font-size: 13px; overflow-wrap: anywhere; }
.lateral .eu .btn { margin-top: 10px; color: #cfe4ef; padding: 0; min-height: 30px; }
.lateral .eu .btn:hover { background: none; color: #fff; }

.principal { min-width: 0; }
.topo-movel { display: none; }
.conteudo { padding: 28px clamp(16px, 3vw, 40px) 64px; max-width: 1360px; }
.cabeca { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.cabeca h1 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; }
.cabeca .sub { color: var(--apagado); margin-top: 4px; }
.migalha { font-size: 14px; color: var(--apagado); margin-bottom: 6px; }
.migalha a { color: var(--apagado); text-decoration: none; }
.migalha a:hover { color: var(--petroleo); }

/* Topo do cliente */
.topo-cliente { background: var(--cartao); border-bottom: 1px solid var(--linha); position: sticky; top: 0; z-index: 20; }
.topo-cliente .linha { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(16px, 3vw, 40px); max-width: 1440px; margin: 0 auto; }
.topo-cliente .logo { width: 128px; }
.topo-cliente .dir { display: flex; align-items: center; gap: 8px; }
.menu-usuario { position: relative; }
.menu-usuario > button { display: flex; align-items: center; gap: 10px; background: none; border: 1px solid var(--linha); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--petroleo); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.menu-usuario .lista { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra); min-width: 220px; padding: 6px; display: none; }
.menu-usuario.aberto .lista { display: block; }
.menu-usuario .lista button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.menu-usuario .lista button:hover { background: var(--fundo); }
.conteudo-cliente { max-width: 1440px; margin: 0 auto; padding: 26px clamp(16px, 3vw, 40px) 64px; }

/* ───────── Painel ───────── */
.painel-cabeca { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.painel-cabeca h1 { font-size: clamp(26px, 3vw, 38px); font-weight: 600; }
.ao-vivo { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; color: var(--apagado); }
.ao-vivo .ponto { width: 9px; height: 9px; border-radius: 50%; background: var(--w7-verde); box-shadow: 0 0 0 0 rgba(39, 165, 72, .5); animation: pulsa 2s infinite; }
.ao-vivo.atraso .ponto { background: var(--w7-amarelo); animation: none; }
.ao-vivo.parado .ponto { background: var(--w7-vermelho); animation: none; }
@keyframes pulsa { 70% { box-shadow: 0 0 0 9px rgba(39, 165, 72, 0); } 100% { box-shadow: 0 0 0 0 rgba(39, 165, 72, 0); } }
.ferramentas { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.periodo { display: flex; background: var(--cartao); border: 1px solid var(--linha); border-radius: 999px; padding: 4px; gap: 2px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.periodo::-webkit-scrollbar { display: none; }
.periodo button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; font-size: 14px; color: var(--texto); font-weight: 500; }
.periodo button:hover { color: var(--petroleo); }
.periodo button.ativo { background: var(--petroleo); color: #fff; }
.periodo-custom { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.periodo-custom input { min-height: 38px; border: 1px solid var(--linha-forte); border-radius: var(--raio-p); padding: 0 10px; background: #fff; }

/* Faixa principal: investimento + resultado + batimento diário */
.destaque { position: relative; background: var(--petroleo-fundo); color: #fff; border-radius: var(--raio-g); padding: 26px clamp(20px, 3vw, 34px) 0; overflow: hidden; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.destaque .bloco { position: relative; z-index: 1; padding-bottom: 18px; min-width: 0; }
.destaque .bloco + .bloco { border-left: 1px solid rgba(150, 205, 232, .16); padding-left: 28px; }
.destaque .rot { font-size: 14px; color: #9cc6da; display: flex; align-items: center; gap: 8px; }
.destaque .valor { font-size: clamp(30px, 3.6vw, 46px); font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.05; overflow-wrap: anywhere; }
.destaque .valor small { font-size: .5em; font-weight: 400; color: #9cc6da; margin-left: 4px; }
.destaque .compara { margin-top: 8px; font-size: 13.5px; color: #9cc6da; }
.destaque .grafico-batimento { grid-column: 1 / -1; position: relative; height: 92px; margin: 6px calc(-1 * clamp(20px, 3vw, 34px)) 0; }
.destaque .grafico-batimento svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; border-radius: 999px; padding: 1px 8px; font-size: 12.5px; }
.delta.sobe { background: rgba(39, 165, 72, .18); color: #7fe0a0; }
.delta.desce { background: rgba(226, 59, 59, .2); color: #ffa3a3; }
.delta.neutro { background: rgba(255, 255, 255, .1); color: #cfe4ef; }
.claro .delta.sobe { background: var(--bom-fundo); color: var(--bom); }
.claro .delta.desce { background: var(--critico-fundo); color: var(--critico); }
.claro .delta.neutro { background: var(--fundo); color: var(--apagado); }

.tipos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tipos span { font-size: 12.5px; background: rgba(150, 205, 232, .14); color: #cfe4ef; padding: 3px 10px; border-radius: 999px; }

/* Ficha de métricas secundárias (uma faixa só, divisórias finas) */
.ficha { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--cartao); border: 1px solid var(--linha); border-radius: var(--raio); margin-top: 16px; overflow: hidden; }
.ficha > div { padding: 14px 16px; min-width: 0; }
.ficha > div + div { border-left: 1px solid var(--linha); }
.ficha dt { font-size: 13px; color: var(--apagado); display: flex; align-items: center; gap: 6px; }
.ficha dd { margin: 4px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.ficha .nd { color: var(--apagado); font-weight: 400; font-size: 15px; }
.info-i { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--linha-forte); font-size: 10px; color: var(--apagado); cursor: help; }

.secao { margin-top: 26px; }
.secao-cabeca { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.secao-cabeca h2 { font-size: 20px; font-weight: 600; }
.secao-cabeca .sub { color: var(--apagado); font-size: 14px; }
.cartao { background: var(--cartao); border: 1px solid var(--linha); border-radius: var(--raio); }
.cartao.pad { padding: 20px; }

/* Gráfico diário */
.grafico { padding: 18px 18px 10px; }
.grafico .legenda { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--texto); margin-bottom: 8px; }
.grafico .legenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.grafico .area { position: relative; height: 260px; }
.grafico svg { width: 100%; height: 100%; overflow: visible; }
.grafico .barra { fill: color-mix(in srgb, var(--petroleo-claro) 26%, white); transition: fill .12s; }
.grafico .barra.ativa { fill: var(--petroleo-claro); }
.grafico .linha-res { fill: none; stroke: var(--petroleo); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.grafico .ponto-res { fill: #fff; stroke: var(--petroleo); stroke-width: 2; }
.grafico .grade { stroke: var(--linha); stroke-width: 1; }
.grafico .eixo { fill: var(--apagado); font-size: 11.5px; font-family: var(--fonte); }
.dica { position: absolute; pointer-events: none; background: var(--petroleo-noite); color: #fff; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.45; box-shadow: var(--sombra); white-space: nowrap; z-index: 5; transform: translate(-50%, calc(-100% - 12px)); }
.dica b { font-weight: 600; }

/* Duas colunas: tipos de resultado + detalhamentos */
.duas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--linha); padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.abas button { background: none; border: 0; padding: 14px 10px 12px; cursor: pointer; color: var(--apagado); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.abas button.ativo { color: var(--petroleo); border-bottom-color: var(--petroleo); }
.barras { padding: 14px 18px 18px; display: grid; gap: 12px; }
.barras .item { display: grid; grid-template-columns: minmax(110px, 34%) minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 14px; }
.barras .nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--texto); }
.barras .trilho { height: 10px; background: var(--fundo); border-radius: 99px; overflow: hidden; }
.barras .trilho i { display: block; height: 100%; border-radius: 99px; background: var(--petroleo-claro); }
.barras .item:nth-child(4n+2) .trilho i { background: var(--petroleo); }
.barras .vlr { font-weight: 600; text-align: right; min-width: 74px; }
.barras .vlr small { display: block; font-weight: 400; color: var(--apagado); font-size: 12px; }
.vazio { padding: 32px 20px; text-align: center; color: var(--apagado); }
.vazio strong { display: block; color: var(--tinta); font-size: 16px; margin-bottom: 4px; }

/* Tabela hierárquica */
.tabela-wrap { overflow-x: auto; }
table.hier { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 980px; }
table.hier th { text-align: right; font-weight: 500; color: var(--apagado); font-size: 13px; padding: 12px 14px; border-bottom: 1px solid var(--linha); background: #f8fafb; position: sticky; top: 0; white-space: nowrap; }
table.hier th:first-child { text-align: left; }
table.hier td { padding: 12px 14px; border-bottom: 1px solid var(--linha); text-align: right; white-space: nowrap; vertical-align: middle; }
table.hier td:first-child { text-align: left; white-space: normal; }
table.hier tr.campanha > td { background: #fff; }
table.hier tr.campanha:hover > td, table.hier tr.conjunto:hover > td { background: #f6fafc; }
table.hier tr.conjunto > td { background: #fbfdfe; }
table.hier tr.anuncio > td { background: #fff; }
table.hier tr:last-child td { border-bottom: 0; }
.nome-linha { display: flex; align-items: center; gap: 10px; min-width: 260px; }
.nome-linha .abre { flex: none; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--linha); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--petroleo); transition: transform .15s; }
.nome-linha .abre svg { width: 14px; height: 14px; transition: transform .15s; }
.nome-linha .abre[aria-expanded="true"] svg { transform: rotate(90deg); }
.nome-linha .espaco { width: 26px; flex: none; }
.nome-linha .txt { min-width: 0; }
.nome-linha .txt b { font-weight: 600; display: block; overflow-wrap: anywhere; }
.nome-linha .txt span { font-size: 12.5px; color: var(--apagado); }
tr.conjunto .nome-linha { padding-left: 22px; }
tr.anuncio .nome-linha { padding-left: 44px; }
.miniatura { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--fundo); flex: none; border: 1px solid var(--linha); }
.miniatura.sem { display: grid; place-items: center; color: var(--apagado); }
.miniatura.sem svg { width: 18px; height: 18px; }
.estado { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--fundo); color: var(--apagado); white-space: nowrap; }
.estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.estado.ativo { background: var(--bom-fundo); color: var(--bom); }
.estado.pausado { background: #eef2f4; color: #5b6f7b; }
.estado.problema { background: var(--atencao-fundo); color: var(--atencao); }
.estado.erro { background: var(--critico-fundo); color: var(--critico); }
.res-tipo { display: block; font-size: 12px; color: var(--apagado); }
.tabela-movel { display: none; }

/* Gaveta do anúncio */
.veu { position: fixed; inset: 0; background: rgba(6, 31, 46, .45); z-index: 50; display: flex; justify-content: flex-end; }
.gaveta { width: min(520px, 100%); height: 100%; background: #fff; overflow-y: auto; box-shadow: -20px 0 40px -20px rgba(6, 31, 46, .4); animation: entra .2s ease-out; display: flex; flex-direction: column; }
@keyframes entra { from { transform: translateX(24px); opacity: .6; } }
.gaveta .topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--linha); position: sticky; top: 0; background: #fff; z-index: 1; }
.gaveta .topo h3 { font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.gaveta .corpo { padding: 20px 22px 32px; display: grid; gap: 18px; }
.fechar { background: var(--fundo); border: 0; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; flex: none; }
.fechar svg { width: 18px; height: 18px; }
.previa-anuncio { border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; }
.previa-anuncio img { width: 100%; max-height: 380px; object-fit: contain; background: var(--fundo); }
.previa-anuncio .txt { padding: 14px 16px; display: grid; gap: 6px; }
.previa-anuncio .txt .chip { justify-self: start; }
.previa-anuncio .txt p { white-space: pre-line; color: var(--texto); font-size: 14px; }
.grade-metricas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; }
.grade-metricas > div { padding: 12px 14px; border-bottom: 1px solid var(--linha); }
.grade-metricas > div:nth-child(odd) { border-right: 1px solid var(--linha); }
.grade-metricas dt { font-size: 13px; color: var(--apagado); }
.grade-metricas dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(6, 31, 46, .5); z-index: 60; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal .caixa { background: #fff; border-radius: var(--raio-g); width: min(560px, 100%); box-shadow: 0 30px 60px -20px rgba(6, 31, 46, .5); animation: sobe .18s ease-out; }
@keyframes sobe { from { transform: translateY(10px); opacity: .5; } }
.modal .caixa > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 22px 0; }
.modal .caixa > header h3 { font-size: 20px; font-weight: 600; }
.modal .caixa > .corpo { padding: 18px 22px 22px; }
.senha-gerada { display: flex; align-items: center; gap: 10px; background: var(--petroleo-gelo); border-radius: var(--raio-p); padding: 12px 14px; font-family: ui-monospace, Consolas, monospace; font-size: 16px; justify-content: space-between; flex-wrap: wrap; }
.senha-gerada .btn { font-family: var(--fonte); }

/* Listas do admin */
.lista-clientes { display: grid; gap: 10px; }
.cliente-linha { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr) minmax(0, .9fr) auto; gap: 16px; align-items: center; padding: 16px 18px; background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.cliente-linha:hover { border-color: var(--linha-forte); box-shadow: var(--sombra); }
.cliente-linha .nome b { font-size: 16px; font-weight: 600; display: block; }
.cliente-linha .nome span, .cliente-linha .meta { font-size: 13.5px; color: var(--apagado); }
.cliente-linha .contas { display: flex; flex-wrap: wrap; gap: 6px; }
.cliente-linha .gasto { text-align: right; }
.cliente-linha .gasto b { display: block; font-size: 16px; font-weight: 600; }
.cliente-linha.inativo { opacity: .6; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--fundo); color: var(--texto); max-width: 100%; }
.chip .bola { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--apagado); }
.chip.ok .bola { background: var(--w7-verde); }
.chip.reauth .bola, .chip.error .bola { background: var(--w7-vermelho); }
.chip.pending .bola { background: var(--w7-amarelo); }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabela-simples { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela-simples th { text-align: left; font-weight: 500; color: var(--apagado); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--linha); }
.tabela-simples td { padding: 12px 14px; border-bottom: 1px solid var(--linha); vertical-align: middle; }
.tabela-simples tr:last-child td { border-bottom: 0; }
.tabela-simples .acoes { text-align: right; white-space: nowrap; }

.abas-pagina { display: flex; gap: 4px; border-bottom: 1px solid var(--linha); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.abas-pagina a { padding: 12px 14px; color: var(--apagado); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.abas-pagina a.ativo { color: var(--petroleo); border-bottom-color: var(--petroleo); }

.conta-escolha { display: grid; gap: 8px; max-height: 340px; overflow-y: auto; margin: 4px 0; }
.conta-escolha label { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--linha); border-radius: var(--raio-p); cursor: pointer; }
.conta-escolha label:hover { border-color: var(--linha-forte); }
.conta-escolha input { accent-color: var(--petroleo); width: 18px; height: 18px; }
.conta-escolha .txt { min-width: 0; flex: 1; }
.conta-escolha .txt b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.conta-escolha .txt span { font-size: 13px; color: var(--apagado); }
.conta-escolha label.usada { opacity: .55; }

.passos { display: grid; gap: 10px; counter-reset: passo; margin: 0; padding: 0; list-style: none; }
.passos li { counter-increment: passo; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; font-size: 14px; color: var(--texto); }
.passos li::before { content: counter(passo); width: 26px; height: 26px; border-radius: 50%; background: var(--petroleo-gelo); color: var(--petroleo); font-weight: 600; display: grid; place-items: center; font-size: 13px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--petroleo-noite); color: #fff; padding: 12px 18px; border-radius: 999px; z-index: 80; box-shadow: var(--sombra); font-size: 14px; max-width: calc(100% - 32px); animation: sobe .18s ease-out; }
.toast.erro { background: #8f1f1f; }
.carregando { opacity: .55; pointer-events: none; transition: opacity .15s; }
.esqueleto { background: linear-gradient(90deg, #e7eef2, #f3f7f9, #e7eef2); background-size: 200% 100%; animation: brilho 1.2s linear infinite; border-radius: var(--raio); }
@keyframes brilho { to { background-position: -200% 0; } }

/* ───────── Responsivo ───────── */
@media (max-width: 1180px) {
  .ficha { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ficha > div:nth-child(5) { border-left: 0; }
  .ficha > div:nth-child(n+5) { border-top: 1px solid var(--linha); }
  .duas { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .casca { grid-template-columns: minmax(0, 1fr); }
  .lateral { display: none; }
  .lateral.aberta { display: flex; position: fixed; inset: 0 30% 0 0; z-index: 70; height: 100%; }
  .topo-movel { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--petroleo-fundo); position: sticky; top: 0; z-index: 30; }
  .topo-movel .logo { width: 110px; }
  .topo-movel button { background: none; border: 0; color: #fff; width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; }
  .entrada { grid-template-columns: minmax(0, 1fr); }
  .entrada-marca { display: none; }
  .entrada-form .logo-movel { display: block; }
  .cliente-linha { grid-template-columns: minmax(0, 1fr) auto; }
  .cliente-linha .contas { grid-column: 1 / -1; order: 3; }
  .cliente-linha .meta { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .destaque { grid-template-columns: minmax(0, 1fr); padding-top: 20px; }
  .destaque .bloco + .bloco { border-left: 0; padding-left: 0; border-top: 1px solid rgba(150, 205, 232, .16); padding-top: 14px; }
  .destaque .bloco { padding-bottom: 14px; }
  .ficha { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ficha > div { border-left: 0 !important; border-top: 1px solid var(--linha); }
  .ficha > div:nth-child(-n+2) { border-top: 0; }
  .ficha > div:nth-child(even) { border-left: 1px solid var(--linha) !important; }
  .grafico .area { height: 210px; }
  .tabela-wrap { display: none; }
  .tabela-movel { display: grid; gap: 10px; }
  .cm { background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; }
  .cm > button { width: 100%; text-align: left; background: none; border: 0; padding: 14px 16px; cursor: pointer; display: grid; gap: 8px; }
  .cm .cab { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
  .cm .cab b { font-weight: 600; overflow-wrap: anywhere; }
  .cm .nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 13px; color: var(--apagado); }
  .cm .nums strong { display: block; color: var(--tinta); font-size: 15px; font-weight: 600; }
  .cm .filhos { border-top: 1px solid var(--linha); background: #fbfdfe; padding: 4px 0; }
  .cm .filhos .cm { border: 0; border-radius: 0; background: transparent; border-bottom: 1px solid var(--linha); }
  .cm .filhos .cm:last-child { border-bottom: 0; }
  .cm .filhos > .cm > button { padding-left: 24px; }
  .cm .filhos .filhos > .cm > button { padding-left: 32px; }
  .cm .anuncio-cab { display: flex; gap: 10px; align-items: center; }
  .barras .item { grid-template-columns: minmax(0, 1fr) auto; }
  .barras .trilho { grid-column: 1 / -1; order: 3; }
  .gaveta { width: 100%; }
  .painel-cabeca .ferramentas { width: 100%; }
  .topo-cliente .logo { width: 104px; }
  .menu-usuario .nome-usuario { display: none; }
  .tabela-simples.responsiva thead { display: none; }
  .tabela-simples.responsiva tr { display: grid; gap: 4px; padding: 12px 14px; border-bottom: 1px solid var(--linha); }
  .tabela-simples.responsiva td { padding: 0; border: 0; }
  .tabela-simples.responsiva .acoes { text-align: left; margin-top: 6px; }
}

/* ───────── Relatório (impressão / PDF) ───────── */
.so-impressao { display: none; }
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; font-size: 11.5px; }
  .topo-cliente, .lateral, .topo-movel, .ferramentas, .abas, .nao-imprime, .abre, .toast, .periodo-custom { display: none !important; }
  .casca { display: block; }
  .conteudo, .conteudo-cliente { padding: 0; max-width: none; }
  .so-impressao { display: block; }
  .cabeca-relatorio { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--petroleo); padding-bottom: 10px; margin-bottom: 14px; }
  .cabeca-relatorio img { width: 130px; }
  .cabeca-relatorio .dir { text-align: right; color: var(--texto); }
  .destaque { break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ficha, .cartao, .grafico { break-inside: avoid; }
  .tabela-wrap { display: block !important; overflow: visible; }
  .tabela-movel { display: none !important; }
  table.hier { min-width: 0; font-size: 10.5px; }
  table.hier th { position: static; }
  table.hier td, table.hier th { padding: 6px 8px; }
  tr.oculta-relatorio { display: table-row !important; }
  .miniatura { width: 30px; height: 30px; }
  .duas { grid-template-columns: 1fr 1fr; }
  .secao { margin-top: 14px; break-inside: avoid-page; }
  .ficha { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .ficha > div { border-top: 0 !important; border-left: 1px solid var(--linha) !important; padding: 10px 12px; }
  .ficha > div:first-child { border-left: 0 !important; }
  .ficha dd { font-size: 15px; }
  .abas { display: flex !important; }
  .abas button:not(.ativo) { display: none; }
  .rodape-relatorio { margin-top: 18px; font-size: 10px; color: var(--apagado); border-top: 1px solid var(--linha); padding-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.lateral .eu .btn + .btn { margin-left: 16px; }
