/* RESET E ESTRUTURA BÁSICA */
*, *::before, *::after {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', Arial, sans-serif;
}
.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}
@media (max-width: 1024px) {
  .page-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* HEADER */
.login-header {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 36px;
  background: #e53935;
  color: #fff;
  border-radius: 0 !important;
  box-shadow: none;
  border-bottom: none;
  z-index: 10;
}
header {
  height: 60px;
  background: #fff;
  z-index: 100;
}
.logo { height: 38px; max-width: 150px; object-fit: contain; }
.logo2 { height: 50px; max-width: 100px; object-fit: contain; }
.logo3 { height: 70px; max-width: 100px; object-fit: contain; }
.login-header nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.login-header nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.login-header nav a.header-btn,
.header-btn,
.footer-btn {
  background: #fff;
  color: #e53935 !important;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  padding: 7px 16px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.login-header nav a.header-btn:hover,
.header-btn:hover,
.footer-btn:hover {
  background-color: #fce4e4;
  border-color: #e53935;
  color: #b32b27 !important;
}
.footer-btn { padding: 5px 12px; }

/* FUNDO PRINCIPAL */
.login-bg {
  flex: 1;
  position: relative;
  width: 100%;
  background-image: url('/imagens/login/background-blur.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: #000;
  overflow: hidden;
}


/* SEÇÃO MARKETING */
.marketing-section {
  position: absolute;
  top: 40px;
  left: 200px;
  width: auto;
  display: block;
  z-index: 2;
  pointer-events: auto;
}
.marketing-section > * { max-width: 600px; width: 100%; }
.marketing-section h1 {
  font-size: 2.8rem;
  font-weight: bold;
  margin-bottom: 18px;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.highlight { color: #e53935; font-weight: bold; }
.i00-logo-text {
  font-family: 'Arial Black', Arial, sans-serif;
  color: #e53935;
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 1.7rem;
  margin-right: 2px;
}
.marketing-section p {
  margin-bottom: 28px;
  font-size: 1.1rem;
  max-width: 450px;
  line-height: 1.4;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* FORMULÁRIO RESPONSIVO CENTRALIZADO */
.login-form-section {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: calc(100dvh - 120px);
  min-height: 400px;
  padding-right: 80px;
  box-sizing: border-box;
  background: none;
  overflow: visible;
}
@media (max-width: 1024px) {
  .login-form-section {
    padding-right: 16px;
    padding-left: 16px;
    height: calc(100dvh - 110px);
    min-height: 320px;
    justify-content: center;
  }
}
@media (max-width: 700px) {
  .login-form-section {
    padding-right: 0;
    padding-left: 0;
    height: auto;
    min-height: 0;
    align-items: flex-start;
  }
}

/* CAIXA DO FORMULÁRIO */
.login-form-box {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
  padding: 38px 36px 32px 36px;
  min-width: 320px;
  max-width: 410px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  max-height: 100%;
  overflow-y: auto;
}
@media (max-width: 700px) {
  .login-form-box {
    min-width: 0;
    max-width: 98vw;
    padding: 18px 8vw 22px 8vw;
    box-shadow: 0 2px 12px rgba(0,0,0,0.13);
  }
}

/* CABEÇALHO DO FORMULÁRIO - ALINHADO À ESQUERDA */
.form-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  justify-content: flex-start;
  width: 100%;
}
.form-header > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: auto;
}
.form-title-1,
.form-title-2 {
  text-align: left;
  width: 100%;
  margin: 0;
  padding: 0;
}
.logo-form {
  height: 64px;
  width: auto;
  margin-left: 0;
  margin-top: 2px;
  margin-right: 0;
  margin-bottom: 0;
}
@media (max-width: 700px) {
  .form-title-1 { font-size: 1.35rem; }
  .form-title-2 { font-size: 1rem; }
  .logo-form { height: 44px; }
}

/* DESCRIÇÃO */
.form-desc {
  color: #222;
  font-size: 1.08rem;
  margin-bottom: 18px;
  margin-top: 2px;
}
@media (max-width: 700px) {
  .form-desc { font-size: 0.97rem; }
}

/* INPUTS */
.input-group {
  position: relative;
  margin-bottom: 18px;
}
.input-group input {
  width: 100%;
  padding: 13px 44px 13px 12px;
  border: 1.5px solid #ccc;
  border-radius: 7px;
  font-size: 1.08rem;
  background: #fff;
  color: #222;
  outline: none;
  transition: border 0.2s;
}
.input-group input:focus {
  border: 1.5px solid #e53935;
}
.input-group .input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.7;
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  line-height: 0;
}
.input-group .input-icon:hover {
  opacity: 1;
}
.input-group .input-icon:focus-visible {
  outline: 2px solid #e53935;
  outline-offset: 2px;
  border-radius: 4px;
}
@media (max-width: 700px) {
  .input-group input { font-size: 0.97rem; padding: 10px 36px 10px 10px; }
}

/* BOTÃO */
.login-btn {
  margin-top: 24px;
  background: #e53935;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 16px 0;
  font-size: 1.18rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  width: 100%;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(229,57,53,0.08);
}
.login-btn:hover {
  background: #b32b27;
}
@media (max-width: 700px) {
  .login-btn { font-size: 1rem; padding: 12px 0; }
}

/* INFORMATIVO E SELECT */
.form-info {
  color: #222;
  font-size: 0.98rem;
  margin: 18px 0 6px 0;
  text-align: left;
}
.user-select {
  width: 100%;
  padding: 12px 10px;
  border-radius: 7px;
  border: 1.5px solid #ccc;
  font-size: 1rem;
  background: #fff;
  margin-bottom: 12px;
}
@media (max-width: 700px) {
  .form-info { font-size: 0.9rem; }
  .user-select { font-size: 0.93rem; }
}

/* RODAPÉ ATUALIZAÇÃO */
.last-update {
  font-size: 0.93rem;
  color: #666;
  background: transparent;
  margin-top: auto;
  text-align: right;
  font-weight: 400;
  opacity: 0.85;
  position: static;
}
@media (min-width: 701px) {
  .last-update {
    position: absolute;
    bottom: 8px;
    right: 22px;
    width: auto;
  }
}

/* FOOTER */
footer, .footer-centered {
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #e53935;
  color: #ccc;
  padding: 8px 36px;
  z-index: 10;
  font-size: 1rem;
}
@media (max-width: 700px) {
  footer, .footer-centered { font-size: 0.93rem; padding: 8px 8px; }
}

/* MODAL COMO FUNCIONA */
.como-funciona-wrapper {
  position: relative;
  display: inline-block;
}
.como-funciona-modal {
  position: absolute;
  top: 32px;
  left: 0;
  z-index: 100;
  width: 340px;
  background: #fff;
  color: #222;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.11);
  padding: 18px 16px 12px 16px;
  border: 1px solid #d3d3d3;
  font-size: 1rem;
  animation: fadeIn 0.18s;
}
@media (max-width: 500px) {
  .como-funciona-modal { width: 95vw; left: -30vw; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px);}
  to   { opacity: 1; transform: translateY(0);}
}
.modal-arrow {
  position: absolute;
  top: -14px;
  left: 24px;
  width: 24px;
  height: 14px;
  overflow: hidden;
}
.modal-arrow::after {
  content: "";
  position: absolute;
  left: 7px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-top: 1px solid #d3d3d3;
  border-left: 1px solid #d3d3d3;
  transform: rotate(45deg);
  top: 7px;
  z-index: 2;
}
.modal-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 16px;
}
.modal-icon {
  font-size: 1.8em;
  color: #e53935;
  min-width: 32px;
  text-align: center;
  margin-top: 2px;
  display: flex;
  align-items: center;
}
.modal-title {
  font-weight: bold;
  color: #e53935;
  font-size: 1.09em;
}
.modal-desc {
  color: #333;
  font-size: 0.97em;
}
.como-funciona-modal .modal-item:last-child {
  margin-bottom: 0;
}

/* SCROLLBAR DISCRETO PARA FORMULÁRIO */
.login-form-box::-webkit-scrollbar {
  width: 6px;
}
.login-form-box::-webkit-scrollbar-thumb {
  background-color: rgba(229, 57, 53, 0.5);
  border-radius: 3px;
}

/* Ajuste para resolução 1024x768 (e telas próximas) */
@media (max-width: 1024px) and (max-height: 800px) {
  .login-form-section {
    padding-top: 2%;
    padding-right: 60px;
    align-items: center;
    min-height: 0;
    height: calc(100vh - 100px);
  }
  .login-form-box {
    padding: 18px 16px 18px 16px;
    min-width: 240px;
    max-width: 320px;
  }
  .logo-form {
    height: 38px;
    margin-left: 4px;
    margin-top: 0;
  }
  .form-title-1 {
    font-size: 1.1rem;
  }
  .form-title-2 {
    font-size: 0.95rem;
  }
  .i00-logo-text {
    font-size: 1.1rem;
  }
  .form-title-delivery {
    font-size: 1.1rem;
  }
  .form-desc {
    font-size: 0.93rem;
    margin-bottom: 10px;
  }
  .input-group input {
    font-size: 0.93rem;
    padding: 9px 36px 9px 9px;
    border-radius: 5px;
  }
  .login-btn {
    font-size: 1rem;
    padding: 10px 0;
    margin-top: 14px;
    border-radius: 5px;
  }
  .form-info {
    font-size: 0.85rem;
    margin: 10px 0 4px 0;
  }
  .user-select {
    font-size: 0.93rem;
    padding: 8px 8px;
    border-radius: 5px;
  }
  .last-update {
    font-size: 0.8rem;
    right: 10px;
    bottom: 5px;
  }
  footer, .footer-centered {
    height: 40px;

  }
  .marketing-section {
    position: absolute;
    top: 10px;
    left: 50px;
    width: auto;
    display: block;
    z-index: 2;
    pointer-events: auto;
  }
  
}


/* Ajuste para resolução 1024x768 (e telas próximas) */
@media (max-width: 1920px) and (max-height: 1080px) {
  .login-form-section {
    padding-top: 20px;
    padding-right: 100px;
    align-items: center;
    min-height: 0;
    height: calc(100vh - 100px);
  }
  footer, .footer-centered {
    height: 40px;

  }
  .login-form-box {
    padding: 18px 16px 18px 16px;
    min-width: 240px;
    max-width: 320px;
  }
  .logo-form {
    height: 38px;
    margin-left: 4px;
    margin-top: 0;
  }
  .form-title-1 {
    font-size: 1.1rem;
  }
  .form-title-2 {
    font-size: 0.95rem;
  }
  .i00-logo-text {
    font-size: 1.1rem;
  }
  .form-title-delivery {
    font-size: 1.1rem;
  }
  .form-desc {
    font-size: 0.93rem;
    margin-bottom: 10px;
  }
  .input-group input {
    font-size: 0.93rem;
    padding: 9px 36px 9px 9px;
    border-radius: 5px;
  }
  .login-btn {
    font-size: 1rem;
    padding: 10px 0;
    margin-top: 14px;
    border-radius: 5px;
  }
  .form-info {
    font-size: 0.85rem;
    margin: 10px 0 4px 0;
  }
  .user-select {
    font-size: 0.93rem;
    padding: 8px 8px;
    border-radius: 5px;
  }
  .last-update {
    font-size: 0.8rem;
    right: 10px;
    bottom: 5px;
  }
  .marketing-section {
    position: absolute;
    top: 20px;
    left: 40px;
    width: auto;
    display: block;
    z-index: 2;
    pointer-events: auto;
  }
 

}


@media screen and (width: 1366px) and (height: 768px) {
  .login-form-section {
    padding-top: 2%;
    padding-right: 60px;
    align-items: center;
    min-height: 0;
    height: calc(100vh - 100px);
  }

  .login-form-box {
    width: 100%;
    max-width: 400px;
    padding: 24px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
  }

  .form-title-1,
  .form-title-2,
  .form-desc,
  .input-group input,
  .login-btn {
    font-size: 1.1rem;
  }

  .login-btn {
    padding: 12px 0;
  }

}

.login-btn-secondary {
  width: 100%;
  margin-top: 10px;
  background: transparent;
  color: #e53935;
  border: 1.5px solid #e53935;
  border-radius: 6px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}

.login-btn-secondary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.token-step-desc {
  color: #b45309;
  font-weight: 600;
}

.token-user-info {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  color: #9a3412;
  font-size: 0.95rem;
}

header,
.login-header {
  height: auto;
  min-height: 64px;
}

.login-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  min-height: calc(100dvh - 128px);
  padding: 48px 72px;
}

