:root {
  --orange: #f26a21;
  --orange-dark: #de5d17;
  --text: #394150;
  --text-soft: #6f7a8d;
  --line: rgba(57, 65, 80, 0.12);
  --white-strong: rgba(255, 255, 255, 0.92);
  --footer-space: clamp(48px, 6vh, 72px);
  --page-padding: clamp(10px, 2.4vh, 34px);
  --dialog-width: clamp(500px, 62vh, 600px);
  --card-width: clamp(430px, 54vh, 520px);
  --logo-width: clamp(210px, 28vh, 280px);
}

/* RESET */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--page-padding) clamp(10px, 3vw, 40px) var(--footer-space);
  overflow-y: auto;

  display: flex;
  align-items: center;
  justify-content: center;

  /* ✅ BACKGROUND FULLSCREEN */
  background:
    linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04)),
    url("../img/background_login.png") center/cover no-repeat fixed;
}

/* Overlay sutil (profundidade) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  backdrop-filter: blur(2px);
  z-index: -1;
}

/* CONTAINER */
.login-shell {
  width: 100%;
  max-width: 1100px;
  min-height: calc(100vh - var(--footer-space) - (var(--page-padding) * 2));
  min-height: calc(100dvh - var(--footer-space) - (var(--page-padding) * 2));
  padding: 0;

  display: grid;
  place-items: center;
}

/* GLASS */
.glass-dialog {
  width: 100%;
  max-width: var(--dialog-width);

  border-radius: clamp(20px, 3vw, 36px);
  padding: clamp(24px, 4.8vh, 46px) clamp(18px, 3vw, 42px);

  display: flex;
  flex-direction: column;
  align-items: center;

  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);

  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);

  box-shadow: 0 28px 60px rgba(16,24,40,0.18);

  position: relative;
}

/* brilho interno */
.glass-dialog::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: clamp(19px, 3vw, 35px);
  background: linear-gradient(
    140deg,
    rgba(255,255,255,0.25),
    rgba(255,255,255,0.05)
  );
}

.glass-dialog::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: clamp(20px, 3vw, 36px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -1px 0 rgba(255,255,255,0.1);
}

.brand-block,
.login-card {
  position: relative;
  z-index: 1;
}

/* LOGO */
.brand-block {
  margin-bottom: clamp(18px, 3.2vh, 30px);
  width: 100%;
  text-align: center;
}

.brand-logo {
  max-width: var(--logo-width);
  width: 100%;
}

.brand-subtitle {
  margin: clamp(6px, 1.2vh, 10px) 0 0;
  font-size: clamp(14px, min(1.1vw, 1.8vh), 18px);
  line-height: 1.35;
  color: var(--text);
}

/* CARD INTERNO */
.login-card {
  width: 100%;
  max-width: var(--card-width);

  background: var(--white-strong);
  border-radius: clamp(18px, 2.2vw, 26px);
  padding: clamp(24px, 3.8vh, 38px) clamp(22px, 2.5vw, 34px);

  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* TITLE */
.login-card h1 {
  font-size: clamp(20px, 1.5vw, 24px);
  line-height: 1.2;
  margin: 0 0 clamp(18px, 2.8vh, 28px);
}

/* FORM */
.login-form {
  display: grid;
  gap: clamp(14px, 2vh, 20px);
}

/* INPUT */
.input-wrap {
  display: flex;
  align-items: center;
  height: clamp(52px, 6.1vh, 62px);

  border-radius: 999px;
  border: 1px solid var(--line);

  padding: 0 16px;
  background: rgba(255,255,255,0.85);

  transition: 0.2s;
}

.input-wrap:focus-within {
  border-color: rgba(242, 106, 33, 0.5);
  box-shadow: 0 0 0 4px rgba(242,106,33,0.12);
  background: #fff;
}

.input-icon svg {
  transition: transform 0.25s ease, color 0.25s ease;
  color: #999;
}

.input-wrap:focus-within .input-icon svg {
  color: #f26a21;
  transform: scale(1.15);
}

.input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  padding: 0 10px;
}

.input-icon {
  font-size: 16px;
  opacity: 0.6;
}

.input-icon.right {
  margin-left: auto;
}

/* LINK */
.forgot-link {
  font-size: 14px;
  color: var(--text-soft);
  text-decoration: none;
}

