/* Spineli Gestão — visual v2 (05/12/2026): menu lateral verde-escuro, dourado do café, fundo creme. */
:root {
  --fundo: #f5f2ea; --papel: #fff; --tinta: #1c2620; --suave: #66705f; --linha: #e3ddd0; --linha-forte: #cfc7b6;
  --verde: #23603a; --verde-escuro: #16301f; --verde-medio: #2f7a4a; --verde-claro: #e3f0e3;
  --ouro: #c9a24a; --ouro-claro: #f6ecd2; --cafe: #6b4226;
  --alerta: #a23b1c; --alerta-claro: #fbe7de; --ambar: #8a6400; --ambar-claro: #fbf0cf;
  --sombra: 0 1px 2px rgba(28, 38, 32, .05), 0 4px 14px rgba(28, 38, 32, .06);
  --raio: 12px; --lateral: 248px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15.5px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  background: var(--fundo); color: var(--tinta); -webkit-font-smoothing: antialiased; }
a { color: var(--verde); text-underline-offset: 2px; }
a:hover { color: var(--verde-medio); }
::selection { background: var(--ouro-claro); }

/* ---------- Estrutura ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 28px 32px 56px; }
body.com-menu main { margin-left: var(--lateral); max-width: none; }
body.com-menu main > * { max-width: 1180px; }
h1 { font: 700 1.7rem/1.2 Georgia, "Times New Roman", serif; letter-spacing: -.01em; margin: 4px 0 18px; color: var(--verde-escuro); }
h1 small { font: 400 .95rem/1.4 inherit; font-family: inherit; color: var(--suave); margin-left: 6px; }
h2 { font-size: 1.12rem; font-weight: 700; margin: 32px 0 10px; color: var(--verde-escuro); display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; width: 4px; height: 1.05em; border-radius: 2px; background: var(--ouro); }
h3 { font-size: 1rem; margin: 22px 0 8px; }

/* ---------- Menu lateral ---------- */
.lateral { position: fixed; inset: 0 auto 0 0; width: var(--lateral); background: var(--verde-escuro); color: #dfe8e0;
  display: flex; flex-direction: column; z-index: 30; padding: 18px 12px 12px; overflow-y: auto;
  background-image: radial-gradient(120% 50% at 0% 0%, rgba(201, 162, 74, .14), transparent 60%); }
