/* ========= Paleta SWOTsoft ========= */
:root {
  --swot-bg-900: #081827;       /* fondo profundo */
  --swot-bg-800: #0a2232;
  --swot-primary: #007395;      /* azul marca */
  --swot-primary-600: #0b6a86;  /* hover */
  --swot-accent: #00b3b3;
  --swot-ink: #e8f3f7;          /* texto claro */
  --swot-ink-2: #b5c7d0;        /* texto suave */
  --swot-line: #13394900;         /* bordes */
}

/* ========= Ajustes generales (mantienen tu layout fuera de iframe) ========= */
body {
  background: linear-gradient(135deg, rgba(0, 114, 149, 0.538), #001f2800);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  margin: 0;
  padding: 24px 16px;
}

.card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  max-width: 980px;
  width: 100%;
  overflow: hidden;
}

.login-legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 0.9rem;
  color: rgba(11, 52, 67, 0.78);
}

.login-legal-links a {
  color: #0b5f78;
  text-decoration: none;
  font-weight: 600;
}

.login-legal-links a:hover {
  color: var(--swot-primary);
  text-decoration: underline;
}

/* Izquierda */
.info-section {
  background: linear-gradient(135deg, var(--swot-primary), #0b3f53);
  color: white;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 40%;
}

/* Derecha */
.form-section {
  padding: 2rem;
  background-color: #f7fbfd;   /* gris azulado muy claro */
  color: #0b3443;
  flex-grow: 1;
}

/* Navegación */
.nav-pills .nav-link { color: var(--swot-primary); }
.nav-pills .nav-link.active {
  background-color: var(--swot-primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,115,149,0.25);
}

/* Botón primario */
.btn-primary {
  background-color: var(--swot-primary);
  border: none;
}
.btn-primary:hover {
  background-color: var(--swot-primary-600);
}

/* Inputs con un toque moderno (sin cambiar elementos) */
.form-control,
.input-group-text {
  border-radius: 10px;
}
.form-control:focus {
  border-color: var(--swot-primary);
  box-shadow: 0 0 0 0.2rem rgba(0,115,149,0.18);
}

/* ========= MODO EMBED (en modal/iframe): “una sola capa”, sin marco doble ========= */
/* Se activa con html.embed */
html.embed, html.embed body {
  background: transparent !important;   /* sin fondo propio */
  min-height: 0;
}
/* ===== Centrado vertical dentro de modal/iframe ===== */
html.embed body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; /* 🔹 centra vertical y horizontal */
  padding: 20px;       /* un respiro para pantallas pequeñas */
  background: transparent !important;
}

html.embed .login-legal-links {
  color: var(--swot-ink-2);
}

html.embed .login-legal-links a {
  color: var(--swot-accent);
}

/* ===== Cartilla con efecto glass ===== */
html.embed .card {
  border-radius: 18px;
  background: rgba(10, 34, 50, 0.6); /* azul oscuro translúcido */
  backdrop-filter: blur(18px);       /* 🔹 efecto glass */
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  padding: 0; /* eliminamos padding extra */
}

/* Que ambas secciones usen el mismo efecto glass */
html.embed .info-section,
html.embed .form-section {
  background: transparent; /* 🔹 heredan del .card */
  padding: 2rem;
}


/* Barra superior sutil con los azules del header (sin añadir elementos HTML) */
html.embed .card::before {
  display: block;
  height: 100%;
  margin: -8px -8px 16px -8px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--swot-primary), #0a4e6500 60%, #08364a01);
  filter: drop-shadow(0 6px 18px rgba(0,115,149,0.22));
}


/* ===== Botones de selección de entorno ===== */
.entorno-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--swot-primary), var(--swot-primary-600));
  border: none;
  box-shadow: 0 6px 14px rgba(0,115,149,0.35);
  transition: all 0.25s ease;
}

.entorno-btn:hover {
  background: var(--swot-accent);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0,115,149,0.45);
  text-decoration: none;
  color: #fff;
}

.entorno-btn i {
  font-size: 1.2rem;
}

/* Columnas: quitamos bordes “de caja” y unificamos */
html.embed .info-section {
  background: transparent;
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: clamp(12px, 2vw, 20px);
}
html.embed .form-section {
  background: transparent;
  color: var(--swot-ink);
  padding: clamp(12px, 2vw, 22px);
}

/* Textos y links dentro del embed */
html.embed .form-label { color: var(--swot-ink); }
html.embed .text-primary { color: var(--swot-accent) !important; }

/* Inputs en embed: estilo “dark glass” suave */
html.embed .form-control {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--swot-ink);
}

html.embed .form-control::placeholder { color: var(--swot-ink-2); }
html.embed .input-group-text {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--swot-ink-2);
}
html.embed .form-control:focus {
  border-color: var(--swot-primary);
  box-shadow: 0 0 0 0.2rem rgba(0,115,149,0.22);
}

/* Botón más integrado */
html.embed .btn-primary {
  background: linear-gradient(135deg, var(--swot-primary), var(--swot-primary-600));
  border: none;
  box-shadow: 0 4px 14px rgba(0,115,149,0.4);
}

html.embed .btn-primary:hover {
  background: var(--swot-accent);
}

/* Píldoras en embed */
html.embed .nav-pills .nav-link { color: #cfe8f0; }
html.embed .nav-pills .nav-link.active {
  background: var(--swot-primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0,115,149,0.28);
}

/* Responsivo: cuando quede muy angosto en modal, apila y limpia divisiones */
@media (max-width: 768px) {
  html.embed .info-section {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    min-width: 100%;
    text-align: center;
  }
}

/* ========= Selector de idioma ========= */
.lang-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1050;
}

/* Bandera circular */
.flag-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  color: #0b3443;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.lang-btn:hover {
  background: #f0f7fa;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.lang-btn .flag-circle {
  width: 28px;
  height: 28px;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  overflow: hidden;
  padding: 4px 0;
}
.lang-dropdown.show { display: block; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.88rem;
  color: #0b3443;
  cursor: pointer;
  transition: background 0.15s;
}
.lang-option:hover { background: #e8f3f7; }
.lang-option.active {
  background: var(--swot-primary);
  color: #fff;
  font-weight: 600;
}
.lang-option.active .flag-circle {
  border-color: rgba(255,255,255,0.4);
}
