body {
  font-family: Arial, sans-serif;
  background: #f0f2f5;
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: auto;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

h1 {
  text-align: center;
  color: #167BD5;
}

form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

input, button, select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

input[type="text"], input[type="date"], input[type="time"], select {
  flex: 1;
}

button {
  background-color: #167BD5;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #125ea0;
}

.agenda-lista {
  margin-top: 20px;
}

.item-agenda {
  padding: 10px;
  margin-bottom: 10px;
  border-left: 5px solid #167BD5;
  background: #f9f9f9;
  border-radius: 6px;
}

.calendario {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  justify-content: center;
  max-width: 100%;
  margin: 0 auto; /* Centraliza o calendário */
  padding: 0 10px; /* Pequeno espaçamento lateral */
}

.dia, .header-dia {
  text-align: center;
  padding: 10px 0;
  background: #f9f9f9;
  border-radius: 5px;
  font-size: 14px;
}

/* Responsivo: reduz o tamanho no mobile */
@media (max-width: 600px) {
  .calendario {
    padding: 0 5px;
    gap: 3px;
  }
  .dia, .header-dia {
    font-size: 12px;
    padding: 8px 0;
  }
}


.header-dia {
  font-weight: bold;
  background: #167BD5;
  color: white;
}

.modalH {
  display: none; /* invisível por padrão */
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh; /* Limita a altura do conteúdo */
  overflow-y: auto;  /* Adiciona rolagem se ultrapassar */
  box-shadow: 0 5px 20px rgba(0,0,0,0.25);
  position: relative;
  animation: fadeIn 0.3s ease-in-out;
}


@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.modal h3 {
  margin-top: 0;
  color: #167BD5;
  font-size: 20px;
  text-align: center;
}

.modal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.modal-table th {
  background-color: #167BD5;
  color: white;
  padding: 10px;
  text-align: left;
}

.modal-table td {
  padding: 10px;
  border: 1px solid #ccc;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #167BD5;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.modal-close:hover {
  background-color: #125ea0;
}

.calendario-controles {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
  font-weight: bold;
  font-size: 18px;
}

.calendario-controles button {
  background: #167BD5;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
}

.calendario-controles button:hover {
  background-color: #125ea0;
}

.senha-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.senha-box {
  background: white;
  padding: 30px;
  border-radius: 14px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.25);
}

.senha-box input {
  padding: 10px;
  width: 100%;
  margin-top: 10px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.senha-botoes {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.senha-botoes button {
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.senha-botoes button:first-child {
  background: #ccc;
}

.senha-botoes button:last-child {
  background: #167BD5;
  color: white;
}
