/* =========================================================================
   Proyecto Isaías v12.5.0 — Puerta de entrada
   Ingresar · Solicitud de ingreso · Solicitud recibida
   Pantalla completa, centrada y con contraste propio para día y noche.
   ========================================================================= */

html body .fj-gate {
  --g-bg1: #f3f0fb;
  --g-bg2: #e9eff9;
  --g-glow1: rgba(201, 162, 90, .22);
  --g-glow2: rgba(91, 76, 214, .16);
  --g-panel: #ffffff;
  --g-panel-line: #dfe3ee;
  --g-ink: #121a2e;
  --g-ink2: #34405a;
  --g-muted: #56617a;
  --g-accent: #4b3bc4;
  --g-accent-ink: #ffffff;
  --g-gold: #8a6116;
  --g-field: #ffffff;
  --g-field-line: #b9c1d4;
  --g-field-ink: #121a2e;
  --g-placeholder: #6b7590;
  --g-focus: rgba(75, 59, 196, .28);
  --g-soft: #f4f6fb;
  --g-tag-bg: #fff3dc;
  --g-tag-ink: #6b4a0e;
  --g-ok: #11734b;
  --g-ok-bg: #e5f6ee;
  --g-err: #a1182f;
  --g-err-bg: #fdecef;
  --g-info: #1d4f91;
  --g-info-bg: #e8f0fc;
  --g-shadow: 0 24px 60px rgba(18, 26, 46, .14), 0 2px 6px rgba(18, 26, 46, .06);
  --g-hero1: #12193a;
  --g-hero2: #2a1f6b;

  position: fixed !important;
  inset: var(--wp-admin--admin-bar--height, 0px) 0 0 0 !important;
  z-index: 99990 !important;
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: auto !important;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif !important;
  color: var(--g-ink) !important;
  background: var(--g-bg1) !important;
  -webkit-font-smoothing: antialiased;
  text-align: left;
}

html[data-fj-theme="night"] body .fj-gate,
body[data-fj-theme="night"] .fj-gate {
  --g-bg1: #0a1020;
  --g-bg2: #141033;
  --g-glow1: rgba(201, 162, 90, .14);
  --g-glow2: rgba(120, 104, 255, .18);
  --g-panel: #131b31;
  --g-panel-line: #2a3553;
  --g-ink: #f2f5fc;
  --g-ink2: #d6ddee;
  --g-muted: #b3bdd4;
  --g-accent: #8f83ff;
  --g-accent-ink: #0b1020;
  --g-gold: #e3bf74;
  --g-field: #0d1426;
  --g-field-line: #3b4870;
  --g-field-ink: #f2f5fc;
  --g-placeholder: #8d98b5;
  --g-focus: rgba(143, 131, 255, .35);
  --g-soft: #18223c;
  --g-tag-bg: #3a2c10;
  --g-tag-ink: #f6d98f;
  --g-ok: #6be0a8;
  --g-ok-bg: #0f2d22;
  --g-err: #ff9aaa;
  --g-err-bg: #3a1220;
  --g-info: #9cc2ff;
  --g-info-bg: #13264a;
  --g-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .04);
}

/* El tema queda oculto detrás de la puerta y no se desplaza. */
html.fj-gate-open,
html.fj-gate-open body,
body.fj-gate-page { overflow: hidden !important; }

html body .fj-gate *,
html body .fj-gate *::before,
html body .fj-gate *::after { box-sizing: border-box; }

html body .fj-gate__bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% 0%, var(--g-glow1), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, var(--g-glow2), transparent 60%),
    linear-gradient(160deg, var(--g-bg1), var(--g-bg2)) !important;
}

/* Desplazamiento interno; el contenido se centra cuando cabe y nunca se corta arriba. */
html body .fj-gate__scroll {
  position: relative;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 4vh, 48px) 16px;
  margin: 0 !important;
  max-width: none !important;
  background: transparent !important;
}
html body .fj-gate__center {
  margin: auto;
  width: 100%;
  max-width: 1080px;
  display: flex;
  justify-content: center;
}
html body .fj-gate.is-apply .fj-gate__center { max-width: 860px; }
html body .fj-gate.is-notice .fj-gate__center { max-width: 580px; }

