/* ==========================================================================
   Login — Einsoft Portal de Capacitación
   Rediseño UI/UX moderno, limpio y sin degradados.
   ========================================================================== */

:root {
  /* Marca */
  --brand: #001487;
  --brand-hover: #000f66;
  --brand-tint: #eef0ff;
  --brand-tint-strong: #dfe2ff;
  --brand-on: #ffffff;

  /* Neutrales */
  --ink: #14151f;
  --body: #4a4b57;
  --muted: #7c7d88;
  --surface: #ffffff;
  --bg: #f6f7fb;
  --border: #e7e8f0;
  --border-strong: #d8d9e4;

  /* Sombras suaves (sin degradados) */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.08);

  /* Tipografía */
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-headline: "Plus Jakarta Sans", "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Estructura
   -------------------------------------------------------------------------- */
.login-wrapper {
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Panel visual (izquierda)
   -------------------------------------------------------------------------- */
.login-media {
  position: relative;
  height: 100%;
  overflow: hidden;
  background-color: var(--brand);
}

.login-media__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Velo sólido de marca (color único, no es degradado) */
.login-media__scrim {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 12, 84, 0.76);
}

.login-media__content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3.5rem;
  color: #fff;
}

.login-brandline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.login-brandline__badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background-color: #fff;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 1.25rem;
}

.login-brandline__name {
  font-family: var(--font-headline);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.login-hero__title {
  font-family: var(--font-headline);
  font-size: 2.6rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  max-width: 15ch;
}

.login-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.login-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.92);
}

.login-features__check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.login-features__check svg {
  width: 15px;
  height: 15px;
}

.login-media__footnote {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.62);
}

/* --------------------------------------------------------------------------
   Panel de acceso (derecha)
   -------------------------------------------------------------------------- */
.login-panel {
  background-color: var(--surface);
  padding: 2rem 1.5rem;
}

.login-panel__inner {
  width: 100%;
  max-width: 25rem;
}

/* Marca (visible sobre todo en móvil) */
.brand-logo {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 16px;
  background-color: var(--brand);
  color: var(--brand-on);
  box-shadow: var(--shadow-sm);
}

.brand-logo__letter {
  font-family: var(--font-headline);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--brand);
}

.login-title {
  font-family: var(--font-headline);
  font-size: 1.65rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.login-subtitle {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--body);
}

/* Divider con etiqueta */
.login-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--border);
}

.login-terms {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

.login-terms a {
  color: var(--body);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--border-strong);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.login-terms a:hover {
  color: var(--brand);
  border-color: var(--brand);
}

/* --------------------------------------------------------------------------
   Botón Google
   -------------------------------------------------------------------------- */
.google-btn-wrapper {
  width: 100%;
  max-width: 400px;
}

.btn-google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.9rem 1.5rem;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  background-color: var(--surface);
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.05s ease;
}

.btn-google:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

.btn-google:active {
  transform: translateY(1px);
}

.btn-google:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--brand-tint);
}

.btn-google:disabled {
  opacity: 0.7;
  cursor: progress;
}

.btn-google__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Botón real de Google (invisible), superpuesto para capturar el clic */
.google-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  overflow: hidden;
  cursor: pointer;
}

.google-overlay > div,
.google-overlay iframe {
  width: 100% !important;
  height: 100% !important;
}

/* Mensaje de error */
.login-error {
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  body {
    overflow: auto;
  }
}

/* --------------------------------------------------------------------------
   Modal legal (SweetAlert2) — Términos y Política de Privacidad
   -------------------------------------------------------------------------- */
.swal-legal {
  border-radius: 18px !important;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.18) !important;
}
.swal-legal .swal2-close {
  color: var(--muted);
  font-size: 1.75rem;
}
.swal-legal .swal2-close:hover {
  color: var(--brand);
}
.swal-legal .swal2-actions {
  margin-top: 0.75rem;
}
.swal-legal .swal2-confirm.swal2-styled {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.6rem 1.6rem;
  box-shadow: none;
}
.swal-legal .swal2-confirm.swal2-styled:focus {
  box-shadow: 0 0 0 3px var(--brand-tint) !important;
}

.swal-legal__body {
  text-align: left !important;
  max-height: 66vh;
  overflow-y: auto;
  padding-right: 0.5rem;
  color: var(--body, #4a4b57);
}
.legal-content__title {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.25rem;
}
.legal-content__meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.legal-content h4 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand);
  margin: 1.4rem 0 0.5rem;
}
.legal-content p {
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 0.85rem;
}
.legal-content ul {
  padding-left: 1.2rem;
  margin-bottom: 0.85rem;
}
.legal-content li {
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0.4rem;
}
.legal-content a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.legal-content a:hover {
  text-decoration: underline;
}

/* Scrollbar sutil dentro del modal */
.swal-legal__body::-webkit-scrollbar {
  width: 8px;
}
.swal-legal__body::-webkit-scrollbar-thumb {
  background-color: var(--border-strong);
  border-radius: 8px;
}
