:root {
  --bg: #04131f;
  --panel: #0a2436;
  --panel-2: #0f3249;
  --text: #e8f8ff;
  --accent: #19d3ff;
  --danger: #ff4d5a;
  --ok: #44d77d;
  --gold: #e7c816;
  --dark-gold: #b68b16;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: radial-gradient(circle at top, #0c3f5d 0%, var(--bg) 65%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Container principal do formulário */
.main {
  width: 380px;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(25, 211, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;
}

#chk {
  display: none;
}

/* Seção de cadastro */
.signup {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 20px 0 30px 0;
  transition: .5s ease-in-out;
}

/* Container da logo */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px 0;
}

.logo {
  width: 80px;
  height: 80px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  border: 2px solid var(--accent);
}

.logo:hover {
  transform: scale(1.05);
}

/* Labels */
label {
  color: var(--gold);
  font-size: 32px;
  justify-content: center;
  display: flex;
  margin: 20px 0 15px 0;
  font-weight: bold;
  cursor: pointer;
  transition: .5s ease-in-out;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Container para inputs com ícone */
.input-container {
  position: relative;
  width: 80%;
  margin: 12px auto;
}

.input-container input {
  width: 100%;
  padding: 12px;
  padding-right: 45px;
  background: #071c2b;
  border: 1px solid rgba(25, 211, 255, 0.35);
  outline: none;
  border-radius: 50px;
  color: var(--text);
  font-size: 14px;
  transition: all 0.3s ease;
}

.input-container input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(25, 211, 255, 0.3);
}

/* Ícone do olho */
.eye-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 20px;
  user-select: none;
  transition: all 0.3s ease;
  color: var(--accent);
  z-index: 2;
}

.eye-icon:hover {
  color: var(--gold);
  transform: translateY(-50%) scale(1.1);
}

/* Animação do olho */
.eye-icon.grow {
  animation: growEye 0.4s ease-in-out;
}

@keyframes growEye {
  0% {
    transform: translateY(-50%) scale(1);
  }
  50% {
    transform: translateY(-50%) scale(1.3);
  }
  100% {
    transform: translateY(-50%) scale(1);
  }
}

/* Inputs padrão */
input {
  width: 80%;
  height: 44px;
  background: #071c2b;
  justify-content: center;
  display: flex;
  margin: 12px auto;
  padding: 0 15px;
  border: 1px solid rgba(25, 211, 255, 0.35);
  outline: none;
  border-radius: 50px;
  color: var(--text);
  font-size: 14px;
  transition: all 0.3s ease;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(25, 211, 255, 0.3);
}

/* Botões */
button {
  width: 80%;
  height: 44px;
  margin: 15px auto;
  justify-content: center;
  display: block;
  color: #fff;
  background: linear-gradient(90deg, #1498bd, var(--accent));
  font-size: 16px;
  font-weight: bold;
  outline: none;
  border: none;
  border-radius: 50px;
  transition: .3s ease-in;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: linear-gradient(90deg, #0f7a9a, #0fa3cc);
}

button.secondary {
  background: linear-gradient(90deg, #103145, #1a4b66);
}

button.secondary:hover {
  background: linear-gradient(90deg, #1a4b66, #236b8e);
}

/* Botão reset */
button[type="reset"] {
  background: linear-gradient(90deg, #8e1b25, var(--danger));
}

button[type="reset"]:hover {
  background: linear-gradient(90deg, #b5222f, #ff5a67);
}

/* Mensagens */
.msg {
  text-align: center;
  margin: 10px auto;
  padding: 8px;
  border-radius: 8px;
  width: 85%;
  font-size: 12px;
}

.badge-ok {
  background: rgba(68, 215, 125, 0.2);
  color: var(--ok);
  border: 1px solid var(--ok);
}

.badge-danger {
  background: rgba(255, 77, 90, 0.2);
  color: var(--danger);
  border: 1px solid var(--danger);
}

/* Seção de login */
.login {
  background: linear-gradient(160deg, #0c1f2c, #05131f);
  border-radius: 60% / 15%;
  transform: translateY(-85px);
  transition: .8s ease-in-out;
  position: relative;
  padding: 20px 0 40px 0;
}

.login label {
  color: var(--gold);
  transform: scale(.7);
  margin: 15px 0 5px 0;
}

.login input {
  background: #071c2b;
  margin: 10px auto;
}

.login .input-container {
  margin: 10px auto;
}

.login p {
  text-align: center;
  padding: 10px;
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.login a {
  color: var(--gold);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.login a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Efeitos ao marcar checkbox */
#chk:checked ~ .login {
  transform: translateY(-500px);
}

#chk:checked ~ .login label {
  transform: scale(.8);
}

#chk:checked ~ .signup label {
  transform: scale(.3);
}

/* Container de cards (para outras páginas) */
.container {
  max-width: 1080px;
  margin: 24px auto;
  padding: 20px;
}

.card {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(25, 211, 255, 0.3);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  padding: 8px;
}

.hero-art {
  width: 120px;
  max-height: 100px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(25, 211, 255, 0.35);
}

h1, h2, h3 {
  margin-top: 0;
  color: var(--gold);
}

/* Tabelas */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--gold);
  font-weight: bold;
}

/* Grids */
.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.action-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr;
  gap: 6px;
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Utilitários */
.small {
  font-size: 13px;
  opacity: 0.95;
}

.hidden {
  display: none;
}

/* Responsividade */
@media (max-width: 760px) {
  .container {
    padding: 12px;
  }
  
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .action-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .main {
    width: 90%;
    max-width: 350px;
  }
  
  .input-container,
  input,
  button {
    width: 85%;
  }
}

@media (max-width: 400px) {
  .main {
    width: 95%;
  }
  
  .logo {
    width: 60px;
    height: 60px;
  }
  
  label {
    font-size: 28px;
  }
  
  .input-container,
  input,
  button {
    width: 90%;
  }
  
  .login {
    transform: translateY(-70px);
  }
  
  #chk:checked ~ .login {
    transform: translateY(-480px);
  }
}

/* Container para inputs com ícone */
.input-container {
  position: relative;
  width: 60%;
  margin: 12px auto;
}

.input-container input {
  width: 100%;
  margin: 0;
  padding: 10px;
  padding-right: 40px;
  background: rgb(217, 218, 202);
  border: none;
  outline: none;
  border-radius: 50px;
  box-sizing: border-box;
  height: 40px;
}

/* Ícone do olho */
.eye-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 20px;
  user-select: none;
  transition: all 0.3s ease;
  background: transparent;
  z-index: 1;
  line-height: 1;
}

.eye-icon:hover {
  transform: translateY(-50%) scale(1.1);
}

/* Animação do olho */
.eye-icon.grow {
  animation: growEye 0.4s ease-in-out;
}

@keyframes growEye {
  0% {
    transform: translateY(-50%) scale(1);
  }
  50% {
    transform: translateY(-50%) scale(1.3);
  }
  100% {
    transform: translateY(-50%) scale(1);
  }
}

/* Ajuste para o formulário de login */
.login .input-container {
  margin: 10px auto;
}

.login .input-container input {
  background: rgb(240, 240, 220);
}