:root {
  --team-green: #00703c;
  --team-paper: #ffffff;
  --team-ink: #263b31;
  --team-border: #dce5df;
  --team-muted: #65776d;
  --team-back: #f4f6f5;
  --team-yellow: #f7d520;
  --team-error: #b91c1c;
}

#team-login {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--team-back);
  overflow-y: auto;
  padding: 40px 20px;
}

.team-entry {
  max-width: 380px;
  margin: 0 auto;
  color: var(--team-ink);
  text-align: center;
}

.team-entry img {
  width: 140px;
  height: 60px;
  object-fit: contain;
  margin: 0 auto 20px;
  background: var(--team-green);
  border-radius: 12px;
  padding: 8px;
}

.team-entry h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.team-entry p {
  color: var(--team-muted);
  font-size: 13px;
  margin-bottom: 18px;
}

#team-names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}

.team-button {
  border: 1px solid var(--team-border);
  border-radius: 12px;
  background: var(--team-paper);
  padding: 12px;
  color: var(--team-ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.team-button:hover {
  border-color: var(--team-green);
}

.team-button.selected {
  background: var(--team-green);
  color: #fff;
  border-color: var(--team-green);
}

#team-error {
  color: var(--team-error);
  font-size: 12px;
  margin-top: 12px;
}

#team-retry {
  margin-top: 14px;
  width: 100%;
}

[hidden] {
  display: none !important;
}

/* topo: não quebrar o texto dos selos em telas estreitas */
header .flex.items-center.justify-between { gap: 6px; }
header .flex.items-center.justify-between > span,
#team-person { white-space: nowrap; }
#team-person { font-size: 11px; padding-left: 8px; padding-right: 8px; }

/* ===== Transcrever caderno (IA) ===== */
.tr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tr-btn-abrir { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--team-green); color: var(--team-green); background: #fff; border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.tr-btn-abrir:active { background: #eef6f1; }

.tr-fundo { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.tr-folha { background: #fff; width: 100%; max-width: 640px; border-radius: 20px 20px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom, 0px)); color: var(--team-ink); }
.tr-folha h3, .tr-topo h3 { font-size: 17px; font-weight: 800; margin: 0; }
.tr-sub { font-size: 12px; color: var(--team-muted); margin: 4px 0 14px; }
.tr-opcao { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; border: 1px solid var(--team-border); background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 10px; cursor: pointer; color: var(--team-ink); }
.tr-opcao:active { background: #f4f6f5; }
.tr-opcao i { font-size: 22px; color: var(--team-green); width: 28px; text-align: center; }
.tr-opcao b { display: block; font-size: 15px; }
.tr-opcao small { display: block; font-size: 12px; color: var(--team-muted); margin-top: 1px; }
.tr-cancelar { width: 100%; border: 0; background: transparent; color: var(--team-muted); font-weight: 700; font-size: 14px; padding: 10px; cursor: pointer; }
#tr-carregando { text-align: center; padding: 18px 0 6px; }
#tr-carregando .tr-sub { margin-bottom: 0; }
.tr-spin { width: 38px; height: 38px; margin: 0 auto 14px; border: 4px solid #dce5df; border-top-color: var(--team-green); border-radius: 50%; animation: tr-gira .9s linear infinite; }
@keyframes tr-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tr-spin { animation-duration: 3s; } }

.tr-cheio { align-items: stretch; background: var(--team-back); }
.tr-tela { width: 100%; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; height: 100%; color: var(--team-ink); }
.tr-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 4px; background: #fff; border-bottom: 1px solid var(--team-border); }
.tr-topo .tr-sub { margin-bottom: 10px; }
.tr-x { border: 0; background: transparent; font-size: 20px; color: var(--team-muted); padding: 4px 6px; cursor: pointer; }
.tr-setor-lote { padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--team-border); font-size: 13px; }
.tr-setor-lote label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; }
.tr-setor-lote select { border: 1px solid var(--team-border); border-radius: 10px; padding: 7px 10px; font-size: 14px; background: #fff; }
.tr-lista { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; }
.tr-item { background: #fff; border: 1px solid var(--team-border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.tr-item.tr-warn { border-color: #e9b949; }
.tr-item.tr-err { border-color: #d94a4a; }
.tr-item.tr-off { opacity: .55; }
.tr-item-topo { display: flex; justify-content: space-between; align-items: center; }
.tr-chk { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.tr-chk input { width: 20px; height: 20px; accent-color: var(--team-green); }
.tr-del { border: 0; background: transparent; color: #9aa8a0; font-size: 16px; padding: 4px 6px; cursor: pointer; }
.tr-item label { display: block; font-size: 11px; font-weight: 700; color: var(--team-muted); }
.tr-in { display: block; width: 100%; margin-top: 3px; padding: 9px 11px; border: 1px solid var(--team-border); border-radius: 10px; background: #f9fbfa; font-size: 14px; color: var(--team-ink); font-weight: 500; }
.tr-in:focus { outline: 2px solid rgba(0,112,60,.35); border-color: var(--team-green); }
.tr-dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tr-flag { font-size: 12px; font-weight: 700; margin: 0; }
.tr-flag-warn { color: #92600a; }
.tr-flag-err { color: #b42323; }
.tr-rodape { display: flex; gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--team-border); }
.tr-prim, .tr-sec { border-radius: 12px; font-size: 14px; font-weight: 800; padding: 12px; cursor: pointer; }
.tr-prim { flex: 1; border: 0; background: var(--team-green); color: #fff; }
.tr-prim:disabled { opacity: .45; }
.tr-sec { border: 1.5px solid var(--team-green); background: #fff; color: var(--team-green); }
