/* ============================
   RESET + FONTE
============================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

html,
body {
  min-height: 100%;
  height: 100%;
}

/* ============================
   BODY (NEUTRO)
============================ */
body {
  background: #f7f7f7;
  overflow-x: hidden;
}

#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #046b34;
  opacity: 1;
  visibility: visible;
  transition: opacity .35s ease, visibility .35s ease;
}

#splash-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #046b34;
}

.splash-logo {
  width: 100%;
  height: 100vh;
  height: 100svh;
  object-fit: cover;
  display: block;
}

/* ============================
   APP SHELL (MOBILE MOCKUP)
============================ */
#app-shell {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  margin: auto;
  background: #f7f7f7;
  overflow: hidden;
}

#app-root {
  width: 100%;
  min-height: 100vh;
}

@media (max-width: 768px) {
  html,
  body {
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body {
    background: #f7f7f7;
  }

  .splash-inner {
    max-width: none;
    min-height: 100dvh;
  }

  .splash-logo {
    width: 100%;
    height: 100dvh;
    max-width: none;
  }

  #app-shell {
    max-width: none;
    height: 100dvh;
    min-height: 100dvh;
  }

  #app-root {
    height: 100dvh;
    min-height: 100dvh;
  }

  #app-root > * {
    min-height: 100dvh !important;
    max-height: 100dvh;
    overflow: hidden;
  }
}

@media (min-width: 769px) {
  body {
    background: linear-gradient(180deg, #ecf2ee 0%, #f7f7f7 100%);
  }

  .splash-inner {
    width: min(100vw, 430px);
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(11, 59, 46, 0.14);
  }

  .splash-logo {
    width: 100%;
    height: 100%;
  }

  #app-shell {
    width: min(100vw, 420px);
    height: 100vh;
    min-height: 100vh;
    min-height: 100dvh;
    box-shadow: 0 18px 60px rgba(11, 59, 46, 0.12);
  }

  #app-root {
    min-height: 100%;
    height: 100%;
  }
}

/* ============================
   WELCOME (ÚNICO FUNDO PRETO)
============================ */
.welcome {
  position: relative;
  width: 100%;
  min-height: 100svh;
  height: 100dvh;
  background: #000;
}

/* ============================
   GRID DE IMAGENS
============================ */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  height: 100%;
}

.welcome-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================
   OVERLAY VERDE
============================ */
.welcome::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 92, 60, 0.55);
  z-index: 1;
}

.welcome::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 92, 60, 0.85);
  z-index: 1;
}

/* ============================
   CONTEÚDO WELCOME
============================ */
.welcome-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}

/* ============================
   HEADER WELCOME
============================ */
.welcome-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.welcome-header img {
  width: 112px;
}

/* ============================
   TEXTO PRINCIPAL
============================ */
.welcome-text {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.8px;
  max-width: 84%;
  color: #fff;
}

/* ============================
   AÇÕES WELCOME
============================ */
.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 40px;
  padding-bottom: env(safe-area-inset-bottom, 12px);
}

.welcome-actions button {
  height: 48px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* BOTÃO PRINCIPAL */
.primary {
  background: #00a859;
  color: #fff;
  border: none;
}

/* BOTÃO SECUNDÁRIO */
.outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

/* ============================
   LOGIN
============================ */
.login {
  min-height: 100vh;
  padding: 24px;
  background: #f7f7f7;
  display: flex;
  flex-direction: column;
}

.login-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-header .back {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

.login-header .help {
  font-size: 20px;
}

.login h1 {
  margin: 32px 0;
  font-size: 26px;
}

.login label {
  font-size: 14px;
  margin-bottom: 6px;
  display: block;
}

.login input {
  width: 100%;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 16px;
  margin-bottom: 20px;
}

.login input:focus {
  outline: none;
  border-color: #2e7d32;
}

.save-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: auto;
}

.login-btn {
  margin-top: 24px;
  padding: 18px;
  font-size: 18px;
  border-radius: 12px;
  background: #2e7d32;
  color: #fff;
  border: none;
  cursor: pointer;
}

/* ============================
   SWITCH (Salvar conta)
============================ */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  border-radius: 26px;
  transition: 0.3s;
}

.slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.switch input:checked + .slider {
  background-color: #2e7d32;
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.pin-container {
  padding: 24px;
}

.pin-inputs {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.pin-inputs input {
  width: 48px;
  height: 56px;
  font-size: 24px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.pin-inputs input:focus {
  border-color: #0a7;
  outline: none;
}

.btn-primary {
  background: #ccc;
  color: #fff;
  border-radius: 24px;
  padding: 14px;
  width: 100%;
  margin-top: 20px;
}

.btn-outline {
  border: 2px solid #0a7;
  color: #0a7;
  border-radius: 24px;
  padding: 14px;
  width: 100%;
  margin-top: 12px;
}