.faixa-testes ~ .lateral { top: 34px; }
.lateral .marca { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 700 1.2rem Georgia, serif; padding: 4px 10px 18px; }
.marca em { font-style: normal; color: var(--ouro); }
.selo-marca { width: 30px; height: 30px; border-radius: 9px; background: var(--ouro); position: relative; flex: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.selo-marca::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cellipse cx='16' cy='16' rx='7' ry='10' fill='%2316301f' transform='rotate(25 16 16)'/%3E%3Cpath d='M12 8c5 5 3 11 8 16' stroke='%23c9a24a' stroke-width='2' fill='none'/%3E%3C/svg%3E") center / 72% no-repeat; }
.lateral nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.lateral nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: #cfdbd1; text-decoration: none; font-size: .95rem; transition: background .15s, color .15s; }
.lateral nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.lateral nav a.ativo { background: rgba(201, 162, 74, .18); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--ouro); }
.lateral nav a.destaque { color: var(--ouro); font-weight: 700; border: 1px solid rgba(201, 162, 74, .55); margin: 2px 0 6px; }
.lateral nav a.destaque:hover { background: var(--ouro); color: var(--verde-escuro); }
.lateral nav a.destaque.ativo { background: var(--ouro); color: var(--verde-escuro); box-shadow: none; }
.lateral .grupo { margin: 16px 12px 4px; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8fa596; }
.lateral .sair { display: flex; align-items: center; gap: 10px; padding: 12px 10px 4px; border-top: 1px solid rgba(255,255,255,.1); margin-top: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--verde-medio); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.quem { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.quem strong { color: #fff; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; }
.quem small { color: #9fb3a5; font-size: .78rem; }
.lateral .sair button.link { color: #cfdbd1; font-size: .85rem; text-decoration: none; padding: 6px 8px; border-radius: 6px; }
.lateral .sair button.link:hover { background: rgba(255,255,255,.08); color: #fff; }
.demo { background: var(--ambar-claro); color: var(--ambar); padding: 0 6px; border-radius: 4px; font-weight: 700; }

/* Ícones do menu (traço simples, cor do texto) */
.ic { width: 19px; height: 19px; flex: none; background: currentColor; opacity: .9;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.ic-inicio { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-7 9 7v9a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
.ic-mais { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E"); }
.ic-caderno { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h12a2 2 0 0 1 2 2v16H7a2 2 0 0 1-2-2z'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h3'/%3E%3C/svg%3E"); }
.ic-relatorio { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 20h16M7 16V10M12 16V5M17 16v-4'/%3E%3C/svg%3E"); }
.ic-foto { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 8a2 2 0 0 1 2-2h2l2-2h6l2 2h2a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E"); }
.ic-gps { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-6.2 7-12a7 7 0 0 0-14 0c0 5.8 7 12 7 12z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E"); }
.ic-custo { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 6l6-2 6 2 6-2v14l-6 2-6-2-6 2z'/%3E%3Cpath d='M9 4v14M15 6v14'/%3E%3C/svg%3E"); }
.ic-financeiro { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='13' rx='2'/%3E%3Cpath d='M3 10h18M7 15h3'/%3E%3C/svg%3E"); }
.ic-insumo { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 4v10l-8 4-8-4V7z'/%3E%3Cpath d='M4 7l8 4 8-4M12 11v10'/%3E%3C/svg%3E"); }
.ic-cadastro { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Cpath d='M8 9h8M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.ic-auditoria { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 4.5-3.4 8-8 9-4.6-1-8-4.5-8-9V6z'/%3E%3Cpath d='M8.5 12l2.5 2.5 4.5-5'/%3E%3C/svg%3E"); }
.ic-modulos { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='7' height='7' rx='1.5'/%3E%3Crect x='13' y='4' width='7' height='7' rx='1.5'/%3E%3Crect x='4' y='13' width='7' height='7' rx='1.5'/%3E%3Crect x='13' y='13' width='7' height='7' rx='1.5'/%3E%3C/svg%3E"); }

/* Celular: barra no alto e menu que desliza */
.menu-abrir, .barra-celular, .menu-fundo { display: none; }

/* ---------- Cartões e números ---------- */
.cartao { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--sombra); }
.cartao > strong:first-child { display: block; margin-bottom: 6px; color: var(--verde-escuro); }
.cartao ul { margin: 6px 0 0; padding-left: 20px; }
.grade { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 18px; }
.grade .cartao { margin: 0; position: relative; overflow: hidden; }
.grade .cartao::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--verde-medio); }
.grade .cartao:nth-child(2)::before { background: var(--ouro); }
.grade .cartao:nth-child(3)::before { background: var(--cafe); }
.grade .cartao:nth-child(4)::before { background: #5c8a9a; }
.numero { font-size: 1.85rem; font-weight: 700; line-height: 1.15; color: var(--verde-escuro); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.rotulo { color: var(--suave); font-size: .88rem; margin-top: 4px; }

/* ---------- Tabelas ---------- */
.tabela { overflow-x: auto; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra); margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; background: var(--papel); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--linha); vertical-align: top; }
th { font-size: .76rem; color: var(--suave); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: #faf8f3; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fbfaf6; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
.tabela + .tabela { margin-top: 16px; }

/* ---------- Formulários ---------- */
form.campos { display: grid; gap: 14px; max-width: 680px; }
body.com-menu main > form.campos { max-width: 720px; }
form.campos label { display: block; font-weight: 600; margin-bottom: 5px; font-size: .92rem; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--linha-forte); border-radius: 9px; background: #fff; color: var(--tinta); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--verde-medio); box-shadow: 0 0 0 3px rgba(47, 122, 74, .16); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--verde); }
input[type=file] { padding: 8px; background: #faf8f3; }
button, .botao { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 9px; border: 1px solid var(--verde); background: var(--verde); color: #fff; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px; line-height: 1.3; transition: background .15s, box-shadow .15s, transform .05s; }
button:hover, .botao:hover { background: var(--verde-medio); color: #fff; box-shadow: 0 2px 8px rgba(35, 96, 58, .25); }
button:active, .botao:active { transform: translateY(1px); }
button.secundario, .botao.secundario { background: #fff; color: var(--verde); border-color: var(--linha-forte); }
button.secundario:hover, .botao.secundario:hover { background: var(--verde-claro); border-color: var(--verde); color: var(--verde); box-shadow: none; }
button.perigo { background: #fff; color: var(--alerta); border-color: #e2b4a5; }
button.perigo:hover { background: var(--alerta-claro); color: var(--alerta); box-shadow: none; }
button.link { background: none; border: none; padding: 0; color: var(--verde); text-decoration: underline; font-weight: 500; box-shadow: none; }
button.link:hover { background: none; box-shadow: none; }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.acoes form { display: flex; gap: 8px; flex-wrap: wrap; }
.acoes input[name=motivo] { width: 240px; }
p.acoes { margin: 0 0 18px; }
.erro, .errorlist { color: var(--alerta); }
.errorlist { margin: 4px 0; padding-left: 18px; font-size: .9rem; }
.filtros { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin-bottom: 18px; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 12px 14px; box-shadow: var(--sombra); }
.filtros > div { min-width: 150px; flex: 1; }
.filtros > div.acoes { flex: 0 1 auto; min-width: 0; margin-left: auto; }
.filtros label { display: block; font-size: .75rem; font-weight: 700; color: var(--suave); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }

/* ---------- Avisos e etiquetas ---------- */
.aviso { padding: 12px 14px 12px 16px; border-radius: 10px; background: var(--verde-claro); border-left: 4px solid var(--verde-medio); margin: 0 0 16px; }
.aviso.error, .aviso.erro { background: var(--alerta-claro); color: var(--alerta); border-left-color: var(--alerta); }
.aviso.warning { background: var(--ambar-claro); color: var(--ambar); border-left-color: var(--ouro); }
.aviso a { color: inherit; font-weight: 600; }
.etiqueta { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.etiqueta::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.etiqueta.rascunho { background: #efece5; color: #555b52; }
.etiqueta.pendente { background: var(--ambar-claro); color: var(--ambar); }
.etiqueta.aprovado { background: var(--verde-claro); color: var(--verde); }
.etiqueta.cancelado { background: var(--alerta-claro); color: var(--alerta); text-decoration: line-through; }
.etiqueta.vencida { background: var(--alerta-claro); color: var(--alerta); }
.etiqueta.gps-confere { background: var(--verde-claro); color: var(--verde); }
.etiqueta.gps-nao_passou { background: var(--alerta-claro); color: var(--alerta); }
.etiqueta.gps-sem_sinal, .etiqueta.gps-sem_mapa, .etiqueta.gps-aguardando { background: #efece5; color: #555b52; }
.planejado { color: var(--suave); }

dl.ficha { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
dl.ficha dt { color: var(--suave); font-size: .9rem; }
dl.ficha dd { margin: 0; font-weight: 500; }
pre { white-space: pre-wrap; font-size: .85rem; background: #f3f0e8; padding: 10px; border-radius: 8px; margin: 0; }
.ajuda { color: var(--suave); font-size: .9rem; }
p.ajuda { max-width: 82ch; }
.faixa-testes { background: #8a1c1c; color: #fff; text-align: center; font-weight: 700; padding: 7px; position: sticky; top: 0; z-index: 40; font-size: .9rem; }

/* ---------- Início ---------- */
.saudacao { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.saudacao h1 { margin: 0; }
.saudacao .ajuda { margin: 2px 0 0; }
.atalhos { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin: 0 0 8px; }
.atalhos a { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio);
  text-decoration: none; color: var(--tinta); box-shadow: var(--sombra); transition: border-color .15s, transform .15s; }
.atalhos a:hover { border-color: var(--ouro); transform: translateY(-1px); color: var(--tinta); }
.atalhos .ic { width: 22px; height: 22px; color: var(--verde); }
.atalhos .bola { width: 42px; height: 42px; border-radius: 11px; background: var(--verde-claro); display: grid; place-items: center; flex: none; }
.atalhos strong { display: block; font-size: .95rem; }
.atalhos small { color: var(--suave); font-size: .8rem; }

/* ---------- Entrar ---------- */
body.sem-menu { min-height: 100vh; background: var(--verde-escuro) radial-gradient(80% 60% at 20% 10%, rgba(201,162,74,.22), transparent 60%); }
.entrar { max-width: 400px; margin: 12vh auto 0; padding: 32px 30px; border: 0; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.entrar h1 { text-align: center; margin-bottom: 4px; }
.entrar h1 + * { margin-top: 16px; }
.entrar form.campos button { width: 100%; justify-content: center; padding: 12px; }
.entrar::before { content: ""; display: block; width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 15px;
  background: var(--ouro) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cellipse cx='16' cy='16' rx='7' ry='10' fill='%2316301f' transform='rotate(25 16 16)'/%3E%3Cpath d='M12 8c5 5 3 11 8 16' stroke='%23c9a24a' stroke-width='2' fill='none'/%3E%3C/svg%3E") center / 70% no-repeat; }

/* ---------- Celular ---------- */
@media (max-width: 900px) {
  body.com-menu main { margin-left: 0; }
  main { padding: 16px 14px 48px; }
  .barra-celular { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; background: var(--verde-escuro); color: #fff; padding: 10px 14px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
  .faixa-testes ~ .barra-celular { top: 34px; }
  .barra-celular .marca { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font: 700 1.1rem Georgia, serif; }
  .barra-celular .selo-marca { width: 26px; height: 26px; }
  .menu-botao { width: 40px; height: 40px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 9px; cursor: pointer; border-radius: 8px; }
  .menu-botao span { height: 2px; background: #fff; border-radius: 2px; }
  .lateral { transform: translateX(-105%); transition: transform .22s ease; box-shadow: 10px 0 30px rgba(0,0,0,.25); }
  .faixa-testes ~ .lateral { top: 0; }
  .menu-abrir:checked ~ .lateral { transform: none; }
  .menu-abrir:checked ~ .menu-fundo { display: block; position: fixed; inset: 0; background: rgba(10, 20, 14, .45); z-index: 25; }
  h1 { font-size: 1.4rem; }
  .numero { font-size: 1.5rem; }
}
@media (max-width: 600px) {
  th, td { padding: 8px 10px; font-size: .9rem; }
  .esconder-celular { display: none; }
  .grade { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cartao { padding: 14px; }
  .filtros > div.acoes { margin-left: 0; }
  .entrar { margin-top: 6vh; padding: 26px 20px; }
}
@media print {
  .lateral, .barra-celular, .faixa-testes, .filtros, .acoes { display: none !important; }
  body.com-menu main { margin: 0; }
  .cartao, .tabela { box-shadow: none; }
}
.ic-colheita { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='9' cy='14' rx='4.5' ry='6' transform='rotate(-20 9 14)'/%3E%3Cellipse cx='16' cy='9' rx='4' ry='5.5' transform='rotate(25 16 9)'/%3E%3Cpath d='M7.5 9.5c2 2.5 1 6 3 8.5M14.5 5c1.5 2 1 5 2.5 7'/%3E%3C/svg%3E"); }

/* ---------- DRE ---------- */
table.dre th { text-align: left; white-space: nowrap; }
tr.dre-grupo > th, tr.dre-grupo > td { background: var(--verde-claro); }
tr.dre-resultado > th, tr.dre-resultado > td { background: #efece5; font-weight: 700; }
tr.dre-conta > td:first-child { padding-left: 22px; }