/* ---------- Tipografía ---------- */
html body .fj-gate h1, html body .fj-gate h2, html body .fj-gate p,
html body .fj-gate ol, html body .fj-gate li, html body .fj-gate fieldset,
html body .fj-gate legend, html body .fj-gate label, html body .fj-gate form { margin: 0; padding: 0; border: 0; background: none; text-transform: none; letter-spacing: normal; }

html body .fj-gate .fj-gate__kicker {
  font-size: 12px !important; font-weight: 800 !important; letter-spacing: .14em !important;
  text-transform: uppercase !important; color: var(--g-gold) !important; margin: 0 0 8px !important;
}
html body .fj-gate .fj-gate__kicker.is-accent { color: var(--g-accent) !important; }
html body .fj-gate .fj-gate__title {
  font-size: clamp(32px, 4.4vw, 48px) !important; line-height: 1.06 !important; font-weight: 800 !important;
  letter-spacing: -.02em !important; color: var(--g-ink) !important; margin: 0 0 12px !important;
}
html body .fj-gate .fj-gate__title.is-sm { font-size: clamp(26px, 3.4vw, 34px) !important; }
html body .fj-gate .fj-gate__h2 { font-size: 24px !important; line-height: 1.2 !important; font-weight: 800 !important; color: var(--g-ink) !important; margin: 0 0 8px !important; }
html body .fj-gate .fj-gate__lead { font-size: 17px !important; line-height: 1.55 !important; color: var(--g-ink2) !important; margin: 0 0 20px !important; }
html body .fj-gate .fj-gate__muted { font-size: 15px !important; line-height: 1.55 !important; color: var(--g-muted) !important; margin: 0 0 18px !important; }
html body .fj-gate .fj-gate__fine { font-size: 13px !important; line-height: 1.5 !important; color: var(--g-muted) !important; margin: 16px 0 0 !important; }
html body .fj-gate .fj-gate__fine.is-center { text-align: center; }
html body .fj-gate a { color: var(--g-accent) !important; font-weight: 700; text-decoration: none !important; }
html body .fj-gate a:hover { text-decoration: underline !important; }
html body .fj-gate a:focus-visible, html body .fj-gate button:focus-visible { outline: 3px solid var(--g-focus) !important; outline-offset: 2px; border-radius: 10px; }

/* ---------- Logo ---------- */
html body .fj-gate .fj-gate__logo {
  display: grid; place-items: center; flex: 0 0 auto;
  background: #0c1330 !important; border-radius: 26px; overflow: hidden;
  box-shadow: 0 0 0 4px rgba(227, 191, 116, .35), 0 14px 30px rgba(0, 0, 0, .25);
}
html body .fj-gate .fj-gate__logo.is-lg { width: 112px; height: 112px; margin: 0 0 28px; }
html body .fj-gate .fj-gate__logo.is-sm { width: 64px; height: 64px; border-radius: 18px; }
html body .fj-gate .fj-gate__logo img { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }
html body .fj-gate .fj-gate__logo.fj-logo-fit-contain img { object-fit: contain; padding: 8%; }

