/* ADMIN PAGE */

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.section-admin {
  padding: 4.8rem 3.2rem;
  background-color: #f0f8ff;
}

.heading-admin {
  font-size: 2.8rem;
  font-weight: 700;
  color: #004d88;
  margin-bottom: 2.4rem;
}

.admin-form {
  display: flex;
  gap: 1.6rem;
  margin-bottom: 3.2rem;
}

.admin-form input,
.admin-form button {
  padding: 1rem 1.6rem;
  font-size: 1.6rem;
}

.admin-form button {
  background-color: #3be036;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.admin-form button:hover {
  background-color: #2ba027;
}

.admin-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  margin-top: 2rem;
  flex: 1;
}

.sidebar {
  background-color: #f4f4f4;
  border-radius: 8px;
  height: auto;
  align-self: stretch;
  /* padding removido ou diminuído */
  padding: 1rem 0; /* só vertical, se quiser */
}

.sidebar-title {
  padding-left: 1.2rem;
  margin-bottom: 1.6rem;
  font-size: 1.8rem;
  font-weight: bold;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  padding: 0.8rem 1.2rem; /* isso mantém o texto alinhado bonito */
  font-size: 1.6rem;
  color: #333;
  margin-bottom: 0.8rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.sidebar-menu li.active {
  background-color: #00bfff;
  color: white;
  font-weight: bold;
  text-align: left;
}

.sidebar h3,
.sidebar-title {
  padding-left: 1.2rem;
  margin-bottom: 1.6rem;
  font-size: 1.8rem;
  font-weight: bold;
}

.sidebar-nav ul,
.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.sidebar-menu li {
  padding: 0.8rem 1.2rem; /* isso mantém o texto alinhado bonito */
  font-size: 1.6rem;
  color: #333;
  margin-bottom: 0.8rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.sidebar-menu li:hover {
  color: #0086df;
}

.sidebar-menu li.active {
  color: white;
  background-color: #00bfff;
}

.admin-content {
  flex: 1;
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

/* Botão de adicionar livro e adicionar editora */
.btn-add-livro,
.btn-add {
  background-color: #3be036;
  color: white;
  border: none;
  padding: 1rem 1.6rem;
  font-size: 1.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-add-livro:hover,
.btn-add:hover {
  background-color: #2ba027;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border: 1px solid #ddd;
}

.admin-table th,
.admin-table td {
  padding: 1.2rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
  font-size: 1.6rem;
}

.admin-table th {
  background-color: #f4f4f4;
  font-weight: 600;
}

/* Botões de ação da tabela */
.btn-acao,
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 1.4rem;
  margin-right: 0.5rem;
  cursor: pointer;
  color: white;
}

/* Estilos dos botões de editora */
.btn-edit {
  background-color: #00a0f0;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1.4rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-right: 0.5rem;
}

.btn-edit:hover {
  background-color: #0085cc;
}

.btn-delete {
  background-color: #ff4c4c;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1.4rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-delete:hover {
  background-color: #e03e3e;
}

/* Estilos dos botões do modal de editora */
.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-save {
  background-color: #00c851;
  color: white;
  border: none;
  padding: 0.8rem 1.6rem;
  font-size: 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
  font-weight: 500;
  text-transform: uppercase;
}

.btn-save:hover {
  background-color: #00a541;
}

.btn-cancel {
  background-color: #ccc;
  color: white;
  border: none;
  padding: 0.8rem 1.6rem;
  font-size: 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
  font-weight: 500;
  text-transform: uppercase;
}

.btn-cancel:hover {
  background-color: #b1b1b1;
}

.visualizar,
.btn.visualizar {
  background-color: #00bfff;
}

.editar,
.btn.editar {
  background-color: #ffa500;
}

.excluir,
.btn.excluir {
  background-color: #ff4c4c;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2.4rem;
  color: #ff4c4c;
  cursor: pointer;
}

.form-livro {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="file"],
select,
textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1.4rem;
}

textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.btn.limpar {
  background-color: #ccc;
  color: white;
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn.salvar {
  background-color: #00c851;
  color: white;
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* Estilo adicional para o modal de cadastro de livros */
.modal h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #333;
  font-size: 2.2rem;
}

.input-with-icon {
  display: flex;
  align-items: center;
  position: relative;
}

.icon {
  font-style: normal;
  position: absolute;
  left: 10px;
  font-size: 1.8rem;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-with-icon input,
.input-with-icon select,
.input-with-icon textarea {
  width: 100%;
  padding-left: 4rem; /* Espaço para o ícone */
}

/* Personalizar botões de arquivo */
.file-input {
  position: relative;
  width: 100%;
}

.file-input-hidden {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.file-input-button {
  display: block;
  width: 100%;
  padding: 0.8rem;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  color: #555;
  font-size: 1.4rem;
}

/* Estilizar botões de ação */
.btn.limpar {
  background-color: #ccc;
  text-transform: uppercase;
  font-weight: 500;
}

.btn.salvar {
  background-color: #00c851;
  text-transform: uppercase;
  font-weight: 500;
}

textarea {
  padding-top: 2.8rem; /* ajusta pra descer o texto */
  padding-bottom: 2rem;
  height: 120px; /* altura total da caixa */
  line-height: 1.6;
  resize: vertical;
  font-size: 1.4rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* Responsividade */
@media (max-height: 700px) {
  .modal-content {
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden; 
    width: 92%; 
    padding: 1.5rem; 
  }
  
  .form-group {
    margin-bottom: 0.8rem;
  }
  
  .form-livro {
    gap: 0.8rem;
  }
  
  .modal-content h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
  }
  
  /* Reduz tamanho de elementos dentro do formulÃ¡rio */
  .form-group label {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
  }
  
  input[type="text"],
  input[type="file"],
  select,
  textarea {
    padding: 0.6rem;
    font-size: 1.3rem;
    padding-left: 3.2rem; 
    max-width: 100%; 
    box-sizing: border-box; 
  }
  
  .icon {
    left: 8px;
    font-size: 1.5rem;
  }
  
  textarea {
    height: 70px;
    padding-top: 2.5rem; 
  }
  
  .form-actions {
    margin-top: 0.8rem;
  }
  
  .btn.limpar, 
  .btn.salvar {
    padding: 0.6rem 1.2rem;
    font-size: 1.3rem;
  }
}

/* Ajustes adicionais para telas muito estreitas */
@media (max-width: 480px) {
  .modal-content {
    width: 95%;
    padding: 1.2rem;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0.6rem;
  }
  
  .input-with-icon input,
  .input-with-icon select,
  .input-with-icon textarea {
    padding-left: 3rem;
  }
  
  .icon {
    left: 6px;
    font-size: 1.4rem;
  }
  
  .close-btn {
    top: 0.5rem;
    right: 0.5rem;
  }
}
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }
}

/* Ajustes para o modal  sucesso*/

.modal-sucesso {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-sucesso-content {
  background: white;
  padding: 2rem 3rem;
  border-radius: 1rem;
  text-align: center;
  animation: scaleIn 0.3s ease;
}

.modal-sucesso .check-icon {
  font-size: 3rem;
  color: green;
  margin-bottom: 1rem;
}

.hidden {
  display: none;
}

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}


