/* The sign-in page (/login), the approved «panel azul» prototype. Its accent colours are the product's tokens
   (tokens.css, and /tema.css with the colour chosen in Administración → Apariencia → Pantalla de acceso; a company's
   own /marca/{slug}/tema.css on its sign-in pages), the text on the accent included: white, or dark on a light accent.
   Its neutral colours are its own: the page is always light, whatever the organization's theme. The font is the product's (fonts.css, served by RemoteUI itself: CSP font-src 'self'). Only
   this page loads this file; the shared .auth styles of the other sign-in pages are untouched. */

:root {
  --login-accent: var(--accent-base);
  --login-accent-hover: var(--accent-base-strong);
  --login-accent-text: var(--accent-base-text); /* the accent as text on the white card */
  --login-on-accent: var(--on-accent-base);
  --login-shadow: var(--accent-base-shadow);
  --login-orb-1: var(--orb-1);
  --login-orb-2: var(--orb-2);
  --login-orb-3: var(--orb-3);
  --login-orb-4: var(--orb-4);
  --login-tint: var(--accent-base-tint);
  --login-focus: var(--accent-base-focus);
  --login-card: #FFFFFF;
  /* The neutral colours of the prototype; the footer and the placeholder are a shade darker than the prototype's
     (#6B7489, #8A93A8) to reach WCAG AA 4.5:1. */
  --login-page: #F1F4FA;
  --login-ink: #0F1E46;
  --login-label: #1F2A44;
  --login-muted: #5B6478;
  --login-footer: #676F84;
  --login-border: #D3DAE8;
  --login-placeholder: #6E7686;
  --login-error-bg: #FEF2F2;
  --login-error: #B42318;
  --login-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.login-page {
  background: var(--login-page);
  font-family: var(--login-font);
}

.login {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 64px; /* the card stands 36px out of the panel: the version below stays clear of it */
  min-height: 100vh;
  padding: 56px 24px;
  background: var(--login-page);
  font-family: var(--login-font);
}
.login *,
.login *::before,
.login *::after {
  box-sizing: border-box;
}
.login a {
  color: var(--login-accent-text);
}
.login a:hover {
  color: var(--login-ink);
}
.login input:focus-visible,
.login button:focus-visible,
.login a:focus-visible {
  outline: 3px solid var(--login-focus);
  outline-offset: 2px;
}

/* ---------- The blue panel ---------- */
.login__panel {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
  max-width: 1080px;
  min-height: 440px;
  padding: 0 56px;
  border-radius: 28px;
  background: var(--login-accent);
  background-image: linear-gradient(160deg, var(--brand-grad-start), var(--login-accent) 52%, var(--brand-grad-end)); /* the logo's cyan → blue → violet (M-002) */
  box-shadow: 0 40px 90px var(--login-shadow);
  animation: login-panel-in .8s cubic-bezier(.2, .7, .2, 1) both;
}
.login__orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 28px;
  pointer-events: none;
}
.login__orb {
  position: absolute;
  border-radius: 50%;
  animation: login-drift 22s ease-in-out infinite alternate;
}
.login__orb--1 {
  left: -220px;
  bottom: -400px;
  width: 680px;
  height: 680px;
  background: radial-gradient(circle at 35% 30%, var(--login-orb-1) 0%, var(--login-orb-2) 45%, var(--login-orb-3) 100%);
}
.login__orb--2 {
  right: -160px;
  top: -300px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle at 60% 70%, var(--login-orb-4) 0%, var(--login-accent) 60%, var(--login-accent) 100%);
  animation-duration: 28s;
  animation-delay: -8s;
}
.login__orb--3 {
  left: 34%;
  top: -170px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at 50% 80%, rgba(255, 255, 255, .10), rgba(255, 255, 255, .02));
  animation-duration: 34s;
  animation-delay: -14s;
}
.login__orb--4 {
  left: 46%;
  bottom: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at 40% 30%, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0));
  animation-duration: 28s;
  animation-delay: -8s;
}

