/* Estilos Padrão */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%; /* Garante que as imagens não excedam a largura do pai */
  height: auto;    /* Mantém a proporção da imagem */
  display: block;
}

/* Estrutura do Layout */
.main-container {
  display: flex;
  flex-grow: 1;
  min-height: 100vh;
  transition: transform 0.3s ease-in-out;
}

.sidebar {
  background-color: #ff6900;
  width: 280px;
  position: fixed;
  height: 100%;
  top: 0;
  right: 0;
  padding: 20px;
  color: #fff;
  transform: translateX(280px);
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar.open {
  transform: translateX(0);
}

.content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Alinha o conteúdo ao topo para evitar rolagem em desktop */
  padding-top: 60px; /* Reduz o espaço do cabeçalho */
  padding-right: 30px;
  padding-left: 30px;
  padding-bottom: 0px; /* Reduz o espaço entre o conteúdo e o rodapé */
}

/* Regra para mover o conteúdo quando o menu estiver aberto */
body.menu-open .main-container {
  transform: translateX(-280px);
}

/* Header Principal */
.top-header {
  background-color: #0f321e;
  color: #fff;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 15px 30px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.top-header .logo-container img {
  height: 40px;
}

.welcome-message {
  font-size: 1.2em;
  font-weight: bold;
  margin-left: 20px;
  text-align: center;
  flex-grow: 1;
}

/* Menu de Hamburguer e Botão de Fechar */
.menu-toggle {
  cursor: pointer;
  font-size: 2em;
  color: #ff6900;
  margin-left: auto;
}

.close-btn {
  font-size: 2em;
  cursor: pointer;
  text-align: right;
  color: #0f321e;
}

/* Estilos para a foto de perfil no cabeçalho */
.profile-pic-header {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  transition: opacity 0.3s ease-in-out;
}

body.menu-open .profile-pic-header {
  opacity: 0;
  pointer-events: none;
}

/* Estilos do Formulário */
.form-card {
  max-width: 1200px;
  width: 90%;
}

.content > .form-card {
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
    margin-bottom: 10px;
}

.login-content .form-card {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 30px;
  border-radius: 15px;
  width: 100%;
  max-width: 420px;
}

h2 {
  text-align: center;
  color: #0f321e;
  margin-top: 30px;
  margin-bottom: 15px;
}

label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
  color: #0f321e;
}

input, textarea {
  width: 100%;
  padding: 12px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
}

button, .btn {
  margin-top: 20px;
  width: 100%;
  background: #ff6900;
  color: #fff;
  border: none;
  padding: 12px;
  font-size: 1em;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.3s;
  text-decoration: none;
  display: block;
  text-align: center;
}

button:hover, .btn:hover {
  background: #0f321e;
}

.btn-secondary {
  background-color: #0f321e;
}

.btn-secondary:hover {
  background-color: #ff6900;
}

/* Estilos do Menu Lateral */
.profile-info {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.profile-info img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
}

.profile-info h3 {
  margin-left: 10px;
  font-size: 1.2em;
}

.sidebar-menu a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  transition: background-color 0.3s;
}

.sidebar-menu a:hover {
  background-color: rgba(0,0,0,0.1);
}

.sidebar-footer {
  padding-top: 20px;
}

/* Estilos da página de login */
.form-card .logo {
  text-align: center;
  margin-bottom: 30px;
}

.form-card .logo img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.error-message {
  color: #e53e3e;
  text-align: center;
  margin-top: 15px;
}

/* Estilos da página de editar perfil */
.profile-img-container {
  text-align: center;
  margin-bottom: 20px;
}

.profile-img-container img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #FF6900;
}

.message {
  text-align: center;
  margin-top: 15px;
}

.success-message {
  color: #16a34a;
}

.error-message {
  color: #d9534f;
}

.password-strength {
  height: 5px;
  background: #ddd;
  border-radius: 2.5px;
  margin-top: 5px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0%;
  transition: width 0.3s;
}

