:root {
  --color-navy-dark: #0b1023;
  --color-blue-primary: #1a4592;
  --color-blue-secondary: #288ecd;
  --color-blue-link: #3e4a7a;
  --color-text-muted: #9b9fab;
  --color-border: #d9d9d9;
  --color-input-border: #949599;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--color-navy-dark);
  font-family: var(--font-main);
  position: relative;
  perspective: 1600px;
}

.page-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2vh 24px;
  padding: 2vh max(24px, env(safe-area-inset-right)) 2vh max(24px, env(safe-area-inset-left));
  padding-top: max(2vh, env(safe-area-inset-top));
  padding-bottom: max(2vh, env(safe-area-inset-bottom));
}

.news-cards,
.news-banner {
  margin-top: 3.5vh;
}

.support-block {
  margin-top: 40px;
}

/* ===== Fundo (hero) ===== */
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}

.hero-bg__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 65%, var(--color-navy-dark) 100%);
}

/* ===== Estrelas de fundo ===== */
.stars {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20px 40px, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 75px 110px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.2px 1.2px at 130px 30px, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1px 1px at 170px 150px, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 210px 80px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.2px 1.2px at 40px 190px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 100px 220px, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 240px 200px, rgba(255, 255, 255, 0.55), transparent);
  background-repeat: repeat;
  background-size: 260px 260px;
  opacity: 0.55;
}

.stars--twinkle {
  background-image:
    radial-gradient(1.6px 1.6px at 60px 60px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.4px 1.4px at 190px 120px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.6px 1.6px at 300px 260px, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1.4px 1.4px at 340px 60px, rgba(255, 255, 255, 0.7), transparent);
  background-size: 380px 380px;
  opacity: 0.5;
  animation: stars-twinkle 4.5s ease-in-out infinite;
}

@keyframes stars-twinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
  .stars--twinkle {
    animation: none;
  }
}

.deco-rings {
  position: fixed;
  left: -80px;
  top: -25px;
  width: 220px;
  height: 220px;
  opacity: 0.4;
  z-index: -2;
  pointer-events: none;
}

.deco-rings__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.deco-big-ring {
  position: fixed;
  left: -25vw;
  top: 30vh;
  width: 62vw;
  max-width: 1000px;
  aspect-ratio: 1 / 1;
  z-index: -2;
  pointer-events: none;
}

.deco-big-ring__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-core {
  position: fixed;
  right: -25vw;
  width: 70rem;
  height: auto;
  z-index: -1;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  will-change: transform;
}

/* ===== Card de login ===== */
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  background: #ffffff;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transform: scale(0.9);
}

.login-card__header h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 27px;
  font-weight: 700;
  color: #000;
}

.logo-samierp {
  height: 25px;
  width: auto;
  object-fit: contain;
}

.login-card__subtitle {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.login-form {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
}

.login-form > * + * {
  margin-top: 18px;
}

.login-form > .divider {
  margin-top: 26px;
}

.login-form > .field--footer {
  margin-top: 20px;
}

.field label {
  display: flex;
  font-size: 16px;
  color: #000;
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  opacity: 0.55;
  pointer-events: none;
}

.input-wrap input[type="text"],
.input-wrap input[type="password"],
.input-wrap input[type="email"] {
  width: 100%;
  height: 52px;
  padding: 0 46px;
  border: 1.6px solid var(--color-border);
  border-radius: 8px;
  font-size: 16px;
  font-family: var(--font-main);
  color: #000;
  outline: none;
  transition: border-color 0.15s ease;
}

.input-wrap input:focus {
  border-color: var(--color-blue-primary);
}

.input-wrap input::placeholder {
  color: #9b9fab;
}

.toggle-password {
  position: absolute;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #9b9fab;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.toggle-password svg {
  width: 22px;
  height: 22px;
}

.toggle-password:hover,
.toggle-password.is-active {
  color: var(--color-blue-primary);
  background-color: rgba(26, 69, 146, 0.08);
}

.field--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: #000;
  cursor: pointer;
  margin-bottom: 0px !important;
}

.checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-blue-primary);
  cursor: pointer;
}

