/* Wiki da Benel — casca do site. Cores e fontes vêm de /padrao/tokens/css/benel-tokens.css */
* { box-sizing: border-box; }
html { scroll-padding-top: 70px; }
body { margin: 0; font-family: var(--bn-fonte); color: var(--bn-texto); background: var(--bn-fundo); font-size: 14px; line-height: 1.5; }
a { color: var(--bn-verde-700); }
code { font-size: .9em; background: var(--bn-neutro-100); padding: 1px 4px; border-radius: 4px; }

/* topo */
.topo { position: sticky; top: 0; z-index: 30; height: 52px; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--bn-petroleo); color: #fff; }
.topo__menu { display: none; background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; }
.topo__marca { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.topo__marca img { height: 22px; display: block; }
.selo { background: #fff; color: var(--bn-petroleo); font-weight: 900; font-size: 10px; padding: 2px 7px; border-radius: 999px; letter-spacing: .06em; }
.topo__busca { flex: 1; max-width: 520px; }
.topo__busca input { width: 100%; height: 34px; border-radius: 999px; border: 0; padding: 0 16px; font: inherit; font-size: 13px; background: rgb(255 255 255 / .12); color: #fff; }
.topo__busca input::placeholder { color: rgb(255 255 255 / .6); }
.topo__busca input:focus { outline: 2px solid var(--bn-verde); background: #fff; color: var(--bn-texto); }
.topo__acoes { display: flex; align-items: center; gap: 14px; margin-left: auto; font-size: 13px; }
.topo__acoes a { color: #fff; text-decoration: none; opacity: .9; white-space: nowrap; }
.topo__acoes a:hover { opacity: 1; color: var(--bn-verde); }
.topo__usuario { display: flex; align-items: center; gap: 6px; }
.topo__usuario span { width: 26px; height: 26px; border-radius: 50%; background: var(--bn-verde); color: var(--bn-petroleo); display: grid; place-items: center; font-weight: 900; font-size: 12px; }
.topo__sair { border: 1px solid rgb(255 255 255 / .3); border-radius: 999px; padding: 3px 10px; }
.faixa-marca { display: flex; height: 3px; }
.faixa-marca i { flex: 1; } .faixa-marca i:nth-child(1) { background: var(--bn-petroleo-claro); } .faixa-marca i:nth-child(2) { background: var(--bn-verde); } .faixa-marca i:nth-child(3) { background: var(--bn-azul); } .faixa-marca i:nth-child(4) { background: var(--bn-verde-sucesso); }

/* corpo */
.corpo { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 55px - 28px); }
.lateral { background: #fff; border-right: 1px solid var(--bn-borda); padding: 10px 8px 24px; position: sticky; top: 55px; height: calc(100vh - 55px); overflow: auto; scrollbar-width: thin; }
.lateral a { display: block; padding: 4px 10px; border-radius: 8px; color: var(--bn-texto); text-decoration: none; font-size: 13px; }
.lateral a:hover { background: var(--bn-fundo-alt); }
.lateral a.ativo { background: var(--bn-petroleo); color: #fff; font-weight: 700; }
.lateral__inicio { font-weight: 700; }
.lateral__grupo { margin: 12px 10px 2px; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--bn-verde-700); }
.conteudo { padding: 16px 20px 32px; min-width: 0; }
.rodape { background: var(--bn-petroleo); color: rgb(255 255 255 / .85); font-size: 11px; text-align: center; padding: 6px; }
.rodape a { color: var(--bn-verde); }

/* componentes */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: 12px; border: 0; font: inherit; font-weight: 800; font-size: 14px; text-decoration: none; cursor: pointer; }
.btn--primario { background: var(--bn-verde); color: var(--bn-petroleo); }
.btn--primario:hover { box-shadow: 0 10px 25px -5px rgb(134 209 5 / .4); }
.btn--claro { background: rgb(255 255 255 / .12); color: #fff; border: 1px solid rgb(255 255 255 / .35); }
.btn--sec { background: #fff; color: var(--bn-petroleo); border: 1px solid var(--bn-borda); }
.alerta { padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.alerta--sucesso { background: #ECFDF5; color: #047857; }
.alerta--erro { background: #FDECEC; color: #B20F0F; }
.alerta--aviso { background: #FFF7E6; color: #9A5B00; }
.cartao { background: #fff; border-radius: 16px; box-shadow: var(--bn-sombra-card); padding: 12px 14px; min-width: 0; }
.cartao h3 { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.titulo { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 10px; }
.titulo small { font-size: 12px; font-weight: 500; color: var(--bn-texto-suave); margin-left: 8px; }
.sub { color: var(--bn-texto-2); margin: 0 0 12px; }
.vazio { text-align: center; padding: 60px 20px; }

/* início */
.hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px; align-items: center; background: linear-gradient(160deg, rgb(0 49 46 / .98), rgb(0 71 67 / .92)); color: #fff; border-radius: 16px; padding: 18px 20px; overflow: hidden; }
.hero .sobre { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--bn-verde); }
.hero h1 { margin: 4px 0 6px; font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.hero p { margin: 0 0 12px; color: rgb(255 255 255 / .8); }
.hero code { background: rgb(255 255 255 / .12); color: var(--bn-verde); }
.hero__acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.hero__ilus { width: 100%; background: rgb(255 255 255 / .94); border-radius: 12px; padding: 6px; }
.atalhos { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-top: 12px; }
.atalhos--lista { grid-template-columns: repeat(4, 1fr); margin: 0 0 12px; }
.atalho { background: #fff; border-radius: 14px; box-shadow: var(--bn-sombra-card); padding: 10px; text-decoration: none; color: var(--bn-texto); display: flex; flex-direction: column; gap: 2px; border: 1px solid transparent; }
.atalho:hover { border-color: var(--bn-verde); }
.atalho b { font-size: 13px; line-height: 1.2; } .atalho small { font-size: 11px; color: var(--bn-texto-suave); line-height: 1.25; }
.ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 16px; margin-bottom: 4px; }
.ico--lima { background: linear-gradient(135deg, #BEF264, #5FA300); color: var(--bn-petroleo); }
.ico--verde { background: linear-gradient(135deg, #34D058, #007A00); }
.ico--teal { background: linear-gradient(135deg, #2DD4BF, #0B7F73); }
.ico--petroleo { background: linear-gradient(135deg, #1B8079, #00312E); }
.ico--ambar { background: linear-gradient(135deg, #FCD34D, #E98A03); }
.ico--azul { background: linear-gradient(135deg, #4D9BFF, #0350C2); }
.avatares-mini { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.avatares-mini img { width: 40px; height: 40px; border-radius: 50%; }

/* página markdown */
.pagina { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 20px; align-items: start; }
.md { background: #fff; border-radius: 16px; box-shadow: var(--bn-sombra-card); padding: 16px 22px 24px; position: relative; min-width: 0; }
.md__acoes { position: absolute; right: 14px; top: 14px; display: flex; gap: 6px; }
.md__acoes a, .md__acoes button { font: inherit; font-size: 11px; font-weight: 700; border: 1px solid var(--bn-borda); background: #fff; color: var(--bn-texto); border-radius: 999px; padding: 3px 10px; cursor: pointer; text-decoration: none; }
.md h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0 120px 10px 0; }
.md h2 { font-size: 17px; font-weight: 800; margin: 20px 0 6px; padding-top: 8px; border-top: 1px solid var(--bn-borda); }
.md h3 { font-size: 14px; font-weight: 800; margin: 14px 0 4px; }
.md p, .md li { font-size: 14px; }
.md p { margin: 0 0 8px; }
.md ul, .md ol { padding-left: 20px; margin: 0 0 8px; }
.md img { max-width: 100%; height: auto; border-radius: 8px; }
.md table img { max-height: 120px; }
.md blockquote { margin: 0 0 10px; padding: 8px 14px; border-left: 4px solid var(--bn-verde); background: var(--bn-verde-50); border-radius: 0 10px 10px 0; }
.md pre { background: #0b1f1d; color: #e2e8f0; padding: 10px 12px; border-radius: 10px; overflow: auto; font-size: 12px; line-height: 1.45; }
.md pre code { background: none; padding: 0; color: inherit; }
.tab-doc { margin: 4px 0 12px; max-height: none; border: 0; }
.md .bn-tabela td { white-space: normal; }
.indice { position: sticky; top: 70px; font-size: 12px; max-height: calc(100vh - 90px); overflow: auto; }
.indice p { margin: 0 0 4px; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--bn-verde-700); }
.indice a { display: block; color: var(--bn-texto-2); text-decoration: none; padding: 2px 0 2px 8px; border-left: 2px solid var(--bn-borda); }
.indice a:hover { color: var(--bn-texto); border-color: var(--bn-verde); }
.indice a.n3 { padding-left: 18px; font-size: 11px; }

/* tabelas utilitárias */
.filtro-linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0; }
.filtro-linha h2 { font-size: 14px; margin: 0; }
.filtro-linha input, .form input, .form select { height: 38px; border: 1px solid var(--bn-borda); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 14px; color: var(--bn-texto); background: #fff; }
.filtro-linha input { height: 30px; width: 280px; font-size: 12px; }
form.inline { display: inline; }
.mini { font: inherit; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--bn-borda); background: #fff; color: var(--bn-texto); cursor: pointer; }
.mini:hover { border-color: var(--bn-verde); }
.mini.perigo { color: #B20F0F; }
td.acoes { white-space: nowrap; }

/* formulários */
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.form input:focus, .form select:focus { outline: 2px solid var(--bn-verde); border-color: transparent; }
.form__duas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form--linha { margin-top: 8px; }
.ajuda { color: var(--bn-texto-suave); font-size: 12px; margin-top: -4px; }
.links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; }

/* telas de acesso */
.acesso { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; background: #fff; }
.acesso__marca { position: relative; overflow: hidden; background: var(--bn-petroleo); color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
.acesso__logo { width: 260px; margin-bottom: 28px; position: relative; }
.acesso__marca h1 { font-size: 36px; font-weight: 900; letter-spacing: -.03em; margin: 0 0 6px; position: relative; }
.acesso__marca p { font-size: 16px; color: var(--bn-verde-200); max-width: 420px; margin: 0 0 16px; position: relative; }
.acesso__marca ul { margin: 0; padding: 0; list-style: none; position: relative; }
.acesso__marca li { padding: 4px 0 4px 22px; position: relative; font-size: 14px; color: rgb(255 255 255 / .85); }
.acesso__marca li::before { content: ''; position: absolute; left: 0; top: 9px; width: 10px; height: 10px; border-radius: 50%; border: 3px solid var(--bn-verde); }
.acesso__graf span { position: absolute; border-radius: 50%; }
.acesso__graf span:nth-child(1) { width: 420px; height: 420px; right: -170px; top: -150px; background: var(--bn-azul); box-shadow: inset 0 0 0 0 transparent; }
.acesso__graf span:nth-child(1)::after { content: ''; position: absolute; inset: 105px; border-radius: 50%; background: var(--bn-petroleo); }
.acesso__graf span:nth-child(2) { width: 240px; height: 240px; left: 30%; bottom: -150px; border: 44px solid var(--bn-neon); }
.acesso__graf span:nth-child(3) { width: 160px; height: 160px; right: -50px; bottom: -40px; background: var(--bn-verde-sucesso); }
.acesso__form { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; background: var(--bn-fundo); }
.cartao-acesso { width: 100%; max-width: 400px; background: #fff; border-radius: 24px; box-shadow: var(--bn-sombra-card-lg); padding: 24px; }
.cartao-acesso h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.cartao-acesso .btn { width: 100%; height: 46px; margin-top: 4px; }
.acesso__rodape { margin-top: 14px; color: var(--bn-texto-suave); font-size: 11px; }

/* celular */
@media (max-width: 1100px) { .atalhos { grid-template-columns: repeat(4, 1fr); } .pagina { grid-template-columns: 1fr; } .indice { display: none; } }
@media (max-width: 860px) {
  .topo__menu { display: block; } .topo__acoes a:not(.topo__usuario):not(.topo__sair) { display: none; } .topo__busca { display: none; }
  .corpo { grid-template-columns: 1fr; }
  .lateral { position: fixed; left: 0; top: 55px; width: 260px; z-index: 25; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--bn-sombra-card-lg); }
  .menu-aberto .lateral { transform: none; }
  .hero, .grade-2 { grid-template-columns: 1fr; }
  .atalhos, .atalhos--lista { grid-template-columns: repeat(2, 1fr); }
  .acesso { grid-template-columns: 1fr; } .acesso__marca { padding: 28px 20px; } .acesso__marca ul, .acesso__marca p { display: none; } .acesso__logo { width: 180px; margin-bottom: 10px; } .acesso__marca h1 { font-size: 24px; }
  .conteudo { padding: 12px; } .md { padding: 14px; } .md h1 { margin-right: 0; margin-top: 24px; }
}

/* exportar PDF (imprimir) */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  .topo, .faixa-marca, .lateral, .rodape, .md__acoes, .indice, .alerta { display: none !important; }
  body { background: #fff; font-size: 11px; }
  .corpo { display: block; } .conteudo { padding: 0; } .pagina { display: block; }
  .md { box-shadow: none; padding: 0; }
  .md::before { content: ''; display: block; height: 30px; margin-bottom: 10px; background: url(/padrao/assets/logos/svg/benel-logo-petroleo.svg) no-repeat left center / auto 28px; border-bottom: 2px solid #86D105; }
  .md h2 { break-after: avoid; } .md table, .md img, .md pre { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.form input, .form select { width: 100%; min-width: 0; }
.form__duas > label { min-width: 0; }

/* ---------- blocos de código (styleguide): prévia, cores e copiar ---------- */
.codigo { margin: 6px 0 14px; border: 1px solid var(--bn-borda); border-radius: 14px; overflow: hidden; background: #0b1f1d; }
.codigo__barra { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; background: var(--bn-petroleo); color: #fff; }
.codigo__lang { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--bn-verde); }
.codigo__abas { display: flex; gap: 2px; background: rgb(255 255 255 / .08); border-radius: 999px; padding: 2px; }
.codigo__abas button { font: inherit; font-size: 11px; font-weight: 700; border: 0; background: none; color: rgb(255 255 255 / .75); padding: 3px 12px; border-radius: 999px; cursor: pointer; }
.codigo__abas button.ativa { background: var(--bn-verde); color: var(--bn-petroleo); }
.codigo__copiar { margin-left: auto; font: inherit; font-size: 11px; font-weight: 800; border: 1px solid rgb(255 255 255 / .25); background: none; color: #fff; border-radius: 999px; padding: 3px 12px; cursor: pointer; }
.codigo__copiar:hover { border-color: var(--bn-verde); color: var(--bn-verde); }
.codigo__copiar.ok { background: var(--bn-verde); color: var(--bn-petroleo); border-color: var(--bn-verde); }
.codigo pre { margin: 0 !important; border-radius: 0 !important; max-height: 520px; }
.previa { background: #fff; background-image: linear-gradient(45deg, #f6faf9 25%, transparent 25%), linear-gradient(-45deg, #f6faf9 25%, transparent 25%); background-size: 16px 16px; }
.previa__quadro { display: block; width: 100%; height: 160px; border: 0; background: transparent; }
/* tema de cores Benel para highlight.js (fundo petróleo escuro) */
.md pre code.hljs { display: block; background: none; color: #e2e8f0; }
.hljs-comment, .hljs-quote { color: #7a9c97; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-built_in, .hljs-meta .hljs-keyword { color: #86d105; font-weight: 600; }
.hljs-string, .hljs-attr-value, .hljs-regexp, .hljs-addition { color: #ffeb33; }
.hljs-attr, .hljs-attribute, .hljs-property, .hljs-selector-attr { color: #7fd4ff; }
.hljs-title, .hljs-title.function_, .hljs-section, .hljs-selector-class, .hljs-selector-id { color: #34d058; }
.hljs-name, .hljs-tag { color: #4d9bff; }
.hljs-number, .hljs-symbol, .hljs-bullet, .hljs-variable, .hljs-template-variable, .hljs-type { color: #fcd34d; }
.hljs-meta, .hljs-deletion { color: #f59e0b; }
.hljs-punctuation, .hljs-params { color: #cbd5e1; }
@media print { .codigo__barra button, .codigo__abas { display: none; } .previa[hidden] + pre, .codigo pre[hidden] { display: block !important; } }

/* ---------- acesso por código e CRUD de usuários ---------- */
.abas-acesso { display: flex; gap: 4px; background: var(--bn-neutro-100); padding: 3px; border-radius: 12px; margin: 6px 0 12px; }
.abas-acesso a { flex: 1; text-align: center; padding: 7px 8px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--bn-texto-2); text-decoration: none; }
.abas-acesso a.ativo { background: #fff; color: var(--bn-petroleo); box-shadow: var(--bn-sombra-card); }
.campo-codigo { font-size: 26px !important; font-weight: 900; letter-spacing: .4em; text-align: center; height: 54px !important; }
.btn--peq { height: 34px; padding: 0 14px; font-size: 13px; }
.form-admin { margin-bottom: 12px; }
.form--grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.form--grade label small { font-weight: 500; color: var(--bn-texto-suave); }
.checks { grid-column: 1 / -1; display: flex; gap: 18px; flex-wrap: wrap; }
.check { flex-direction: row !important; align-items: center; gap: 6px !important; font-weight: 600; }
.check input { width: 16px !important; height: 16px !important; accent-color: #86d105; }
.acoes-form { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.acoes-form .btn { height: 38px; }
a.mini { text-decoration: none; display: inline-block; }
@media (max-width: 860px) { .form--grade { grid-template-columns: 1fr; } }

/* ---------- gerador de avatares ---------- */
.av-redondo { border-radius: 50%; display: block; }
.av-grande { width: 230px; height: 230px; box-shadow: var(--bn-sombra-card-lg); }
.av-linha { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.av-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.av-cores { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.av-cores button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--bn-borda); cursor: pointer; }
.av-cores button.ativo { box-shadow: 0 0 0 3px var(--bn-verde); }
.av-tamanhos { display: flex; flex-direction: column; gap: 8px; min-width: 260px; }
.av-fundo { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; }
.av-fundo span { font-size: 13px; font-weight: 700; }
.av-fundo--escuro { background: #17212b; color: #fff; }
.av-fundo--claro { background: #fff; border: 1px solid var(--bn-borda); }
.sec-tit { font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin: 18px 0 8px; }
.av-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.av-item { background: #fff; border-radius: 14px; box-shadow: var(--bn-sombra-card); padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.av-item img { width: 110px; height: 110px; }
.av-item b { font-size: 12px; line-height: 1.2; } .av-item small { font-size: 10px; color: var(--bn-texto-suave); }

/* ---------- chaves de acesso ---------- */
.form--linha-unica { flex-direction: row; gap: 8px; align-items: center; }
.form--linha-unica input { flex: 1; height: 36px !important; }
.chave-nova code { font-size: 13px; background: #fff; padding: 3px 8px; border: 1px solid #f59e0b; user-select: all; }

/* ---------- checklist (listas de tarefas) ---------- */
.md li.tarefa { list-style: none; margin-left: -20px; display: flex; gap: 8px; align-items: flex-start; }
.tarefa__caixa { width: 16px; height: 16px; margin-top: 3px; accent-color: #86d105; flex: none; cursor: pointer; }
.tarefa__barra { display: flex; align-items: center; gap: 10px; margin: -4px 0 10px; font-size: 12px; font-weight: 700; color: var(--bn-verde-700); }
@media print { .tarefa__barra button { display: none; } }
