/* ============================================================
   @file    web_cargadores/public/auth/login.css
   @brief   Login alineado al sistema visual de landing.
   @note    La base reusable vive en /utils/css/shared.css.
   ============================================================ */

:root {
  --auth-glow-primary: radial-gradient(circle at top left, rgba(183, 28, 28, 0.16), transparent 34%);
  --auth-glow-secondary: radial-gradient(circle at bottom right, rgba(25, 118, 210, 0.12), transparent 32%);
  --auth-highlight: rgba(183, 28, 28, 0.08);
  --auth-highlight-strong: rgba(183, 28, 28, 0.14);
}

body.auth-page {
  display: block;
  min-height: 100svh;
  background:
    var(--auth-glow-primary),
    var(--auth-glow-secondary),
    var(--page-bg-gradient);
  color: var(--color-text);
  overflow-x: hidden;
}

html[data-bs-theme="dark"] body.auth-page {
  background:
    radial-gradient(circle at top left, rgba(229, 57, 53, 0.16), transparent 30%),
    radial-gradient(circle at bottom right, rgba(25, 118, 210, 0.10), transparent 28%),
    var(--page-bg-gradient-dark);
}

.auth-shell {
  position: relative;
  min-height: 100svh;
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: fixed;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  filter: blur(42px);
  pointer-events: none;
  z-index: 0;
}

.auth-shell::before {
  top: 4.5rem;
  right: -5rem;
  background: rgba(183, 28, 28, 0.12);
}

.auth-shell::after {
  bottom: 5rem;
  left: -6rem;
  background: rgba(25, 118, 210, 0.12);
}

.auth-main {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.auth-grid {
  align-items: stretch;
  gap: clamp(1.2rem, 3vw, 2rem);
}

.auth-hero,
.auth-panel {
  min-width: 0;
}

.auth-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.6rem 0;
}

.auth-hero__headline {
  max-width: 12ch;
  margin: 1rem 0 1.1rem;
  font-size: clamp(2.55rem, 6vw, 4.7rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.auth-hero__copy {
  max-width: 26rem;
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}


.auth-hero__support {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.auth-hero__support--single {
  max-width: 32rem;
}

.auth-support-card {
  background: color-mix(in srgb, var(--surface-glass) 88%, white 12%);
}

.auth-support-card--muted {
  background: color-mix(in srgb, var(--auth-highlight) 20%, var(--surface-glass));
}

.auth-support-card__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-support-card__title {
  margin: 0 0 0.6rem;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.32;
}

.auth-support-card__copy {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.auth-panel {
  display: flex;
  align-items: center;
}

.auth-card {
  width: 100%;
  padding: clamp(1.35rem, 3vw, 2rem);
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(183, 28, 28, 0.08), rgba(255, 255, 255, 0.78)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 247, 251, 0.94));
}

html[data-bs-theme="dark"] .auth-card {
  background:
    linear-gradient(160deg, rgba(229, 57, 53, 0.14), rgba(20, 24, 36, 0.88)),
    linear-gradient(180deg, rgba(20, 24, 36, 0.94), rgba(11, 13, 18, 0.94));
}

.auth-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.auth-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 0.85rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-primary) 10%, white 90%);
  border: 1px solid color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 800;
}

html[data-bs-theme="dark"] .auth-card__pill {
  background: color-mix(in srgb, var(--color-primary-light) 12%, transparent);
  border-color: color-mix(in srgb, var(--color-primary-light) 18%, transparent);
}

.auth-card__backlink {
  min-height: 2.8rem;
  padding-inline: 1rem;
  font-size: 0.92rem;
}

.auth-card__brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.auth-card__logo {
  width: 3.85rem;
  height: 3.85rem;
  object-fit: contain;
  padding: 0.75rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-soft);
}