.link-muted {
  font-size: 15px;
  color: var(--color-blue-link);
  text-decoration: none;
}

.link-muted:hover {
  text-decoration: underline;
}

.link-centered {
  display: block;
  text-align: center;
}

.error-message {
  font-size: 13px;
  color: #d0342c;
  background: #fdecea;
  border-radius: 6px;
  padding: 8px 12px;
}

.btn-submit {
  height: 52px;
  border: none;
  border-radius: 8px;
  background: var(--color-blue-primary);
  color: #fff;
  font-size: 17px;
  font-family: var(--font-main);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn-submit:hover {
  opacity: 0.92;
}

.btn-submit:active {
  transform: scale(0.99);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.divider {
  height: 1px;
  background: #e3e3e3;
}

.text-muted {
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* ===== Cards de novidades ===== */
.news-cards {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1140px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.news-card {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1.2px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  padding: 14px 16px;
  color: #fff;
}

.news-card__tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  background: rgba(217, 217, 217, 0.28);
  border-radius: 40px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.news-card h3 {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
}

.news-card p {
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
}

.news-card__link {
  display: block;
  margin-top: 10px;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: #96acd3;
  text-decoration: none;
}

.news-card__link:hover {
  text-decoration: underline;
}

/* ===== Suporte / WhatsApp ===== */
.support-block {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.support-hours {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.btn-whatsapp {
  margin-top: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--color-blue-primary), var(--color-blue-secondary));
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  border-radius: 7px;
  box-shadow: 0 10px 14px rgba(26, 61, 30, 0.18);
}

.btn-whatsapp img {
  width: 18px;
  height: 18px;
}

.brand-footer-logo {
  width: 80px;
  height: auto;
  object-fit: contain;
  margin-top: 30px;
}

@media (max-height: 720px) {
  .news-cards,
  .news-banner {
    display: none;
  }
}

/* Telas largas com pouca altura (ex: tablets landscape 1024x600, laptops com janela reduzida) */
@media (max-height: 720px) and (min-width: 769px) {
  .page-content {
    padding-top: 1vh;
    padding-bottom: 1vh;
  }

  .login-card {
    padding: 24px 32px 20px;
    transform: none;
  }

  .login-form > * + * {
    margin-top: 12px;
  }

  .login-form > .divider {
    margin-top: 18px;
  }

  .login-form > .field--footer {
    margin-top: 14px;
  }

  .support-block {
    margin-top: 20px;
  }

  .brand-footer-logo {
    margin-top: 16px;
  }
}

/* ===== Seletor de banco (dev) ===== */
.bank-selector {
  margin-bottom: 18px;
}

.bank-selector select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1.6px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-main);
  color: #000;
  background: #fff;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.bank-selector select:focus {
  border-color: var(--color-blue-primary);
}

.bank-selector label {
  display: flex;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

/* ===== Mensagem do sistema (samiNotificacao / samiAlerta) ===== */
.msg-area {
  margin-top: 12px;
}

/* ===========================================================
   Responsividade
   =========================================================== */

/* 1600px */
@media (max-width: 1600px) {
  .hero-core {
    width: 58rem;
    right: -20vw;
  }
}

/* 1400px */
@media (max-width: 1400px) {
  .hero-core {
    width: 50rem;
    right: -17vw;
  }

  .deco-big-ring {
    width: 56vw;
  }
}

/* 1200px */
@media (max-width: 1200px) {
  .login-card {
    max-width: 520px;
  }

  .news-cards {
    max-width: 960px;
  }

  .hero-core {
    width: 44rem;
    right: -15vw;
  }
}

/* 960px */
@media (max-width: 960px) {
  .news-cards {
    grid-template-columns: repeat(2, 1fr);
    max-width: 620px;
  }

  .login-card {
    max-width: 480px;
    padding: 32px 30px 26px;
  }

  .hero-core {
    width: 36rem;
    right: -13vw;
  }

  .deco-big-ring {
    width: 50vw;
  }
}

/* 768px */
@media (max-width: 768px) {
  html,
  body {
    height: auto;
    min-height: 100%;
  }

  body {
    perspective: none;
  }

  .page-content {
    padding: 32px 20px;
  }

  .hero-core,
  .deco-big-ring,
  .deco-rings {
    display: none;
  }

  .news-cards {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin-top: 28px;
  }

  .login-card {
    max-width: 460px;
    padding: 28px 26px 22px;
    transform: none;
  }

  .login-card__header h1 {
    font-size: 23px;
    flex-wrap: wrap;
  }

  .support-block {
    margin-top: 28px;
  }
}

/* 560px */
@media (max-width: 560px) {
  .login-card {
    padding: 24px 20px 20px;
    border-radius: 10px;
    transform: none;
  }

  .login-card__header h1 {
    font-size: 20px;
    gap: 8px;
  }

  .logo-samierp {
    height: 20px;
  }

  .login-card__subtitle {
    font-size: 14px;
  }

  .field label,
  .checkbox {
    font-size: 15px;
  }

  .input-wrap input[type="text"],
  .input-wrap input[type="password"],
  .input-wrap input[type="email"] {
    height: 48px;
    padding: 0 42px;
    font-size: 15px;
  }

  .btn-submit {
    height: 48px;
    font-size: 16px;
  }

  .field--row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .support-block {
    margin-top: 28px;
  }

  .news-cards {
    display: none;
  }
}

/* 480px */
@media (max-width: 480px) {
  .page-content {
    padding: 24px 16px;
  }

  .login-card {
    padding: 20px 18px 18px;
    transform: none;
  }

  .login-card__header h1 {
    font-size: 19px;
  }

  .login-card__subtitle {
    font-size: 13px;
  }

  .field label {
    font-size: 14px;
  }

  .input-wrap input[type="text"],
  .input-wrap input[type="password"],
  .input-wrap input[type="email"] {
    height: 46px;
    padding: 0 38px;
    font-size: 14px;
  }

  .input-icon {
    left: 12px;
    width: 16px;
    height: 16px;
  }

  .toggle-password {
    right: 8px;
    width: 28px;
    height: 28px;
  }

  .toggle-password svg {
    width: 20px;
    height: 20px;
  }

  .checkbox {
    font-size: 14px;
    gap: 8px;
  }

  .link-muted {
    font-size: 13px;
  }

  .btn-submit {
    height: 46px;
    font-size: 15px;
  }

  .text-muted {
    font-size: 13px;
  }

  .field--row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .support-block {
    margin-top: 24px;
  }

  .support-hours {
    font-size: 12px;
  }

  .btn-whatsapp {
    font-size: 13px;
    padding: 9px 18px;
  }

  .brand-footer-logo {
    width: 48px;
    margin-top: 24px;
  }
}

/* 400px */
@media (max-width: 400px) {
  .page-content {
    padding: 20px 14px;
  }

  .login-card {
    padding: 18px 16px 16px;
    border-radius: 8px;
    transform: none;
  }

  .login-card__header h1 {
    font-size: 18px;
    gap: 6px;
  }

  .logo-samierp {
    height: 18px;
  }

  .login-form > * + * {
    margin-top: 14px;
  }

  .login-form > .divider {
    margin-top: 18px;
  }

  .login-form > .field--footer {
    margin-top: 14px;
  }

  .field--row {
    gap: 6px;
  }
}

/* 360px */
@media (max-width: 360px) {
  .page-content {
    padding: 16px 12px;
  }

  .login-card {
    padding: 16px 14px 14px;
    transform: none;
  }

  .login-card__header h1 {
    font-size: 17px;
  }

  .input-wrap input[type="text"],
  .input-wrap input[type="password"],
  .input-wrap input[type="email"] {
    height: 44px;
    padding: 0 34px;
    font-size: 14px;
  }

  .input-icon {
    left: 10px;
    width: 14px;
    height: 14px;
  }

  .toggle-password {
    right: 6px;
    width: 26px;
    height: 26px;
  }

  .btn-submit {
    height: 44px;
    font-size: 14px;
  }

  .btn-whatsapp {
    font-size: 12px;
    padding: 8px 14px;
    gap: 6px;
  }

  .btn-whatsapp img {
    width: 16px;
    height: 16px;
  }

  .support-hours {
    font-size: 11px;
  }
}
