@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

/* ==================================================
   CORES E CONFIGURAÇÕES GERAIS
================================================== */

:root {
  --primary: #ff7417;
  --primary-light: #ff984c;
  --primary-dark: #e95400;
  --primary-soft: #fff4ec;
  --navy: #0b1424;
  --navy-light: #15233a;
  --card: rgba(255, 255, 255, 0.98);
  --text: #152033;
  --text-light: #68758a;
  --text-soft: #98a2b3;
  --border: #dfe5ee;
  --input-background: #f7f9fc;
  --error: #dc2626;
  --success: #15803d;
}

/* Padroniza os elementos da página. */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--navy);
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font-family: inherit;
}

/* Impede zoom automático ao focar os campos no celular. */
input,
select,
textarea {
  font-size: 16px !important;
}

/* ==================================================
   PÁGINA DE AUTENTICAÇÃO
================================================== */

.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px 24px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 10% 10%,
      rgba(51, 78, 120, 0.75),
      transparent 32%
    ),
    radial-gradient(
      circle at 88% 15%,
      rgba(255, 116, 23, 0.25),
      transparent 34%
    ),
    linear-gradient(145deg, #070c15, #0d192c 55%, #101d31);
}

/* Cria uma textura discreta no fundo. */
.login-page::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 45px 45px;
  pointer-events: none;
}

/* ==================================================
   LUZES DECORATIVAS
================================================== */

.background-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  pointer-events: none;
}

.background-light-one {
  top: -170px;
  right: -90px;
  width: 480px;
  height: 480px;
  background: rgba(255, 116, 23, 0.17);
}

.background-light-two {
  bottom: -220px;
  left: -130px;
  width: 520px;
  height: 520px;
  background: rgba(37, 99, 235, 0.13);
}

/* ==================================================
   CARTÃO PRINCIPAL
================================================== */

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 510px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.login-container::before {
  position: absolute;
  top: 0;
  right: 65px;
  left: 65px;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  border-radius: 0 0 10px 10px;
}

.login-card {
  padding: 55px 58px 42px;
  background: var(--card);
}

/* ==================================================
   CABEÇALHO
================================================== */

.login-header {
  margin-bottom: 38px;
  text-align: center;
}

.login-logo {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin: 0 auto 23px;
  color: #ffffff;
  background: linear-gradient(
    145deg,
    var(--primary-light),
    var(--primary-dark)
  );
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 22px;
  box-shadow:
    0 16px 32px rgba(232, 84, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-size: 34px;
}

.welcome-label {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.2px;
}

.login-header h1 {
  margin-top: 13px;
  color: var(--text);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1.4px;
  line-height: 1.15;
}

.login-header p {
  margin-top: 11px;
  color: var(--text-light);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
}

/* ==================================================
   FORMULÁRIO
================================================== */

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.input-container {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 700;
  transform: translateY(-50%);
  pointer-events: none;
}

.form-group input {
  width: 100%;
  height: 58px;
  padding: 0 17px 0 50px;
  color: var(--text);
  background: var(--input-background);
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  font-size: 16px;
  font-weight: 550;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

.form-group input::placeholder {
  color: var(--text-soft);
  font-weight: 500;
}

.form-group input:hover {
  background: #ffffff;
  border-color: #cdd5e1;
}

.form-group input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 116, 23, 0.12);
  transform: translateY(-1px);
}

/* ==================================================
   LINKS DE AUTENTICAÇÃO
================================================== */

.auth-link-container {
  display: flex;
  align-items: center;
  margin-top: -6px;
  margin-bottom: 16px;
}

.auth-link-container-right {
  justify-content: flex-end;
}

.auth-link-container-center {
  justify-content: center;
  margin-top: 25px;
  margin-bottom: 0;
}

.auth-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: var(--primary-dark);
  background: transparent;
  border-radius: 9px;
  outline: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition:
    color 0.2s,
    background-color 0.2s,
    transform 0.2s;
}

.auth-link:hover {
  color: #c84800;
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.auth-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 116, 23, 0.2);
}

.auth-link-back span {
  font-size: 17px;
  transition: transform 0.2s;
}

.auth-link-back:hover span {
  transform: translateX(-3px);
}

.first-access-message {
  margin-top: 24px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
}

.first-access-message .auth-link {
  margin-left: 2px;
}

/* ==================================================
   MENSAGENS
================================================== */

.login-message {
  min-height: 22px;
  margin: 2px 0 13px;
  color: var(--error);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

/* ==================================================
   BOTÃO PRINCIPAL
================================================== */

#login-button {
  width: 100%;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 14px;
  box-shadow: 0 13px 27px rgba(232, 84, 0, 0.27);
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.15px;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    opacity 0.2s;
}

#login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(232, 84, 0, 0.36);
}

#login-button:active {
  transform: translateY(0);
}

#login-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.button-arrow {
  font-size: 23px;
  transition: transform 0.2s;
}

#login-button:hover .button-arrow {
  transform: translateX(5px);
}

/* ==================================================
   MENSAGEM DE SEGURANÇA
================================================== */

.security-message {
  margin-top: 27px;
  color: #8490a3;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.6;
  text-align: center;
}

/* ==================================================
   TABLETS E CELULARES
================================================== */

@media (max-width: 600px) {
  .login-page {
    padding: 20px;
  }

  .login-container {
    max-width: 470px;
    border-radius: 25px;
  }

  .login-card {
    padding: 45px 31px 34px;
  }

  .login-logo {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    font-size: 31px;
  }

  .login-header {
    margin-bottom: 33px;
  }

  .login-header h1 {
    font-size: 31px;
  }

  .login-header p {
    font-size: 14px;
  }
}

/* ==================================================
   CELULARES PEQUENOS
================================================== */

@media (max-width: 420px) {
  .login-page {
    align-items: stretch;
    padding: 0;
    background: #ffffff;
  }

  .login-container {
    min-height: 100vh;
    max-width: none;
    display: flex;
    align-items: center;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .login-container::before {
    right: 30px;
    left: 30px;
  }

  .login-card {
    width: 100%;
    padding: 40px 23px;
  }

  .login-header h1 {
    font-size: 29px;
  }

  .form-group input {
    height: 56px;
  }

  #login-button {
    height: 56px;
  }

  .auth-link {
    min-height: 40px;
    padding: 10px;
  }
}
