:root {
  --tinta: #1a1a1a;
  --fundo: #ffffff;
  --fundo-suave: #f7f6f3;
  --borda: #d8d8d8;
  --acento: #b58900;
  --amarelo: #ffcd00;
  --atenuado: #5b6470;
  --erro: #b00020;
  --azul: #0072b2;
  font-family: -apple-system, "Inter", "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; padding: 0 1rem 3rem; color: var(--tinta); background: var(--fundo); line-height: 1.5; }
header.topo { max-width: 52rem; margin: 0 auto; padding: 1.25rem 0 0.75rem; border-top: 6px solid var(--amarelo); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
header.topo h1 { margin: 0; font-size: 1.35rem; }
header.topo .contexto { color: var(--atenuado); font-size: 0.95rem; }
main { max-width: 52rem; margin: 0 auto; }
section { margin: 1rem 0; }
h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }
p { margin: 0.4rem 0; }
.aviso { background: var(--fundo-suave); border-left: 4px solid var(--amarelo); padding: 0.6rem 0.9rem; border-radius: 0.3rem; font-size: 0.95rem; }
.erro { color: var(--erro); font-weight: 600; }
.atenuado { color: var(--atenuado); font-size: 0.9rem; }
label { display: block; font-weight: 600; font-size: 0.9rem; margin-top: 0.75rem; }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  font: inherit; width: 100%; max-width: 28rem; padding: 0.5rem 0.65rem; border: 1px solid var(--borda); border-radius: 0.4rem; margin-top: 0.25rem; background: #fff; color: var(--tinta);
}
textarea { max-width: none; min-height: 4.5rem; resize: vertical; }
fieldset { border: 1px solid var(--borda); border-radius: 0.4rem; padding: 0.5rem 0.9rem; margin: 0.75rem 0 0; max-width: 28rem; }
legend { font-weight: 600; font-size: 0.9rem; padding: 0 0.3rem; }
fieldset label { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0.3rem 1rem 0.3rem 0; font-weight: 400; }
button { font: inherit; padding: 0.55rem 1rem; border-radius: 0.4rem; border: 1px solid var(--borda); background: var(--fundo-suave); color: var(--tinta); cursor: pointer; }
button.primario { background: var(--tinta); color: #fff; border-color: var(--tinta); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
.acoes { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.opcoes-modo { display: grid; gap: 0.6rem; margin: 0.5rem 0; }
.opcoes-modo button { text-align: left; padding: 0.8rem 1rem; }
.opcoes-modo button small { display: block; color: var(--atenuado); font-weight: 400; }
ol.conversa { list-style: none; padding: 0; margin: 0.75rem 0; display: grid; gap: 0.6rem; }
ol.conversa li { padding: 0.6rem 0.9rem; border-radius: 0.6rem; max-width: 92%; white-space: pre-wrap; overflow-wrap: anywhere; }
ol.conversa li .rotulo { display: block; font-size: 0.78rem; font-weight: 600; color: var(--atenuado); margin-bottom: 0.15rem; }
ol.conversa li.user { background: #fff8d6; margin-left: auto; }
ol.conversa li.assistant { background: var(--fundo-suave); }
ol.conversa li.sistema { background: transparent; color: var(--atenuado); text-align: center; max-width: none; font-size: 0.9rem; }
.estado { min-height: 1.4rem; color: var(--atenuado); font-size: 0.9rem; }
.barra-conversa { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.envio { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
.envio .linha { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; margin: 0.5rem 0; }
th, td { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--borda); vertical-align: top; }
th { background: var(--fundo-suave); }
.barra { height: 0.5rem; background: var(--fundo-suave); border-radius: 0.25rem; overflow: hidden; max-width: 12rem; }
.barra > span { display: block; height: 100%; background: var(--acento); }
.cartao { border: 1px solid var(--borda); border-radius: 0.5rem; padding: 0.8rem 1rem; margin: 0.75rem 0; }
.interruptor { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 400; margin: 0.2rem 0.8rem 0.2rem 0; }
.linha-atividade { display: flex; align-items: center; gap: 0.6rem; margin: 0.25rem 0; }
.linha-atividade button { padding: 0.3rem 0.7rem; min-width: 4.6rem; }
.linha-atividade .estado-atividade { font-size: 0.78rem; color: var(--atenuado); }
.linha-atividade.aberta .estado-atividade { color: var(--acento); font-weight: 700; }
code { font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 0.88em; }
[hidden] { display: none !important; }
/* TP2: folha partilhada do grupo */
body.largo header.topo, body.largo main { max-width: 78rem; }
nav.separadores { display: flex; flex-wrap: wrap; gap: 0.3rem; border-bottom: 2px solid var(--tinta); margin: 0.5rem 0 0.4rem; }
nav.separadores button { border-radius: 0.4rem 0.4rem 0 0; border-bottom: none; padding: 0.4rem 0.75rem; font-size: 0.9rem; }
nav.separadores button[aria-selected="true"] { background: var(--tinta); color: #fff; border-color: var(--tinta); }
nav.separadores button .conta { font-size: 0.78rem; color: var(--atenuado); margin-left: 0.3rem; }
nav.separadores button[aria-selected="true"] .conta { color: #ddd; }
nav.separadores button.fechado { color: var(--atenuado); }
.sinc { min-height: 1.3rem; font-size: 0.85rem; color: var(--atenuado); margin: 0 0 0.5rem; }
.sinc.falha { color: var(--erro); font-weight: 600; }
.envolvente-folha { overflow-x: auto; border: 1px solid var(--borda); border-radius: 0.4rem; }
table.folha { margin: 0; }
table.folha th { white-space: nowrap; font-size: 0.85rem; }
table.folha td { padding: 0.15rem 0.2rem; }
table.folha input { width: 100%; min-width: 7.5rem; max-width: none; margin: 0; padding: 0.35rem 0.45rem; font-size: 0.9rem; }
table.folha tbody.exemplos td { color: var(--atenuado); background: var(--fundo-suave); padding: 0.35rem 0.5rem; font-size: 0.85rem; }
table.folha tbody.exemplos td:first-child::before { content: "EX "; font-weight: 700; }
table.folha tr.pendente input, .cartao.pendente textarea { border-color: var(--acento); }
table.folha td.acoes-linha { white-space: nowrap; width: 1%; }
table.folha td.acoes-linha button, .cartao button.pequeno { padding: 0.25rem 0.55rem; font-size: 0.82rem; }
dl.caso dt { font-weight: 700; margin-top: 0.6rem; }
dl.caso dd { margin: 0.15rem 0 0; }
.cartao h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.cartao textarea { min-height: 3rem; }
.cartao .cabeca { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
dialog { border: 1px solid var(--borda); border-radius: 0.6rem; padding: 1rem 1.2rem; width: min(40rem, 94vw); color: var(--tinta); background: var(--fundo); }
dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
ul.resultados { list-style: none; padding: 0; margin: 0.5rem 0; max-height: 45vh; overflow-y: auto; }
ul.resultados li button { width: 100%; text-align: left; margin: 0.15rem 0; padding: 0.4rem 0.6rem; }
ul.resultados li code { font-weight: 700; margin-right: 0.4rem; }
tr.divergente td { background: #fff3c4; }
tr.divergente td:last-child::after { content: " ≠"; font-weight: 700; }
tr.proprio td { font-weight: 600; }
tr.nova-familia td { border-top: 2px solid var(--borda); }
#paineis.entregue .edicao { display: none; }
.faixa-entregue { border-left-color: var(--acento); font-weight: 600; }
li.falta { color: var(--erro); }
details { margin: 0.3rem 0; }
details summary { cursor: pointer; }
@media (prefers-reduced-motion: no-preference) { .pulsar { animation: pulsar 1.2s ease-in-out infinite; } @keyframes pulsar { 50% { opacity: 0.4; } } }
@media print { header.topo, .acoes, .envio, .estado, form { display: none; } }