.forgot-link:hover {
  color: var(--orange);
}

/* BUTTON */
.btn-login {
  margin-top: clamp(4px, 1vh, 10px);
  align-self: flex-end;

  height: clamp(52px, 5.8vh, 58px);
  min-width: 140px;
  width: 100%;


  border-radius: 999px;
  border: none;

  background: linear-gradient(180deg, #ff8b2b, var(--orange));
  color: white;
  font-weight: 800;
  letter-spacing: 0.05em;

  cursor: pointer;

  box-shadow:
    0 14px 28px rgba(242,106,33,0.28),
    inset 0 1px 0 rgba(255,255,255,0.2);

  transition: 0.2s;
}

.btn-login:hover {
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(2px) scale(0.98);
  box-shadow:
    0 6px 12px rgba(242,106,33,0.2),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;

  height: clamp(52px, 5.8vh, 58px);
  min-width: 140px;
  flex: 1;

  border-radius: 999px;
  border: 1px solid var(--line);

  background: rgba(255,255,255,0.7);
  color: var(--text);

  text-decoration: none;
  font-weight: 600;

  transition: 0.2s;
}

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* FOOTER */
.card-footer {
  margin-top: clamp(12px, 2vh, 20px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: clamp(11px, 0.9vw, 13px);
  line-height: 1.3;
  color: var(--text-soft);
}

.login-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(6px, 1vh, 8px) 16px;
  font-size: clamp(10px, min(1vw, 1.5vh), 18px);
  line-height: 1.25;
  color: #ffffff;
}

.login-footer .pull-right {
  position: absolute;
  top: 8px;
  right: 16px;
}

.login-footer .pull-left {
  position: absolute;
  top: 8px;
  left: 16px;
}

.login-footer a {
  color: #ffffff;
  font-weight: 800;
}

/* LOADER */
.loader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.loader-modal {
  width: 260px;
  padding: 30px 25px;
  text-align: center;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.loader-modal p {
  margin: 15px 0 0;
  color: #3f485d;
  font-size: 16px;
}

.spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border: 5px solid #ffe1cf;
  border-top-color: #ff6b1a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ALERT MESSAGE */
.alert-message {
  margin-bottom: 18px;
  padding: 14px 16px;

  border-radius: 12px;
  border-left: 4px solid var(--orange);

  background: rgba(242, 106, 33, 0.1);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;

  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* PASSWORD STATUS */
.password-strong {
  color: #28a745;
  font-weight: bold;
  font-size: 14px;
}

.password-weak {
  color: #dc3545;
  font-size: 14px;
}

/* RESPONSIVO */
@media (max-height: 720px) {
  body {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {

  body {
    --footer-space: 64px;
    --page-padding: 10px;
  }

  .login-shell {
    padding: 0;
  }

  .glass-dialog {
    border-radius: 28px;
  }

  .brand-block {
    text-align: center;
  }

  .brand-logo {
    max-width: 220px;
  }

  .brand-subtitle {
    font-size: 15px;
  }

  .login-card {
    padding: 22px;
  }

  .btn-login {
    width: 100%;
    align-self: stretch;
  }

  .card-footer {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  .login-footer {
    padding: 6px 10px;
    font-size: 11px;
    text-align: center;
  }

  .login-footer .pull-right {
    position: static;
    margin-top: 2px;
  }

  .login-footer .pull-left {
    position: static;
    margin-top: 2px;
  }
}
/* RESPONSIVO PARA TELAS AINDA MENORES COMO CELULARES*/
@media (max-width: 480px) {

  body {
    --footer-space: 68px;
    --page-padding: 5px;
  }

  .login-shell {
    padding: 0;
  }

  .glass-dialog {
    padding: 18px;
    border-radius: 20px;
  }

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

  .brand-logo {
    max-width: 180px;
  }

  .brand-subtitle {
    font-size: 14px;
  }

  .login-card h1 {
    font-size: 20px;
  }

  .input-wrap {
    height: 50px;
  }

  .input-wrap input {
    font-size: 14px;
  }

  .btn-login {
    height: 50px;
    font-size: 14px;
  }

  .card-footer {
    font-size: 12px;
  }

  .login-footer {
    font-size: 10px;
  }
}
