
body {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centraliza verticalmente */
  align-items: center;     /* Centraliza horizontalmente */
  height: 100vh;           /* Ocupa toda a altura da janela */
  margin: 0;
  background-color: #f4f6f8;
}


    .fieldset {

  height: 100%
  color: black;
  margin-top: 100px;
  margin-left: 5px;
  padding: 15px;
  border: 2px solid #333;
  border-radius: 10px;

  /*background-image: url(../imagem/tela012.jpg);opacity:5
  */
    background: #f9f9f9;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
<legend>
 Cadastro Usuários</legend>
  width: 97%;


    .container {
      flex: 1;
      display: flex;
      background-color: #999;
    }

   /* Sidebar fixa */
.sidebar {
  width: 5%;
  background: #333; /* cor neutra para a barra */
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 2px 0 8px rgba(0,0,0,0.2);
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar ul li {
  margin: 25px 0;
}

.sidebar ul li button {
  border: none;
  font-size: 16px;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: upright;
  transition: all 0.3s ease;
  padding: 12px 6px;
  border-radius: 6px;
  font-weight: lato bold;
  width: 100%; /* ocupa largura da sidebar */
}

/* Botões coloridos com gradiente */
.cadastrar {
  color: #fff;
  background: linear-gradient(180deg, #00cc00, #006600); /* verde degradê */
}
.atualizar {
  color: #000;
  background: linear-gradient(180deg, #ffcc00, #cc9900); /* amarelo dourado */
}
.excluir {
  color: #fff;
  background: linear-gradient(180deg, #ff3333, #990000); /* vermelho intenso */
}

.sidebar ul li button:hover {
  opacity: 0.9;
  transform: scale(1.08);
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.blink {
  animation: blinkBorder 0.5s step-end 3;
}

@keyframes blinkBorder {
  50% { border-color: #ff3333; }
  100% { border-color: #990000; }
}
input[type="email"] {
  padding: 8px;
  border: 2px solid #ccc;
  border-radius: 6px;
  width: 100%;
  max-width: 350px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

/* Feedback abaixo do campo */
.email-feedback {
  display: block;
  margin-top: 5px;
  font-weight: bold;
  font-size: 14px;
}

.email-feedback.invalid {
  color: #990000; /* vermelho */
}

.email-feedback.valid {
  color: #006600; /* verde */
}

/* Mensagem de sucesso */
.success-message {
  background: #e6ffe6;
  border: 2px solid #33cc33;
  color: #006600;
  padding: 20px;
  margin-top: 100px;
  margin-left: 100px;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
  animation: fadeIn 0.8s ease forwards;
}

/* Animação de fade-in */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Efeito de piscar no input inválido */
.blink {
  animation: blinkBorder 0.5s step-end 3;
}

@keyframes blinkBorder {
  50% { border-color: #ff3333; background-color: #ffe6e6; }
  100% { border-color: #990000; background-color: #fff; }
}

/* Animação de entrada suave */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Aplica animação aos botões da sidebar */
.sidebar ul li button {
  animation: fadeInUp 0.8s ease forwards;
}
    .main {

      margin-left: 120px;
      padding: 20px;
      background: #f9f9f9;
    }
    .msgBox {
      padding: 10px;
      margin-bottom: 20px;
      border-radius: 5px;
      background-color: #e0ffe0;
      color: #006600;
      font-weight: bold;
    }

.form-box {
margin-top: 150px;
  border: 2px solid #2e8b57;
  padding: 30px;
  margin: 25px 0;
  background: white;
  border-radius: 12px; /* 🔹 arredonda os cantos */
  box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* opcional: sombra suave */
  animation: fadeInUp 1s ease forwards;
}

   .form-box label {
      font-weight: bold;
      margin-right: 10px;
    }
   /* Validação visual dos inputs */
.form-box input[type="email"]:valid {
  border: 2px solid #00cc00; /* verde quando válido */
  box-shadow: 0 0 6px #00cc00;
}

.form-box input[type="email"]:invalid {
  border: 2px solid #ff3333; /* vermelho quando inválido */
  box-shadow: 0 0 6px #ff3333;
}

    .form-box button {
      display: none; /* invisível */
    }

    /* Caixa de mensagem de erro */
.error-message {
  background: #ffe6e6; /* fundo vermelho claro */
  border: 2px solid #ff3333; /* borda vermelha */
  color: #990000; /* texto vermelho escuro */
  padding: 15px;
  margin: 20px auto;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  max-width: 600px;
  box-shadow: 0 0 10px rgba(255,0,0,0.2);
  animation: fadeIn 0.8s ease forwards;
}

.error-message::before {
  content: "⚠️ ";
  font-size: 20px;
  margin-right: 5px;
}


/* Ícone de alerta */
.error-message::before {
  content: "⚠️ ";
  font-size: 20px;
  margin-right: 5px;
}

/* Animação de entrada */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.error-message {
  background: #ffe6e6;
  border: 2px solid #ff3333;
  color: #990000;
  padding: 15px;
  margin: 20px auto;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  max-width: 600px;
  box-shadow: 0 0 10px rgba(255,0,0,0.2);
  animation: fadeIn 0.8s ease forwards;
}

.error-message::before {
  content: "⚠️ ";
  font-size: 20px;
  margin-right: 5px;
}

    h1 {
  text-align: center;
  color: #2e8b57; /* opcional: dá destaque */
}
 .valid-input {
      border: 2px solid #006600;
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23006000" viewBox="0 0 16 16"><path d="M13.485 1.929l-7.071 7.071-3.536-3.536-1.414 1.414 4.95 4.95 8.485-8.485z"/></svg>');
      background-repeat: no-repeat;
      background-position: right 10px center;
      background-size: 20px;
    }
    .invalid-input {
      border: 2px solid #990000;
      background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23990000" viewBox="0 0 16 16"><path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm3.707 9.293l-1.414 1.414L8 9.414l-2.293 2.293-1.414-1.414L6.586 8 4.293 5.707l1.414-1.414L8 6.586l2.293-2.293 1.414 1.414L9.414 8l2.293 2.293z"/></svg>');
      background-repeat: no-repeat;
      background-position: right 10px center;
      background-size: 20px;
    }
    .blink { animation: blinkBorder 0.5s step-end 3; }
    @keyframes blinkBorder {
      50% { border-color: #ff3333; background-color: #ffe6e6; }
      100% { border-color: #990000; background-color: #fff; }
    }

.caixa-cadastro {
  background-color: #ffffff; /* fundo branco para contraste */
  border: 2px solid #2e7d32; /* borda verde para harmonia com o título */
  border-radius: 12px; /* cantos arredondados */
  padding: 25px 30px;
  width: 80%;
  max-width: 600px;
  margin: 20px auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); /* sombra suave */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.caixa-cadastro:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Título dentro da caixa */
.caixa-cadastro h3 {
  color: #fe7d32;
  margin-bottom: 15px;
  font-size: 20px;
}

/* Campos de entrada */
.caixa-cadastro input[type="email"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.caixa-cadastro input[type="email"]:focus {
  border-color: #2e7d32;
  outline: none;
}

/* Checkbox e texto */
.caixa-cadastro label {
  font-weight: bold;
  display: block;
  margin-bottom: 8px;
}

.caixa-cadastro a {
  color: #1565c0;
  text-decoration: none;
  font-weight: bold;
}

.caixa-cadastro a:hover {
  text-decoration: underline;
}

/* Botão */
.caixa-cadastro button {
  background-color: #c62828;
  color: #fff;
  padding: 10px 25px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.caixa-cadastro button:hover {
  background-color: #b71c1c;
  transform: translateY(-3px);
}


.footer {
  position: fixed;       /* mantém o rodapé fixo */
  bottom: 0;             /* fixa na parte inferior da janela */
  left: 80px;               /* alinha à esquerda */
  width: 100%;           /* ocupa toda a largura da tela */
  background: blue;
  color: white;
  padding: 10px;
  border-radius: 12px 12px 0 0; /* cantos superiores arredondados */
  text-align: center;
  font-weight: bold;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.2); /* sombra suave acima */
  z-index: 1000;         /* garante que fique acima de outros elementos */
}




      footer img {
      width: 100px;
      border-radius: 8px;
      border: 3px solid #8B4513;
      margin-right: 10px;
      vertical-align: middle;
    }

.mensagem-seguranca {
    border: 1px solid #ccc;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 800px;
    font-size: 14px;
    color: #333;
}

.alerta-verificacao {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: bold;
    padding: 8px;
    border-radius: 5px;
    margin-top: 10px;
}

@media (max-width: 768px) {
  .sidebar { width: 80px; }
  .main { margin-left: 80px; padding: 10px; }
  .sidebar ul li button { font-size: 16px; }
}
  