.marketing-section {
  position: relative;
  top: auto;
  left: auto;
  flex: 1 1 auto;
  width: auto;
  max-width: 640px;
}

.marketing-section h1 {
  font-size: clamp(2rem, 3.4vw, 3.4rem);
}

.login-form-section {
  position: relative;
  flex: 0 0 420px;
  width: 420px;
  height: auto;
  min-height: 0;
  padding: 0;
  justify-content: center;
  align-items: center;
}

.login-form-box {
  width: 100%;
  min-width: 0;
  max-width: 420px;
  max-height: none;
  padding: 36px 32px 28px;
}

footer,
.footer-centered {
  height: auto;
  min-height: 52px;
  color: #fff;
  text-align: center;
}

@media (max-width: 900px) {
  .login-header {
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    min-height: 0;
    padding: 8px 12px;
  }

  .login-header .logo {
    height: 32px;
    max-width: 64px;
    flex: 0 0 auto;
  }

  .login-header nav {
    width: auto;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .login-header nav a {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .login-header nav a.header-btn {
    margin-left: 4px;
    padding: 6px 10px;
  }

  .login-content {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    min-height: 0 !important;
    padding: 12px 16px 16px;
  }

  .marketing-section,
  .marketing-section h1,
  .marketing-section p {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    max-width: none;
  }

  .marketing-section h1 {
    font-size: 1.65rem;
    margin: 0 0 6px;
  }

  .marketing-section p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .logo2 {
    height: 36px;
    vertical-align: middle;
  }

  .login-form-section {
    flex: none;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
  }

  .login-form-box {
    max-width: none;
    padding: 22px 18px 20px;
  }

  .form-title-1 {
    font-size: 1.15rem;
  }

  .form-title-2,
  .i00-logo-text,
  .form-title-delivery {
    font-size: 1.2rem;
  }

  .logo-form {
    height: 52px;
  }
}
