/* RINDE+ login: composition responsive para escritorio, tablet y móvil. */
:root {
  --login-ink: #262b2f;
  --login-muted: #697178;
  --login-orange: #e66b0b;
  --login-border: #e7e4df;
  --login-surface: #f5f4f1;
}

html:has(.login),
body:has(.login) {
  min-height: 100%;
  background: var(--login-surface);
}

.login,
.login * {
  box-sizing: border-box;
}

.login {
  --login-gap: clamp(28px, 4vw, 64px);
  width: min(calc(100% - 64px), 1320px);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding-block: clamp(28px, 5vh, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .85fr);
  align-content: center;
  align-items: center;
  justify-items: stretch;
  gap: var(--login-gap);
  overflow: visible;
  color: var(--login-ink);
  background: var(--login-surface);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.login .hero {
  position: relative;
  isolation: isolate;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 480px;
  aspect-ratio: 16 / 9;
  align-self: center;
  padding: clamp(24px, 3.2vw, 46px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 20px;
  background-color: #392c22;
  background-image: url("login-obra-limpia.png");
  background-position: center;
  background-size: cover;
  box-shadow: 0 22px 58px rgba(42, 34, 27, .16);
  animation: login-photo-in .8s cubic-bezier(.2,.7,.2,1) both;
}

.login .hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(18, 19, 20, .58) 0%, rgba(22, 22, 21, .34) 48%, rgba(23, 21, 19, .07) 100%),
    linear-gradient(0deg, rgba(19, 20, 21, .48) 0%, transparent 70%);
}

.login .sun,
.login .cloud,
.login .scene,
.login .particles {
  display: none;
}

.login .hero-copy {
  visibility: visible;
  opacity: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  width: min(100%, 640px);
  max-width: 640px;
  margin: auto 0 0;
  animation: login-copy-in .65s .12s ease-out both;
}

.login .hero-brand {
  display: block;
  width: clamp(116px, 12vw, 164px);
  height: auto;
  margin: 0 0 clamp(14px, 1.7vw, 22px);
  line-height: 0;
}

.login .hero-brand .brand-logo {
  content: url("logo-avendano-transparente.png");
  position: static;
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 2px 3px rgba(20, 16, 12, .2));
  box-shadow: none;
}

/* Compatibilidad con el HTML que sigue publicado en cPanel. */
.login .hero > .brand-logo {
  content: url("logo-avendano-transparente.png");
  position: absolute;
  z-index: 2;
  top: clamp(24px, 3.2vw, 46px);
  left: clamp(24px, 3.2vw, 46px);
  display: block;
  width: clamp(116px, 12vw, 164px);
  height: auto;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(20, 16, 12, .2));
  box-shadow: none;
}

.login .hero .kicker {
  margin: 0 0 9px;
  color: #ffd6af;
  font-size: clamp(10px, .86vw, 12px);
  font-weight: 800;
  letter-spacing: .17em;
  line-height: 1.4;
}

.login .hero h1 {
  max-width: 620px;
  margin: 0;
  color: #fff;
  font-family: "Manrope", "DM Sans", system-ui, sans-serif;
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.045em;
  text-wrap: balance;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .22);
}

.login .hero-copy > p:last-child {
  max-width: 480px;
  margin: 13px 0 0;
  color: rgba(255, 255, 255, .92);
  font-size: clamp(13px, 1.12vw, 16px);
  font-weight: 450;
  line-height: 1.55;
  text-wrap: pretty;
}

