/* Mesmo visual do sistema de Isenção de IR (isencao-ir-aposentadoria/public/estilo.css), com os cartões dos sistemas. */
:root {
  --bg: #f4f2ee; --surface: #ffffff; --ink: #1d232b; --muted: #66707c;
  --line: #e2ddd5; --campo: #cfc8bd; --accent: #1f4e5f; --accent-dark: #173c49; --accent-soft: #e5eef1;
  --req: #b0412e; --ok: #2f7a4d; --cond: #8a6d1d; --cond-soft: #fbf5e3;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 "Segoe UI", system-ui, sans-serif; }
a { color: var(--accent); }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 80px; }
h1 { font-size: 22px; margin: 0 0 16px; color: var(--accent); }
h2 { font-size: 18px; margin: 28px 0 12px; color: var(--accent); }

/* Topo fixo com a logo branca. */
.topo { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  padding: 10px 24px; background: var(--accent); color: #fff; }
.topo a { color: #fff; text-decoration: none; }
.marca { display: flex; align-items: center; gap: 22px; margin-right: auto; }
.marca img { height: 46px; width: auto; }
.marca span { font-size: 17px; font-weight: 600; padding-left: 22px; border-left: 1px solid rgba(255,255,255,.35); line-height: 30px; }

/* Marca-d'água: logo grande, centralizada e transparente, fixa no fundo das páginas internas. */
body.com-marca::before { content: ""; position: fixed; inset: 66px 0 0; z-index: 0; pointer-events: none;
  background: url("img/logo.png") center / min(560px, 70vw) auto no-repeat; opacity: .07; }
body.com-marca main { position: relative; z-index: 1; }
.topo nav { display: flex; gap: 6px; }
.topo nav a { padding: 6px 12px; border-radius: 99px; font-size: 14px; }
.topo nav a:hover { background: rgba(255,255,255,.12); }
.topo nav a.ativo { background: rgba(255,255,255,.2); font-weight: 600; }
.conta { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.conta .pill { background: rgba(255,255,255,.15); border-radius: 99px; padding: 3px 12px; }
.conta form { margin: 0; }
.conta a, .conta button.link { color: #fff; font-size: 14px; text-decoration: none; }
.conta a:hover, .conta button.link:hover { text-decoration: underline; background: none; }

/* Cartões e blocos. */
.cartao { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; margin: 0 0 18px; }
.cartao h2 { margin-top: 0; }
.estreito { max-width: 480px; }
.cabecalho { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.cabecalho h1 { margin: 0; }
.grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.dica { background: var(--accent-soft); border-radius: 6px; padding: 10px 12px; font-size: 14px; color: #234; margin: 10px 0; }

/* Tela de login: cartão central com a logo colorida. */
.entrada { max-width: 420px; margin: 40px auto 0; text-align: center; }
.entrada img { width: 220px; height: auto; margin-bottom: 8px; }
.entrada .cartao { text-align: left; }
.entrada p.sub { color: var(--muted); margin: 0 0 18px; }

/* Campos. */
label { display: block; margin: 0 0 14px; font-weight: 600; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 8px 10px; font: inherit; font-weight: 400;
  border: 1px solid var(--campo); border-radius: 6px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }

/* Botões: principal cheio; secundário com contorno (como o .btn do formulário). */
button, .botao { display: inline-block; padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 600; color: #fff;
  background: var(--accent); border: 1px solid var(--accent); border-radius: 6px; cursor: pointer; text-decoration: none; }
button:hover, .botao:hover { background: var(--accent-dark); }
.botao.secundario { background: #fff; color: var(--accent); }
.botao.secundario:hover { background: var(--accent-soft); }
button.link { background: none; border: 0; color: var(--accent); padding: 0; font-weight: 400; text-decoration: underline; }
.acoes { display: flex; align-items: center; gap: 16px; }
.linha { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.linha label, .linha select, .linha input { margin: 0; width: auto; flex: 1 1 180px; }
.filtro { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0 0 16px; }
.filtro label { margin: 0; flex: 0 1 320px; }

/* Tabelas. */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid #f0ece6; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th { background: #faf8f5; color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
tbody tr:hover td { background: #fcfbf9; }
tr.inativo td { color: var(--muted); }
.acoes-tabela form { margin: 0 0 6px; }
.acoes-tabela details summary { cursor: pointer; color: var(--accent); }
.acoes-tabela details form { margin-top: 6px; }
/* Mensagens. */
.erro { color: var(--req); background: #fbecea; padding: 10px 12px; border-radius: 6px; }
.sucesso { color: var(--ok); background: #e3f1e8; padding: 10px 12px; border-radius: 6px; }
.aviso { color: var(--cond); background: var(--cond-soft); border-left: 3px solid var(--cond); padding: 10px 12px; border-radius: 0 6px 6px 0; }
.vazio { color: var(--muted); }
.pill-claro { background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 3px 12px; font-size: 13px; }

/* Cartões dos sistemas na tela inicial. */
.sistemas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.sistema { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.sistema img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.sistema .texto { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px 22px; }
.sistema h2 { margin: 0; }
.sistema p { margin: 0; color: var(--muted); }
a.sistema:hover, a.sistema:focus-visible { border-color: var(--accent); box-shadow: 0 6px 18px rgba(31,78,95,.12); transform: translateY(-2px); }
/* Em breve: imagem acinzentada e texto apagado, sem link. */
.sistema.em-breve img { filter: grayscale(.85); opacity: .55; }
.sistema.em-breve h2, .sistema.em-breve p { opacity: .6; }
.sistema .pill-claro { align-self: flex-start; margin-top: 6px; }
.acessos { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 6px; }
.acessos label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.acessos input { display: inline; width: auto; margin: 0; }
fieldset.acessos { border: 0; padding: 0; margin: 0 0 14px; }
fieldset.acessos legend { width: 100%; padding: 0; margin-bottom: 6px; font-weight: 600; }
table + .cartao { margin-top: 24px; }

@media (max-width: 760px) {
  .topo { padding: 10px 16px; }
  .marca span { display: none; }
  body.com-marca::before { inset: 60px 0 0; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  td { border: 0; padding: 4px 14px; }
}
