:root {
  --mf-bg: #3D1185;
  --mf-card: #250B41;
  --mf-text: #fff;
  --mf-primary: #E43037;
  --mf-secondary: #00E6FF;
  --mf-ok: #92D050;
  --mf-danger: #E43037;
  --mf-focus: #00B0F0;
  --radius: 16px;
  --header-h: 70px;
}

/* ---------- RESET ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  color: var(--mf-text);
  background: var(--mf-bg);
}

/* ---------- HEADER ---------- */
.mf-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background-color: #3D1185;
  box-shadow: none;
  z-index: 1000;
  gap: 10px;
}

/* ---------- LOGO ---------- */
.mf-logo__img {
  height: 34px;
  width: auto;
  display: block;
}

/* ---------- ICONOS (ACCESIBILIDAD Y AYUDA) ---------- */
.mf-icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.12);
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
  position: relative;
  z-index: 1002;
}
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24;
  font-size: 22px;
  color: #fff;
}
.mf-icon-btn:hover {
  background: rgba(255,255,255,.25);
  transform: translateY(-1px);
}
.mf-icon-btn:hover .material-symbols-outlined {
  color: #00E6FF;
  filter: drop-shadow(0 0 4px rgba(0,230,255,0.6));
  transition: color 0.25s ease, filter 0.25s ease;
}

/* ---------- ESPACIADOR HEADER ---------- */
.mf-header-spacer { height: var(--header-h); }

/* ---------- MAIN ---------- */
.mf-main {
  display: grid;
  place-items: center;
  padding: 100px 16px 40px;
  min-height: calc(100vh - var(--header-h));
}

/* ---------- CARD ---------- */
.mf-card {
  background: var(--mf-card);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: 100%;
  max-width: 420px;
  color: #fff;
  margin-top: 12px;
}

/* ---------- TITLE ---------- */
.mf-card__title {
  margin: 0 0 18px;
  font-size: clamp(22px, 3.2vw, 26px);
  font-weight: 700;
}

/* ---------- INPUTS ---------- */
.mf-field { display: grid; gap: 8px; margin-bottom: 10px; }
.mf-field label { font-size: 14px; font-weight: 600; color: #fff; }
.mf-field input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-radius: 12px;
  font-size: 16px;
  background: #fff;
  color: #000;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.mf-field input::placeholder { color: #999; }
.mf-field input:focus {
  border-color: var(--mf-focus);
  box-shadow: 0 0 0 3px rgba(0,176,240,.4);
}

/* ---------- MENSAJES ---------- */
.mf-field__msg {
  font-size: 13px;
  min-height: 16px;
  margin: 0 2px;
}
.mf-field__msg.ok { color: var(--mf-ok); }
.mf-field__msg.error { color: var(--mf-danger); }

/* ---------- BOTONES ---------- */
.mf-btn {
  background: var(--mf-primary);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  transition: transform .25s ease, filter .25s ease;
  margin-top: 8px;
}
.mf-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.mf-btn__label { font-size: 15px; }
.mf-btn--alt { background: var(--mf-secondary); color: #250B41; }

.mf-btn--google {
  background: #fff;
  color: #333;
  gap: 10px;
  margin-top: 18px;
  border: 1px solid #DADCE0;
  border-radius: 12px;
}
.mf-btn--google:hover { background: #f8f9fa; filter: none; }
.mf-google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-right: 10px;
}

/* ---------- ENLACE OLVIDASTE ---------- */
.mf-forgot {
  text-align: center;
  margin: 18px 0 20px;
}
.mf-forgot__link {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  transition: color .25s ease;
}
.mf-forgot__link:hover { color: #00E6FF; }

/* ---------- FOOTER ---------- */
.mf-footer {
  text-align: center;
  padding: 16px;
  color: #fff;
  font-size: 13px;
}
.mf-legal {
  color: #fff;
  opacity: .85;
  text-decoration: none;
}
.mf-legal:hover { text-decoration: underline; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 520px) {
  .mf-main { padding-top: 110px; }
}

/* ---------- BASE ESTRUCTURAL ---------- */
.mf-header-spacer { height: var(--header-h); }
.mf-main { padding-top: 16px; padding-bottom: 32px; }
.mf-card { margin-top: 0; }
@media (min-width: 768px){ .mf-main{ padding-top: 28px; } }

/* === ACCESIBILIDAD: MENÚ === */
.mf-access-panel {
  position: absolute;
  top: 70px;
  right: 20px;
  width: 260px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  padding: 16px;
  z-index: 1001;
  font-family: 'Montserrat', sans-serif;
  display: none;
}
.mf-access-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.mf-access-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.mf-access-panel__title {
  font-weight: 600;
  color: #3D1185;
  font-size: 1rem;
}
.mf-access-panel__help {
  font-size: 0.8rem;
  color: #333;
  margin-bottom: 8px;
}
.mf-access-panel__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mf-access-item {
  font-size: 0.9rem;
  color: #222;
}
.mf-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.mf-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.mf-toggle__ui {
  width: 44px;
  height: 24px;
  background: #ccc;
  border-radius: 24px;
  position: relative;
  transition: background 0.3s;
  margin-right: 6px;
}
.mf-toggle__ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}
.mf-toggle input:checked + .mf-toggle__ui {
  background: #3D1185;
}
.mf-toggle input:checked + .mf-toggle__ui::after {
  transform: translateX(20px);
}
.mf-toggle__label { font-size: 0.9rem; color: #222; }
.mf-access-panel__list[aria-disabled="true"] {
  opacity: 0.5; pointer-events: none;
}

/* === CHECKS === */
.mf-access-item input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 2px solid #3D1185;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  cursor: pointer;
  position: relative;
  transition: background-color 0.25s, border-color 0.25s;
}
.mf-access-item input[type="checkbox"]:checked {
  background-color: #3D1185;
  border-color: #3D1185;
}

/* === SLIDER CENTRADO === */
#mf-opt-text-lg {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, #3D1185 50%, #d3d3d3 50%);
  border-radius: 4px;
  outline: none;
  margin-top: 12px;
  margin-bottom: 6px;
}
#mf-opt-text-lg::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3D1185;
  cursor: pointer;
  margin-top: -3px;
}
#mf-opt-text-lg::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3D1185;
  cursor: pointer;
}

