:root {
  --verde: #2f6b3a;
  --verde-escuro: #1f4a28;
  --bege: #f7f3ea;
  --texto: #2b2b2b;
  --borda: #ddd6c5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bege);
  color: var(--texto);
}

header {
  background: var(--verde);
  color: white;
  padding: 1rem 1.5rem;
}

header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
}

.marca {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-header {
  height: 40px;
  width: auto;
  display: block;
  background: #fff;
  border-radius: 8px;
  padding: 4px 10px;
}

.logo-login {
  max-width: 220px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

nav a {
  color: white;
  text-decoration: none;
  margin-right: 1rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

nav a:hover {
  text-decoration: underline;
  opacity: 1;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  color: white;
  font: inherit;
  font-size: 0.95rem;
  opacity: 0.9;
  padding: 0;
  margin-right: 1rem;
  cursor: pointer;
  width: auto;
}

.nav-dropdown-toggle:hover {
  background: none;
  opacity: 1;
  text-decoration: underline;
}

.nav-dropdown.open .nav-dropdown-toggle {
  opacity: 1;
  text-decoration: underline;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--borda);
  border-radius: 6px;
  padding: 0.4rem 0;
  min-width: 230px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  z-index: 20;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  color: var(--texto);
  opacity: 1;
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.nav-dropdown-menu a:hover {
  background: var(--bege);
  text-decoration: none;
}

.nav-dropdown-conta {
  margin-left: auto;
}

.nav-dropdown-conta .nav-dropdown-menu {
  left: auto;
  right: 0;
}

main {
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

h2 {
  color: var(--verde-escuro);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--borda);
}

th, td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--borda);
}

th {
  background: var(--verde-escuro);
  color: white;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  background: white;
  padding: 1.5rem;
  border: 1px solid var(--borda);
  border-radius: 6px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: bold;
}

.form input,
.form select,
.form textarea {
  padding: 0.5rem;
  border: 1px solid var(--borda);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.form textarea {
  min-height: 5rem;
  resize: vertical;
}

button {
  background: var(--verde);
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  width: fit-content;
}

button:hover {
  background: var(--verde-escuro);
}

.acoes {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.acoes form {
  margin: 0;
}

.btn-excluir {
  background: none;
  border: none;
  color: #b3261e;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  width: auto;
}

.btn-excluir:hover {
  color: #7a1a12;
  background: none;
}

fieldset {
  border: 1px solid var(--borda);
  border-radius: 4px;
  padding: 0.75rem 1rem;
}

fieldset legend {
  font-weight: bold;
  padding: 0 0.3rem;
}

.checkbox-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal !important;
  padding: 0.2rem 0;
}

.checkbox-label input {
  width: auto;
}

.alerta {
  background: #fdecea;
  border: 1px solid #f5c6c0;
  color: #8a2c22;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.sucesso {
  background: #e6f4ea;
  border: 1px solid #b7dfc1;
  color: #1f4a28;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.usuario-logado {
  margin: 0 0 0.75rem 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

.usuario-logado a {
  color: white;
}

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-conteudo {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  justify-content: center;
  max-width: 900px;
  width: 100%;
  padding: 1.5rem;
}

.login-main {
  max-width: 400px;
  width: 100%;
  padding: 0;
  flex: 1 1 320px;
}

.mural-preview {
  flex: 1 1 360px;
  max-width: 440px;
  max-height: 80vh;
  overflow-y: auto;
}

.mural-preview h2 {
  color: var(--verde-escuro);
  font-size: 1.1rem;
}

.mural-item {
  background: white;
  border: 1px solid var(--borda);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.mural-item-cabecalho {
  margin: 0 0 0.3rem 0;
}

.login-main h1 {
  color: var(--verde-escuro);
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.login-main h2 {
  margin-top: 0;
}

.main-largo {
  max-width: 1100px;
}

.ajuda {
  font-size: 0.9rem;
  color: #555;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.chip {
  background: var(--bege);
  border: 1px solid var(--borda);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.chip-vazio {
  color: #888;
  font-style: italic;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 700px;
  margin-bottom: 1.5rem;
}

.chat-bolha {
  max-width: 80%;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--borda);
}

.chat-bolha p {
  margin: 0;
}

.chat-bolha-funcionario {
  align-self: flex-end;
  background: var(--verde);
  color: white;
  border-color: var(--verde-escuro);
}

.chat-bolha-coordenador {
  align-self: flex-start;
  background: white;
}

.chat-autor {
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--verde-escuro);
  margin-bottom: 0.2rem !important;
}

.chat-bolha-pendente {
  background: var(--bege);
  font-style: italic;
}

.chat-form {
  max-width: 700px;
}

.codigo-documento {
  font-size: 0.85em;
  color: var(--verde-escuro);
  background: var(--bege);
  border: 1px solid var(--borda);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}

.chip-confirmada {
  background: #e6f4ea;
  border-color: #b7dfc1;
  color: #1f4a28;
  font-weight: bold;
}

.alerta-inline {
  color: #b3261e;
}

.form-revisao {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-revisao select {
  min-width: 220px;
}

.filtros-documentos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.filtros-documentos input,
.filtros-documentos select {
  padding: 0.5rem;
  border: 1px solid var(--borda);
  border-radius: 4px;
  font-size: 1rem;
}

.filtros-documentos input {
  min-width: 260px;
}

.btn-secundario {
  background: none;
  border: 1px solid var(--borda);
  color: var(--texto);
}

.btn-secundario:hover {
  background: var(--bege);
}

.proposta {
  background: white;
  border: 1px solid var(--borda);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.proposta h4 {
  margin: 0.5rem 0;
}

.proposta-cabecalho {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.proposta-revisao {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--borda);
}

.badge {
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.8rem;
  font-weight: bold;
  white-space: nowrap;
}

.badge-aprovada {
  background: #e6f4ea;
  color: #1f4a28;
}

.badge-corrigida {
  background: #fff4e0;
  color: #8a5a00;
}

.badge-rejeitada {
  background: #fdecea;
  color: #8a2c22;
}

.badge-pendente {
  background: var(--bege);
  color: #666;
}

.badge-reprovada {
  background: #fdecea;
  color: #8a2c22;
}

.badge-escalada_humano {
  background: #fff4e0;
  color: #8a5a00;
}

.proposta-decisao {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--borda);
}

.form-decisao {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 500px;
}

.form-decisao textarea {
  padding: 0.5rem;
  border: 1px solid var(--borda);
  border-radius: 4px;
  font: inherit;
  resize: vertical;
  min-height: 3rem;
}

.duas-colunas {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.duas-colunas .form {
  flex: 1 1 320px;
}

.documento-oficial {
  background: white;
  border: 1px solid var(--borda);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

.documento-oficial summary {
  cursor: pointer;
  font-weight: bold;
}

.documento-oficial-conteudo {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--borda);
  white-space: pre-wrap;
}

.acoes a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--borda);
  background: white;
  color: var(--verde-escuro);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: bold;
}

.acoes a:hover {
  background: var(--bege);
  text-decoration: none;
}

.marca-dagua {
  display: block;
  width: 80px;
  height: auto;
  opacity: 0.3;
  margin: 1.5rem 0 0 auto;
}

@media print {
  header,
  .no-print {
    display: none !important;
  }

  .marca-dagua {
    position: fixed;
    bottom: 10mm;
    right: 10mm;
    width: 60px;
    opacity: 0.25;
    margin: 0;
  }

  main {
    max-width: none;
    margin: 0;
    padding: 0;
  }
}

.hero-pagina {
  background-image:
    linear-gradient(rgba(31, 74, 40, 0.6), rgba(31, 74, 40, 0.72)),
    url("images/foto-pousada-fundo.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 8px;
  padding: 2.5rem 2rem;
  color: white;
}

.hero-pagina h2,
.hero-pagina h3 {
  color: white;
}

.hero-pagina a {
  color: white;
}

.hero-pagina .ajuda {
  color: rgba(255, 255, 255, 0.85);
}

/* Cards com fundo próprio (branco) dentro de uma tela com hero não devem
   herdar o texto branco do overlay — senão o texto some contra o fundo
   branco do card. */
.hero-pagina .proposta,
.hero-pagina .documento-oficial,
.hero-pagina table {
  color: var(--texto);
}

.hero-pagina .proposta .ajuda,
.hero-pagina .documento-oficial .ajuda,
.hero-pagina table .ajuda {
  color: #555;
}

.hero-pagina .proposta a,
.hero-pagina .documento-oficial a,
.hero-pagina table a {
  color: var(--verde-escuro);
}

/* Registro de Ponto — tela de revisão (foto ao lado da tabela editável) */
.ponto-revisao-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.ponto-revisao-foto {
  flex: 1 1 320px;
  max-width: 420px;
  position: sticky;
  top: 1rem;
}

.ponto-revisao-foto img {
  max-width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.ponto-revisao-form {
  flex: 2 1 480px;
  min-width: 0;
}

.ponto-revisao-tabela-wrap {
  overflow-x: auto;
}

.ponto-revisao-tabela-wrap input {
  width: 6rem;
}

tr.linha-inconsistente {
  background: #fdecea;
}
