/* Campaña Navideña 2026 - kölbi
 * "Crear mi arbolito": Mi servicio (/mi-servicio) y Mis datos (/mis-datos), con el modal del OTP.
 * Se carga junto a landing.css.
 */
:root {
  --su-green-dark: #004109;
  --su-kolbi-green: #3fae49;
  --su-text: #2b2b2b;
  --su-label: #4a4a4a;
  --su-border: #c9d6cc;
  --su-error: #c8102e;
}

body.signup {
  min-height: 100vh;
  padding: clamp(24px, 6vh, 72px) 16px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
  background: var(--su-green-dark);
}
/* Tarjeta + logo centrados verticalmente (Ingresar y Mi servicio) */
body.signup--centered {
  justify-content: center;
  padding: 24px 16px;
}

.su-card {
  width: min(630px, 100%);
  padding: 36px 24px 26px;
  border-radius: 28px;
  background: radial-gradient(ellipse 70% 80% at 72% 100%, #b6ebc0 0%, rgba(218, 245, 224, .9) 40%, #ffffff 75%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .35);
  color: var(--su-text);
}
.su-title {
  text-align: center;
  font-size: clamp(30px, 4.6vw, 38px);
  font-weight: 500;
  letter-spacing: -.01em;
  margin-bottom: 20px;
}

.su-form { width: min(272px, 100%); margin: 0 auto; }
.su-form--wide { width: min(544px, 100%); }

.su-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.su-field[hidden] { display: none; }
.su-field label { margin: 0; font-size: 12px; font-weight: 400; color: var(--su-label); }
.su-input {
  width: 100%;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--su-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .85);
  color: var(--su-text);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.su-input::placeholder { color: #8a8a8a; }
.su-input:focus { border-color: var(--su-kolbi-green); box-shadow: 0 0 0 3px rgba(63, 174, 73, .18); }
.su-input.invalid { border-color: var(--su-error); }
.su-input[readonly] { background: #f2f2f2; color: #5a5a5a; cursor: not-allowed; }
.su-input[readonly]:focus { border-color: var(--su-border); box-shadow: none; }
select.su-input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
  background: rgba(255, 255, 255, .85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23123d1e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 16px center / 18px no-repeat;
}
select.su-input:invalid { color: #8a8a8a; }
input[type="date"].su-input:invalid::-webkit-datetime-edit { color: #8a8a8a; }
/* iOS Safari: el input date tiene ancho mínimo intrínseco y centra el texto, se desborda del contenedor */
input[type="date"].su-input {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  text-align: left;
  line-height: 42px;
}
input[type="date"].su-input::-webkit-date-and-time-value { text-align: left; margin: 0; }
input[type="date"].su-input::-webkit-datetime-edit { padding: 0; }

.su-error { min-height: 0; font-size: 11px; color: var(--su-error); }
.su-error:empty { display: none; }

/* Dropdown propio (Tipo de servicio): botón con el estilo de .su-input + lista flotante */
.su-select { position: relative; }
.su-select-btn {
  display: flex;
  align-items: center;
  padding-right: 44px;
  text-align: left;
  cursor: pointer;
  background: rgba(255, 255, 255, .85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23123d1e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 16px center / 18px no-repeat;
}
.su-select-btn[aria-expanded="true"] { border-color: var(--su-kolbi-green); }
.su-select-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.su-select-text.is-placeholder { color: #8a8a8a; }
.su-select-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 5;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}
.su-select-list[hidden] { display: none; }
.su-select-option {
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 700;
  color: #1f1f1f;
  cursor: pointer;
  outline: none;
}
.su-select-option:hover,
.su-select-option:focus { background: #eef8ef; }
.su-select-option[aria-selected="true"] { color: #2f8f3a; }

/* Check verde con palomita blanca (el input nativo queda oculto pero accesible) */
.su-check {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--su-label);
  cursor: pointer;
}
.su-check input {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.su-check-box {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid var(--su-border);
  border-radius: 4px;
  background: #fff;
  transition: background .15s ease, border-color .15s ease;
}
.su-check input:checked + .su-check-box {
  border-color: #33b843;
  background: #33b843 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.su-check input:focus-visible + .su-check-box { box-shadow: 0 0 0 3px rgba(63, 174, 73, .3); }

.su-legal { margin-top: 10px; text-align: center; font-size: 11px; color: var(--su-label); }
.su-legal a { color: #6b3f86; }

.su-alert {
  display: none;
  margin: 10px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(200, 16, 46, .08);
  border: 1px solid rgba(200, 16, 46, .3);
  color: var(--su-error);
  font-size: 12px;
  line-height: 1.4;
}
.su-alert.show { display: block; }
.su-alert.info { background: rgba(63, 174, 73, .1); border-color: rgba(63, 174, 73, .4); color: #2f6b36; }
.su-alert a { color: inherit; font-weight: 700; }

.su-btn {
  display: block;
  min-width: 148px;
  margin: 24px auto 0;
  padding: 14px 28px;
  border: 0;
  border-radius: 12px;
  background: #c9ecc9;
  color: #2fb53d;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(0, 0, 0, .18);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.su-btn:hover:not(:disabled) { transform: translateY(-1px); background: #bfe7bf; box-shadow: 0 9px 16px rgba(0, 0, 0, .2); }
.su-btn:focus-visible { outline: 3px solid var(--su-kolbi-green); outline-offset: 3px; }
.su-btn:disabled { opacity: .65; cursor: wait; }
/* Formulario completo: botón verde lleno */
.su-btn.is-ready { background: #32c332; color: #fff; }
.su-btn.is-ready:hover:not(:disabled) { background: #2bb02b; }

.su-link {
  border: 0;
  background: none;
  color: #2f8f3a;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}
.su-link:disabled { color: #8a8a8a; cursor: default; text-decoration: none; }

/* "¿Ya tenés cuenta Tribu? Iniciá sesión aquí", debajo del botón de Mi servicio */
.su-switch {
  /* Más ancho que el formulario (272px) para que entre en una línea */
  width: max-content;
  max-width: calc(100vw - 64px);
  margin: 24px 0 0 50%;
  transform: translateX(-50%);
  text-align: center;
  font-size: 13px;
  color: var(--su-label);
}
.su-switch a {
  margin-left: 4px;
  white-space: nowrap;
  color: var(--su-green-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.su-switch a:hover { color: #2f8f3a; }
.su-switch a:focus-visible { outline: 3px solid var(--su-kolbi-green); outline-offset: 2px; border-radius: 2px; }

/* ---------- Ingresar (/login) ---------- */
.su-card--login { width: min(512px, 100%); }
.su-card--login .su-form { width: min(360px, 100%); }
/* Enlace de texto: "Olvidé mi contraseña" */
.su-text-link {
  display: inline-block;
  font-size: 11px;
  color: var(--su-label);
  text-decoration: underline;
}
.su-text-link:hover { color: #2f8f3a; }
/* "Regresar a registro de servicio", debajo del botón */
.su-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: max-content;
  margin: 20px auto 0;
  color: var(--su-green-dark);
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.su-back svg { width: 20px; height: 20px; flex-shrink: 0; }
.su-back:hover { color: #2f8f3a; }
.su-back:focus-visible { outline: 3px solid var(--su-kolbi-green); outline-offset: 3px; border-radius: 4px; }

/* ---------- Recuperar contraseña (/recuperar): misma tarjeta que Ingresar ---------- */
.su-title--sm { font-size: clamp(24px, 3.4vw, 28px); }
/* "Regresar a inicio de sesión" bajo el correo, alineado a la izquierda */
.su-back--inline { margin: 2px 0 0; font-size: 12px; gap: 6px; }
.su-back--inline svg { width: 16px; height: 16px; }
.su-modal-text--hint { font-size: 12px; }
.su-resend { text-align: center; }
/* Botón como enlace ("Iniciar sesión", "Solicitar un nuevo enlace" en Cambiar contraseña) */
a.su-btn { width: max-content; max-width: 100%; text-align: center; text-decoration: none; }

/* Logo kölbi verde (estilos en landing.css); debajo de la tarjeta va a 144px de ella */
.su-logo { font-size: 36px; margin-top: 144px; }
/* Ingresar, Mi servicio, Recuperar y Cambiar contraseña: en el HTML va antes de la tarjeta
   (arriba en celular); en pantallas más grandes se pasa abajo con `order` */
.su-logo--top-mobile { order: 1; }

/* ---------- Modal OTP ---------- */
.su-modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .6);
}
.su-modal[hidden] { display: none; }
.su-modal .su-card { width: min(440px, 100%); }
.su-modal-text { text-align: center; font-size: 14px; line-height: 1.45; color: var(--su-label); margin-bottom: 18px; }
.su-otp {
  height: 52px;
  text-align: center;
  font-size: 24px;
  letter-spacing: .4em;
}
.su-modal-actions { display: flex; justify-content: space-between; margin-top: 4px; }

/* ---------- Modal de aviso con la rana (cuenta existente) ---------- */
.su-modal .su-card--notice {
  width: min(360px, 100%);
  padding: 28px 28px 30px;
  text-align: center;
}
.su-notice-frog {
  display: block;
  width: 168px;
  height: auto;
  margin: 0 auto 18px;
}
.su-notice-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}
.su-card--notice .su-modal-text { font-size: 13px; margin-bottom: 0; }
.su-notice-btn {
  width: min(240px, 100%);
  margin-top: 28px;
  font-size: 22px;
}

/* ---------- Recuperar (/recuperar) y cambiar contraseña (/cambiar-contrasena) ---------- */
.su-hidden { display: none !important; }
.su-subtitle {
  max-width: 360px;
  margin: -8px auto 22px;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  color: var(--su-label);
}
.su-subtitle strong { color: var(--su-text); word-break: break-all; }

/* Contraseña con botón de ver/ocultar */
.su-pass { position: relative; }
.su-pass .su-input { padding-right: 48px; }
.su-pass-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #6a6a6a;
  cursor: pointer;
  transform: translateY(-50%);
}
.su-pass-toggle svg { width: 20px; height: 20px; }
.su-pass-toggle:hover { color: #2f8f3a; }
.su-pass-toggle:focus-visible { outline: 2px solid var(--su-kolbi-green); }

/* Reglas de la contraseña: se marcan en verde al cumplirse */
.su-rules {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: -4px 0 14px;
  padding: 0;
  list-style: none;
  font-size: 11px;
  color: var(--su-label);
}
.su-rules li { display: flex; align-items: center; gap: 6px; }
.su-rules li::before {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--su-border);
  border-radius: 50%;
  background: #fff;
}
.su-rules li.ok { color: #2f8f3a; }
.su-rules li.ok::before {
  border-color: #33b843;
  background: #33b843 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 9px no-repeat;
}

/* Estados: correo enviado, contraseña actualizada, enlace no válido */
.su-state { text-align: center; }
.su-state .su-notice-frog { width: 150px; margin-bottom: 14px; }
.su-state .su-title { margin-bottom: 10px; }
.su-state-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #f2842f;
  color: #fff;
}
.su-state-icon svg { width: 36px; height: 36px; }
.su-state .su-subtitle { margin: 0 auto 6px; }
.su-help { margin: 10px auto 0; font-size: 12px; color: #6a6a6a; }
.su-resend { margin-top: 18px; text-align: center; font-size: 13px; color: var(--su-label); }
/* Botón como enlace (solo en los estados de recuperar/cambiar contraseña) */
.su-state a.su-btn { width: max-content; text-align: center; text-decoration: none; }

@media (max-width: 480px) {
  .su-card { padding: 28px 18px 22px; border-radius: 22px; }
  /* Arriba de la tarjeta en celular: la separación va abajo del logo */
  .su-logo--top-mobile { order: 0; margin: 0 0 36px; }
}
