/* ERP Auxiliar Izzy — estrutura no estilo do GestãoClick (menu lateral, listagens com filtro e ações),
   identidade da Izzy Print (preto, faixa das tintas CMYK, Anton nos títulos, Archivo no texto). */
@font-face { font-family: "Anton"; src: url("../fonts/Anton-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --ciano: #00A0E3; --magenta: #E5007E; --amarelo: #FFE600; --preto: #0B0B0B;
  --fundo: #F4F4F2; --papel: #FFFFFF; --linha: #E2E2DE; --linha-forte: #CFCFCA;
  --texto: #161616; --suave: #66665F; --fraco: #8E8E86;
  --ok: #1E7F4F; --ok-fundo: #E7F4EC; --aviso: #8A5A00; --aviso-fundo: #FFF6D6;
  --erro: #B42318; --erro-fundo: #FDECEA; --info-fundo: #E6F5FC;
  --raio: 8px; --menu: 248px;
  --sombra: 0 1px 2px rgba(0,0,0,.05), 0 1px 1px rgba(0,0,0,.03);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Archivo", system-ui, sans-serif; font-size: 14.5px; line-height: 1.45; color: var(--texto); background: var(--fundo); }
a { color: inherit; }
h1, h2, h3 { font-family: "Anton", "Archivo", sans-serif; font-weight: 400; letter-spacing: .01em; line-height: 1.1; margin: 0; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
code, .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .86em; }
.suave { color: var(--suave); }
.fraco { color: var(--fraco); }
.direita { text-align: right; }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------- estrutura */
.app { display: grid; grid-template-columns: var(--menu) 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--preto) var(--menu), var(--fundo) var(--menu)); }
.menu { background: var(--preto); color: #EDEDED; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.menu .marca { padding: 20px 20px 16px; display: flex; align-items: center; gap: 12px; position: relative; }
.menu .marca img { height: 40px; width: auto; }
.menu .marca span { font-family: "Anton"; font-size: 1.05rem; letter-spacing: .02em; line-height: 1.05; border-left: 1px solid #555; padding-left: 12px; }
.tintas { height: 4px; background: linear-gradient(90deg, var(--ciano) 0 25%, var(--magenta) 25% 50%, var(--amarelo) 50% 75%, #3A3A3A 75% 100%); }
.menu nav { padding: 10px 10px 20px; flex: 1; }
.menu .grupo { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: #8A8A84; margin: 16px 10px 6px; }
.menu a.item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; text-decoration: none; color: #DCDCD6; position: relative; }
.menu a.item:hover { background: #1D1D1B; color: #fff; }
.menu a.item.ativo { background: #fff; color: var(--preto); font-weight: 600; }
.menu a.item.ativo::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 4px; border-radius: 2px; background: var(--magenta); }
.menu a.item svg { width: 18px; height: 18px; flex: none; }
.menu .selo { margin-left: auto; font-size: .66rem; padding: 1px 6px; border-radius: 10px; background: #2A2A27; color: #A9A9A2; }
.menu a.item.ativo .selo { background: #EEE; color: #555; }
.menu .rodape { padding: 14px 20px; border-top: 1px solid #222; font-size: .8rem; color: #8A8A84; }

.principal { min-width: 0; display: flex; flex-direction: column; }
.topo { height: 56px; background: var(--papel); border-bottom: 1px solid var(--linha); display: flex; align-items: center; gap: 12px; padding: 0 28px; position: sticky; top: 0; z-index: 5; }
.topo .migalha { color: var(--suave); font-size: .9rem; }
.topo .migalha a { text-decoration: none; }
.topo .migalha a:hover { text-decoration: underline; }
.topo .espaco { flex: 1; }
.topo .quem { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--preto); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.botao.botao-menu { display: none; }
.conteudo { padding: 24px 28px 48px; max-width: 1320px; width: 100%; }

/* ---------------------------------------------------------------- cabeçalho de página */
.cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.cab p { margin: 6px 0 0; color: var(--suave); max-width: 760px; }
.cab .acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.abas { display: flex; gap: 4px; border-bottom: 2px solid var(--preto); margin-bottom: 18px; flex-wrap: wrap; }
.abas a { padding: 8px 16px; text-decoration: none; border-radius: 6px 6px 0 0; font-weight: 600; color: var(--suave); }
.abas a:hover { background: #EAEAE6; color: var(--texto); }
.abas a.ativa { background: var(--preto); color: #fff; }

/* ---------------------------------------------------------------- blocos */
.cartao { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra); margin-bottom: 18px; }
.cartao .titulo { padding: 14px 18px; border-bottom: 1px solid var(--linha); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cartao .titulo h2, .cartao > .titulo h3 { font-size: 1.1rem; }
.cartao .corpo { padding: 16px 18px; }
.cartao .corpo.sem { padding: 0; }
.grade { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.numero { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 14px 16px; }
.numero .rotulo { font-size: .8rem; color: var(--suave); }
.numero .valor { font-family: "Anton"; font-size: 1.75rem; line-height: 1.15; margin-top: 4px; }
.numero .nota { font-size: .78rem; color: var(--fraco); margin-top: 2px; }

.modulos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.modulo { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 16px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; min-height: 140px; transition: border-color .15s, transform .15s; }
.modulo:hover { border-color: var(--preto); transform: translateY(-1px); }
.modulo .linha1 { display: flex; align-items: center; gap: 10px; }
.modulo .ico { width: 34px; height: 34px; border-radius: 8px; background: var(--preto); color: #fff; display: grid; place-items: center; }
.modulo .ico svg { width: 18px; height: 18px; }
.modulo.breve .ico { background: #E9E9E4; color: #6E6E68; }
.modulo h3 { font-family: "Archivo"; font-weight: 700; font-size: 1rem; }
.modulo p { margin: 0; color: var(--suave); font-size: .88rem; }

/* ---------------------------------------------------------------- tabelas */
.tabela-wrap { overflow-x: auto; }
table.tabela { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabela th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--linha-forte); background: #FAFAF8; white-space: nowrap; }
.tabela td { padding: 10px 14px; border-bottom: 1px solid var(--linha); vertical-align: middle; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tbody tr:hover td { background: #FAFAF7; }
.tabela td.num, .tabela th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tabela .acoes-linha { text-align: right; white-space: nowrap; }
.tabela input[type=text] { width: 100%; min-width: 220px; }
.vazio { padding: 28px 18px; text-align: center; color: var(--suave); }

/* ---------------------------------------------------------------- formulários */
label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: 5px; }
.campo { margin-bottom: 14px; }
.campo .ajuda { font-size: .78rem; color: var(--fraco); margin-top: 4px; font-weight: 400; }
.campo .erro-campo { font-size: .8rem; color: var(--erro); margin-top: 4px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; font: inherit; color: inherit; padding: 8px 10px; border: 1px solid var(--linha-forte); border-radius: 6px; background: #fff; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ciano); outline-offset: 0; border-color: var(--ciano); }
input.invalido { border-color: var(--erro); }
.com-unidade { display: flex; align-items: center; gap: 8px; }
.com-unidade span { color: var(--suave); font-size: .85rem; white-space: nowrap; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 16px; height: 16px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.checks label { font-weight: 500; display: flex; gap: 8px; align-items: flex-start; padding: 10px; border: 1px solid var(--linha); border-radius: 6px; cursor: pointer; }
.checks label:hover { border-color: var(--linha-forte); }
.checks label small { display: block; color: var(--fraco); font-weight: 400; }
.linha-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.linha-form .campo { margin-bottom: 0; }
fieldset { border: 0; padding: 0; margin: 0; }

.botao { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--linha-forte); background: #fff; color: var(--texto); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; line-height: 1.2; }
.botao:hover { border-color: var(--preto); }
.botao.primario { background: var(--preto); border-color: var(--preto); color: #fff; }
.botao.primario:hover { background: var(--magenta); border-color: var(--magenta); }
.botao.perigo { color: var(--erro); }
.botao.pequeno { padding: 5px 10px; font-size: .84rem; }
.botao[disabled] { opacity: .45; cursor: not-allowed; }
.botao svg { width: 16px; height: 16px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* ---------------------------------------------------------------- mensagens e selos */
.mensagens { margin-bottom: 16px; display: grid; gap: 8px; }
.msg { padding: 10px 14px; border-radius: 6px; border-left: 4px solid; background: var(--papel); }
.msg.ok { border-color: var(--ok); background: var(--ok-fundo); }
.msg.aviso { border-color: #D9A400; background: var(--aviso-fundo); color: #4A3500; }
.msg.erro { border-color: var(--erro); background: var(--erro-fundo); color: #6B1810; }
.msg.info { border-color: var(--ciano); background: var(--info-fundo); }
.msg ul { margin: 6px 0 0; padding-left: 18px; }
.selo { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 12px; background: #EEEEEA; color: #4A4A45; white-space: nowrap; }
.selo.ok { background: var(--ok-fundo); color: var(--ok); }
.selo.aviso { background: var(--aviso-fundo); color: var(--aviso); }
.selo.erro { background: var(--erro-fundo); color: var(--erro); }
.selo.escuro { background: var(--preto); color: #fff; }

/* ---------------------------------------------------------------- etapas da importação */
.passos { display: flex; gap: 0; margin-bottom: 18px; counter-reset: passo; flex-wrap: wrap; }
.passos > a, .passos > span { flex: 1; min-width: 150px; padding: 10px 14px; background: var(--papel); border: 1px solid var(--linha); text-decoration: none; font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.passos > *:first-child { border-radius: 8px 0 0 8px; }
.passos > *:last-child { border-radius: 0 8px 8px 0; }
.passos > * + * { border-left: 0; }
.passos .n { width: 22px; height: 22px; border-radius: 50%; background: #E9E9E4; display: grid; place-items: center; font-size: .78rem; }
.passos .atual { background: var(--preto); color: #fff; border-color: var(--preto); }
.passos .atual .n { background: var(--magenta); color: #fff; }
.passos .feito .n { background: var(--ok); color: #fff; }

.pendencia { border: 1px solid var(--linha-forte); border-left: 4px solid var(--erro); border-radius: var(--raio); padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.pendencia h3 { font-family: "Archivo"; font-weight: 700; font-size: .98rem; margin-bottom: 4px; }
.pendencia .opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.pendencia .opcao { border: 1px dashed var(--linha-forte); border-radius: 6px; padding: 12px; }
.pendencia .opcao h4 { margin: 0 0 8px; font-size: .86rem; }
details > summary { cursor: pointer; font-weight: 600; padding: 12px 18px; list-style: none; display: flex; justify-content: space-between; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; color: var(--suave); font-weight: 700; }
details[open] > summary::after { content: "–"; }
details[open] > summary { border-bottom: 1px solid var(--linha); }

.login-pagina { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-lado { background: var(--preto); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; }
.login-lado::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 8px; background: linear-gradient(180deg, var(--ciano) 0 25%, var(--magenta) 25% 50%, var(--amarelo) 50% 75%, #3A3A3A 75% 100%); }
.login-lado img { height: 72px; width: auto; align-self: flex-start; }
.login-lado h1 { font-size: 2.8rem; margin-top: 28px; }
.login-lado p { color: #BDBDB6; max-width: 420px; }
.login-form { display: grid; place-items: center; padding: 32px; }
.login-form form { width: 100%; max-width: 360px; }
.login-form h2 { font-size: 1.6rem; margin-bottom: 18px; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; background: var(--fundo); }
  .menu { position: fixed; z-index: 20; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; }
  .menu.aberto { transform: none; box-shadow: 4px 0 24px rgba(0,0,0,.3); }
  .botao.botao-menu { display: inline-flex; }
  .topo { padding: 0 16px; }
  .conteudo { padding: 18px 16px 40px; }
  .g2, .g3, .g4, .pendencia .opcoes { grid-template-columns: 1fr; }
  .login-pagina { grid-template-columns: 1fr; }
  .login-lado { padding: 28px; }
  .login-lado h1 { font-size: 2rem; }
  .topo .quem .nome { display: none; }
}
input.alterado { border-color: var(--magenta); background: #FFF0F7; }
