/* Paleta: pasto, terra roxa, látex, ipê */
:root {
  --pasto: #2E5130;
  --pasto-claro: #E3EBDD;
  --terra: #7A3E22;
  --latex: #F7F8F3;
  --ipe: #E8B021;
  --tinta: #1E2A1F;
  --cinza: #5E6A5F;
  --linha: #D5DCCF;
  --vermelho: #A8321F;
  --verde-ok: #2F6B34;
  --fonte: "Archivo", "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--latex); color: var(--tinta); font: 400 1rem/1.5 var(--fonte); }
a { color: var(--pasto); }
:focus-visible { outline: 3px solid var(--ipe); outline-offset: 2px; }

/* Topo: faixa amarela como porteira */
.topo { background: var(--pasto); color: #fff; border-bottom: 6px solid var(--ipe); }
.topo-in { max-width: 1100px; margin: 0 auto; padding: .9rem 1rem .4rem; }
.marca { color: #fff; text-decoration: none; font-weight: 800; font-stretch: 112%; font-size: 1.35rem; letter-spacing: -.01em; }
.menu { display: flex; gap: .25rem; overflow-x: auto; margin-top: .5rem; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a { color: #DDE8D8; text-decoration: none; padding: .55rem .75rem; border-radius: 6px 6px 0 0; white-space: nowrap; font-weight: 500; }
.menu a:hover { color: #fff; }
.menu a.ativo { background: var(--latex); color: var(--pasto); font-weight: 700; }
.menu .sair { margin-left: auto; }

.conteudo { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
h1 { font-size: 1.9rem; font-stretch: 105%; font-weight: 800; margin: 0; letter-spacing: -.015em; }
h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 .9rem; }
h3 { font-size: 1rem; font-weight: 700; margin: 1.4rem 0 .6rem; }
.cabeca { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.intro { color: var(--cinza); max-width: 65ch; margin: -.25rem 0 1rem; }
.nota { color: var(--cinza); font-size: .9rem; max-width: 70ch; }
.vazio { color: var(--cinza); margin: .25rem 0; }

.periodo { display: flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--linha); border-radius: 999px; padding: .2rem; }
.periodo strong { padding: 0 .5rem; min-width: 9ch; text-align: center; }
.seta { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; text-decoration: none; font-size: 1.4rem; color: var(--pasto); }
.seta:hover { background: var(--pasto-claro); }

/* Resultado do mês: o número que o dono quer ver */
.resultado { border-left: 8px solid var(--pasto); background: #fff; padding: 1.1rem 1.25rem; margin-bottom: 1rem; border-radius: 0 10px 10px 0; }
.resultado.negativo { border-left-color: var(--vermelho); }
.resultado .rotulo { margin: 0; color: var(--cinza); font-weight: 600; }
.valor-grande { font-size: clamp(2.2rem, 7vw, 3.4rem); font-weight: 800; font-stretch: 90%; margin: .1rem 0 .4rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.resultado.positivo .valor-grande { color: var(--pasto); }
.resultado.negativo .valor-grande { color: var(--vermelho); }
.conta { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; color: var(--cinza); }
.conta strong { color: var(--tinta); }

.grade-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.bloco { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--linha); border-radius: 8px; padding: .85rem 1rem; color: inherit; text-decoration: none; }
a.bloco:hover { border-color: var(--pasto); }
.bloco .rotulo { color: var(--cinza); font-size: .9rem; }
.bloco strong { font-size: 1.45rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.bloco small { color: var(--cinza); }

.duas-colunas { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.painel { background: #fff; border: 1px solid var(--linha); border-radius: 10px; padding: 1.1rem 1.1rem 1.2rem; margin-bottom: 1rem; }

.barra-linha { margin-bottom: .7rem; }
.barra-txt { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; }
.barra { height: 10px; background: var(--pasto-claro); border-radius: 5px; overflow: hidden; margin-top: .25rem; }
.barra i { display: block; height: 100%; background: var(--terra); }

.numero-gado { font-size: 3rem; font-weight: 800; font-stretch: 90%; margin: 0; line-height: 1; color: var(--terra); }
.numero-gado span { font-size: 1.1rem; font-weight: 600; color: var(--cinza); font-stretch: 100%; }
.pares { display: flex; gap: 2rem; margin: 1rem 0 0; }
.pares dt { color: var(--cinza); font-size: .9rem; }
.pares dd { margin: 0; font-size: 1.5rem; font-weight: 750; }
.lista-simples { padding-left: 1.1rem; margin: 0; }
.lista-simples li { margin: .3rem 0; }
.lista-valores { list-style: none; padding: 0; margin: 0 0 1rem; }
.lista-valores li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--linha); }
.lista-valores small, .tabela small { display: block; color: var(--cinza); font-size: .82rem; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chips span { background: var(--pasto-claro); border-radius: 999px; padding: .3rem .8rem; }

/* Abas do gado */
.abas { display: flex; gap: .25rem; border-bottom: 2px solid var(--linha); margin-bottom: 1rem; overflow-x: auto; }
.abas a { padding: .6rem .9rem; text-decoration: none; color: var(--cinza); white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -2px; font-weight: 600; }
.abas a.ativo { color: var(--terra); border-bottom-color: var(--terra); }

/* Tabelas */
.rolagem { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabela { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabela th { text-align: left; font-weight: 600; color: var(--cinza); font-size: .85rem; padding: .5rem .6rem; border-bottom: 2px solid var(--linha); white-space: nowrap; }
.tabela td { padding: .6rem; border-bottom: 1px solid var(--linha); vertical-align: top; }
.tabela tfoot td { font-weight: 750; border-bottom: 0; border-top: 2px solid var(--tinta); }
.tabela .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.forte { font-weight: 700; }
.bate { color: var(--verde-ok); font-weight: 700; }
.acima { color: var(--vermelho); font-weight: 700; }
.abaixo { color: var(--terra); font-weight: 700; }
.linha-acoes { white-space: nowrap; text-align: right; }
.linha-acoes a, .linha-acoes form { margin-left: .6rem; display: inline; }
form.inline { display: inline; margin-left: .5rem; }

/* Formulários: campos grandes para o celular */
.form label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .92rem; }
.form input, .form select, .filtro select {
  font: inherit; font-weight: 400; padding: .7rem .75rem; border: 1px solid #B9C3B3; border-radius: 6px; background: #fff; color: var(--tinta); min-height: 2.9rem; width: 100%;
}
.form input:focus, .form select:focus { border-color: var(--pasto); }
.grade-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .9rem; }
.grade-form .largo { grid-column: 1 / -1; }
.faixas { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .9rem; max-width: 480px; margin-bottom: 1rem; }
.acoes { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.barra-acoes { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.filtro { margin-left: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 700; background: var(--pasto); color: #fff; border: 0; border-radius: 6px; padding: .75rem 1.15rem; min-height: 2.9rem; text-decoration: none; cursor: pointer; }
.btn:hover { background: #24422A; }
.btn.claro { background: #fff; color: var(--pasto); border: 1px solid var(--pasto); }
.btn.claro:hover { background: var(--pasto-claro); }
.link, .link-perigo { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; color: var(--pasto); }
.link-perigo { color: var(--vermelho); }
.excluir-rodape { margin-top: 1.2rem; padding-top: .8rem; border-top: 1px solid var(--linha); }

.aviso { padding: .8rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-weight: 600; }
.aviso.ok { background: var(--pasto-claro); color: var(--pasto); }
.aviso.erro { background: #F6E1DC; color: var(--vermelho); }

/* Login */
.entrada { min-height: 100vh; display: grid; place-items: center; background: var(--pasto); border-top: 8px solid var(--ipe); padding: 1rem; }
.caixa-entrada { background: var(--latex); border-radius: 12px; padding: 1.75rem; width: 100%; max-width: 380px; }
.caixa-entrada h1 { margin-bottom: 1rem; }
.caixa-entrada .form { display: grid; gap: .9rem; }

@media (max-width: 560px) {
  h1 { font-size: 1.55rem; }
  .filtro { margin-left: 0; width: 100%; }
  .barra-acoes .btn { flex: 1; }
  .painel { padding: .9rem; }
  .menu .sair { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Aplicação: navegação lateral e identidade visual Bom Pastor */
:root { --pasto:#244b32; --pasto-claro:#e8f0e8; --terra:#81512d; --latex:#f5f7f3; --ipe:#d9a441; --tinta:#1d2a21; --cinza:#667268; --linha:#e1e7df; }
body { background:#f4f6f3; }
.app-shell { min-height:100vh; }
.sidebar { position:fixed; inset:0 auto 0 0; width:264px; background:#172f22; color:#e9f0e9; display:flex; flex-direction:column; z-index:20; box-shadow:5px 0 24px rgba(19,40,26,.08); }
.brand { display:flex; align-items:center; gap:12px; padding:24px 20px 22px; color:#fff; text-decoration:none; border-bottom:1px solid rgba(255,255,255,.1); }
.brand-mark { width:43px; height:43px; display:grid; place-items:center; flex:none; border-radius:14px; background:linear-gradient(145deg,#e4b64e,#b87d2e); color:#183522; font-size:25px; box-shadow:inset 0 1px rgba(255,255,255,.4); }
.brand-copy { min-width:0; display:flex; flex-direction:column; gap:3px; }
.brand-copy strong { font-size:16px; line-height:1.15; letter-spacing:-.3px; }
.brand-copy small { color:#b9cbbd; font-size:10px; letter-spacing:.3px; }
.sidebar-caption { padding:23px 22px 8px; color:#91aa98; font-size:10px; font-weight:800; letter-spacing:1.4px; }
.side-nav { overflow-y:auto; padding:0 12px 18px; scrollbar-width:thin; scrollbar-color:#496451 transparent; }
.nav-group { margin:0 0 14px; }
.nav-group h2 { margin:0; padding:10px 11px 7px; color:#92aa98; font-size:10px; font-weight:800; letter-spacing:1.1px; text-transform:uppercase; }
.nav-link { display:flex; align-items:center; gap:12px; min-height:40px; padding:8px 11px; margin:2px 0; border-radius:9px; color:#d7e3d9; text-decoration:none; font-size:13px; font-weight:550; transition:background .15s,color .15s; }
.nav-link:hover { background:rgba(255,255,255,.08); color:#fff; }
.nav-link.ativo { color:#fff; background:#326344; box-shadow:inset 3px 0 #e2b34b; font-weight:700; }
.nav-icon { display:grid; place-items:center; width:21px; flex:none; color:#b4cbb8; font-size:19px; line-height:1; }
.nav-link.ativo .nav-icon { color:#f1c766; }
.sidebar-foot { margin-top:auto; padding:16px 22px; border-top:1px solid rgba(255,255,255,.1); color:#a9c0ae; font-size:11px; }
.status-dot { display:inline-block; width:7px; height:7px; margin-right:7px; border-radius:50%; background:#79c58c; box-shadow:0 0 0 3px rgba(121,197,140,.12); }
.app-main { min-height:100vh; margin-left:264px; display:flex; flex-direction:column; }
.topbar { min-height:76px; padding:12px clamp(20px,3vw,42px); display:flex; align-items:center; justify-content:space-between; gap:20px; background:#fff; border-bottom:1px solid #e8ece7; }
.topbar-title { display:flex; flex-direction:column; gap:2px; }
.topbar-kicker { color:#8a978d; font-size:9px; font-weight:800; letter-spacing:1.5px; }
.topbar-title strong { font-size:19px; letter-spacing:-.5px; }
.topbar-right { display:flex; align-items:center; gap:17px; }
.location-pill { padding:7px 11px; border:1px solid #e5eae4; border-radius:20px; color:#657268; font-size:11px; background:#fafbf9; }
.user-chip { display:flex; align-items:center; gap:9px; text-decoration:none; color:var(--tinta); }
.user-avatar { width:35px; height:35px; display:grid; place-items:center; border-radius:50%; background:#e5eee5; color:var(--pasto); font-size:11px; font-weight:800; }
.user-chip strong,.user-chip small { display:block; }
.user-chip strong { font-size:11px; }
.user-chip small { color:#849087; font-size:10px; }
.logout-link { color:#718076; font-size:11px; text-decoration:none; }
.logout-link:hover { color:var(--vermelho); }
.conteudo { width:100%; max-width:1500px; margin:0 auto; padding:28px clamp(20px,3vw,42px) 36px; flex:1; }
.app-footer { display:flex; justify-content:space-between; gap:12px; padding:15px clamp(20px,3vw,42px); border-top:1px solid #e5eae4; color:#89948b; font-size:10px; }
h1 { font-size:clamp(1.55rem,2.2vw,2rem); }
.painel,.bloco,.resultado { border-color:#e5eae4; box-shadow:0 3px 14px rgba(26,54,34,.035); }
.painel { border-radius:13px; }
.bloco { border-radius:11px; }
.btn { border-radius:8px; }
.form input,.form select,.filtro select { border-radius:8px; }
.aviso { border-radius:9px; }
@media(max-width:900px) {
 .sidebar { width:220px; }
 .app-main { margin-left:220px; }
 .brand { padding:20px 14px; }
 .brand-copy strong { font-size:14px; }
 .nav-link { font-size:12px; }
 .location-pill { display:none; }
}
@media(max-width:680px) {
 .app-shell { display:block; }
 .sidebar { position:relative; width:100%; height:auto; display:block; }
 .brand { padding:13px 16px; }
 .brand-mark { width:36px;height:36px;border-radius:11px; }
 .sidebar-caption,.sidebar-foot { display:none; }
 .side-nav { display:flex; gap:8px; padding:8px 12px 12px; overflow-x:auto; }
 .nav-group { display:flex; align-items:center; gap:5px; margin:0; flex:none; }
 .nav-group h2 { display:none; }
 .nav-link { min-height:36px; padding:7px 10px; white-space:nowrap; background:rgba(255,255,255,.055); font-size:11px; }
 .nav-icon { display:none; }
 .app-main { margin-left:0; min-height:calc(100vh - 110px); }
 .topbar { min-height:62px; padding:10px 16px; }
 .topbar-title strong { font-size:16px; }
 .topbar-kicker { font-size:8px; }
 .user-chip small { display:none; }
 .user-chip { gap:6px; }
 .user-avatar { width:30px;height:30px; }
 .logout-link { display:none; }
 .conteudo { padding:20px 15px 28px; }
 .app-footer { padding:13px 16px; }
}
