* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url("fundo.png");
  width: 100vw;
  height: 100vh;
  z-index: 19000;
  background-size: cover;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: 500px;
  padding: 20px;
}

.login-box {
  background-color: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.logo {
  height: 80px;
  margin-bottom: 10px;
}

form input[type="email"],
form input[type="password"],
form input[type="text"] {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 16px; /* 🔧 evita zoom automático no iOS */
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  color: #666;
  cursor: pointer;
  font-size: 16px;
}

.btn {
  width: 100%;
  padding: 12px;
  border-radius: 30px;
  border: none;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  margin-top: 10px;
}

.btn.primary {
  background: #007bff;
  color: white;
}

.btn.secondary {
  background: #28a745;
  color: white;
}

.forgot-link {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  text-decoration: none;
  color: #007bff;
}

#retorno-msg {
  margin-bottom: 10px;
  font-size: 14px;
  text-align: center;
}

footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: #444;
}

footer hr {
  margin: 20px auto 10px auto;
  width: 80%;
  border: 0;
  border-top: 1px solid #ccc;
}

/* Loading overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(30, 30, 30, 0.5);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #007bff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 🔧 IFRAME FULLSCREEN FIX IOS */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

#iframe-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;                 /* moderno: Android/iOS 16+ */
  height: -webkit-fill-available; /* fallback iOS Safari */
  z-index: 9999;
  background: #fff;
  overflow: hidden;
}

#iframe-container iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}
