/* Portal de Reembolso — Grupo ICF
   Identidade do Grupo ICF (mesma do site grupoicf.com.br):
   azul-marinho #112942, verde #01c38e (sempre com texto azul-marinho por cima), fontes Geologica e Inter. */
:root {
  --brand: #112942;        /* azul-marinho ICF */
  --brand-950: #0b1d30;
  --brand-600: #1b4268;    /* links e realces sobre fundo claro */
  --brand-ink: #ffffff;
  --brand-soft: #e8eef5;

  --accent: #01c38e;       /* verde ICF */
  --accent-hover: #00b080;
  --accent-ink: #112942;   /* texto sobre o verde */
  --accent-soft: #e2f7f0;
  --accent-strong: #007a57; /* verde escuro, legível sobre branco */

  --display: Geologica, "Helvetica Neue", Arial, sans-serif;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e7ee;
  --border-strong: #cfd7e2;
  --text: #132233;
  --text-2: #4b5868;
  --text-3: #7a8696;
  --focus: #007a57;

  --amber: #a15c00;  --amber-bg: #fff3dc;
  --green: #18794e;  --green-bg: #e3f5ec;
  --red: #c4291c;    --red-bg: #fde9e7;
  --gray: #5b6675;   --gray-bg: #eef1f5;
  --note-bg: #fff8e1; --note-border: #f1d58a;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, .18);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  color: var(--text);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { line-height: 1.45; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-family: var(--display); font-size: 1.6rem; font-weight: 700; letter-spacing: -.015em; color: var(--brand); }
h2 { color: var(--brand); }
h2 { font-size: 1.08rem; font-weight: 650; }
h3 { font-size: .95rem; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); font-size: .86rem; }
.boot { display: grid; place-items: center; min-height: 50vh; color: var(--text-3); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Topo ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--brand); color: var(--brand-ink); box-shadow: inset 0 -3px 0 var(--accent); }
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 20px; min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; height: 31px; width: auto; }
.brand-sep { width: 1px; height: 26px; background: rgba(255,255,255,.25); }
.brand-text { font-family: var(--display); font-weight: 500; font-size: 1.02rem; letter-spacing: .01em; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: rgba(255,255,255,.82); padding: 8px 12px; border-radius: 7px; font-weight: 550; font-size: .92rem; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 7px 7px 2px 2px; }
.quem { display: flex; align-items: center; gap: 8px; font-size: .86rem; white-space: nowrap; }
.quem .chip-user { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.9); }
.avatar {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 700;
}
.quem button { background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 7px; padding: 4px 10px; font: inherit; font-size: .82rem; cursor: pointer; }
.quem button:hover { background: rgba(255,255,255,.1); }

@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; gap: 0 12px; padding: 10px 16px 3px; }
  .brand-logo { height: 26px; }
  .brand { flex: 1; }
  .nav { order: 3; flex-basis: 100%; margin: 6px -8px 0; padding-bottom: 6px; }
  .nav a { padding: 7px 10px; font-size: .88rem; }
  .quem .nome-user { display: none; }
}

/* ---------- Estrutura ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 28px 20px 64px; }
.narrow { max-width: 560px; margin: 0 auto; }
.medio { max-width: 760px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin-top: 4px; }
.stack > * + * { margin-top: 14px; }
@media (max-width: 720px) { .container { padding: 20px 16px 56px; } h1 { font-size: 1.35rem; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
@media (max-width: 720px) { .card { padding: 16px; } }

/* ---------- Início ---------- */
.hero { margin: 6px 0 22px; }
.hero h1 { font-size: 2rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }
.eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--accent); }
.hero p { margin-top: 6px; max-width: 620px; }
.acoes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.acao {
  display: flex; flex-direction: column; gap: 6px; padding: 20px; min-height: 150px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.acao:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 6px 18px rgba(17,41,66,.12); transform: translateY(-1px); }