html[data-bs-theme="dark"] .auth-card__logo {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.auth-card__kicker {
  margin: 0 0 0.18rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-card__title {
  margin: 0;
  font-size: clamp(1.9rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.auth-card__intro {
  margin: 1rem 0 1.15rem;
  font-size: 0.98rem;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-field {
  display: grid;
  gap: 0.5rem;
}

.auth-field__label {
  font-weight: 700;
  color: var(--color-text);
}

.auth-input {
  position: relative;
}

.auth-input > i {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-size: 1.05rem;
  pointer-events: none;
  z-index: 1;
}

.auth-input__control,
.auth-input input {
  width: 100%;
  min-height: 3.55rem;
  padding-left: 2.9rem !important;
  padding-right: 1rem;
  border-radius: 1.15rem;
  border: 1px solid color-mix(in srgb, var(--color-border) 88%, transparent);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-input__control:hover,
.auth-input input:hover {
  border-color: color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
}

.auth-input__control:focus,
.auth-input input:focus {
  background: rgba(255, 255, 255, 0.92);
  border-color: color-mix(in srgb, var(--color-primary) 38%, transparent);
  box-shadow: var(--ring);
}

html[data-bs-theme="dark"] .auth-input__control,
html[data-bs-theme="dark"] .auth-input input {
  background: rgba(20, 24, 36, 0.76);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

html[data-bs-theme="dark"] .auth-input__control:focus,
html[data-bs-theme="dark"] .auth-input input:focus {
  background: rgba(20, 24, 36, 0.92);
}

.password-field .password-toggle {
  position: absolute;
  top: 50%;
  right: 0.8rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.password-field .password-toggle:hover,
.password-field .password-toggle:focus-visible {
  background: rgba(15, 23, 42, 0.06);
  color: var(--color-text);
}

.password-field input {
  padding-right: 3.3rem !important;
}

html[data-bs-theme="dark"] .password-field .password-toggle:hover,
html[data-bs-theme="dark"] .password-field .password-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.caps-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.1rem;
  width: fit-content;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(251, 192, 45, 0.12);
  color: #9a6200;
  border: 1px solid rgba(251, 192, 45, 0.25);
}

html[data-bs-theme="dark"] .caps-hint {
  background: rgba(251, 192, 45, 0.12);
  color: #ffd271;
  border-color: rgba(251, 192, 45, 0.22);
}

.auth-form__actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.auth-submit {
  width: 100%;
  border: 0;
}

.auth-submit[disabled] {
  opacity: 0.78;
  transform: none;
}

.auth-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-bs-theme="dark"] .auth-card__footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.auth-card__footer-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(15, 23, 42, 0.07);
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 600;
}

html[data-bs-theme="dark"] .auth-card__footer-item {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.auth-dialog-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(10, 14, 22, 0.56);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
}

.auth-dialog {
  width: min(100%, 28rem);
  padding: 1.35rem;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(160deg, rgba(183, 28, 28, 0.08), rgba(255, 255, 255, 0.86)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 247, 251, 0.96));
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-floating);
}

html[data-bs-theme="dark"] .auth-dialog {
  background:
    linear-gradient(160deg, rgba(229, 57, 53, 0.12), rgba(20, 24, 36, 0.9)),
    linear-gradient(180deg, rgba(20, 24, 36, 0.94), rgba(11, 13, 18, 0.96));
  border-color: var(--border-soft-dark);
  box-shadow: var(--shadow-floating-dark);
}

.auth-dialog__title {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-dialog__copy {
  margin: 0 0 1.2rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.auth-dialog__actions {
  display: grid;
  gap: 0.75rem;
}

.auth-dialog__actions .btn-pill-primary,
.auth-dialog__actions .btn-pill-secondary {
  width: 100%;
}

@media (min-width: 992px) {
  .auth-hero__support:not(.auth-hero__support--single) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .auth-main {
    padding-block: 2.25rem;
  }

  .auth-hero {
    order: 2;
  }

  .auth-panel {
    order: 1;
  }

  .auth-hero__headline {
    max-width: 14ch;
  }
}

@media (max-width: 767.98px) {
  .auth-card__topline,
  .auth-card__brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-card__footer {
    flex-direction: column;
  }

  .auth-card__footer-item {
    width: 100%;
    justify-content: flex-start;
  }
}
