@font-face {
  font-family: 'Poppins';
  src: url('../../../assets/fonts/Poppins-Light.ttf') format('truetype');
  font-weight: 300;
}
@font-face {
  font-family: 'Poppins';
  src: url('../../../assets/fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
}
@font-face {
  font-family: 'Poppins';
  src: url('../../../assets/fonts/Poppins-Medium.ttf') format('truetype');
  font-weight: 500;
}
@font-face {
  font-family: 'Poppins';
  src: url('../../../assets/fonts/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
}
@font-face {
  font-family: 'Open Sans';
  src: url('../../../assets/fonts/OpenSans-Bold.ttf') format('truetype');
  font-weight: 700;
}
@font-face {
  font-family: 'Open Sans';
  src: url('../../../assets/fonts/OpenSans-ExtraBold.ttf') format('truetype');
  font-weight: 800;
}

:root {
  --azul: #003855;
  --amarelo: #f3a500;
  --claro: #f2f2f2;
  --branco: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--azul);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--azul);
  position: relative;
}

.tela {
  display: none;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 52px 28px 0;
  animation: fadeIn 0.4s ease;
}

.tela.ativa { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.logo {
  width: 200px;
  margin-bottom: 36px;
  flex-shrink: 0;
}

.btn {
  width: 100%;
  padding: 17px;
  border-radius: 50px;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: auto;
  margin-bottom: 48px;
  background: var(--branco);
  color: var(--azul);
}

.btn:hover { background: #ebebeb; transform: translateY(-1px); }

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* TELA 1 */
#t1 { justify-content: flex-start; }

#t1 .hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

#t1 h1 {
  font-family: 'Open Sans', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--claro);
  text-align: center;
  line-height: 1.3;
}

#t1 .robo-img {
  width: 260px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.25));
}

.subtitulo {
  color: rgba(242,242,242,0.75);
  font-size: 14px;
  text-align: center;
  line-height: 1.6;
  padding: 0 8px;
}

/* TELA 2 */
.form-tela { justify-content: flex-start; gap: 0; }

.form-tela h2 {
  font-family: 'Open Sans', sans-serif;
  font-size: 19px;
  font-weight: 800;
  color: var(--claro);
  text-align: center;
  margin-bottom: 16px;
}

.secao-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  align-self: flex-start;
}

.secao-icone {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--azul);
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.secao-icone img {
  width: 30px;
  height: 30px;
  display: block;
}

.secao-label span {
  color: var(--claro);
  font-size: 15px;
  font-weight: 500;
}

.form-group {
  width: 100%;
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  color: rgba(242,242,242,0.65);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  margin-bottom: 5px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.92);
  border: 2px solid transparent;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  color: var(--azul);
  outline: none;
  transition: border 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input::placeholder {
  color: rgba(0,56,85,0.35);
  font-size: 12.5px;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--amarelo);
  background: #ffffff;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23003855' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: rgba(255,255,255,0.92);
  padding-right: 40px;
  cursor: pointer;
}

.erro-msg {
  color: #ff6b6b;
  font-size: 12px;
  text-align: center;
  min-height: 16px;
  margin-bottom: 8px;
  font-weight: 500;
}

/* TELA 3 */
#t3 { justify-content: flex-start; }

#t3 .hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

#t3 h1 {
  font-family: 'Open Sans', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--claro);
  text-align: center;
  line-height: 1.3;
}

#t3 .robo-img {
  width: 250px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.25));
}

/* LOADING */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,56,85,0.85);
  z-index: 50;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 16px;
}

.loading-overlay.ativo { display: flex; }

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(243,165,0,0.3);
  border-top-color: var(--amarelo);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay p {
  color: var(--claro);
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 380px) {
  .tela { padding: 40px 20px 0; }
  #t1 h1 { font-size: 22px; }
  #t1 .robo-img { width: 220px; }
  .form-tela h2 { font-size: 17px; }
}