.acao strong { font-family: var(--display); font-weight: 700; font-size: 1.08rem; margin-top: 8px; color: var(--brand); }
.acao span.desc { color: var(--text-2); font-size: .88rem; }
.acao-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); }
.acao.principal { background: var(--brand); color: #fff; border-color: var(--brand); }
.acao.principal strong { color: #fff; }
.acao.principal span.desc { color: rgba(255,255,255,.8); }
.acao.principal .acao-ico { background: var(--accent); color: var(--accent-ink); }
.acao.principal:hover { border-color: var(--accent); }
.acao.adm .acao-ico { background: var(--gray-bg); color: var(--gray); }
@media (max-width: 900px) { .acoes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .acao { min-height: 0; padding: 16px; } .acao strong { margin-top: 4px; } }

.politica { margin-top: 26px; }
.politica-texto { color: var(--text); max-width: 760px; }
.politica-texto h3 { margin: 18px 0 6px; font-size: .98rem; color: var(--brand); }
.politica-texto p { margin: 8px 0; color: var(--text-2); }
.politica-texto ul { margin: 6px 0; padding-left: 20px; color: var(--text-2); }
.politica-texto li { margin: 4px 0; }
.politica-texto > :first-child { margin-top: 0; }

/* ---------- Formulários ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span.label, .field > legend, label.field { font-weight: 600; font-size: .9rem; color: var(--text); }
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 6px; }
.field input, .field textarea, .field select, .input {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; font-weight: 400; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus { outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(1,195,142,.25); }
.field .hint, .hint { display: block; font-weight: 400; color: var(--text-3); font-size: .84rem; margin-top: 5px; }
.field.invalid input, .field.invalid textarea, .field.invalid .chips, .field.invalid .upload { border-color: var(--red); }
.field .erro { display: block; color: var(--red); font-size: .84rem; font-weight: 500; margin-top: 5px; }
.input-codigo { letter-spacing: .5em; font-size: 1.25rem !important; font-weight: 600 !important; text-align: center; font-variant-numeric: tabular-nums; max-width: 180px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 1px solid transparent; border-radius: var(--radius-sm); }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 999px;
  font-size: .9rem; font-weight: 500; color: var(--text-2); background: var(--surface); cursor: pointer; user-select: none;
}
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px;
  font: inherit; font-weight: 600; font-size: .92rem; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); white-space: nowrap;
}
.btn:hover { text-decoration: none; background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--red); }
.btn.ghost { background: transparent; border-style: dashed; color: var(--brand); }
.btn.ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn.lg { padding: 13px 22px; font-size: 1rem; }
.btn.sm { padding: 6px 10px; font-size: .84rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: progress; }
.link { background: none; border: 0; padding: 0; font: inherit; font-size: .88rem; color: var(--brand-600); cursor: pointer; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--red); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions.end { justify-content: flex-end; }

.seg { display: inline-flex; padding: 4px; background: var(--gray-bg); border-radius: 10px; gap: 4px; flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 7px; font: inherit; font-weight: 600; font-size: .9rem;
  color: var(--text-2); cursor: pointer;
}
.seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.seg.decisao button.on[data-dec="aprovado"] { color: var(--green); }
.seg.decisao button.on[data-dec="negado"] { color: var(--red); }

.tabs { display: flex; border-bottom: 1px solid var(--border); margin: -4px 0 18px; gap: 4px; overflow-x: auto; }
.tabs button, .tabs a {
  border: 0; background: none; padding: 10px 12px; font: inherit; font-weight: 600; font-size: .92rem; color: var(--text-3);
  border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.tabs .on { color: var(--brand); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }

.aviso { padding: 12px 14px; border-radius: var(--radius-sm); font-size: .9rem; }
.aviso.erro { background: var(--red-bg); color: var(--red); }
.aviso.info { background: var(--accent-soft); color: var(--brand); }
.aviso.nota { background: var(--note-bg); border: 1px solid var(--note-border); color: #6b4a00; }

/* ---------- Novo pedido ---------- */
details.lembrete { background: var(--note-bg); border: 1px solid var(--note-border); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 18px; }
details.lembrete summary { cursor: pointer; font-weight: 600; color: #6b4a00; font-size: .92rem; }
details.lembrete .politica-texto { margin-top: 8px; font-size: .9rem; }
.quem-pede { display: flex; align-items: center; gap: 10px; }
.quem-pede .avatar { background: var(--accent); color: var(--accent-ink); width: 36px; height: 36px; }
.despesa .card-head h2 { font-size: 1rem; }
.despesa + .despesa, .card + .despesa, #lista-desp { margin-top: 14px; }
.add-despesa { width: 100%; margin-top: 14px; padding: 14px; }
.total-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding: 16px 20px; }
.total-bar strong { font-family: var(--display); font-size: 1.35rem; color: var(--brand); }
.form-fim { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.form-fim .btn.lg { align-self: flex-start; }
@media (max-width: 560px) { .form-fim .btn.lg { align-self: stretch; } }

.upload {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; padding: 14px;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--brand); font-weight: 600; font-size: .92rem;
  cursor: pointer; background: var(--surface-2);
}
.upload:hover { border-color: var(--accent); background: var(--accent-soft); }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.anexos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.anexos:empty { display: none; }
.anexo {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 30px 6px 6px; max-width: 100%;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: .84rem;
}
.anexo .thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--gray-bg); display: grid; place-items: center; font-size: .66rem; font-weight: 700; color: var(--red); flex: none; }
.anexo .nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.anexo .estado { display: block; font-size: .76rem; color: var(--text-3); }
.anexo.erro { border-color: var(--red); }
.anexo.erro .estado { color: var(--red); }
.anexo .rm { position: absolute; top: 4px; right: 4px; border: 0; background: none; width: 22px; height: 22px; border-radius: 50%; color: var(--text-3); cursor: pointer; font-size: 1rem; line-height: 1; }
.anexo .rm:hover { background: var(--gray-bg); color: var(--red); }