/* === OVERLAY GENERAL === */
.mf-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mf-overlay.active {
  display: block;
  opacity: 1;
}

/* === OVERLAY DE AYUDA === */
.mf-help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 998;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mf-help-overlay.active {
  display: block;
  opacity: 1;
}

/* === BACKGROUND === */
.mf-bg {
  position: fixed;
  inset: 0;
  background: var(--mf-bg);
  z-index: -1;
}

/* === CONTENEDOR DE ICONOS EN EL HEADER === */
.mf-header-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* === PANEL CENTRO DE AYUDA === */
.mf-help-panel {
  position: absolute;
  top: 70px;
  right: 74px;
  width: 280px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  padding: 16px;
  z-index: 1001;
  font-family: 'Montserrat', sans-serif;
  display: none;
}
.mf-help-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}
.mf-help-panel a {
  text-decoration: none;
  color: #222;
  font-size: 0.9rem;
}
.mf-help-panel a:hover {
  color: #3D1185;
  text-decoration: underline;
}

/* === BOTÓN "CREAR CUENTA" — CELESTE ORIGINAL === */
.mf-btn--crear {
  background-color: var(--mf-secondary, #00E6FF) !important;
  color: #0b1030 !important;
  border: none !important;
  width: 100%;
  font-weight: 600;
  border-radius: var(--radius, 12px);
  padding: 12px;
  transition: filter .2s ease, transform .2s ease, background-color .2s ease;
}
.mf-btn--crear:hover {
  filter: brightness(0.95);
  transform: translateY(-2px);
}
.mf-btn--crear:active {
  transform: translateY(0);
  filter: brightness(0.9);
}
.mf-btn--crear:focus-visible {
  outline: 3px solid #00B0F0;
  outline-offset: 2px;
}

/* === Checkbox "Ver contraseña" — igual al estilo de crear-cuenta === */
.mf-checkbox.ver-pass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  user-select: none;
  margin: 10px 0 16px;
}

/* Oculta el checkbox nativo */
.mf-checkbox.ver-pass input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Círculo del checkbox */
.mf-checkbox__circle {
  width: 22px;
  height: 22px;
  min-width: 22px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid #00B0F0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  transition: border-color 0.25s ease;
}

/* Punto interno */
.mf-checkbox__circle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  background: #00E6FF;
  border-radius: 50%;
  transition: all 0.25s ease;
}

/* Estado activo */
.mf-checkbox.ver-pass input:checked + .mf-checkbox__circle::after {
  width: 10px;
  height: 10px;
}

/* Hover */
.mf-checkbox__circle:hover {
  border-color: #00E6FF;
}