.strength-bar.weak { background: #d9534f; }
.strength-bar.medium { background: #f0ad4e; }
.strength-bar.strong { background: #5cb85c; }

.password-info {
  font-size: 12px;
  margin-top: 5px;
  text-align: left;
}

.password-info li {
  color: #d9534f;
  list-style-type: none;
}

.password-info li.valid {
  color: #16a34a;
}

/* Estilos para a nova seção de botões do Dashboard */
.action-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 40px;
}

.dashboard-button, .footer-link-button {
  display: block;
  width: 100%;
  padding: 15px 25px;
  background-color: #004b2a;
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-button:hover, .footer-link-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Estilos para a seção de Links Úteis */
.useful-links-container {
  text-align: center;
  margin-top: 10px; /* Reduz a margem superior para comprimir o layout */
}

.useful-links-container h3 {
  margin-bottom: 10px; /* Reduz o espaço abaixo do título */
}

.useful-links-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.useful-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: #000;
  transition: transform 0.2s;
}

.useful-link-card:hover {
  transform: translateY(-5px);
}

.useful-link-card img {
  width: 100%;
  height: auto;
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.useful-link-card span {
  margin-top: 10px;
  font-weight: bold;
}
/* Estilos para a nova seção de botões principais do Dashboard */
.main-buttons-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 10px; /* Reduz a margem inferior para comprimir o layout */
}

.main-icon-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    text-align: center;
    width: 180px; /* Largura do botão */
    height: 180px; /* Altura do botão para deixá-lo quadrado */
    max-width: 100%; /* Garante que nunca seja maior que a tela */
    background-color: #ffffff;
    color: #004b2a;
    border-radius: 15px; /* Cantos arredondados */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s, color 0.2s;
}

.main-icon-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background-color: #004b2a;
    color: #ffffff;
}

.main-icon-button img {
    width: 200px; /* Tamanho do ícone */
    height: 200px;
    object-fit: contain;
    margin-bottom: 10px;
}

.main-icon-button span {
    font-size: 16px;
    font-weight: bold;
}

/* Media Queries para Responsividade */
@media (max-width: 768px) {
  /* Regras para tablets e telas menores */
  .top-header {
      padding: 20px 15px; /* Aumenta a altura do header */
      align-items: flex-start; /* Alinha o conteúdo do header ao topo */
  }

  .profile-pic-header {
      width: 50px; /* Aumenta o tamanho da foto de perfil */
      height: 50px;
  }

  .content {
    padding: 15px; /* Reduz o padding para ganhar mais espaço */
    padding-top: 35px; /* Aumenta o espaço entre o header e o conteúdo para 35px */
    padding-bottom: 0; /* Reduz o espaço entre o conteúdo e o rodapé */
  }

  /* Reduz o espaço entre o header e o título principal */
  .content h2 {
    margin-top: 15px;
  }
  
  .main-icon-button {
    width: 45%; /* Permite que dois botões caibam lado a lado com um pequeno espaço */
    height: auto; /* A altura se ajusta automaticamente à largura */
  }

  .useful-links-grid {
    flex-direction: column; /* Links úteis se empilham em telas menores */
    gap: 15px;
  }
}

@media (max-width: 480px) {
  /* Regras para celulares */
  .top-header {
    padding: 20px 15px; /* Aumenta a altura do header em celulares */
  }

  .welcome-message {
    font-size: 1em; /* Fonte menor para se ajustar na tela */
    margin-left: 10px;
  }

  .sidebar {
    width: 100%; /* A barra lateral ocupa a tela inteira quando aberta */
    transform: translateX(100%);
  }

  body.menu-open .main-container {
    transform: translateX(-100%);
  }
  
  .main-icon-button {
    width: 100%; /* Botões principais ocupam a largura total em celulares */
    height: auto;
  }

  .main-icon-button img {
      width: 100px; /* Diminui o tamanho do ícone para liberar espaço vertical */
      height: auto;
  }

  .form-card {
      margin-bottom: 10px; /* Reduz o espaço inferior do card para comprimir o layout */
  }
  
  .useful-links-container {
      margin-top: 10px; /* Reduz o espaço superior dos links úteis */
  }
}
/* Estilo para o campo de seleção (select) */
select {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    background-color: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%230f321e" d="M6 9l-4-4h8z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* Estilos da Tabela de Usuários */
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    overflow: hidden; /* Garante que os cantos arredondados sejam aplicados */
}

.user-table thead {
    background-color: #0f321e;
    color: #fff;
}

.user-table th, .user-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.user-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.user-table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Estilos para os botões de ação na tabela */
.user-table .actions {
    white-space: nowrap; /* Impede que os botões quebrem a linha */
}

.btn-action {
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

.btn-action.reset {
    background-color: #ff6900;
}

.btn-action.edit {
    background-color: #004b2a;
}

.btn-action.delete {
    background-color: #d9534f;
}

.btn-action:hover {
    opacity: 0.8;
}

/* Ícones nos botões de ação */
.btn-action img {
    height: 16px; /* Tamanho do ícone */
    width: 16px;
    margin: 0;
    display: inline-block;
}

/* Estilos para o rodapé */
.app-footer {
    padding-top: 20px;
    text-align: center;
    width: 100%;
}

.app-footer p {
  color: #595959;
}