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

html,
body {
  height: 100%;
}

body {
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #000;
  background-color: #0e111c;
  background-image:
    url("../imagenes/background_auth.svg"),
    radial-gradient(62.59% 96.7% at 91.84% 72.33%, #10195b 0%, #0e111c 100%);
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-position: center, center;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.banner {
  background-color: #1644ff;
  color: #fff;
  text-align: left;
  padding: 8px 16px;
  font-size: 16px;
  line-height: 1.4;
}

.banner a {
  color: #fff;
  text-decoration: underline;
  font-weight: 400;
}

.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 48px;
}

.auth {
  width: 100%;
  max-width: 443px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo {
  display: block;
  width: 91px;
  height: 24px;
  margin-bottom: 32px;
}

.card {
  width: 100%;
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card__title {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #000;
  margin-bottom: 24px;
}

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

.form-group:last-of-type {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #000;
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 46px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrap:hover:not(:focus-within):not(.input-wrap--error) {
  border-color: #cbd5e1;
}

.input-wrap:focus-within:not(.input-wrap--error) {
  border-color: #1644ff;
  box-shadow: 0 0 0 1px #1644ff, 0 0 0 4px rgba(22, 68, 255, 0.15);
}

.form-group.is-error .form-label {
  color: #d32f2f;
}

.input-wrap--error {
  border-color: #d32f2f;
  background-color: #fef2f2;
}

.input-wrap--error:hover:not(:focus-within) {
  border-color: #d32f2f;
}

.input-wrap--error:focus-within {
  border-color: #d32f2f;
  box-shadow: 0 0 0 1px #d32f2f, 0 0 0 4px rgba(211, 47, 47, 0.12);
}

.field-error {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: #d32f2f;
}

.form-input {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0 12px;
  font-family: inherit;
  font-size: 16px;
  color: #000;
  outline: none;
}

.form-input::placeholder {
  color: #8a9aa8;
}

.toggle-password {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 100%;
  border: none;
  background: transparent;
  color: #8a9aa8;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-password:hover {
  color: #525252;
}

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

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

.forgot-link {
  font-size: 14px;
  color: #1644ff;
  white-space: nowrap;
}

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

.btn-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 40px;
  padding: 0 20px;
  border: none;
  border-radius: 4px;
  background-color: #1644ff;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-signin:hover:not(:disabled) {
  background-color: #1238d4;
}

.btn-signin:disabled {
  background-color: #94a3ff;
  cursor: not-allowed;
  opacity: 0.85;
}

.alert {
  margin-top: 24px;
}

.alert--error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #d32f2f;
  border-radius: 4px;
  background-color: #fef2f2;
}

.alert[hidden] {
  display: none;
}

.alert__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: #d32f2f;
}

.alert__text {
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
}

.alert__text a {
  color: #1644ff;
  font-weight: 400;
}

.alert__text a:hover {
  text-decoration: underline;
}

.footer-links {
  margin-top: 24px;
  width: 100%;
  text-align: center;
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
}

.footer-links a {
  font-weight: 600;
  color: #fff;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-links p + p {
  margin-top: 8px;
}

@media (max-width: 480px) {
  .card {
    padding: 24px 20px;
  }

  .card__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .forgot-link {
    text-align: center;
  }

  .btn-signin {
    width: 100%;
  }
}
