/* ------------------ LOGIN ------------------ */
.container-login {
    max-width: 400px;
    margin: 80px auto;
    padding: 40px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.container-login h1 {
    margin-bottom: 30px;
    color: purple;
    font-size: 28px;
    font-weight: 600;
}

.container-login input[type="text"],
.container-login input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.container-login input[type="text"]:focus,
.container-login input[type="password"]:focus {
    border-color: purple;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
    outline: none;
}

.container-pass {
    position: relative;
}

.container-pass i.fa {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 16px;
    transition: color 0.2s;
}

.container-pass i.fa:hover {
    color: purple;
}

.container-login input[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: purple;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.container-login input[type="submit"]:hover {
    background-color: #D8BFD8;
    transform: scale(1.02);
}
/* ------------------ TOPBAR ------------------ */
.topbar {
  background-color: #fff;
  color: #333;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.logo img {
  height: 40px;
}

.menu a {
  color: #333;
  margin-left: 20px;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.menu a:hover {
  color: purple;
}

/* ------------------ GERAL ------------------ */
body {
  background-color: #f5f6fa;
  margin: 0;
  font-family: Arial, sans-serif;
}

.container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 30px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.container h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #2c3e50;
}

/* ------------------ TABELAS ------------------ */
.tabela-contr {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: white;
}

.tabela-contr th,
.tabela-contr td {
  border: 1px solid #ddd;
  padding: 12px 10px;
  text-align: left;
}

.tabela-contr th {
  background-color: #D8BFD8;
  font-weight: bold;
  color: purple;
}

.tabela-contr tr:nth-child(even) {
  background-color: #f9f9f9;
}

.tabela-contr tr:hover {
  background-color: #eef5ff;
}

/* Linhas com prazo expirado */
.tabela-contr tr.prazo-expirado {
    background-color: #ffe6e6; /* vermelho suave */
    color: #a00; /* texto mais escuro */
    font-weight: bold;
}


/* ------------------ BOTÕES ------------------ */
.botao-principal {
  background-color: purple;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.botao-principal:hover {
  background-color: #D8BFD8;
  transform: scale(1.03);
}

.botao-cancelar {
  background-color: #888;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  margin-left: 10px;
  transition: background-color 0.3s ease;
}

.botao-cancelar:hover {
  background-color: #555;
}

/* ------------------ MODAIS ------------------ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
  animation: fadeIn 0.3s ease;
}

.modal-overlay.ativo{
    display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: #fff;
  padding: 30px 35px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  max-width: 600px;
  width: 90%;
  animation: slideIn 0.3s ease-out;

}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content h3 {
  font-size: 22px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
  text-align: center;
}

.modal-content label {
  font-weight: 600;
  color: #333;
  margin-top: 10px;
  display: block;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  background-color: #f9f9f9;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
  outline: none;
}

.modal-content .modal-buttons {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
}

/* -------------- CONTEXT MENU ----------------- */
.context-menu {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    padding: 0;
    z-index: 10000;
}

.context-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.context-menu li {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.context-menu li:hover {
    background-color: #f0f0f0;
}


/* -------------- PAGINAÇÃO ----------------- */
.paginacao {
    margin-top: 15px;
    text-align: center;
}
.paginacao a {
    display: inline-block;
    margin: 0 5px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}
.paginacao a:hover {
    background-color: #f0f0f0;
}
.paginacao a.ativo {
    background-color: purple;
    color: white;
    border-color: purple;
}

/* ------------------ BOTÕES EXTRA ------------------ */
.botao {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.botao:focus {
  outline: 2px solid rgba(128,0,128,0.3);
  outline-offset: 2px;
}

/* Principal (Restaurar, Guardar, etc.) */
.botao-principal {
  background-color: purple;
  color: white;
}
.botao-principal:hover {
  background-color: #D8BFD8;
  transform: translateY(-2px);
}

/* Cancelar */
.botao-cancelar {
  background-color: #888;
  color: white;
}
.botao-cancelar:hover {
  background-color: #555;
  transform: translateY(-2px);
}

/* Perigo (Eliminar) */
.botao-danger {
  background-color: #e63946;
  color: white;
}
.botao-danger:hover {
  background-color: #b71c1c;
  transform: translateY(-2px);
}
