:root {
  --tei-blue: #168bc4;
  --tei-blue-dark: #0d5f89;
  --tei-navy: #12354a;
  --tei-green: #18a866;
  --tei-surface: rgba(255, 255, 255, 0.96);
  --tei-border: #d9e6ed;
  --tei-muted: #637a87;
  --tei-shadow: 0 28px 70px rgba(24, 67, 91, 0.16);
}

body.tei-login-page {
  min-height: 100vh;
  margin: 0;
  padding: 48px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  color: var(--tei-navy);
  font-family: "Avenir LT 65", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(22, 139, 196, 0.17), transparent 33%),
    radial-gradient(circle at 88% 84%, rgba(24, 168, 102, 0.13), transparent 30%),
    linear-gradient(145deg, #f7fbfd 0%, #edf6f8 48%, #f8fcfa 100%);
}

body.tei-login-page::before,
body.tei-login-page::after {
  content: "";
  position: fixed;
  z-index: 0;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(22, 139, 196, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

body.tei-login-page::before {
  top: -150px;
  right: -80px;
  box-shadow: 0 0 0 44px rgba(22, 139, 196, 0.035), 0 0 0 88px rgba(22, 139, 196, 0.025);
}

body.tei-login-page::after {
  bottom: -190px;
  left: -90px;
  box-shadow: 0 0 0 56px rgba(24, 168, 102, 0.035), 0 0 0 112px rgba(24, 168, 102, 0.02);
}

.tei-login-page .tei-login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  max-width: 620px !important;
  margin: 0 auto;
  padding: 42px 48px 36px;
  text-align: center;
  background: var(--tei-surface);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 28px;
  box-shadow: var(--tei-shadow);
  backdrop-filter: blur(16px);
}

.tei-brand-heading {
  margin-bottom: 22px;
}

.tei-login-page .tei-login-logo {
  width: auto;
  height: 86px;
  margin-bottom: 8px !important;
  object-fit: contain;
}

.tei-brand-kicker,
.tei-login-heading > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tei-blue-dark);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tei-brand-kicker::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: var(--tei-green);
}

.tei-brand-subtitle {
  margin: 8px 0 0;
  color: var(--tei-muted);
  font-family: "Avenir LT 35", "Segoe UI", sans-serif;
  font-size: 1rem;
}

.tei-login-page .tei-whatsapp-share {
  position: absolute;
  top: 28px;
  right: 28px;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  padding: 9px 13px;
  color: #147b48 !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  line-height: 1;
  background: #eaf9f1;
  border: 1px solid #ccefdc;
  border-radius: 999px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.tei-login-page .tei-whatsapp-share:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(20, 123, 72, 0.13);
}

.tei-explore-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 30px;
}

.tei-login-page .tei-explore-actions .btn {
  width: 100% !important;
  min-height: 46px;
  margin: 0 !important;
  padding: 11px 14px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: var(--tei-blue-dark);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: #f1f8fb !important;
  border: 1px solid #d1e7f1 !important;
  border-radius: 12px;
  box-shadow: none;
}

.tei-login-page .tei-explore-actions .descargar {
  color: #147b48;
  background: #eefaf4 !important;
  border-color: #d2efdf !important;
}

.tei-login-heading {
  margin-bottom: 22px;
  text-align: left;
}

.tei-login-heading h1 {
  margin: 5px 0 6px !important;
  color: var(--tei-navy);
  font-size: clamp(1.65rem, 4vw, 2rem);
  font-weight: 700 !important;
}

