:root {
  --navy: #16213E;
  --gold: #E99B4D;
  --cobre: #C97A3D;
  --cinza: #6B7280;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #F3F4F8;
  color: #1F2430;
}

.topo {
  background: var(--navy);
  color: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.marca { font-weight: 800; letter-spacing: 1px; }
.marca-gold { color: var(--gold); }
.subtitulo { color: #DDE3EF; font-size: 14px; flex: 1; }
.link-voltar { color: #DDE3EF; font-size: 13px; text-decoration: none; }
.link-voltar:hover { text-decoration: underline; }

main { max-width: 960px; margin: 24px auto; padding: 0 16px; }

.cartao {
  background: #fff;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.cartao h2 { margin-top: 0; color: var(--navy); font-size: 18px; }
.descricao { color: var(--cinza); font-size: 13.5px; }

.botao {
  background: var(--cobre);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}
.botao:hover { background: #B5692F; }
.botao:disabled { background: #C9C9C9; cursor: not-allowed; }
.botao-secundario { background: #fff; color: var(--navy); border: 1px solid #D0D5E0; }
.botao-secundario:hover { background: #F3F4F8; }

.status-texto { margin-left: 12px; font-size: 13.5px; color: var(--cinza); }
.ultimo-resultado { margin-top: 12px; font-size: 13.5px; color: #1F2430; }
.ultimo-resultado .erro { color: #B3261E; }

.tabela { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
.tabela th, .tabela td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #EEF0F5; }
.tabela th { color: var(--cinza); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.tabela .acoes button { background: none; border: none; cursor: pointer; color: var(--cobre); font-size: 13px; }
.tabela .acoes button:hover { text-decoration: underline; }
.pill { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill-ok { background: #E4F5E9; color: #1E7A3D; }
.pill-off { background: #F5E4E4; color: #A32C2C; }

.area-rolavel { max-height: 320px; overflow-y: auto; }
.area-rolavel .tabela thead th { position: sticky; top: 0; background: #fff; z-index: 1; }

.lista-arquivos { list-style: none; padding: 0; margin: 8px 0 0; }
.lista-arquivos li { padding: 8px 4px; border-bottom: 1px solid #EEF0F5; font-size: 13.5px; display: flex; justify-content: space-between; gap: 12px; }
.lista-arquivos a { color: var(--navy); text-decoration: none; font-weight: 600; }
.lista-arquivos a:hover { text-decoration: underline; }
.lista-arquivos .meta { color: var(--cinza); font-size: 12.5px; white-space: nowrap; }
.lista-arquivos button.pasta { background: none; border: none; text-align: left; color: var(--navy); font-weight: 600; cursor: pointer; font-size: 13.5px; }
.lista-arquivos button.pasta:hover { text-decoration: underline; }

.trilha-linha { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.trilha { font-size: 13px; color: var(--cinza); }
.trilha button { background: none; border: none; color: var(--cobre); cursor: pointer; font-size: 13px; padding: 0; }
.trilha button:hover { text-decoration: underline; }
.link-lote { color: var(--cobre); font-size: 12.5px; text-decoration: none; white-space: nowrap; }
.link-lote:hover { text-decoration: underline; }
.cliente-resumo { color: var(--cinza); font-size: 12.5px; }

.modal-fundo {
  position: fixed; inset: 0; background: rgba(22,33,62,0.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-fundo[hidden] { display: none; }
.modal-caixa {
  background: #fff; border-radius: 14px; padding: 24px; width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 10px;
}
.modal-caixa h3 { margin: 0 0 4px; color: var(--navy); }
.modal-caixa label { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: #333; }
.modal-caixa input[type="text"], .modal-caixa input[type="password"], .modal-caixa input[type="file"] {
  padding: 8px; border: 1px solid #D0D5E0; border-radius: 6px; font-size: 14px;
}
.linha-checkbox { flex-direction: row !important; align-items: center; gap: 8px !important; }
.modal-botoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.erro-form { color: #B3261E; font-size: 13px; margin: 0; }
