/* ==========================================================================
   FUNDACIÓN REDSAVIA — Pantalla de Ingreso al Portal (Emprendedor / MiPymes / Empresas)
   Diseño fiel a la referencia: columna editorial crema + arco orgánico verde +
   fotografía territorial + tarjeta flotante de inicio de sesión.
   ========================================================================== */

.ap-stage {
  position: relative;
  min-height: calc(100vh - 88px);
  background: #faf7f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(92px, 11vh, 118px) 0 48px;
}

/* Fondo curvo verde + fotografía a la derecha */
.ap-bg-right {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 56%;
  pointer-events: none;
  z-index: 1;
}
.ap-bg-arc {
  position: absolute;
  inset: 0;
  background: #6da137;
  border-radius: 52% 0 0 52% / 64% 0 0 64%;
  transform: translateX(4%);
}
.ap-bg-photo {
  position: absolute;
  inset: 0;
  border-radius: 52% 0 0 52% / 64% 0 0 64%;
  transform: translateX(6.5%);
  overflow: hidden;
  box-shadow: -12px 0 36px rgba(20, 57, 35, 0.14);
}
.ap-bg-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}
.ap-bg-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(23, 61, 38, 0.24) 0%, rgba(23, 61, 38, 0.06) 55%, rgba(13, 42, 69, 0.14) 100%);
}

.ap-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 430px);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

/* Columna izquierda editorial */
.ap-copy {
  display: grid;
  gap: 18px;
  max-width: 560px;
}
.ap-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1b5e3b;
}
.ap-eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: #1b5e3b;
}
.ap-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.45rem, 4.6vw, 3.85rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: #0d2a45;
}
.ap-title span {
  display: block;
  color: #174d2c;
}
.ap-lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #36453c;
}
.ap-lead strong {
  color: #0d2a45;
}

/* 4 pilares inferiores con separadores verticales */
.ap-pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
  padding-top: 12px;
}
.ap-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 6px 10px;
  border-right: 1px solid rgba(23, 61, 38, 0.14);
}
.ap-pillar:last-child {
  border-right: 0;
}
.ap-pillar svg {
  width: 28px;
  height: 28px;
  stroke: #1b5e3b;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ap-pillar span {
  font-size: 0.8rem;
  font-weight: 700;
  color: #203227;
  line-height: 1.25;
}

.ap-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  font-size: 0.8rem;
  color: #54645a;
}
.ap-switcher a {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(23, 61, 38, 0.18);
  background: #ffffff;
  color: #174d2c;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.ap-switcher a:hover,
.ap-switcher a.is-active {
  background: #174d2c;
  color: #ffffff;
  border-color: #174d2c;
}

/* Tarjeta flotante de inicio de sesión */
.ap-card {
  background: #ffffff;
  border: 1px solid rgba(23, 61, 38, 0.10);
  border-radius: 28px;
  padding: 30px 28px 26px;
  box-shadow: 0 24px 60px rgba(13, 42, 69, 0.18);
  display: grid;
  gap: 16px;
}
.ap-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border-radius: 50%;
  background: #e8f4dd;
  color: #3f822b;
  display: grid;
  place-items: center;
}
.ap-card__icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ap-card__head {
  text-align: center;
  display: grid;
  gap: 6px;
}
.ap-card__head h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.15;
  color: #0d2a45;
}
.ap-card__head p {
  margin: 0;
  font-size: 0.86rem;
  color: #53635a;
}

.ap-form {
  display: grid;
  gap: 12px;
}
.ap-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.ap-input-ico {
  position: absolute;
  left: 14px;
  color: #54665c;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.ap-input-ico svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ap-input-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 42px 13px 42px;
  border-radius: 14px;
  border: 1.5px solid #dfe4de;
  background: #fafaf7;
  font: inherit;
  font-size: 0.92rem;
  color: #16241c;
  transition: border-color 0.16s, background 0.16s;
}
.ap-input-wrap input:focus {
  outline: none;
  border-color: #1b5e3b;
  background: #ffffff;
}
.ap-eye-btn {
  position: absolute;
  right: 10px;
  border: 0;
  background: transparent;
  color: #607067;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.ap-eye-btn:hover { background: #eef2ee; }
.ap-eye-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; }

.ap-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  color: #425348;
}
.ap-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  cursor: pointer;
}
.ap-check input { accent-color: #1b5e3b; }
.ap-forgot-btn {
  border: 0;
  background: transparent;
  color: #1b5e3b;
  font: inherit;
  font-size: 0.81rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.ap-submit {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  background: #17462b;
  color: #ffffff;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(23, 70, 43, 0.24);
  transition: background 0.16s, transform 0.14s;
}
.ap-submit:hover { background: #1e5937; transform: translateY(-1px); }
.ap-submit:disabled { opacity: 0.7; cursor: wait; }

.ap-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: #6b7970;
  margin-top: 2px;
}
.ap-divider::before,
.ap-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e6eae4;
}

.ap-reg-btn {
  width: 100%;
  border-radius: 999px;
  padding: 12px 18px;
  border: 1.5px solid #cfd8cf;
  background: #ffffff;
  color: #143923;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, border-color 0.15s;
}
.ap-reg-btn:hover {
  background: #eef5ec;
  border-color: #1b5e3b;
}
.ap-reg-btn svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; }

.ap-alert {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.38;
}
.ap-alert--err { background: #fbeae8; color: #8c261c; border: 1px solid #ecc6c0; }
.ap-alert--info { background: #e8f3e4; color: #1b5e3b; border: 1px solid #bdd9b3; }

.ap-consultor-note {
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  color: #5b6b61;
  line-height: 1.38;
}

@media (max-width: 1020px) {
  .ap-bg-right { display: none; }
  .ap-grid { grid-template-columns: 1fr; max-width: 540px; }
  .ap-pillars { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ap-pillar { border-right: 0; background: #ffffff; border-radius: 14px; border: 1px solid rgba(23, 61, 38, 0.10); padding: 12px; }
}