.tei-login-heading p {
  margin: 0;
  color: var(--tei-muted);
  font-family: "Avenir LT 35", "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

.tei-login-page .form-control {
  min-height: 52px;
  margin-bottom: 12px;
  padding: 0 16px;
  color: var(--tei-navy);
  font-size: 0.96rem;
  background: #f9fcfd;
  border: 1px solid var(--tei-border);
  border-radius: 12px;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.tei-login-page .form-control::placeholder {
  color: #91a5af;
}

.tei-login-page .form-control:focus {
  position: relative;
  z-index: 2;
  background: #fff;
  border-color: var(--tei-blue);
  box-shadow: 0 0 0 4px rgba(22, 139, 196, 0.12);
}

.tei-login-page .input-group {
  flex-wrap: nowrap;
}

.tei-login-page .input-group .form-control {
  border-right: 0 !important;
  border-radius: 12px 0 0 12px;
}

.tei-login-page .input-group-append {
  height: 52px;
  margin-bottom: 12px !important;
  background: transparent !important;
}

.tei-login-page .input-group-text {
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tei-muted);
  cursor: pointer;
  background: #f9fcfd !important;
  border: 1px solid var(--tei-border);
  border-left: 0 !important;
  border-radius: 0 12px 12px 0;
}

.tei-login-page .form-login {
  min-height: 54px;
  margin: 4px 0 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--tei-blue), #0879b2);
  border: 0;
  border-radius: 13px;
  box-shadow: 0 12px 25px rgba(22, 139, 196, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.tei-login-page .form-login:hover,
.tei-login-page .form-login:focus {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(22, 139, 196, 0.3);
}

.tei-account-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.tei-login-page .tei-account-actions .btn {
  width: auto !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  display: inline-flex !important;
  color: var(--tei-blue-dark);
  font-size: 0.87rem;
  font-weight: 600;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none;
}

.tei-login-page .tei-account-actions .registrarse {
  color: #147b48;
}

.tei-login-page .container-row {
  margin: 8px 0 14px !important;
  padding-top: 14px;
  border-top: 1px solid #e8f0f3;
}

.tei-login-page .container-row a {
  color: var(--tei-muted) !important;
  font-size: 0.82rem;
  font-weight: 500 !important;
}

.tei-login-page .vermanual {
  width: auto !important;
  margin: 0 auto 18px !important;
  padding: 8px 12px !important;
  display: inline-flex !important;
  color: var(--tei-blue-dark);
  font-size: 0.84rem;
  font-weight: 600;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none;
}

.tei-login-page #p {
  margin: 0;
  color: var(--tei-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.tei-login-page #p:not(:empty)::before {
  content: "●";
  margin-right: 8px;
  color: var(--tei-green);
  font-size: 0.72rem;
}

.tei-login-page .soporte {
  width: auto !important;
  margin: 6px auto 0 !important;
  padding: 9px 14px !important;
  display: inline-flex !important;
  align-items: center;
  color: #147b48;
  font-size: 0.83rem;
  font-weight: 600;
  background: #eaf9f1 !important;
  border: 1px solid #ccefdc !important;
  border-radius: 999px;
  box-shadow: none;
}

.tei-login-page .form-login-msg.alert {
  margin: 8px 0 14px !important;
  padding: 10px 12px;
  font-size: 0.86rem;
  border-radius: 10px;
}

.tei-login-page button:focus-visible,
.tei-login-page a:focus-visible,
.tei-login-page input:focus-visible {
  outline: 3px solid rgba(22, 139, 196, 0.3);
  outline-offset: 3px;
}

@media (max-width: 680px) {
  body.tei-login-page {
    align-items: flex-start;
    padding: 18px 12px;
  }

  .tei-login-page .tei-login-card {
    padding: 30px 22px 26px;
    border-radius: 22px;
  }

  .tei-login-page .tei-whatsapp-share {
    position: static;
    margin: 4px auto 18px !important;
  }

  .tei-explore-actions {
    grid-template-columns: 1fr;
    margin-top: 8px;
  }

  .tei-account-actions {
    flex-direction: column;
    gap: 2px;
  }

  .tei-login-page .tei-login-logo {
    height: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tei-login-page *,
  .tei-login-page *::before,
  .tei-login-page *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
