:root {
  --fundo: #F3F4F1; --sup: #FFFFFF; --borda: #DADDD6; --borda2: #C9CDC4; --linha: #ECEDE9;
  --txt: #17212B; --txt2: #3D4650; --mudo: #5A6470;
  --azul: #1F5FA8; --azul2: #174A84; --azulc: #DCE8F7; --azulsel: #EAF1FA;
  --verde: #1D5A2E; --verdec: #DDF0E2; --lar: #7A3A05; --larc: #FDEBD3; --cinza: #ECEDE9;
  --mono: Consolas, 'Cascadia Mono', Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--fundo); color: var(--txt); font-family: 'Segoe UI', system-ui, sans-serif; font-size: 14px; line-height: 1.4; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }
#app, #maxx { max-width: 1500px; margin: 0 auto; padding: 20px 24px 90px; display: flex; flex-direction: column; gap: 16px; }

.topo { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.marca { display: flex; flex-direction: column; gap: 2px; }
.marca h1 { font-size: 24px; }
.status-dados { font-size: 13px; color: var(--mudo); }
.status-dados.ok::before { content: '●'; color: #2E8B57; margin-right: 6px; }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--borda2); background: var(--sup); color: var(--txt); font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--txt2); }
.btn.primario { background: var(--azul); border-color: var(--azul); color: #fff; font-weight: 600; }
.btn.primario:hover { background: var(--azul2); }
.btn.perigo { color: #8A1C1C; border-color: #E3B4B0; }
.btn.pequeno { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.btn.icone { min-width: 40px; font-size: 18px; padding: 6px; }
.btn.claro { background: transparent; color: #fff; border-color: #ffffff66; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }

.aviso { border-radius: 10px; padding: 12px 16px; border: 1px solid; }
.aviso.atencao { background: var(--larc); border-color: #F0C58F; color: var(--lar); }
.aviso.erro { background: #FBE0DE; border-color: #E9B3AE; color: #8A1C1C; }
.aviso.info { background: #E3EEF9; border-color: #B7CFEA; color: #123E6E; }

.cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cartao { text-align: left; background: var(--sup); border: 1px solid var(--borda); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.cartao:hover { border-color: var(--azul); }
.cartao[aria-pressed="true"] { border-color: var(--azul); box-shadow: inset 0 0 0 1px var(--azul); }
.cartao .rot { font-size: 12px; font-weight: 600; color: var(--mudo); text-transform: uppercase; letter-spacing: .5px; }
.cartao .val { font-size: 30px; font-weight: 700; line-height: 1.1; }
.cartao .nota { font-size: 13px; color: var(--mudo); }

.abas { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--borda); }
.abas button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; margin-bottom: -1px; font-weight: 500; color: var(--txt2); cursor: pointer; }
.abas button[aria-pressed="true"] { color: var(--azul); border-color: var(--azul); }

.filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.campo { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--mudo); min-width: 0; }
.campo input, .campo select, .campo textarea { font-size: 14px; font-weight: 400; color: var(--txt); padding: 8px 10px; min-height: 40px; width: 100%;
  border: 1px solid var(--borda2); border-radius: 8px; background: var(--sup); }
.campo textarea { min-height: 90px; resize: vertical; }
.campo .ajuda { font-weight: 400; color: var(--mudo); }
.campo .ajuda.erro { color: #8A1C1C; }
.filtros .busca { flex: 1 1 280px; }
.filtros .campo:not(.busca) { flex: 0 1 150px; }
.campo.check { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--txt); font-weight: 500; }
.campo.check input { width: 18px; height: 18px; min-height: 0; }

.tabela-card { background: var(--sup); border: 1px solid var(--borda); border-radius: 10px; overflow: hidden; }
.tabela-info { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 14px; font-size: 13px; color: var(--mudo); border-bottom: 1px solid var(--linha); }
.tabela-wrap { overflow-x: auto; max-height: calc(100vh - 380px); min-height: 300px; overflow-y: auto; }
table.tabela { width: 100%; border-collapse: collapse; }
.tabela th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: 12px; font-weight: 600; color: var(--mudo); text-transform: uppercase; letter-spacing: .4px;
  padding: 10px 12px; background: #F7F8F5; white-space: nowrap; cursor: pointer; user-select: none; border-bottom: 1px solid var(--borda); }
.tabela th.sel, .tabela td.sel { width: 40px; cursor: default; }
.tabela th[aria-sort="ascending"]::after { content: ' ▲'; }
.tabela th[aria-sort="descending"]::after { content: ' ▼'; }
.tabela td { padding: 9px 12px; border-top: 1px solid var(--linha); vertical-align: top; }
.tabela tbody tr { cursor: pointer; }
.tabela tbody tr:hover td { background: #F7FAFD; }
.tabela tbody tr.marcada td { background: var(--azulsel); }
.tabela td.obs { max-width: 420px; color: var(--txt2); font-size: 13px; }
.tabela td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabela td.nowrap { white-space: nowrap; }
.tabela input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.vazio { padding: 40px 16px; text-align: center; color: var(--mudo); }
.mono { font-family: var(--mono); }

.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--cinza); color: var(--txt2); white-space: nowrap; }
.chip.estoque { background: var(--azulc); color: var(--azul2); }
.chip.alugado { background: var(--larc); color: var(--lar); }
.chip.vendido { background: var(--verdec); color: var(--verde); }
.chip.conf { background: #FFF4CC; color: #6B5300; }

.barra-selecao { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 50; background: var(--txt); color: #fff; border-radius: 12px;
  padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 24px); }
.barra-selecao .btn:not(.claro) { background: #fff; }

dialog.modal { border: 0; border-radius: 12px; padding: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--txt); }
dialog.modal::backdrop { background: rgba(23,33,43,.45); }
.modal form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.m-cab { padding: 18px 20px 6px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.m-cab h2 { font-size: 18px; }
.m-corpo { padding: 10px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.m-pe { padding: 14px 20px 18px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--linha); }
.m-pe .esq { margin-right: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.fechar { background: transparent; border: 0; font-size: 22px; cursor: pointer; color: var(--mudo); min-width: 40px; min-height: 40px; }
.grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.grade .inteiro { grid-column: 1 / -1; }
.historico { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; border: 1px solid var(--linha); border-radius: 8px; padding: 10px 12px; }
.historico div { font-size: 13px; display: flex; gap: 10px; }
.historico .q { font-family: var(--mono); font-size: 12px; color: var(--mudo); white-space: nowrap; min-width: 112px; }
.secao-tit { font-size: 13px; font-weight: 700; color: var(--txt2); text-transform: uppercase; letter-spacing: .5px; }
.rapidas { display: flex; flex-wrap: wrap; gap: 8px; }

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { background: var(--sup); border: 1px solid var(--borda); border-radius: 12px; padding: 28px; width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { font-size: 21px; }
.menu-usuario { position: absolute; z-index: 60; background: var(--sup); border: 1px solid var(--borda); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 6px; display: flex; flex-direction: column; min-width: 200px; }
.menu-usuario button { text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 6px; cursor: pointer; }
.menu-usuario button:hover { background: var(--azulsel); }
.menu-usuario .quem { padding: 8px 12px; font-size: 12px; color: var(--mudo); border-bottom: 1px solid var(--linha); margin-bottom: 4px; }
.so-leitura .so-editor { display: none !important; }

#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--txt); color: #fff; border-radius: 10px; padding: 12px 16px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.erro { background: #8A1C1C; }

#impressao { display: none; }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; font-size: 10.5px; }
  #app, #maxx, #escolha, #toasts, dialog { display: none !important; }
  #impressao { display: block; }
  #impressao h1 { font-size: 18px; margin: 0 0 2px; }
  #impressao .sub { color: #444; margin-bottom: 10px; font-size: 11px; }
  #impressao table { width: 100%; border-collapse: collapse; }
  #impressao th { text-align: left; background: #1F5FA8 !important; color: #fff !important; padding: 5px 6px; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #impressao td { padding: 4px 6px; border-bottom: 1px solid #ccc; vertical-align: top; }
  #impressao tr { page-break-inside: avoid; }
  #impressao tr:nth-child(even) td { background: #F4F6F8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #impressao .tot { margin-top: 8px; font-weight: 700; }
}
@media (max-width: 700px) { #app, #maxx { padding: 14px 12px 110px; } .tabela-wrap { max-height: none; } }

/* escolha de sistema */
.escolha { max-width: 900px; margin: 0 auto; padding: 48px 24px; display: flex; flex-direction: column; gap: 16px; }
.escolha-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.escolha-cab h1 { font-size: 24px; }
.escolha-cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.sistema { text-align: left; background: var(--sup); border: 1px solid var(--borda); border-top: 6px solid var(--azul); border-radius: 12px; padding: 24px;
  display: flex; flex-direction: column; gap: 8px; cursor: pointer; min-height: 170px; }
.sistema[data-sistema="maxx"] { border-top-color: #B5651D; }
.sistema:hover { border-color: var(--azul); box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.sis-nome { font-size: 20px; font-weight: 700; }
.sis-desc { color: var(--mudo); }
.sis-num { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--txt2); }
.chip.es-OK, .chip.es-PO { background: var(--verdec); color: var(--verde); }
.chip.es-AR, .chip.es-AM { background: var(--larc); color: var(--lar); }
.chip.es-RE, .chip.es-RM, .chip.es-AE, .chip.es-EM { background: var(--azulc); color: var(--azul2); }
.chip.es-SC, .chip.es-OF, .chip.es-VD { background: #F2DEDC; color: #7A1F1A; }
.chip.saiu { background: var(--cinza); color: var(--mudo); }

.chip.etapa-autorizacao { background: var(--larc); color: var(--lar); }
.chip.etapa-reparo { background: var(--azulc); color: var(--azul2); }
.chip.etapa-ok { background: var(--verdec); color: var(--verde); }
.chip.etapa-vendido { background: #EDE3F6; color: #4E2A7A; }
.chip.etapa-saiu { background: var(--cinza); color: var(--mudo); }

/* ================= cores por sistema ================= */
:root { --acento: #1F5FA8; --acento2: #163F73; --acentoc: #E6EEF8; }
body[data-sistema="maxx"] { --acento: #B4561B; --acento2: #7E3A10; --acentoc: #FBEBDD; }
body[data-sistema="maxx"] .btn.primario { background: var(--acento); border-color: var(--acento); }
body[data-sistema="maxx"] .btn.primario:hover { background: var(--acento2); }
body[data-sistema="maxx"] :focus-visible { outline-color: var(--acento); }

/* faixa do topo colorida */
#app .topo, #maxx .topo { background: linear-gradient(120deg, var(--acento), var(--acento2)); color: #fff; border-radius: 14px; padding: 18px 22px;
  box-shadow: 0 6px 18px rgba(23,33,43,.12); }
#app .topo .status-dados, #maxx .topo .status-dados { color: #ffffffcc; }
#app .topo .status-dados.ok::before, #maxx .topo .status-dados.ok::before { color: #8FE3A8; }
.topo .btn { background: #ffffff1f; border-color: #ffffff55; color: #fff; }
.topo .btn:hover { background: #ffffff33; border-color: #fff; }
.topo .btn.primario, body[data-sistema="maxx"] .topo .btn.primario { background: #fff; border-color: #fff; color: var(--acento2); }
.topo .btn.primario:hover, body[data-sistema="maxx"] .topo .btn.primario:hover { background: var(--acentoc); }

/* cartões de resumo coloridos */
.cartao { --c: var(--acento); --cc: var(--acentoc); border-left: 6px solid var(--c); transition: transform .12s, box-shadow .12s; }
.cartao:hover { border-color: var(--c); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(23,33,43,.08); }
.cartao[aria-pressed="true"] { border-color: var(--c); background: var(--cc); box-shadow: inset 0 0 0 1px var(--c); }
.cartao .val { color: var(--c); }
.cartao[data-cor="azul"] { --c: #1F5FA8; --cc: #E6EEF8; }
.cartao[data-cor="laranja"] { --c: #C2410C; --cc: #FDEEE3; }
.cartao[data-cor="verde"] { --c: #1E7A3E; --cc: #E3F3E8; }
.cartao[data-cor="amarelo"] { --c: #A16207; --cc: #FEF6DC; }
.cartao[data-cor="roxo"] { --c: #6B3FA0; --cc: #F1EAF8; }
.cartao[data-cor="ardosia"] { --c: #334155; --cc: #EEF1F4; }

/* abas em formato de "pílula", com contador */
.abas { border-bottom: 0; gap: 6px; background: var(--sup); border: 1px solid var(--borda); border-radius: 12px; padding: 6px; }
.abas button { border: 0; margin: 0; border-radius: 8px; padding: 8px 12px; display: inline-flex; align-items: center; gap: 8px; }
.abas button:hover { background: var(--acentoc); color: var(--acento2); }
.abas button[aria-pressed="true"] { background: var(--acento); color: #fff; }
.abas .qtd { font-size: 12px; font-weight: 700; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--cinza); color: var(--txt2); text-align: center; }
.abas button[aria-pressed="true"] .qtd { background: #ffffff33; color: #fff; }

/* tabela: cabeçalho e seleção no tom do sistema */
.tabela th { background: var(--acentoc); color: var(--acento2); }
.tabela tbody tr.marcada td { background: var(--acentoc); }
.tabela tbody tr:hover td { background: #FAFBFC; }
.filtros { background: var(--sup); border: 1px solid var(--borda); border-radius: 12px; padding: 12px; }
.barra-selecao { background: var(--acento2); }

/* ================= tela de escolha ================= */
.escolha { max-width: 980px; padding: 40px 24px; gap: 18px; }
.escolha-topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(120deg, #17212B, #2B3A4A); color: #fff; border-radius: 14px; padding: 20px 24px; }
.escolha-topo h1 { font-size: 26px; }
.escolha-marca { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: #ffffffa8; }
.escolha-topo .btn { background: #ffffff1f; border-color: #ffffff55; color: #fff; }
.escolha-pergunta { margin: 4px 0 0; font-size: 16px; font-weight: 600; color: var(--txt2); }
.escolha-cartoes { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.sistema { --c: #1F5FA8; --c2: #163F73; --cc: #E6EEF8; padding: 0; border: 1px solid var(--borda); border-top: 0; overflow: hidden; gap: 0; min-height: 0;
  transition: transform .12s, box-shadow .12s; }
.sistema[data-sistema="maxx"] { --c: #B4561B; --c2: #7E3A10; --cc: #FBEBDD; border-top: 0; }
.sistema:hover { border-color: var(--c); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(23,33,43,.12); }
.sis-faixa { display: flex; align-items: center; gap: 14px; padding: 20px 22px; background: linear-gradient(120deg, var(--c), var(--c2)); color: #fff; }
.sis-ico { width: 52px; height: 52px; border-radius: 12px; background: #ffffff26; display: grid; place-items: center; flex: none; }
.sis-ico svg { width: 34px; height: 34px; }
.sis-faixa .sis-nome { font-size: 21px; }
.sis-corpo { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px 20px; flex: 1; }
.sis-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sis-stats .st { background: var(--cc); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.sis-stats b { font-size: 24px; line-height: 1.1; color: var(--c2); }
.sis-stats small { font-size: 12px; color: var(--txt2); }
.sis-entrar { margin-top: auto; align-self: flex-start; font-weight: 700; color: #fff; background: var(--c); border-radius: 8px; padding: 9px 14px; }
.sistema:hover .sis-entrar { background: var(--c2); }

/* login */
.login { background: linear-gradient(160deg, #E6EEF8 0%, var(--fundo) 45%, #FBEBDD 100%); }
.login-card { border-top: 6px solid #1F5FA8; box-shadow: 0 10px 30px rgba(23,33,43,.10); }

/* etapas da compra do armador */
.chip.designado { background: #EEF1F4; color: #334155; }
.chip.intencao { background: #F1EAF8; color: #5B2E91; }
.chip.pagamento { background: #DDF3F1; color: #0F5E57; }


/* ================= Embarques Evergreen ================= */
#ever { max-width: 1500px; margin: 0 auto; padding: 20px 24px 90px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 700px) { #ever { padding: 14px 12px 110px; } }
@media print { #ever { display: none !important; } }
body[data-sistema="ever"] { --acento: #0B6B3A; --acento2: #064A27; --acentoc: #E2F2E8; }
body[data-sistema="ever"] .btn.primario { background: var(--acento); border-color: var(--acento); }
body[data-sistema="ever"] .btn.primario:hover { background: var(--acento2); }
body[data-sistema="ever"] :focus-visible { outline-color: var(--acento); }
#ever .topo { background: linear-gradient(120deg, var(--acento), var(--acento2)); color: #fff; border-radius: 14px; padding: 18px 22px; box-shadow: 0 6px 18px rgba(23,33,43,.12); }
#ever .topo .status-dados { color: #ffffffcc; }
#ever .topo .status-dados.ok::before { color: #8FE3A8; }
body[data-sistema="ever"] .topo .btn.primario { background: #fff; border-color: #fff; color: var(--acento2); }
body[data-sistema="ever"] .topo .btn.primario:hover { background: var(--acentoc); }
.sistema[data-sistema="ever"] { --c: #0B6B3A; --c2: #064A27; --cc: #E2F2E8; border-top: 0; }
.chip.ev-in { background: var(--azulc); color: var(--azul2); }
.chip.ev-out { background: #E2F2E8; color: #0B4F2B; }
.chip.ev-ot { background: #F1EAF8; color: #5B2E91; }
.chip.ev-vendas { background: #DDF3F1; color: #0F5E57; }
.chip.ev-fx-extra { background: var(--larc); color: var(--lar); }
.chip.ev-fx-domfer { background: #F2DEDC; color: #7A1F1A; }
.chip.ev-dif { background: #F2DEDC; color: #7A1F1A; }
.ev-painel { background: var(--sup); border: 1px solid var(--borda); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ev-fech-topo { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ev-fech-topo .campo { flex: 0 1 170px; }
.ev-fech-topo .campo:first-child { flex: 1 1 260px; }
.ev-fech-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.ev-resumo { min-height: 0; max-height: none; border: 1px solid var(--linha); border-radius: 10px; }
.ev-resumo td { vertical-align: middle; }
.ev-resumo tbody tr { cursor: default; }
.ev-resumo .ev-total td { background: var(--acentoc); }
.ev-inp { width: 120px; padding: 6px 8px; min-height: 34px; border: 1px solid var(--borda2); border-radius: 6px; }
.ev-anteriores { display: flex; flex-direction: column; gap: 14px; }
.ev-fcard { background: var(--sup); border: 1px solid var(--borda); border-left: 6px solid var(--acento); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ev-fcard header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.ev-fcard h3 { font-size: 17px; }
.ev-fcard .tabela tbody tr { cursor: default; }
.ev-ftot { font-size: 22px; color: var(--acento2); }
.ev-facoes { display: flex; gap: 8px; flex-wrap: wrap; }
.ev-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; background: var(--acentoc); border-radius: 10px; padding: 12px; }
.ev-info > div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.ev-info .rot { font-size: 11px; font-weight: 700; color: var(--mudo); text-transform: uppercase; letter-spacing: .4px; }
.ev-nfgrade { display: flex; flex-direction: column; gap: 12px; }
.ev-nfl { display: grid; grid-template-columns: 1.3fr .7fr 1fr 1fr 1fr; gap: 10px; align-items: end; }
@media (max-width: 700px) { .ev-nfl { grid-template-columns: 1fr 1fr; } }
.mudo { color: var(--mudo); }

/* Embarques Evergreen: off hire e proibidos (Estoque Bira) */
.cartao[data-cor="vermelho"] { --c: #B42318; --cc: #FDECEA; }
.cartao[data-cor="offhire"] { --c: #B45309; --cc: #FFF3DC; }
.chip.ev-offhire-chip { background: #F59E0B; color: #3B2200; letter-spacing: .4px; }
.chip.ev-proib-chip { background: #B42318; color: #fff; }
.tabela tbody tr.ev-offhire td { background: #FFF6E5; }
.tabela tbody tr.ev-offhire td:first-child { box-shadow: inset 4px 0 0 #F59E0B; }
.tabela tbody tr.ev-proibido td { background: #FDECEA; }
.tabela tbody tr.ev-proibido td:first-child { box-shadow: inset 4px 0 0 #B42318; }
.tabela tbody tr.ev-atencao td { background: #FEF6DC; }
.tabela tbody tr.marcada.ev-offhire td, .tabela tbody tr.marcada.ev-proibido td { background: var(--acentoc); }
.aviso.ev-proibido-box { background: #FDECEA; border-color: #E9A39B; color: #7A1A12; }
.aviso.ev-offhire-box { background: #FFF6E5; border-color: #F5C77A; color: #6B3B00; }
.ev-link { background: none; border: 0; padding: 0; color: var(--acento2); text-decoration: underline; cursor: pointer; font: inherit; font-weight: 600; }
.ev-drop { border: 2px dashed var(--borda2); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; background: #FAFBF9; }
.ev-drop.sobre { border-color: var(--acento); background: var(--acentoc); }
.ev-fonte { border: 1px solid var(--borda); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ev-fonte-cab { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ev-fonte-cab .btn { margin-left: auto; }
.ev-aba { display: flex; flex-direction: column; gap: 6px; }
.ev-mapa { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.ev-mapa .campo select { min-height: 34px; padding: 5px 8px; font-size: 13px; }
.ev-mais summary { font-size: 13px; }
.btn.claro-escuro { background: transparent; }

/* fotos (Maxx) */
.mx-fotos-acoes { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mx-fotos-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.mx-foto { padding: 0; border: 1px solid var(--borda); border-radius: 8px; overflow: hidden; background: #F7F8F5; cursor: zoom-in; aspect-ratio: 4 / 3; }
.mx-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mx-foto:hover { border-color: var(--acento); }
.mx-foto-grande { display: flex; flex-direction: column; gap: 8px; }
.mx-foto-grande img { max-width: 100%; max-height: 65vh; object-fit: contain; border-radius: 8px; background: #111; align-self: center; }
.mx-foto-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mx-btn-fotos { min-height: 28px; padding: 2px 8px; }
.mx-btn-fotos.pos { border-color: #8FC9A3; background: #EEF8F1; color: #1E5F33; }
.sis-nome .sis-sub { display: block; font-size: 12px; font-weight: 600; letter-spacing: .6px; opacity: .85; margin-top: 2px; }

/* Cofre de Acessos */
body[data-sistema="cofre"] { --acento: #2F3A4A; --acento2: #1A222D; --acentoc: #E7EAEE; }
.sistema[data-sistema="cofre"] { --c: #2F3A4A; --c2: #1A222D; --cc: #E7EAEE; border-top: 0; }
#cofre { max-width: 1300px; margin: 0 auto; padding: 20px 24px 60px; display: flex; flex-direction: column; gap: 16px; }
#cofre .topo { background: linear-gradient(120deg, var(--acento), var(--acento2)); color: #fff; border-radius: 14px; padding: 18px 22px; }
#cofre .topo .status-dados { color: #ffffffcc; }
#cfCorpo { display: flex; flex-direction: column; gap: 14px; }
.cf-tranca { max-width: 440px; margin: 24px auto; background: var(--sup); border: 1px solid var(--borda); border-radius: 14px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.cf-tranca h2 { font-size: 20px; }
.cf-cadeado { font-size: 34px; }
.cf-barra { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
@media print { #cofre { display: none !important; } }

/* ---------- Contas do Pátio (só o dono) ---------- */
body[data-sistema="contas"] { --acento: #5A3D8A; --acento2: #3A2560; --acentoc: #EEE8F7; }
.sistema[data-sistema="contas"] { --c: #5A3D8A; --c2: #3A2560; --cc: #EEE8F7; border-top: 0; }
#contas { max-width: 1300px; margin: 0 auto; padding: 20px 24px 60px; display: flex; flex-direction: column; gap: 16px; }
#contas .topo { background: linear-gradient(120deg, var(--acento), var(--acento2)); color: #fff; border-radius: 14px; padding: 18px 22px; }
#contas .topo .status-dados { color: #ffffffcc; }
#ctCorpo { display: flex; flex-direction: column; gap: 16px; }
.ct-resumo { display: flex; flex-wrap: wrap; gap: 12px; }
.ct-num { background: var(--sup); border: 1px solid var(--borda); border-radius: 12px; padding: 12px 18px; min-width: 150px; display: flex; flex-direction: column; }
.ct-num b { font-size: 22px; } .ct-num small { color: var(--mudo); }
.ct-num.atraso { border-color: #C9312C; background: #FCEBEA; } .ct-num.atraso b { color: #8A1C1C; }
.ct-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ct-cartao { --fc: #6B7280; --fc2: #4B5563; text-align: left; color: #fff; background: linear-gradient(135deg, var(--fc), var(--fc2)); border: 0; border-radius: 14px; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: transform .12s, box-shadow .12s; box-shadow: 0 4px 14px color-mix(in srgb, var(--fc2) 35%, transparent); position: relative; }
.ct-cartao:hover, .ct-cartao:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 24px color-mix(in srgb, var(--fc2) 50%, transparent); outline: none; }
.ct-cartao:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.ct-cartao.atraso { --fc: #FF1F1F; --fc2: #B80000; animation: ct-pulso 1.6s ease-in-out infinite; }
.ct-cartao.perto { --fc: #FF8A00; --fc2: #E04E00; }
.ct-cartao.aguarda { --fc: #9B30FF; --fc2: #5E14C4; }
.ct-cartao.aberto { --fc: #1E7BFF; --fc2: #0A45C9; }
.ct-cartao.ok { --fc: #18C25A; --fc2: #088A3A; }
.ct-cartao.inativa { --fc: #9CA3AF; --fc2: #6B7280; opacity: .7; }
@keyframes ct-pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 31, 31, .75), 0 4px 14px rgba(184, 0, 0, .4); } 50% { box-shadow: 0 0 0 10px rgba(255, 31, 31, 0), 0 4px 14px rgba(184, 0, 0, .4); } }
@media (prefers-reduced-motion: reduce) { .ct-cartao.atraso { animation: none; outline: 4px solid #FF1F1F; outline-offset: 3px; } }
.ct-selo { align-self: flex-start; background: rgba(255,255,255,.95); color: var(--fc2); font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 3px 10px; border-radius: 999px; }
.ct-cartao.atraso .ct-selo { background: #FFEB3B; color: #8A0000; }
.ct-topo { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; } .ct-topo strong { font-size: 18px; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.ct-local { font-size: 12px; color: rgba(255,255,255,.85); white-space: nowrap; }
.ct-como { font-size: 13px; color: #fff; font-weight: 600; } .ct-quando { font-size: 13px; color: rgba(255,255,255,.88); }
.ct-status { font-weight: 800; font-size: 15px; background: rgba(0,0,0,.18); border-radius: 8px; padding: 6px 10px; }
.ct-rodape { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,.9); border-top: 1px solid rgba(255,255,255,.35); padding-top: 8px; margin-top: 4px; }
.ct-rodape span { color: #fff; font-weight: 800; }
/* placar colorido no topo */
.ct-placar { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; }
.ct-pl { --fc: #6B7280; --fc2: #4B5563; text-align: left; border: 0; border-radius: 14px; padding: 12px 14px; color: #fff; background: linear-gradient(135deg, var(--fc), var(--fc2)); display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; cursor: pointer; transition: transform .12s; box-shadow: 0 4px 12px color-mix(in srgb, var(--fc2) 30%, transparent); }
.ct-pl:hover { transform: translateY(-2px); }
.ct-pl .ct-pl-ico { grid-row: 1 / 3; font-size: 26px; }
.ct-pl b { font-size: 24px; line-height: 1.1; } .ct-pl small { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.92); }
.ct-pl.atraso { --fc: #FF1F1F; --fc2: #B80000; } .ct-pl.perto { --fc: #FF8A00; --fc2: #E04E00; } .ct-pl.aguarda { --fc: #9B30FF; --fc2: #5E14C4; }
.ct-pl.aberto { --fc: #1E7BFF; --fc2: #0A45C9; } .ct-pl.ok { --fc: #18C25A; --fc2: #088A3A; } .ct-pl.total { --fc: #263238; --fc2: #11181C; cursor: default; }
.ct-pl.total:hover { transform: none; }
.ct-pl.zero { filter: saturate(.25) brightness(1.1); opacity: .6; }
.ct-pl.atraso:not(.zero) { animation: ct-pulso 1.6s ease-in-out infinite; }
.ct-pl.ativo { outline: 4px solid #111; outline-offset: 2px; }
.ct-filtro-ativo { font-size: 14px; }
dialog.modal.ct-janela { width: min(1100px, calc(100vw - 24px)); }
.ct-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 16px; margin-bottom: 12px; }
.ct-info small { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--mudo); }
.ct-info .largo { grid-column: 1 / -1; }
.ct-status-linha { padding: 8px 12px; border-radius: 8px; font-weight: 600; margin-bottom: 12px; background: var(--cinza); }
.ct-status-linha { color: #fff; font-size: 15px; padding: 10px 14px; }
.ct-status-linha.atraso { background: linear-gradient(135deg, #FF1F1F, #B80000); } .ct-status-linha.perto { background: linear-gradient(135deg, #FF8A00, #E04E00); }
.ct-status-linha.ok { background: linear-gradient(135deg, #18C25A, #088A3A); } .ct-status-linha.aguarda { background: linear-gradient(135deg, #9B30FF, #5E14C4); }
.ct-status-linha.aberto { background: linear-gradient(135deg, #1E7BFF, #0A45C9); }
.ct-tab td { vertical-align: top; } .ct-acoes { white-space: nowrap; } .ct-acoes .btn + .btn { margin-left: 4px; }
.ct-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.ct-tag { color: #fff; padding: 3px 10px; }
.ct-tag.ok { background: #13A84C; } .ct-tag.atraso { background: #E00000; box-shadow: 0 0 0 2px #FFD0D0; } .ct-tag.aberto { background: #1E6FF0; }
.ct-tab tr:has(.ct-tag.atraso) td { background: #FFE5E5; }
.ct-anexo { border: 1px solid var(--borda); background: var(--sup); border-radius: 999px; padding: 3px 10px; font-size: 12px; margin: 0 4px 4px 0; cursor: pointer; }
.ct-anexo:hover { border-color: var(--acento); }
.ct-docs .lnk { display: block; }
.lnk { background: none; border: 0; padding: 0; color: var(--acento, #1F5FA8); text-decoration: underline; cursor: pointer; font-size: 13px; }
.ct-solta { border: 2px dashed var(--borda2); border-radius: 12px; padding: 16px; text-align: center; margin-bottom: 12px; background: #FAFAF8; }
.ct-solta.sobre { border-color: var(--acento); background: var(--acentoc); }
.ct-chave { font-family: var(--mono); font-size: 16px; letter-spacing: .03em; word-break: break-all; }
.ct-img { max-width: 100%; max-height: 60vh; display: block; margin: 0 auto 12px; border-radius: 8px; }
.ct-rev input, .ct-rev select { min-height: 32px; padding: 4px 6px; border: 1px solid var(--borda2); border-radius: 6px; max-width: 190px; }
@media print { #contas { display: none !important; } }

/* ---------- acesso aos sistemas ---------- */
.sis-acesso { border: 1px solid var(--borda); border-radius: 10px; padding: 8px 12px 10px; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 12px; }
.sis-acesso legend { font-size: 12px; font-weight: 600; color: var(--mudo); padding: 0 4px; }
.sis-matriz th, .sis-matriz td { text-align: center; vertical-align: middle; }
.sis-matriz th:first-child, .sis-matriz td:first-child { text-align: left; }
.sis-matriz th .lnk { font-size: 11px; font-weight: 400; }
.sis-chave { position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer; }
.sis-chave input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sis-chave span { position: absolute; inset: 0; background: #C9CDC4; border-radius: 999px; transition: background .15s; pointer-events: none; }
.sis-chave span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.sis-chave input:checked + span { background: #2E7D46; }
.sis-chave input:checked + span::after { transform: translateX(20px); }
.sis-chave input:focus-visible + span { outline: 2px solid var(--azul); outline-offset: 2px; }

/* ---------- relatório das Contas do Pátio ---------- */
dialog.modal.ct-relatorio { width: min(1200px, calc(100vw - 24px)); }
.ct-filtros { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 14px; }
.ct-filtros .campo { flex: 0 1 170px; }
.ct-atalhos { font-size: 13px; display: flex; gap: 10px; align-items: center; padding-bottom: 10px; }
.ct-chips { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.ct-chips label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--borda); border-radius: 999px; padding: 4px 12px 4px 8px; font-size: 13px; cursor: pointer; background: var(--sup); }
.ct-chips input { margin: 0; }
.ct-bola { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; flex: none; }
.ct-chips .ct-bola { margin-right: 0; }
.ct-relatorio .ct-resumo { margin-bottom: 12px; }
.ct-relatorio .ct-num b { font-size: 19px; }
.ct-destaques { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ct-destaques li { padding: 7px 12px; border-radius: 8px; background: var(--azulsel); border-left: 4px solid var(--azul); font-size: 13px; }
.ct-destaques li.alerta { background: #FFF3D6; border-left-color: #D98A00; }
.ct-destaques li.erro { background: #FCEBEA; border-left-color: #C9312C; }
.ct-h { font-size: 15px; margin: 18px 0 8px; }
.ct-graf { width: 100%; height: auto; max-height: 300px; display: block; background: var(--sup); border: 1px solid var(--borda); border-radius: 10px; }
.ct-legenda { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; }
.ct-legenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ct-rel td, .ct-rel th { white-space: nowrap; }
.ct-rel tfoot td { font-weight: 700; border-top: 2px solid var(--borda2); background: var(--fundo); }
.ct-barra-pct { display: inline-block; width: 60px; height: 8px; background: var(--linha); border-radius: 4px; margin-right: 6px; vertical-align: middle; overflow: hidden; }
.ct-barra-pct span { display: block; height: 100%; background: var(--acento); }
.ct-det { margin-top: 14px; } .ct-det summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
@media print {
  #contas, #cofre, #ever { display: none !important; }
  .ct-imp h2 { font-size: 13px; margin: 14px 0 6px; }
  .ct-imp h2.quebra { page-break-before: always; }
  .ct-imp-kpi { display: flex; gap: 10px; margin: 8px 0 10px; }
  .ct-imp-kpi div { border: 1px solid #ccc; border-radius: 6px; padding: 6px 10px; flex: 1; }
  .ct-imp-kpi small { display: block; color: #555; font-size: 9px; text-transform: uppercase; }
  .ct-imp-kpi b { font-size: 13px; }
  .ct-imp .ct-graf { max-height: 230px; border: 1px solid #ccc; }
  .ct-imp .ct-graf rect, .ct-legenda i, .ct-bola, .ct-barra-pct span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ct-imp .ct-legenda { font-size: 10px; }
  .ct-imp tfoot td { font-weight: 700; border-top: 2px solid #999; }
  .ct-imp ul { margin: 0; padding-left: 18px; }
  .ct-imp .mudo { color: #777; }
  #impressao .ct-imp th { background: #5A3D8A !important; }
}

/* ---------- aviso de duplicidade ---------- */
.ct-dup { margin-top: 10px; padding: 10px 14px; border-radius: 10px; font-size: 14px; color: #fff; }
.ct-dup.forte { background: linear-gradient(135deg, #FF1F1F, #B80000); animation: ct-pulso 1.6s ease-in-out infinite; }
.ct-dup.fraco { background: linear-gradient(135deg, #FF8A00, #E04E00); }
.ct-dup-selo { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; margin-bottom: 4px; color: #fff; }
.ct-dup-selo.forte { background: #E00000; } .ct-dup-selo.fraco { background: #FF7A00; } .ct-dup-selo.junta { background: #1E6FF0; }
.ct-rev tr.dup-forte td { background: #FFE0E0; } .ct-rev tr.dup-fraco td { background: #FFF0DC; }
@media (prefers-reduced-motion: reduce) { .ct-dup.forte { animation: none; } }

/* ---------- cadastro da empresa no cartão ---------- */
.ct-cad { display: flex; flex-direction: column; gap: 1px; font-size: 12px; color: rgba(255,255,255,.92); background: rgba(255,255,255,.14); border-radius: 8px; padding: 6px 9px; }
.ct-cad .ct-razao { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #fff; }
.ct-cad .ct-cnpj { font-family: var(--mono); font-size: 12px; }
.ct-cad .ct-semcad { font-style: italic; opacity: .85; }
.ct-cnpj-linha { display: flex; gap: 6px; } .ct-cnpj-linha input { flex: 1; }
.ct-nova { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.ct-nova input { border: 2px solid #1E6FF0 !important; font-weight: 600; }

/* ---------- conferência do número do container ---------- */
.num-ok { color: #13A84C; font-weight: 800; margin-left: 4px; }
.num-aceito { color: #8A6D00; font-weight: 800; margin-left: 4px; font-size: 12px; }
.num-erro { display: inline-block; background: #E00000; color: #fff; font-weight: 800; font-size: 11px; padding: 1px 7px; border-radius: 999px; margin-left: 4px; }
.campo .ajuda.ok { color: #0B7A35; font-weight: 600; }
.campo .ajuda.erro { font-weight: 600; }
#avisoNumeros .btn { margin-left: 8px; }
@media print { .num-ok, .num-aceito { display: none; } }

/* ================= tela inicial — acabamento (out/2026) ================= */
#escolha { max-width: 1160px; padding: 44px 28px 56px; gap: 22px; }
.escolha-topo { background: none; color: var(--txt); padding: 0 0 18px; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--borda); }
.escolha-id { display: flex; align-items: center; gap: 16px; }
.escolha-logo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 16px; letter-spacing: .5px; color: #fff;
  background: linear-gradient(135deg, #1F5FA8 0%, #0B6B3A 55%, #5A3D8A 100%); box-shadow: 0 6px 16px rgba(31,95,168,.25); flex: none; }
.escolha-marca { color: var(--mudo); font-size: 11px; letter-spacing: 1.2px; }
.escolha-topo h1 { font-size: 28px; font-weight: 700; letter-spacing: -.3px; margin: 2px 0 0; color: var(--txt); }
.escolha-data { font-size: 13px; color: var(--mudo); margin-top: 2px; }
.escolha-topo .btn { background: var(--sup); border-color: var(--borda2); color: var(--txt); box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.escolha-topo .btn:hover { border-color: var(--txt2); }
.escolha-pergunta { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--mudo); margin: 4px 0 -6px; }
.escolha-cartoes { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; align-items: stretch; }

.sistema { position: relative; display: flex; flex-direction: column; background: var(--sup); border: 1px solid #E3E5E0; border-radius: 16px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.04); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.sistema::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--c), var(--c2)); }
.sistema:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 35%, #E3E5E0); box-shadow: 0 2px 4px rgba(16,24,40,.05), 0 16px 36px rgba(16,24,40,.10); }
.sistema:focus-visible { outline: 3px solid color-mix(in srgb, var(--c) 55%, transparent); outline-offset: 3px; }

.sis-faixa { background: none; color: var(--txt); padding: 24px 24px 0; gap: 14px; }
.sis-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--cc); color: var(--c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 14%, transparent); }
.sis-ico svg { width: 26px; height: 26px; }
.sis-faixa .sis-nome { font-size: 18px; font-weight: 700; letter-spacing: -.2px; line-height: 1.25; }
.sis-nome .sis-sub { color: var(--c); opacity: 1; font-size: 10.5px; font-weight: 700; letter-spacing: .9px; margin-top: 3px; }

.sis-corpo { padding: 12px 24px 22px; gap: 18px; }
.sis-desc { font-size: 13.5px; line-height: 1.5; color: var(--txt2); }
.sis-stats { gap: 0; border-top: 1px solid var(--linha); border-bottom: 1px solid var(--linha); padding: 12px 0; }
.sis-stats .st { background: none; border-radius: 0; padding: 0 12px; }
.sis-stats .st:first-child { padding-left: 0; }
.sis-stats .st + .st { border-left: 1px solid var(--linha); }
.sis-stats b { font-size: 26px; font-weight: 700; color: var(--txt); font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.sis-stats small { font-size: 11.5px; color: var(--mudo); }
.sis-tags { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--linha); padding-top: 14px; }
.sis-tags span { font-size: 11.5px; font-weight: 600; color: var(--c); background: var(--cc); padding: 4px 10px; border-radius: 999px; }

.sis-entrar { margin-top: auto; background: none; color: var(--c); padding: 0; border-radius: 0; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.sistema:hover .sis-entrar { background: none; color: var(--c2); }
.sis-seta { display: inline-block; transition: transform .18s ease; }
.sistema:hover .sis-seta { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) { .sistema, .sis-seta { transition: none; } .sistema:hover { transform: none; } .sistema:hover .sis-seta { transform: none; } }
@media (max-width: 600px) { #escolha { padding: 24px 16px 40px; } .escolha-topo h1 { font-size: 23px; } .escolha-cartoes { grid-template-columns: 1fr; } }

/* ---------- NFs do faturamento Evergreen: arquivos e relatório ---------- */
.ev-arqcel { white-space: normal; min-width: 150px; }
.ev-arq { display: inline-flex; align-items: center; gap: 4px; background: #E8F3EC; border: 1px solid #BBD9C6; border-radius: 999px; padding: 2px 4px 2px 9px; margin: 2px 4px 2px 0; font-size: 12.5px; }
.ev-arq a { color: #0B5A33; text-decoration: none; font-weight: 600; }
.ev-arq a:hover { text-decoration: underline; }
.ev-arq-x { border: 0; background: transparent; color: #8A1C1C; cursor: pointer; font-size: 12px; padding: 2px 6px; border-radius: 999px; }
.ev-arq-x:hover { background: #F6D9D9; }
.ev-anexar { cursor: pointer; }
.ev-arqs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding-top: 2px; }
@media print { #impressao .ev-imp th { background: #0B5A33 !important; } }

@media print { #impressao .cf-imp .mono { font-family: Consolas, monospace; word-break: break-all; } #impressao .cf-imp td { font-size: 10px; } }

/* ===== Evergreen: Lavação, Debris e Reparo estrutural ===== */
.ev-modos { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.ev-modos button { border: 1px solid var(--borda2, #cfd6d2); background: #fff; border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 600; cursor: pointer; color: inherit; }
.ev-modos button[aria-pressed="true"] { background: #0B5A33; border-color: #0B5A33; color: #fff; }
.ev-modos .qtd:not(:empty) { background: #F2B134; color: #3a2a00; border-radius: 999px; padding: 0 7px; margin-left: 4px; font-size: .8em; }
#ever.modo-serv .ev-mov-only { display: none !important; }
.ev-serv[hidden] { display: none; }
.ev-serv { display: flex; flex-direction: column; gap: 12px; }
.sv-barra { display: flex; gap: 8px; flex-wrap: wrap; }
.sv-grupos { display: flex; gap: 8px; flex-wrap: wrap; }
.sv-gchip { background: #eef3f0; border-radius: 8px; padding: 4px 10px; font-size: .9em; }
.sv-g-estrutura { background: #fdf1d8; }
.sv-g-lavacao { background: #e3f0fa; }
.sv-chip { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: .85em; font-weight: 600; background: #eee; white-space: nowrap; }
.sv-chip.sv-autorizado { background: #d9f0e1; color: #0B5A33; }
.sv-chip.sv-parcial { background: #fff0c4; color: #6b4a00; }
.sv-chip.sv-nao_autorizado { background: #f8dada; color: #8A1C1C; }
.sv-chip.sv-venda { background: #e6e0f5; color: #3d2a7a; }
.sv-chip.sv-aguardando { background: #eceff1; color: #455a64; }
.sv-itens { display: flex; flex-wrap: wrap; gap: 4px; }
.sv-item { font-size: .78em; font-weight: 600; border-radius: 6px; padding: 1px 6px; background: #eceff1; white-space: nowrap; }
.sv-item.ok { background: #d9f0e1; color: #0B5A33; }
.sv-item.nao { background: #f8dada; color: #8A1C1C; text-decoration: line-through; }
.sv-alerta { color: #b26a00; cursor: help; font-size: 1.1em; }
.sv-servs { display: flex; flex-direction: column; gap: 6px; }
.sv-serv { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; border: 1px solid var(--borda2, #dde3df); border-radius: 8px; padding: 6px 10px; }
.sv-qtd { width: 64px; }
.sv-ap { display: none; font-size: .9em; white-space: nowrap; }
.sv-parcial .sv-ap { display: inline-flex; gap: 4px; align-items: center; }
.sv-estl { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; margin-bottom: 6px; align-items: center; }
.sv-resumo-reg { display: flex; gap: 18px; background: #eef3f0; border-radius: 8px; padding: 8px 12px; }
.sv-meses { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 10px; }
.sv-mes { display: inline-flex; gap: 6px; align-items: center; }
@media print { #impressao .ev-imp .mudo { color: #555; } }

/* Refinos visuais operacionais: cada ajuste pode ser desligado pelo botão fixo. */
body:not(.visual-classico)[data-sistema="bira"]::before,
body:not(.visual-classico)[data-sistema="maxx"]::before,
body:not(.visual-classico)[data-sistema="ever"]::before,
body:not(.visual-classico)[data-sistema="fifo"]::before,
body:not(.visual-classico)[data-sistema="als"]::before,
body:not(.visual-classico)[data-sistema="nfmei"]::before,
body:not(.visual-classico)[data-sistema="cofre"]::before,
body:not(.visual-classico)[data-sistema="contas"]::before { opacity: .012; }
body:not(.visual-classico):has(#escolha:not([hidden]))::before { opacity: .025; }
body:not(.visual-classico) #login::before {
  opacity: .52; filter: brightness(1.5) saturate(1.25);
  background-position: right 2% bottom -5%; background-size: min(84vw, 1560px) auto;
}
body:not(.visual-classico) #login {
  background:
    radial-gradient(ellipse at 82% 18%, rgba(232,177,70,.2), transparent 30rem),
    radial-gradient(ellipse at 14% 88%, rgba(27,126,83,.32), transparent 38rem),
    linear-gradient(128deg, #0A2924 0%, #104433 48%, #176346 100%);
}
body:not(.visual-classico) .login-card { overflow: hidden; border-top: 1px solid rgba(255,255,255,.76); }
body:not(.visual-classico) .login-card::before {
  content: ''; position: absolute; z-index: 2; top: 0; left: 11%; right: 11%; height: 4px;
  border-radius: 0 0 999px 999px; background: linear-gradient(90deg, #F2B134, #0B6B3A 48%, #F2B134);
}
body:not(.visual-classico) .login-logo {
  width: 60px; height: 60px; border: 1px solid rgba(11,107,58,.13);
  background: linear-gradient(145deg, #F7FAF7, #E9F3EC);
  box-shadow: 0 7px 20px rgba(11,73,47,.17), inset 0 0 0 3px rgba(255,255,255,.65);
}
body:not(.visual-classico) .login-sobretitulo { color: #0B6B3A; }

body:not(.visual-classico) .tabela-wrap { scrollbar-color: #AAB7B0 #EEF2EF; scrollbar-width: thin; }
body:not(.visual-classico) .tabela-wrap::-webkit-scrollbar { height: 12px; width: 12px; }
body:not(.visual-classico) .tabela-wrap::-webkit-scrollbar-thumb { background: #AAB7B0; border: 3px solid #EEF2EF; border-radius: 99px; }
body:not(.visual-classico) table.tabela { width: max-content; min-width: 100%; }
body:not(.visual-classico) .tabela th { background: #F0F4F1; color: #394A42; }
body:not(.visual-classico) .tabela tbody tr:nth-child(even):not(.ev-offhire):not(.ev-proibido):not(.ev-atencao) td { background: #FAFBFA; }
body:not(.visual-classico) .tabela tbody tr:hover td { background: #EDF4F0; }
body:not(.visual-classico) .tabela tbody tr.marcada td { background: var(--acentoc, var(--azulsel)); }
body:not(.visual-classico) .tabela th.sel, body:not(.visual-classico) .tabela td.sel { position: sticky; left: 0; z-index: 3; min-width: 40px; background: #F0F4F1; box-shadow: 1px 0 0 var(--borda); }
body:not(.visual-classico) .tabela th[data-col="numero"], body:not(.visual-classico) .tabela td[data-col="numero"],
body:not(.visual-classico) .tabela th[data-col="container"], body:not(.visual-classico) .tabela td[data-col="container"] {
  position: sticky; left: 40px; z-index: 2; min-width: 142px; background: #fff; box-shadow: 1px 0 0 var(--borda), 8px 0 12px -12px rgba(20,40,32,.55);
}
body:not(.visual-classico) .tabela th[data-col="numero"], body:not(.visual-classico) .tabela th[data-col="container"] { z-index: 4; background: #F0F4F1; }
body:not(.visual-classico) .tabela tbody tr:nth-child(even) td[data-col="numero"], body:not(.visual-classico) .tabela tbody tr:nth-child(even) td[data-col="container"] { background: #FAFBFA; }
body:not(.visual-classico) .tabela tbody tr:hover td[data-col="numero"], body:not(.visual-classico) .tabela tbody tr:hover td[data-col="container"] { background: #EDF4F0; }
body:not(.visual-classico) .tabela tbody tr.marcada td[data-col="numero"], body:not(.visual-classico) .tabela tbody tr.marcada td[data-col="container"] { background: var(--acentoc, var(--azulsel)); }
.tabela-info { align-items: center; }
body:not(.visual-classico) .sistema { min-height: 232px; }
body:not(.visual-classico) .sis-faixa { padding-top: 20px; }
body:not(.visual-classico) .sis-corpo { padding-bottom: 18px; }
body:not(.visual-classico) .ct-lista td { padding-top: 8px; padding-bottom: 8px; line-height: 1.35; }
body:not(.visual-classico) .tabela-info::after { content: 'Role para os lados para ver mais colunas'; color: #7A8580; font-size: 11px; margin-left: auto; }
.colunas-menu { position: relative; order: 3; margin-left: 8px; z-index: 8; }
.colunas-menu summary { list-style: none; cursor: pointer; color: var(--txt2); background: #fff; }
.colunas-menu summary::-webkit-details-marker { display: none; }
.colunas-opcoes { position: absolute; top: calc(100% + 6px); right: 0; width: min(280px, calc(100vw - 32px)); max-height: min(60vh, 420px); overflow: auto; display: grid; gap: 2px; padding: 8px; border: 1px solid var(--borda); border-radius: 10px; background: #fff; box-shadow: 0 12px 30px rgba(20,35,28,.18); }
.colunas-opcoes label { display: flex; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.colunas-opcoes label:hover { background: #F1F5F2; }
.colunas-opcoes input { min-height: auto; width: 16px; height: 16px; }

body:not(.visual-classico) .acao-grupo { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
body:not(.visual-classico) .ct-acao-grupo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
body:not(.visual-classico) #maxx .acoes { gap: 10px 14px; }
body:not(.visual-classico) #maxx .acao-grupo + .acao-grupo { padding-left: 12px; border-left: 1px solid rgba(255,255,255,.2); }
body:not(.visual-classico) .cf-barra { align-items: center; padding: 10px; border: 1px solid var(--borda); border-radius: 12px; background: rgba(255,255,255,.82); }
body:not(.visual-classico) .ct-acao-secundario { margin-left: auto; padding-left: 12px; border-left: 1px solid var(--borda); }

body:not(.visual-classico) .pg-vazio { display: flex; align-items: center; gap: 20px; max-width: 780px; margin: 32px auto 12px; padding: 24px 28px; border: 1px solid #DCE7DF; border-radius: 16px; background: rgba(255,255,255,.92); box-shadow: 0 8px 24px rgba(20,48,42,.06); }
body:not(.visual-classico) .pg-vazio-icone { display: grid; place-items: center; width: 58px; height: 58px; flex: none; border-radius: 16px; background: #E7F2EA; font-size: 28px; }
body:not(.visual-classico) .pg-vazio h2 { margin: 0 0 6px; color: #173F30; font-size: 18px; }
body:not(.visual-classico) .pg-vazio p { margin: 0; color: #5A6A61; line-height: 1.55; }
body:not(.visual-classico) .pg-vazio-etapas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
body:not(.visual-classico) .pg-vazio-etapas span { padding: 5px 9px; border-radius: 999px; background: #F0F5F1; color: #416451; font-size: 12px; }

@media (max-width: 760px) {
  body:not(.visual-classico) .pg-vazio { align-items: flex-start; margin: 16px 4px; padding: 18px; }
  body:not(.visual-classico) .pg-vazio-icone { width: 46px; height: 46px; font-size: 22px; }
  body:not(.visual-classico) #maxx .acao-grupo + .acao-grupo { padding-left: 0; border-left: 0; }
  body:not(.visual-classico) .ct-acao-secundario { margin-left: 0; padding-left: 0; border-left: 0; }
}
@media (max-width: 520px) {
  body:not(.visual-classico) .pg-vazio { flex-direction: column; gap: 12px; }
  .tabela-info::after { display: none; }
}
@media print { .colunas-menu { display: none !important; } }

/* ---------- Contas do Pátio: modo lista ---------- */
.ct-modo { display: inline-flex; border: 1px solid var(--borda2); border-radius: 8px; overflow: hidden; align-self: flex-end; }
.ct-modo .btn { border: 0; border-radius: 0; min-height: 40px; }
.ct-modo .btn + .btn { border-left: 1px solid var(--borda2); }
.ct-modo .btn[aria-pressed="true"] { background: var(--acento); color: #fff; font-weight: 600; }
.ct-lista-wrap { max-height: none; min-height: 0; background: var(--sup); border: 1px solid var(--borda); border-radius: 12px; }
.ct-lista td { vertical-align: middle; }
.ct-lista .ct-sub { display: block; font-size: 12px; color: var(--mudo); font-weight: 400; }
.ct-lista tbody tr.ct-linha-conta td:first-child { box-shadow: inset 5px 0 0 var(--lc, #9CA3AF); }
.ct-linha-conta.atraso { --lc: #E00000; } .ct-linha-conta.perto { --lc: #FF8A00; } .ct-linha-conta.aguarda { --lc: #9B30FF; }
.ct-linha-conta.aberto { --lc: #1E7BFF; } .ct-linha-conta.ok { --lc: #18C25A; } .ct-linha-conta.inativa { --lc: #9CA3AF; opacity: .65; }
.ct-lista tbody tr.ct-linha-conta.atraso td { background: #FFF1F1; }
.ct-lista tbody tr.ct-linha-conta:hover td { background: var(--acentoc); }
.ct-lista tbody tr.ct-linha-conta:focus-visible { outline: 2px solid var(--acento); outline-offset: -2px; }
.ct-tag.perto { background: #E8700A; } .ct-tag.aguarda { background: #7E2BE0; } .ct-tag.inativa { background: #6B7280; }
.ct-lista .ct-tag { white-space: nowrap; }

/* Login: identidade Transbrazil e acabamento de acesso */
#login {
  position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; padding: 24px;
  background:
    radial-gradient(ellipse at 82% 78%, rgba(55,132,91,.36), transparent 42%),
    radial-gradient(ellipse at 12% 12%, rgba(214,177,99,.12), transparent 31%),
    linear-gradient(135deg, #0E2927 0%, #154638 56%, #225A42 100%);
}
#login::before {
  content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  opacity: .38; filter: brightness(1.3) saturate(1.12);
  background: url('/transbrazil-watermark.png') right 3% bottom 7% / min(92vw, 1480px) auto no-repeat;
}
#login::after {
  content: ''; position: absolute; z-index: -1; width: 520px; height: 520px; left: -240px; top: -280px;
  border: 1px solid rgba(224,195,133,.20); border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255,255,255,.025), 0 0 0 78px rgba(255,255,255,.018); pointer-events: none;
}
.login-card {
  position: relative; z-index: 1; width: min(460px, 100%); gap: 17px; padding: 34px;
  border: 1px solid rgba(255,255,255,.76); border-top: 1px solid rgba(255,255,255,.76); border-radius: 20px;
  background: rgba(255,255,255,.97); box-shadow: 0 28px 72px rgba(4,20,17,.32);
}
.login-marca { display: flex; align-items: center; gap: 15px; }
.login-logo {
  width: 54px; height: 54px; display: grid; place-items: center; flex: none; border-radius: 16px;
  color: #173A33; background: #F2F5F3;
  box-shadow: 0 5px 14px rgba(20,48,42,.14);
}
.login-logo img, .escolha-logo img { display: block; width: 46px; height: 40px; object-fit: contain; }
.login-sobretitulo { color: #927642; font-size: 9px; font-weight: 800; letter-spacing: 1.7px; }
.login-card h1 { margin-top: 3px; color: #19372F; font-size: 24px; letter-spacing: -.45px; }
.login-descricao { margin: -7px 0 0; color: #68736D; font-size: 13px; line-height: 1.5; }
.login-separador { display: flex; align-items: center; gap: 10px; color: #87918B; font-size: 9px; font-weight: 700; letter-spacing: 1.25px; }
.login-separador::before, .login-separador::after { content: ''; height: 1px; flex: 1; background: #E8ECE9; }
.login-card .campo { gap: 6px; color: #4F5C55; font-size: 12px; }
.login-card .campo input { min-height: 46px; padding: 10px 12px; border-color: #D9E1DC; border-radius: 10px; background: #FBFCFB; }
.login-card .campo input:focus { border-color: #287356; outline: 3px solid rgba(40,115,86,.12); }
.login-entrar { width: 100%; min-height: 48px; justify-content: space-between; padding: 11px 15px; border-color: #15573E !important; border-radius: 10px; background: #15573E !important; font-weight: 700; }
.login-entrar:hover { background: #0E4632 !important; }
.login-entrar span { color: #E7D19A; font-size: 18px; transition: transform .16s ease; }
.login-entrar:hover span { transform: translateX(3px); }
.login-rodape { margin: 0; padding-top: 12px; border-top: 1px solid #E8ECE9; color: #87918B; font-size: 11px; text-align: center; }

/* Saudação, relógio e identidade na tela de escolha */
.escolha-topo { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: 'identidade hora usuario'; }
.escolha-id { grid-area: identidade; min-width: 0; }
.escolha-topo > .btn-usuario { grid-area: usuario; justify-self: end; }
.escolha-hora-box { grid-area: hora; display: flex; align-items: center; gap: 11px; padding: 0 22px; border-left: 1px solid rgba(255,255,255,.18); }
.escolha-hora-icone { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; background: rgba(255,255,255,.08); color: #F1D9A4; font-size: 29px; line-height: 1; }
.escolha-hora-box > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.escolha-hora-label { color: #D8C18F; font-size: 9px; font-weight: 700; letter-spacing: 1.25px; white-space: nowrap; }
.escolha-hora-box time { color: #fff; font: 600 20px/1.25 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .4px; }

@media (max-width: 1050px) {
  .escolha-topo { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'identidade usuario' 'hora hora'; }
  .escolha-hora-box { justify-self: start; padding: 13px 0 0; border: 0; border-top: 1px solid rgba(255,255,255,.16); }
}
@media (max-width: 600px) {
  #login { padding: 16px; }
  .login-card { padding: 26px 22px; border-radius: 17px; }
  .login-logo { width: 48px; height: 48px; border-radius: 14px; }
  .login-card h1 { font-size: 22px; }
  #login::before { background-position: 68% bottom 4%; background-size: 118vw auto; }
  .escolha-hora-box { gap: 8px; }
  .escolha-hora-icone { width: 32px; height: 32px; border-radius: 10px; font-size: 25px; }
  .escolha-hora-box time { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .login-entrar span { transition: none; } .login-entrar:hover span { transform: none; } }

/* Botão fixo para voltar à tela inicial (escolha de sistema) */
.btn-inicio { display: none; position: fixed; left: max(14px, env(safe-area-inset-left, 0px)); bottom: max(14px, env(safe-area-inset-bottom, 0px)); z-index: 40; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; border: 0; background: #0B5A33; color: #fff; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.28); }
.btn-inicio:hover { background: #0e6e3e; }
.btn-inicio:focus-visible { outline: 3px solid #F2B134; outline-offset: 2px; }
body[data-sistema="bira"] .btn-inicio, body[data-sistema="maxx"] .btn-inicio, body[data-sistema="ever"] .btn-inicio, body[data-sistema="fifo"] .btn-inicio, body[data-sistema="cofre"] .btn-inicio, body[data-sistema="contas"] .btn-inicio { display: inline-flex; }
@media print { .btn-inicio { display: none !important; } }

/* Evergreen: envio do FIFO */
.ev-fifo { display: flex; flex-direction: column; gap: 12px; padding: 0 0 24px; }
.ev-fifo h3 { margin: 0 0 8px; font-size: 15px; } .ev-fifo h3 small { font-weight: 400; color: var(--mudo, #667); }
.fifo-grade { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
.fifo-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fifo-slot { padding: 14px; } .fifo-campos { display: grid; gap: 8px; }
.fifo-aviso { color: #8A5A00; background: #FFF4D6; border-radius: 8px; padding: 6px 10px; margin: 8px 0 0; font-size: 13px; }
.fifo-tab { border-collapse: collapse; } .fifo-tab th, .fifo-tab td { border: 1px solid var(--borda2, #ccc); padding: 4px 8px; text-align: center; font-size: 13px; }
.fifo-tab input { width: 64px; text-align: center; }
.fifo-prev { background: #fff; border: 1px solid var(--borda2, #ccc); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.fifo-assunto { margin-bottom: 10px; } .fifo-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
@media (max-width: 900px) { .fifo-grade, .fifo-slots { grid-template-columns: 1fr; } }

/* ===== Tela inicial: portal operacional refinado (2026-10-28) ===== */
body:has(#escolha:not([hidden])) {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 12% 4%, rgba(31,95,82,.09), transparent 34rem),
    radial-gradient(ellipse at 92% 80%, rgba(196,151,75,.08), transparent 30rem),
    #F2F5F3;
}
body:has(#escolha:not([hidden]))::before {
  content: ''; position: fixed; z-index: 2; inset: 0; pointer-events: none;
  opacity: .055;
  background: url('/transbrazil-watermark.png') center 56% / min(82vw, 1180px) auto no-repeat;
}
#escolha { position: relative; z-index: 1; max-width: 1280px; padding: 38px 32px 64px; gap: 24px; }
.escolha-topo {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 148px; padding: 27px 30px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 20px;
  background: linear-gradient(112deg, #102B2A 0%, #163D37 58%, #1E5143 100%);
  box-shadow: 0 18px 42px rgba(20,48,42,.16);
}
.escolha-topo::before {
  content: ''; position: absolute; z-index: -1; right: -70px; top: -170px;
  width: 410px; height: 410px; border: 1px solid rgba(226,190,119,.22);
  border-radius: 50%; box-shadow: 0 0 0 32px rgba(255,255,255,.025), 0 0 0 66px rgba(255,255,255,.02);
}
.escolha-id { gap: 18px; }
.escolha-logo {
  width: 56px; height: 56px; border-radius: 16px;
  color: #183B34; background: rgba(255,255,255,.96);
  box-shadow: 0 8px 24px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.55);
}
.escolha-marca { color: #D8C18F; font-size: 10px; font-weight: 700; letter-spacing: 1.8px; }
.escolha-topo h1 { margin-top: 4px; color: #fff; font-size: clamp(25px, 3vw, 32px); letter-spacing: -.7px; }
.escolha-data { margin-top: 5px; color: rgba(255,255,255,.68); }
.escolha-topo .btn {
  position: relative; z-index: 1; min-height: 42px; padding-inline: 16px;
  color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22);
  border-radius: 10px; backdrop-filter: blur(8px);
}
.escolha-topo .btn:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.48); }
.escolha-pergunta {
  margin: 5px 0 -8px; color: #183B34; font-size: 20px; font-weight: 700;
  text-transform: none; letter-spacing: -.25px;
}
.escolha-cartoes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.sistema {
  min-height: 254px; border-color: #DCE4DF; border-radius: 17px;
  box-shadow: 0 3px 10px rgba(21,43,36,.035), 0 10px 24px rgba(21,43,36,.045);
}
.sistema::before { height: 3px; opacity: .9; }
.sistema:hover {
  border-color: color-mix(in srgb, var(--c) 38%, #DCE4DF);
  box-shadow: 0 8px 18px rgba(21,43,36,.07), 0 20px 38px rgba(21,43,36,.09);
}
.sis-faixa { padding: 23px 24px 0; gap: 15px; }
.sis-ico {
  width: 50px; height: 50px; border-radius: 14px;
  background: color-mix(in srgb, var(--cc) 86%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 15%, transparent);
}
.sis-ico svg { width: 27px; height: 27px; }
.sis-faixa .sis-nome { font-size: 18px; letter-spacing: -.25px; }
.sis-nome .sis-sub { font-size: 9.5px; letter-spacing: 1.05px; }
.sis-corpo { padding: 13px 24px 22px 89px; gap: 15px; }
.sis-desc { min-height: 40px; color: #59655F; font-size: 13px; line-height: 1.55; }
.sis-stats { padding: 11px 0; }
.sis-stats .st { padding-inline: 14px; }
.sis-stats b { font-size: 25px; color: #20332C; }
.sis-stats small { font-size: 11px; }
.sis-tags { padding-top: 11px; }
.sis-tags span { font-size: 10.5px; }
.sis-entrar { color: var(--c2); font-size: 13px; }
.sis-seta { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--cc); }
.sistema:hover .sis-seta { transform: translateX(3px); }
.escolha-vazia { max-width: 100%; }
@media (max-width: 760px) {
  #escolha { padding: 22px 16px 42px; gap: 20px; }
  .escolha-topo { min-height: 0; padding: 22px 20px; border-radius: 17px; }
  .escolha-topo::before { right: -215px; }
  .escolha-id { gap: 13px; }
  .escolha-logo { width: 46px; height: 46px; border-radius: 13px; }
  .login-logo img, .escolha-logo img { width: 40px; height: 35px; }
  .escolha-topo h1 { font-size: 24px; }
  .escolha-cartoes { grid-template-columns: 1fr; gap: 14px; }
  .sistema { min-height: 0; }
  .sis-corpo { padding-left: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .sistema, .sistema:hover, .sis-seta { transition: none; transform: none; }
}

/* Repete a identidade da tela de acesso em todos os módulos */
body[data-sistema="bira"], body[data-sistema="maxx"], body[data-sistema="ever"],
body[data-sistema="fifo"], body[data-sistema="als"], body[data-sistema="nfmei"], body[data-sistema="cofre"], body[data-sistema="contas"] {
  min-height: 100vh; position: relative; isolation: isolate;
  background:
    radial-gradient(ellipse at 12% 4%, rgba(31,95,82,.09), transparent 34rem),
    radial-gradient(ellipse at 92% 80%, rgba(196,151,75,.08), transparent 30rem),
    #F2F5F3;
}
body:has(#escolha:not([hidden]))::before,
body[data-sistema="bira"]::before, body[data-sistema="maxx"]::before, body[data-sistema="ever"]::before,
body[data-sistema="fifo"]::before, body[data-sistema="als"]::before, body[data-sistema="nfmei"]::before, body[data-sistema="cofre"]::before, body[data-sistema="contas"]::before {
  content: ''; position: fixed; z-index: 2; inset: 0; pointer-events: none; opacity: .055;
  background: url('/transbrazil-watermark.png') center 56% / min(82vw, 1180px) auto no-repeat;
}
#app, #maxx, #ever, #fifo, #als, #nfmei, #cofre, #contas { position: relative; z-index: 1; }

#app .topo, #maxx .topo, #ever .topo, #fifo .topo, #als .topo, #nfmei .topo, #cofre .topo, #contas .topo {
  position: relative; isolation: isolate; overflow: hidden;
  color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 16px;
  background: linear-gradient(112deg, #102B2A 0%, #163D37 58%, #1E5143 100%);
  box-shadow: 0 14px 34px rgba(20,48,42,.16);
}
.topo::after {
  content: ''; position: absolute; z-index: -1; right: -70px; top: -170px;
  width: 410px; height: 410px; border: 1px solid rgba(226,190,119,.22); border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(255,255,255,.025), 0 0 0 66px rgba(255,255,255,.02); pointer-events: none;
}
.topo > * { position: relative; z-index: 1; }
.topo .status-dados { color: rgba(255,255,255,.72); }
.topo .status-dados.ok::before { color: #9BE0B0; }
.topo .btn { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); }
.topo .btn:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.48); }
#app .topo .btn.primario, #maxx .topo .btn.primario, #ever .topo .btn.primario,
#fifo .topo .btn.primario, #als .topo .btn.primario, #nfmei .topo .btn.primario, #cofre .topo .btn.primario, #contas .topo .btn.primario {
  color: #15573E; background: #fff; border-color: #fff;
}
#app .topo .btn.primario:hover, #maxx .topo .btn.primario:hover, #ever .topo .btn.primario:hover,
#fifo .topo .btn.primario:hover, #als .topo .btn.primario:hover, #nfmei .topo .btn.primario:hover, #cofre .topo .btn.primario:hover, #contas .topo .btn.primario:hover { background: #F2E9D2; }
@media (max-width: 700px) {
  .topo::after { right: -225px; }
}

.sis-lembrete { display: block; background: #FFF4D6; color: #7A4B00; font-size: 13px; font-weight: 600; padding: 6px 12px; }
.fifo-ok { color: #0B5A33; background: #E8F3EC; border-radius: 8px; padding: 6px 10px; margin: 0; font-size: 13px; }

/* Evergreen: programação de embarque */
.ev-prog { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.pg-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pg-esp { flex: 1; } .pg-titulo { font-size: 17px; }
.pg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.pg-card { text-align: left; border: 1px solid var(--borda2, #ccc); background: #fff; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; font: inherit; }
.pg-card:hover { border-color: var(--acento, #0B5A33); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.pg-card-topo { display: flex; align-items: baseline; gap: 8px; font-size: 16px; } .pg-card-topo .pg-chip { margin-left: auto; }
.pg-card-sub, .pg-card-data { color: var(--mudo, #667); font-size: 13px; }
.pg-kpis { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.pg-ruim { color: #B42318; } .pg-aten { color: #8A5A00; }
.pg-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #E8ECEF; color: #394552; }
.pg-chip-confirmado { background: #E1EEFB; color: #12467A; } .pg-chip-concluido { background: #E8F3EC; color: #0B5A33; } .pg-chip-cancelado { background: #F6D9D9; color: #8A1C1C; }
.pg-saida-status { display: inline-flex; align-items: center; gap: 5px; }
.pg-bandeira { color: #0B6B3A; font-size: 17px; font-weight: 800; line-height: 1; }
.chip.pg-faturado { background: #DDF0E2; color: #145C32; }
.chip.pg-pendente-fat { background: #E5EFF9; color: #245A85; }
.pg-es { display: inline-block; min-width: 26px; text-align: center; border-radius: 6px; padding: 1px 5px; font-weight: 700; font-size: 12px; background: #E8F3EC; color: #0B5A33; }
.pg-es-AR, .pg-es-AE, .pg-es-WS { background: #FFF4CC; color: #6B5300; } .pg-es-OF, .pg-es-RE { background: #F6D9D9; color: #8A1C1C; }
.pg-aviso { font-size: 12.5px; } .pg-n-proibido { color: #B42318; font-weight: 700; } .pg-n-atencao { color: #8A5A00; } .pg-n-info { color: var(--mudo, #667); }
.pg-cancelada td { opacity: .5; text-decoration: line-through; }
.pg-hist { font-size: 13px; } .pg-hist summary { cursor: pointer; }

/* ---- Faturamento ALS ---- */
.als-grupo { border: 1px solid var(--borda2, #ccc); border-radius: 12px; background: #fff; margin: 10px 0; overflow: hidden; }
.als-grupo-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(20, 90, 60, .07); }
.als-grupo-topo label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.als-nota { border: 1px solid var(--borda2, #ccc); border-radius: 10px; padding: 12px 16px; margin-bottom: 12px; }
.als-nota h4 { margin: 0 0 8px; font-size: 15px; }
.als-valor { font-size: 28px; font-weight: 700; margin: 6px 0; }

/* Faturamento ALS / Envio do FIFO: mesmo layout do Evergreen (margens, cabeçalho e botão Trocar sistema visíveis) */
#als, #nfmei, #fifo { max-width: 1500px; margin: 0 auto; padding: 20px 24px 90px; display: flex; flex-direction: column; gap: 16px; }
#als[hidden], #nfmei[hidden], #fifo[hidden] { display: none; }
@media (max-width: 700px) { #als, #nfmei, #fifo { padding: 14px 12px 110px; } }
@media print { #als, #nfmei, #fifo { display: none !important; } }
body[data-sistema="als"] { --acento: #0B6B3A; --acento2: #064A27; --acentoc: #E2F2E8; }
body[data-sistema="als"] .btn.primario { background: var(--acento); border-color: var(--acento); }
body[data-sistema="als"] .btn.primario:hover { background: var(--acento2); }
.als-caixa { border: 1px solid var(--borda2, #ccc); border-radius: 12px; background: #fff; padding: 12px 16px; margin: 16px 0; }
.als-caixa .tabela-wrap { margin-top: 8px; }
.als-arquivo { background: rgba(0, 0, 0, .03); }
.als-arquivo > summary { cursor: pointer; font-weight: 600; }
.nfm-barra { display: block; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .1); overflow: hidden; margin-top: 4px; }
.nfm-barra i { display: block; height: 100%; background: var(--c, #6B3FA0); }
.nfm-cancel td { opacity: .5; text-decoration: line-through; }
body[data-sistema="nfmei"] { --acento: #1F5FA8; --acento2: #164A85; --acentoc: #E6EEF8; }
body[data-sistema="nfmei"] .btn.primario { background: var(--acento); border-color: var(--acento); }
body[data-sistema="nfmei"] .btn.primario:hover { background: var(--acento2); }
body[data-sistema="nfmei"] .ev-modos button[aria-pressed="true"] { background: var(--acento); border-color: var(--acento); }
.das-mei { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.das-leg { display: grid; gap: 8px; font-size: 14px; }
.das-q { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
.das-q.verde, .das-chip.verde { background: #1E7A3E; } .das-q.amarelo, .das-chip.amarelo { background: #F5B921; } .das-q.vermelho, .das-chip.vermelho { background: #D92D20; } .das-q.roxo, .das-chip.roxo { background: #7A1FA2; } .das-q.cinza { background: #D5D9DD; border: 1px solid #aaa; }
.das-chip { color: #fff; margin-left: 8px; } .das-chip.amarelo { color: #3a2a00; }
.das-prog { display: flex; height: 26px; border-radius: 13px; overflow: hidden; font-size: 12px; font-weight: 700; margin-bottom: 8px; background: #eee; }
.das-prog .pago { background: #1E7A3E; color: #fff; display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }
.das-prog .avencer { background: #F5B921; color: #3a2a00; display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }
.das-linha { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 14px; align-items: center; padding: 10px 6px; border-top: 1px solid var(--borda2, #ddd); border-left: 4px solid transparent; }
.das-linha.das-verde { border-left-color: #1E7A3E; } .das-linha.das-amarelo { border-left-color: #F5B921; } .das-linha.das-vermelho { border-left-color: #D92D20; background: rgba(217, 45, 32, .06); } .das-linha.das-roxo { border-left-color: #7A1FA2; }
.das-val { text-align: right; min-width: 110px; }
.das-tot { display: flex; justify-content: space-between; padding: 10px 6px; border-top: 1px solid var(--borda2, #ddd); font-size: 16px; }
@media (max-width: 700px) { .das-linha { grid-template-columns: auto 1fr; } .das-val { text-align: left; } }
.sv-local { display: inline-block; margin-top: 3px; font-weight: 600; font-size: 11px; line-height: 1.4; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.sv-local.saiu { background: #E7F0FB; color: #1F5FA8; }
.sv-local.patio { background: #E3F3E8; color: #1E7A3E; }
