/* Divelsa — acceso. Paleta: amarillo #F1C400 + carbón cálido #16140F */
@import url("https://fonts.bunny.net/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&family=Montserrat:wght@600;700;800&display=swap");

:root {
  --brand: #F1C400;
  --brand-hover: #FFD21F;
  --ink: #16140F;
  --ink-2: #26231B;
  --muted: #78736A;
  --line: #E8E4D8;
  --paper: #FAF9F5;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Panel de marca ---------- */
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: clamp(32px, 5vw, 64px);
  color: #fff;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(241, 196, 0, 0.14) 0%, transparent 55%),
    var(--ink);
}

.auth-logo { width: min(260px, 60%); height: auto; display: block; }

.auth-hero { position: relative; z-index: 1; max-width: 30rem; }

.auth-eyebrow {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.auth-brand h1 {
  margin: 0 0 20px;
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.auth-lede {
  margin: 0;
  max-width: 26rem;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.68);
}

.auth-star {
  position: absolute;
  right: -90px;
  bottom: 70px;
  width: clamp(260px, 34vw, 460px);
  opacity: 0.07;
  transform: rotate(-8deg);
  pointer-events: none;
  user-select: none;
}

/* ---------- Formulario ---------- */
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 64px);
}

.auth-form { width: 100%; max-width: 380px; }

.auth-mark { width: 40px; height: auto; margin-bottom: 28px; display: none; }

.auth-form h2 {
  margin: 0 0 6px;
  font-family: "Montserrat", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.auth-sub { margin: 0 0 28px; color: var(--muted); font-size: 15px; }

.auth-field { display: block; margin-bottom: 18px; }
.auth-field > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }

.auth-field input,
.auth-pass input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.auth-field input::placeholder { color: #B5B0A3; }
.auth-field input:hover { border-color: #D8D4C8; }
.auth-field input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(241, 196, 0, 0.35);
}

.auth-pass { position: relative; }
.auth-pass input { padding-right: 48px; }
.toggle-password {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}
.toggle-password:hover { background: #F3F1EA; color: var(--ink); }
.toggle-password .material-icons-round { font-size: 20px; }

.auth-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 24px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.auth-check input { width: 16px; height: 16px; accent-color: var(--ink); }

.auth-submit {
  width: 100%;
  height: 50px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: var(--brand);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 150ms var(--ease-out);
}
.auth-submit:hover { background: var(--brand-hover); }
.auth-submit:active { transform: scale(0.97); }
.auth-submit:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.auth-help { margin: 28px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.auth-help a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--brand); text-decoration-thickness: 2px; }

.alert { border-radius: 10px; font-size: 14px; padding: 12px 14px; }

/* Entrada: una sola, suave, solo en carga */
@media (prefers-reduced-motion: no-preference) {
  .auth-hero, .auth-form {
    animation: auth-in 420ms var(--ease-out) both;
  }
  .auth-form { animation-delay: 80ms; }
  @keyframes auth-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
}

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-mark { display: block; }
}
