/* ============================================================
   JOBDAY — Cambio de contraseña (tarjeta centrada)
   ============================================================ */

:root {
  --jd-teal:      #3ea0a2;
  --jd-teal-dark: #2d8789;
  --jd-teal-rgb:  62, 160, 162;
  --jd-text:      #1a2535;
  --jd-muted:     #6b7a8d;
  --jd-border:    #dde5e8;
  --radius:       14px;
  --font:         'Montserrat', sans-serif;
}

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

body {
  font-family: var(--font);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* ── Fondo degradado ───────────────────────────────────────── */
.jd-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(ellipse 65% 55% at 4% 8%,  rgba(175, 215, 218, 0.60) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 96% 92%, rgba(242, 220, 196, 0.55) 0%, transparent 65%),
    #f2f7f8;
}

/* ── Tarjeta centrada ──────────────────────────────────────── */
.jd-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 48px 44px;
  width: 100%;
  max-width: 462px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.07),
    0 2px 8px  rgba(0, 0, 0, 0.04);
}

/* ── Logo ──────────────────────────────────────────────────── */
.jd-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}

.jd-logo img {
  height: 52px;
  width: auto;
}

/* ── Encabezado ────────────────────────────────────────────── */
.jd-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--jd-text);
  text-align: center;
  margin: 0 0 8px;
  letter-spacing: -0.4px;
  font-family: var(--font);
}

.jd-subtitle {
  font-size: 14px;
  color: var(--jd-muted);
  text-align: center;
  margin: 0 0 28px;
  font-weight: 400;
  line-height: 1.55;
}

/* ── Campos ────────────────────────────────────────────────── */
.jd-field {
  margin-bottom: 16px;
}

.jd-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--jd-muted);
  margin-bottom: 7px;
}

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

.jd-input-icon {
  position: absolute;
  left: 16px;
  color: #b8c8cc;
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}

.jd-input {
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--jd-border);
  border-radius: var(--radius);
  padding: 0 50px 0 44px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--jd-text);
  background: white;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
}

.jd-input::placeholder { color: #b8c6c9; }

.jd-input:focus {
  border-color: var(--jd-teal);
  box-shadow: 0 0 0 3.5px rgba(var(--jd-teal-rgb), 0.12);
}

/* Estado inválido */
.jd-input.is-invalid {
  border-color: #f4655a;
}

.jd-input.is-invalid:focus {
  border-color: #f4655a;
  box-shadow: 0 0 0 3.5px rgba(244, 101, 90, 0.12);
}

/* Mensaje de error bajo el campo */
.jd-field-error {
  display: none;
  font-size: 12.5px;
  line-height: 1.4;
  color: #f4655a;
  margin-top: 7px;
  padding-left: 2px;
}

.jd-field-error.show {
  display: block;
}

/* Toggle mostrar/ocultar contraseña */
.jd-toggle-pass {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  padding: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #b8c8cc;
  font-size: 16px;
  transition: color 0.2s, background 0.2s;
  outline: none;
  z-index: 2;
}

.jd-toggle-pass:hover {
  color: var(--jd-teal);
  background: rgba(var(--jd-teal-rgb), 0.08);
}

.jd-toggle-pass.active { color: var(--jd-teal); }

.jd-toggle-pass i {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease;
}

.jd-toggle-pass.animating i {
  transform: scale(0.35) rotate(15deg);
  opacity: 0;
}

/* ── Botón guardar ─────────────────────────────────────────── */
.jd-btn-submit {
  width: 100%;
  height: 52px;
  background: var(--jd-teal);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  letter-spacing: 0.2px;
  margin-top: 8px;
}

.jd-btn-submit:hover {
  background: var(--jd-teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(var(--jd-teal-rgb), 0.32);
}

.jd-btn-submit:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ── Pie de tarjeta ────────────────────────────────────────── */
.jd-card-footer {
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--jd-muted);
  text-align: center;
  font-weight: 400;
}

.jd-support-link {
  color: var(--jd-text);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.jd-support-link:hover { color: var(--jd-teal); }

/* ============================================================
   RESPONSIVE — Móvil y tablet: tarjeta a pantalla completa,
   sin scroll vertical
   ============================================================ */

@media (max-width: 991.98px) {
  /* Bloquea el scroll del documento */
  html, body {
    height: 100%;
    overflow: hidden;
  }

  /* El fondo pasa a ser un contenedor a pantalla completa */
  .jd-bg {
    min-height: 100vh;   /* fallback navegadores sin dvh */
    min-height: 100dvh;
    height: 100dvh;
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  /* La tarjeta ocupa TODA la pantalla del dispositivo */
  .jd-card {
    width: 100%;
    max-width: none;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    /* Respeta las zonas seguras (notch / barra inferior) */
    padding: calc(20px + env(safe-area-inset-top)) 24px
             calc(16px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
  }

  /* Logo arriba del todo y más grande */
  .jd-logo     { margin-bottom: 0; }
  .jd-logo img { height: 62px; }

  /* Empuja el encabezado + formulario al centro,
     separando el logo hacia arriba */
  .jd-title    { margin-top: auto; margin-bottom: 6px; }
  .jd-subtitle { margin-bottom: 18px; }

  /* Empuja el pie hacia abajo, separado del formulario */
  .jd-card-footer:not(.mt-1) { margin-top: auto; padding-top: 8px; }
  .jd-card-footer.mt-1       { margin-top: 6px; }
}

/* Móvil: laterales algo más ajustados y tipografía compacta */
@media (max-width: 575.98px) {
  .jd-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .jd-title    { font-size: 21px; }
  .jd-subtitle { font-size: 13px; }
}

/* Pantallas de muy poca altura (móvil apaisado / dispositivos bajos):
   reduce aún más para garantizar que no aparezca scroll */
@media (max-width: 991.98px) and (max-height: 680px) {
  .jd-logo img { height: 44px; }

  .jd-subtitle { margin-bottom: 12px; }
  .jd-field    { margin-bottom: 12px; }

  .jd-input,
  .jd-btn-submit { height: 48px; }

  .jd-card-footer:not(.mt-1) { padding-top: 4px; }
}