/* ---------- Ingresar: dos columnas ---------- */
html body .fj-gate .fj-gate__split {
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border-radius: 28px;
  overflow: hidden;
  background: var(--g-panel) !important;
  box-shadow: var(--g-shadow);
  border: 1px solid var(--g-panel-line);
}
html body .fj-gate .fj-gate__hero {
  padding: clamp(28px, 5vw, 56px);
  display: flex; flex-direction: column; justify-content: center;
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(227, 191, 116, .22), transparent 60%),
    linear-gradient(150deg, var(--g-hero1), var(--g-hero2)) !important;
}
/* El panel de marca es oscuro en ambos modos: texto claro fijo. */
html body .fj-gate .fj-gate__hero .fj-gate__kicker { color: #e3bf74 !important; }
html body .fj-gate .fj-gate__hero .fj-gate__title { color: #ffffff !important; }
html body .fj-gate .fj-gate__hero .fj-gate__lead { color: #d9def0 !important; }
html body .fj-gate .fj-gate__path { display: flex; flex-wrap: wrap; gap: 8px; list-style: none !important; margin: 4px 0 0 !important; }
html body .fj-gate .fj-gate__path li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px !important; font-weight: 700 !important;
  color: #ffffff !important; background: rgba(255, 255, 255, .12) !important;
  border: 1px solid rgba(227, 191, 116, .55) !important;
}
html body .fj-gate .fj-gate__path li + li::before { content: "→"; color: #e3bf74; margin-right: 2px; }

html body .fj-gate .fj-gate__panel {
  padding: clamp(24px, 4vw, 48px);
  background: var(--g-panel) !important;
  color: var(--g-ink) !important;
  display: flex; flex-direction: column; justify-content: center;
}
html body .fj-gate .fj-gate__panel.is-wide {
  border-radius: 24px; border: 1px solid var(--g-panel-line); box-shadow: var(--g-shadow);
}

/* ---------- Formularios ---------- */
html body .fj-gate .fj-gate__form { display: grid; gap: 16px; }
html body .fj-gate .fj-gate__field { display: grid; gap: 7px; min-width: 0; }
html body .fj-gate .fj-gate__field > span {
  font-size: 14px !important; font-weight: 700 !important; color: var(--g-ink2) !important; line-height: 1.3;
}
html body .fj-gate .fj-gate__field > span b { color: var(--g-err) !important; font-weight: 800; }
html body .fj-gate .fj-gate__field > span small { color: var(--g-muted) !important; font-weight: 500; font-size: 13px; }
html body .fj-gate input[type="text"], html body .fj-gate input[type="email"], html body .fj-gate input[type="tel"],
html body .fj-gate input[type="password"], html body .fj-gate select, html body .fj-gate textarea {
  width: 100% !important; min-height: 48px; margin: 0 !important;
  padding: 12px 14px !important;
  font: inherit !important; font-size: 16px !important; line-height: 1.35 !important;
  color: var(--g-field-ink) !important; background: var(--g-field) !important;
  border: 1.5px solid var(--g-field-line) !important; border-radius: 12px !important;
  box-shadow: none !important; outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
html body .fj-gate select {
  padding-right: 40px !important;
  background-image: linear-gradient(45deg, transparent 50%, var(--g-muted) 50%), linear-gradient(135deg, var(--g-muted) 50%, transparent 50%) !important;
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50% !important;
  background-size: 6px 6px, 6px 6px !important;
  background-repeat: no-repeat !important;
}
html body .fj-gate select option { color: #121a2e; background: #ffffff; }
html body .fj-gate textarea { min-height: 120px; resize: vertical; }
html body .fj-gate ::placeholder { color: var(--g-placeholder) !important; opacity: 1; }
html body .fj-gate input:focus, html body .fj-gate select:focus, html body .fj-gate textarea:focus {
  border-color: var(--g-accent) !important; box-shadow: 0 0 0 4px var(--g-focus) !important;
}
html body .fj-gate input:-webkit-autofill { -webkit-text-fill-color: var(--g-field-ink) !important; -webkit-box-shadow: 0 0 0 40px var(--g-field) inset !important; }

html body .fj-gate .fj-gate__check {
  display: flex !important; align-items: center; gap: 10px; cursor: pointer;
  font-size: 15px !important; color: var(--g-ink2) !important; font-weight: 600;
}
html body .fj-gate .fj-gate__check input {
  width: 20px !important; height: 20px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
  flex: 0 0 20px; accent-color: var(--g-accent); border-radius: 5px;
  -webkit-appearance: auto; appearance: auto;
}
html body .fj-gate .fj-gate__check span { color: var(--g-ink2) !important; }

html body .fj-gate .fj-gate__btn {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 52px; padding: 14px 20px !important; margin: 4px 0 0 !important;
  font: inherit !important; font-size: 16px !important; font-weight: 800 !important; letter-spacing: .01em;
  color: var(--g-accent-ink) !important; background: var(--g-accent) !important;
  border: 0 !important; border-radius: 14px !important; cursor: pointer; text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(75, 59, 196, .28) !important;
  transition: transform .12s, filter .12s;
}
html body .fj-gate .fj-gate__btn:hover { filter: brightness(1.06); text-decoration: none !important; }
html body .fj-gate .fj-gate__btn:active { transform: translateY(1px); }
html body .fj-gate .fj-gate__btn[disabled] { opacity: .7; cursor: progress; }

html body .fj-gate .fj-gate__links {
  display: grid; gap: 10px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--g-panel-line);
}
html body .fj-gate .fj-gate__links a { font-size: 15px !important; color: var(--g-accent) !important; }
html body .fj-gate .fj-gate__links a.is-strong {
  display: block; padding: 12px 14px; border-radius: 12px; background: var(--g-soft) !important;
  border: 1px solid var(--g-panel-line);
}

/* ---------- Mensajes ---------- */
html body .fj-gate .fj-gate__alert {
  padding: 12px 14px; border-radius: 12px; margin: 0 0 16px;
  font-size: 15px !important; font-weight: 600; line-height: 1.45;
  border-left: 4px solid currentColor;
}
html body .fj-gate .fj-gate__alert.is-error { color: var(--g-err) !important; background: var(--g-err-bg) !important; }
html body .fj-gate .fj-gate__alert.is-ok { color: var(--g-ok) !important; background: var(--g-ok-bg) !important; }
html body .fj-gate .fj-gate__alert.is-info { color: var(--g-info) !important; background: var(--g-info-bg) !important; }

/* ---------- Solicitud ---------- */
html body .fj-gate .fj-gate__stack { width: 100%; display: grid; gap: 18px; }
html body .fj-gate .fj-gate__head {
  display: grid; grid-template-columns: auto 1fr; gap: 18px 20px; align-items: center;
  padding: 4px 4px 0;
}
html body .fj-gate .fj-gate__head .fj-gate__muted { margin: 0 !important; }
html body .fj-gate .fj-gate__head .fj-gate__title { margin-bottom: 6px !important; }
html body .fj-gate .fj-gate__head .fj-gate__steps { grid-column: 1 / -1; }

html body .fj-gate .fj-gate__steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none !important; margin: 0 !important; padding: 0 !important; }
html body .fj-gate .fj-gate__steps li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 7px; border-radius: 999px;
  font-size: 14px !important; font-weight: 700 !important;
  color: var(--g-muted) !important; background: var(--g-panel) !important; border: 1px solid var(--g-panel-line) !important;
}
html body .fj-gate .fj-gate__steps li span {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 12px; font-weight: 800; color: var(--g-muted) !important; background: var(--g-soft) !important;
}
html body .fj-gate .fj-gate__steps li.is-current { color: var(--g-ink) !important; border-color: var(--g-accent) !important; }
html body .fj-gate .fj-gate__steps li.is-current span { color: var(--g-accent-ink) !important; background: var(--g-accent) !important; }
html body .fj-gate .fj-gate__steps li.is-done { color: var(--g-ok) !important; }
html body .fj-gate .fj-gate__steps li.is-done span { color: #ffffff !important; background: #11734b !important; }

html body .fj-gate .fj-gate__panel-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
html body .fj-gate .fj-gate__tag {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  font-size: 13px !important; font-weight: 800 !important; color: var(--g-tag-ink) !important; background: var(--g-tag-bg) !important;
}
html body .fj-gate .fj-gate__group { display: grid; gap: 14px; padding: 18px 0 0 !important; border-top: 1px solid var(--g-panel-line) !important; }
html body .fj-gate .fj-gate__group legend {
  float: left; width: 100%; margin: 0 0 2px !important; padding: 0 !important;
  font-size: 13px !important; font-weight: 800 !important; letter-spacing: .08em !important; text-transform: uppercase !important;
  color: var(--g-gold) !important;
}
html body .fj-gate .fj-gate__group legend + * { clear: both; }
html body .fj-gate .fj-gate__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
html body .fj-gate .fj-gate__grid .is-full { grid-column: 1 / -1; }
html body .fj-gate .fj-gate__birth { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 10px; }
html body .fj-gate .fj-gate__hint, html body .fj-gate .fj-gate__file small { font-size: 13px !important; line-height: 1.45; color: var(--g-muted) !important; }
html body .fj-gate .fj-gate__file input[type="file"] {
  width: 100%; padding: 10px; font-size: 14px; color: var(--g-ink2) !important;
  background: var(--g-soft) !important; border: 1.5px dashed var(--g-field-line) !important; border-radius: 12px;
}
html body .fj-gate .fj-gate__file input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 9px 14px; border: 0; border-radius: 10px; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--g-accent-ink); background: var(--g-accent);
}
html body .fj-gate .fj-gate__notes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
html body .fj-gate .fj-gate__notes p {
  margin: 0 !important; padding: 12px 14px; border-radius: 12px; font-size: 14px !important; line-height: 1.5;
  color: var(--g-ink2) !important; background: var(--g-soft) !important; border: 1px solid var(--g-panel-line);
}
html body .fj-gate .fj-gate__notes strong { color: var(--g-ink) !important; }

/* ---------- Aviso (Solicitud recibida / sesión activa) ---------- */
html body .fj-gate .fj-gate__notice {
  width: 100%; text-align: center;
  padding: clamp(28px, 5vw, 48px);
  border-radius: 28px; background: var(--g-panel) !important; border: 1px solid var(--g-panel-line);
  box-shadow: var(--g-shadow);
  display: flex; flex-direction: column; align-items: center;
}
html body .fj-gate .fj-gate__notice .fj-gate__logo { margin: 0 0 22px; }
html body .fj-gate .fj-gate__notice-icon {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; margin: 0 0 18px;
  font-size: 36px; font-weight: 900; color: #ffffff !important; background: #11734b !important;
  box-shadow: 0 0 0 10px var(--g-ok-bg);
}
html body .fj-gate .fj-gate__notice.is-info .fj-gate__notice-icon { background: #1d4f91 !important; box-shadow: 0 0 0 10px var(--g-info-bg); font-family: Georgia, serif; font-style: italic; }
html body .fj-gate .fj-gate__notice .fj-gate__steps { justify-content: center; margin: 0 0 24px !important; }
html body .fj-gate .fj-gate__notice .fj-gate__btn { max-width: 360px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  html body .fj-gate .fj-gate__split { grid-template-columns: 1fr; border-radius: 22px; }
  html body .fj-gate .fj-gate__hero { padding: 28px 22px; align-items: center; text-align: center; }
  html body .fj-gate .fj-gate__logo.is-lg { width: 84px; height: 84px; margin-bottom: 18px; border-radius: 22px; }
  html body .fj-gate .fj-gate__hero .fj-gate__lead { margin-bottom: 14px !important; font-size: 16px !important; }
  html body .fj-gate .fj-gate__path { justify-content: center; }
  html body .fj-gate .fj-gate__panel { padding: 24px 20px; }
}
@media (max-width: 640px) {
  html body .fj-gate .fj-gate__scroll { padding: 16px 12px; }
  html body .fj-gate .fj-gate__grid, html body .fj-gate .fj-gate__notes { grid-template-columns: 1fr; }
  html body .fj-gate .fj-gate__head { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  html body .fj-gate .fj-gate__head .fj-gate__steps { justify-content: center; }
  html body .fj-gate .fj-gate__panel.is-wide { border-radius: 20px; padding: 20px 16px; }
  html body .fj-gate .fj-gate__birth { grid-template-columns: 1fr 1.5fr 1.2fr; gap: 8px; }
  html body .fj-gate .fj-gate__steps li { font-size: 13px !important; padding-right: 11px; }
}
@media (prefers-reduced-motion: reduce) { html body .fj-gate * { transition: none !important; } }