.loginbox {
  align-self: center;
  justify-self: center;
  width: min(100%, 440px);
  min-width: 0;
  margin: 0;
  padding: clamp(30px, 3.25vw, 46px);
  border: 1px solid var(--login-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 54px rgba(52, 45, 36, .09);
  animation: login-card-in .7s .08s cubic-bezier(.2,.7,.2,1) both;
}

.login-heading {
  margin: 0 0 25px;
}

.login-heading .kicker {
  color: #af571a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .17em;
}

.login-heading h2 {
  margin: 8px 0 7px;
  color: var(--login-ink);
  font-family: "Manrope", "DM Sans", system-ui, sans-serif;
  font-size: clamp(28px, 2.5vw, 36px);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -.04em;
}

.login-heading p {
  margin: 0;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.55;
}

.login .stack {
  display: grid;
  gap: 16px;
}

.login .stack label {
  display: grid;
  gap: 7px;
  color: #343a3e;
  font-size: 13px;
  font-weight: 700;
}

.login .stack input {
  width: 100%;
  min-height: 49px;
  padding: 0 14px;
  border: 1px solid #d8dadd;
  border-radius: 10px;
  background: #fff;
  color: var(--login-ink);
  font: inherit;
  font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.login .stack input:focus-visible {
  border-color: var(--login-orange);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(230, 107, 11, .16);
}

.login .password-box {
  position: relative;
}

.login .password-box input {
  padding-right: 52px;
}

.login .password-toggle {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4d555a;
  cursor: pointer;
}

.login .primary {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 5px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(115deg, #e9780f, #d65c04);
  box-shadow: 0 7px 16px rgba(217, 95, 5, .18);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.login .primary:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow: 0 10px 21px rgba(217, 95, 5, .24);
}

.login .primary:active {
  transform: translateY(0);
}

.login .primary:focus-visible,
.login .password-toggle:focus-visible,
.login a:focus-visible {
  outline: 3px solid #7b3606;
  outline-offset: 3px;
}

.login .primary[disabled] {
  opacity: .8;
  cursor: wait;
}

.login .spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, .55);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin .7s linear infinite;
}

.login .primary[aria-busy="true"] .spinner {
  display: inline-block;
}

.login .primary[aria-busy="true"] .button-arrow {
  display: none;
}

.login .caps-notice {
  min-height: 1.35em;
  margin: 4px 0 0;
  color: #853c0c;
  font-size: 12px;
}

.login .error {
  margin: 0 0 16px;
  padding: 11px 13px;
  border: 1px solid #ebc7ba;
  border-radius: 9px;
  background: #fff2ed;
  color: #8d3b27;
  font-size: 13px;
  line-height: 1.5;
}

.login .login-foot {
  margin: 17px 0 0;
  color: #777e83;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.loginbox footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 22px;
  margin-top: 21px;
  padding-top: 18px;
  border-top: 1px solid #ece9e5;
  color: #71777b;
  font-size: 12px;
}

.loginbox footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.loginbox footer a:hover {
  color: #9b4c15;
}

@keyframes login-photo-in {
  from { opacity: 0; transform: translateY(8px) scale(.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes login-card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes login-copy-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes login-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 960px) {
  .login {
    width: min(calc(100% - 40px), 760px);
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding-block: 28px;
  }

  .login .hero {
    min-height: 360px;
    aspect-ratio: 16 / 9;
    padding: clamp(22px, 4vw, 34px);
  }

  .login .hero-brand {
    width: clamp(104px, 16vw, 144px);
    margin-bottom: 12px;
  }

  .login .hero > .brand-logo {
    top: clamp(22px, 4vw, 34px);
    left: clamp(22px, 4vw, 34px);
    width: clamp(104px, 16vw, 144px);
  }

  .login .hero h1 {
    font-size: clamp(30px, 5vw, 46px);
  }

  .login .hero-copy > p:last-child {
    max-width: 440px;
    font-size: clamp(13px, 1.8vw, 15px);
  }

  .loginbox {
    width: min(100%, 560px);
  }
}

@media (max-width: 600px) {
  .login {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    gap: 0;
    padding: 0 0 22px;
  }

  .login .hero {
    min-height: 330px;
    width: 100%;
    aspect-ratio: 1.55 / 1;
    padding: calc(env(safe-area-inset-top, 0px) + 22px) 22px 28px;
    border: 0;
    border-radius: 0;
    background-position: 43% center;
    box-shadow: none;
  }

  .login .hero::before {
    background:
      linear-gradient(90deg, rgba(18, 19, 20, .55), rgba(22, 22, 21, .16)),
      linear-gradient(0deg, rgba(19, 20, 21, .5), transparent 78%);
  }

  .login .hero-copy {
    width: 100%;
    margin-top: auto;
  }

  .login .hero-brand {
    width: clamp(92px, 27vw, 118px);
    margin-bottom: 10px;
  }

  .login .hero > .brand-logo {
    top: calc(env(safe-area-inset-top, 0px) + 22px);
    left: 22px;
    width: clamp(92px, 27vw, 118px);
  }

  .login .hero .kicker {
    margin-bottom: 5px;
    font-size: 9px;
    letter-spacing: .15em;
  }

  .login .hero h1 {
    max-width: 380px;
    font-size: clamp(27px, 8vw, 36px);
    line-height: 1.04;
  }

  .login .hero-copy > p:last-child {
    max-width: 360px;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.42;
  }

  .loginbox {
    position: relative;
    z-index: 2;
    width: min(calc(100% - 32px), 480px);
    margin: -18px auto 0;
    padding: 25px 22px 22px;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(52, 45, 36, .1);
  }

  .login-heading {
    margin-bottom: 19px;
  }

  .login-heading h2 {
    margin-top: 7px;
    font-size: 27px;
  }

  .login-heading p {
    font-size: 13px;
  }

  .login .stack {
    gap: 13px;
  }

  .login .stack label {
    gap: 6px;
    font-size: 12px;
  }

  .login .stack input {
    min-height: 46px;
    font-size: 16px;
  }

  .login .password-toggle {
    width: 40px;
    height: 40px;
  }

  .login .primary {
    min-height: 47px;
    margin-top: 3px;
    font-size: 13px;
  }

  .login .login-foot {
    margin-top: 13px;
    font-size: 11px;
  }

  .loginbox footer {
    gap: 12px 16px;
    margin-top: 16px;
    padding-top: 14px;
    font-size: 11px;
  }
}

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