/* ---------- The welcome, left ---------- */
.login__hero {
  position: relative;
  display: flex;
  flex: 1 1 380px;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
  padding: 56px 0;
  color: var(--login-on-accent);
}
.login__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.login__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 440px;
}
.login__welcome {
  margin: 0;
  color: var(--login-on-accent); /* the base h2 colour is the interior's ink: dark on the panel (PB review 2026-11-22) */
  font-size: 46px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}
.login__support {
  margin: 0;
  color: var(--login-tint);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.login__secure {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--login-tint);
  font-size: 13px;
}
.login__secure svg {
  flex: none;
  fill: none;
  stroke: var(--login-tint);
  stroke-width: 2;
}

/* ---------- The card, right: it stands out of the panel above and below ---------- */
.login__card {
  position: relative;
  display: flex;
  flex: 0 1 400px;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  margin: -36px 0;
  padding: 44px 38px 32px;
  border-radius: 22px;
  background: var(--login-card);
  box-shadow: 0 2px 6px rgba(15, 23, 42, .06), 0 30px 70px rgba(15, 30, 70, .24);
  animation: login-card-in .8s cubic-bezier(.2, .7, .2, 1) .15s both;
}
.login__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login__title {
  margin: 0;
  color: var(--login-ink);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.025em;
}
.login__sub {
  margin: 0;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.5;
}
.login__alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--login-error-bg);
  color: var(--login-error);
  font-size: 14px;
  line-height: 1.45;
}
.login__alert svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.login__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login__label {
  color: var(--login-label);
  font-size: 13px;
  font-weight: 600;
}
.login__input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--login-border);
  border-radius: 12px;
  background: var(--login-card);
  color: var(--login-ink);
  font-family: inherit;
  font-size: 15px;
}
.login__input::placeholder {
  color: var(--login-placeholder);
}
.login__input[aria-invalid='true'] {
  border-color: var(--login-error);
}
.login__password {
  position: relative;
}
.login__password .login__input {
  padding-right: 84px;
}
.login__reveal {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 70px;
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--login-accent-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.login__reveal:hover {
  color: var(--login-ink);
}
.login__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.login__remember {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--login-label);
  font-size: 14px;
  cursor: pointer;
}
.login__remember input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--login-accent);
}
.login__forgot {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.login__submit {
  height: 52px;
  border: 0;
  border-radius: 12px;
  background: var(--login-accent);
  box-shadow: 0 10px 24px var(--login-shadow);
  color: var(--login-on-accent);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.login__submit:hover {
  background: var(--login-accent-hover);
}
.login__submit:disabled {
  cursor: progress;
  opacity: .85;
}
.login__help {
  margin: 4px 0 0;
  color: var(--login-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.login__footer {
  margin: 0;
  color: var(--login-footer);
  font-size: 12px;
}

/* ---------- Motion: once on arrival; the circles drift slowly ---------- */
@keyframes login-panel-in {
  from { opacity: 0; transform: scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes login-card-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes login-drift {
  from { transform: translate(0, 0); }
  to { transform: translate(28px, -22px); }
}
.login--still .login__panel,
.login--still .login__card,
.login--still .login__orb {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .login__panel,
  .login__card,
  .login__orb {
    animation: none;
  }
}

/* ---------- Narrow screens: the card goes under the welcome ---------- */
@media (max-width: 900px) {
  .login {
    gap: 28px;
  }
  .login__card {
    flex-basis: 100%;
    margin: 0 0 32px;
  }
  .login__hero {
    padding: 48px 0 8px;
  }
}
@media (max-width: 480px) {
  .login {
    padding: 24px 16px;
  }
  .login__panel {
    padding: 0 18px;
    border-radius: 22px;
  }
  .login__orbs {
    border-radius: 22px;
  }
  .login__hero {
    gap: 22px;
    padding: 36px 4px 4px;
  }
  .login__welcome {
    font-size: 34px;
  }
  .login__card {
    margin: 0 0 18px;
    padding: 30px 20px 24px;
  }
  .login__title {
    font-size: 28px;
  }
}