.sucesso { text-align: center; padding: 28px 8px; }
.sucesso .ok-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); margin-bottom: 14px; }
.sucesso p { margin: 8px auto 20px; max-width: 420px; }
.sucesso .actions { justify-content: center; }

/* ---------- Listas de pedidos ---------- */
.filtros { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filtros button {
  border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 6px 12px;
  font: inherit; font-size: .86rem; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.filtros button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.filtros .qtd { opacity: .7; font-weight: 500; margin-left: 2px; }
.lista { display: flex; flex-direction: column; gap: 10px; }
.pedido-item {
  display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; padding: 16px 18px; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.pedido-item:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 4px 14px rgba(17,41,66,.1); }
.pi-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pi-top { display: flex; align-items: center; gap: 8px; }
.pi-num { color: var(--text-3); font-size: .84rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pi-titulo { font-size: 1rem; overflow-wrap: anywhere; }
.pi-status { font-size: .88rem; color: var(--text-2); margin-top: 4px; overflow-wrap: anywhere; }
.pi-status.negado { color: var(--red); }
.pi-status.aprovado { color: var(--green); }
.pi-valor { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pi-valor strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pdf-tag { font-size: .72rem; font-weight: 700; color: var(--brand); border: 1px solid var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 5px; }
@media (max-width: 480px) { .pedido-item { padding: 14px; gap: 10px; } }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 650; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-em_analise { background: var(--amber-bg); color: var(--amber); }
.s-aprovado { background: var(--green-bg); color: var(--green); }
.s-negado { background: var(--red-bg); color: var(--red); }
.s-inativo { background: var(--gray-bg); color: var(--gray); }

.vazio { text-align: center; padding: 40px 16px; color: var(--text-2); }
.vazio p { margin-bottom: 14px; }

/* ---------- Recorrentes ---------- */
.rec + .rec { margin-top: 14px; }
.rec-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.rec-head .subtle { display: block; margin-top: 3px; }
.rec .pendente { margin-top: 12px; }
.rec .envio-form { margin-top: 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.envios { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--border); }
.envios li { border-bottom: 1px solid var(--border); }
.envios a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; color: var(--text); align-items: center; }
.envios a:hover { text-decoration: none; background: var(--surface-2); }
.envios .mes { font-weight: 600; text-transform: capitalize; }
.envios .det { font-size: .84rem; color: var(--text-2); }
.envios .det.negado { color: var(--red); }
.rec-rodape { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- ADM ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { padding: 16px 18px; }
.stat .rot { font-size: .8rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .03em; }
.stat .val { font-family: var(--display); font-size: 1.5rem; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; color: var(--brand); }
.stat .sub { font-size: .84rem; color: var(--text-2); margin-top: 2px; }
.stat.destaque { border-color: var(--amber); background: linear-gradient(0deg, var(--surface), var(--surface)), var(--amber-bg); box-shadow: inset 4px 0 0 var(--amber), var(--shadow); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .filtros { margin: 0; }
.toolbar .busca { flex: 1; min-width: 200px; }
.toolbar .input { margin: 0; }
.toolbar select.input { width: auto; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table.tabela { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabela th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); font-weight: 650; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tabela td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tbody tr.clicavel { cursor: pointer; }
.tabela tbody tr.clicavel:hover td { background: var(--surface-2); }
.tabela .direita { text-align: right; }
.tabela .sec { display: block; color: var(--text-3); font-size: .82rem; }
.tabela .acoes-cel { white-space: nowrap; text-align: right; }
.tabela .acoes-cel .btn + .btn { margin-left: 6px; }

/* Gaveta de detalhe do pedido */
.drawer-bg { position: fixed; inset: 0; background: rgba(15, 23, 35, .42); z-index: 50; animation: fade .15s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface); z-index: 51;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: entra .18s ease-out;
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-body > section + section { margin-top: 22px; }
.drawer-body h3 { margin-bottom: 10px; color: var(--text-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.fechar { border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--text-3); cursor: pointer; width: 34px; height: 34px; border-radius: 8px; }
.fechar:hover { background: var(--gray-bg); color: var(--text); }
@keyframes entra { from { transform: translateX(24px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }

dl.info { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 12px 0 0; font-size: .9rem; }
dl.info dt { color: var(--text-3); }
dl.info dd { margin: 0; overflow-wrap: anywhere; }
.desp { padding: 12px 0; border-bottom: 1px solid var(--border); }
.desp:first-of-type { padding-top: 0; }
.desp-top { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.desp p { margin-top: 4px; font-size: .9rem; color: var(--text-2); overflow-wrap: anywhere; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumbs a { display: block; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: var(--gray-bg); }
.thumbs a:hover { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .pdf { display: grid; place-items: center; height: 100%; font-weight: 700; font-size: .8rem; color: var(--red); text-align: center; padding: 4px; }
.thumbs .pdf small { display: block; font-weight: 500; color: var(--text-3); font-size: .64rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 68px; }
.total-linha { display: flex; justify-content: space-between; padding-top: 12px; font-weight: 700; font-size: 1.05rem; }
.parecer-box { padding: 14px 16px; border-radius: var(--radius-sm); font-size: .92rem; }
.parecer-box.aprovado { background: var(--green-bg); color: #0f5537; }
.parecer-box.negado { background: var(--red-bg); color: #8a1d14; }
.parecer-box strong { display: block; margin-bottom: 4px; }
.parecer-box .quando { font-size: .82rem; opacity: .8; margin-top: 6px; }
.hist { list-style: none; padding: 0; margin: 0; font-size: .86rem; }
.hist li { padding: 6px 0 6px 14px; border-left: 2px solid var(--border); position: relative; color: var(--text-2); }
.hist li::before { content: ""; position: absolute; left: -5px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.hist li strong { color: var(--text); font-weight: 600; }
.hist .quando { display: block; font-size: .78rem; color: var(--text-3); }

.politica-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.politica-editor textarea { min-height: 460px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; line-height: 1.5; }
.politica-editor .preview { max-height: 520px; overflow: auto; }
@media (max-width: 900px) { .politica-editor { grid-template-columns: 1fr; } .politica-editor textarea { min-height: 300px; } }

/* Diálogo */
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(440px, calc(100% - 32px)); box-shadow: var(--shadow-lg); color: var(--text); }
dialog::backdrop { background: rgba(15, 23, 35, .45); }
dialog form { padding: 22px; }
dialog h2 { margin-bottom: 10px; }
dialog .corpo { color: var(--text-2); margin-bottom: 16px; }
dialog .destaque-codigo { display: flex; gap: 10px; justify-content: center; margin: 14px 0; }
dialog .destaque-codigo span { padding: 10px 16px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent); color: var(--brand); font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: .12em; }

/* Avisos rápidos */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; width: calc(100% - 32px); max-width: 460px; pointer-events: none; }
.toast { background: var(--brand); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: .92rem; animation: fade .2s; pointer-events: auto; }
.toast.erro { background: var(--red); }
.toast.ok { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* ---------- Entrar com o rosto ---------- */
.btn.rosto { background: var(--brand); border-color: var(--brand); color: #fff; gap: 10px; }
.btn.rosto svg { color: var(--accent); }
.btn.rosto:hover { background: var(--brand-950); }
.divisor { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--text-3); font-size: .84rem; }
.divisor::before, .divisor::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.rosto-card { margin-top: 18px; }
.rosto-card .card-head { flex-wrap: wrap; }
.rosto-card .acao-ico { flex: none; width: 40px; height: 40px; }
.rosto-card h2 { font-size: 1rem; }
.aparelhos { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.aparelhos li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.aparelhos li:last-child { border-bottom: 0; padding-bottom: 0; }
.aparelhos .subtle { display: block; }

/* Rodapé com a marca */
.rodape { max-width: 1120px; margin: 0 auto; padding: 0 20px 32px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--text-3); font-size: .8rem; }
.rodape img { height: 22px; width: auto; opacity: .9; }

/* Janela de ativação do rosto */
dialog .opcoes-ativacao { display: flex; flex-direction: column; gap: 8px; }
dialog .opcoes-ativacao .btn svg { color: var(--accent-ink); }
dialog .passos { margin: 8px 0 0; padding-left: 20px; }
dialog .passos li { margin: 4px 0; }
.btn.sem-borda { border-color: transparent; background: transparent; color: var(--text-2); }
