: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);
}

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

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  min-height: 100vh;

  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;
  padding: 40px;

  display: grid;
  place-items: center;
}

/* GLASS */
.glass-dialog {
  width: 100%;
  max-width: 850px;

  border-radius: 36px;
  padding: 42px;

  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: 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: 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: 28px;
}

.brand-logo {
  max-width: 280px;
  width: 100%;
}

.brand-subtitle {
  margin-top: 10px;
  font-size: 18px;
  color: var(--text);
}

/* CARD INTERNO */
.login-card {
  width: 100%;
  max-width: 520px;

  background: var(--white-strong);
  border-radius: 26px;
  padding: 34px;

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

/* TITLE */
.login-card h1 {
  font-size: 24px;
  margin-bottom: 25px;
}

/* FORM */
.login-form {
  display: grid;
  gap: 18px;
}

/* INPUT */
.input-wrap {
  display: flex;
  align-items: center;
  height: 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-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: 10px;
  align-self: flex-end;

  height: 56px;
  min-width: 140px;
  flex: 1;

  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: 56px;
  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: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-soft);
}

/* LOADER */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;

  background: rgba(242, 106, 33, 0.08);
  border-radius: 16px;
  border: 1px solid rgba(242, 106, 33, 0.2);
}

.loader p {
  font-size: 14px;
  color: var(--text);
  margin: 0;
  font-weight: 500;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(242, 106, 33, 0.2);
  border-top-color: var(--orange);
  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-width: 768px) {

  body {
    padding: 10px;
  }

  .login-shell {
    padding: 10px;
  }

  .glass-dialog {
    padding: 25px;
    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;
  }
}
