/**
 * Auth (login / register) — Landify theme tokens + gradient motion + form polish
 */

.auth-page {
  min-height: 100vh;
  color: var(--default-color);
  background: var(--surface-color);
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.auth-shell {
  min-height: 100vh;
}

/* ---- Left visual panel (desktop): logo bar + copy + framed art ---- */
.auth-aside {
  position: relative;
  min-height: 100vh;
  flex: 1 1 44%;
  max-width: 50%;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

.auth-aside__inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.75rem;
  min-height: 0;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 2.5rem 2.75rem 2rem;
}

.auth-aside__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(145deg,
      #1b5e20 0%,
      #2e7d32 30%,
      #388e3c 65%,
      #43a047 100%);
  background-size: 200% 200%;
  animation: authGradientShift 14s ease-in-out infinite;
}

.auth-aside__bg::before,
.auth-aside__bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(0);
  opacity: 0.18;
  animation: authOrbFloat 18s ease-in-out infinite;
}

.auth-aside__bg::before {
  width: 380px;
  height: 380px;
  top: -100px;
  right: -80px;
  background: radial-gradient(circle, #a5d6a7 0%, transparent 70%);
}

.auth-aside__bg::after {
  width: 320px;
  height: 320px;
  bottom: 5%;
  left: -110px;
  background: radial-gradient(circle, #c8e6c9 0%, transparent 65%);
  animation-delay: -6s;
  animation-duration: 22s;
}

.auth-aside__mesh {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.10;
  background-image:
    radial-gradient(circle at 20% 30%, #e8f5e9 0, transparent 45%),
    radial-gradient(circle at 80% 70%, #f1f8e9 0, transparent 40%);
  pointer-events: none;
}

.auth-aside__header {
  flex-shrink: 0;
}

/* Plain logo (matches admin sidebar — no glass “card”) */
.auth-aside__brand {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.auth-aside__brand:hover {
  opacity: 0.97;
  transform: translateY(-1px);
}

.auth-page-logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: clamp(72px, 22vw, 140px);
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
}

@media (min-width: 1200px) {
  .auth-page-logo {
    max-height: clamp(88px, 12rem, 160px);
  }
}

.auth-aside__title {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.2vw, 2.25rem);
  color: #ffffff;
  line-height: 1.25;
  margin: 1.35rem 0 0.75rem;
  letter-spacing: -0.025em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.auth-aside__text {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.02rem;
  line-height: 1.68;
  max-width: 28rem;
  margin: 0;
}

.auth-aside__bullets {
  list-style: none;
  padding: 0;
  margin: 1.35rem 0 0;
}

.auth-aside__bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

.auth-aside__bullets li:last-child {
  margin-bottom: 0;
}

.auth-aside__bullet-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.30);
}

.auth-aside__visual {
  flex: 1;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0.5rem;
}

.auth-aside__figure {
  margin: 0;
  width: 100%;
  max-width: 400px;
  padding: 1.25rem 1.35rem 1.5rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.30);
  box-shadow:
    0 4px 0 rgba(255,255,255,0.12),
    0 24px 56px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.auth-aside__img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(38vh, 340px);
  object-fit: contain;
  object-position: center bottom;
  animation: authIllustrationFloat 6s ease-in-out infinite;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.15));
}

/* ---- Form column ---- */
.auth-main {
  flex: 1 1 56%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.5rem 2.5rem;
  position: relative;
  background:
    linear-gradient(180deg,
      rgba(232, 245, 233, 0.50) 0%,
      rgba(255, 255, 255, 0.42) 50%,
      rgba(241, 248, 233, 0.48) 100%),
    url('/front/images/login-background.png') center / cover no-repeat;
}

.auth-main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(620px, 85%);
  height: 4px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg,
      transparent,
      #2e7d32,
      #66bb6a,
      #43a047,
      transparent);
  opacity: 0.9;
  animation: authShimmerBar 4s ease-in-out infinite;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 540px;
  padding: clamp(2.25rem, 3.5vw, 3.25rem) clamp(2rem, 3.5vw, 2.85rem);
  border-radius: 28px;
  background:
    radial-gradient(ellipse 360px 320px at 100% -10%,
      color-mix(in srgb, var(--accent-color), transparent 70%) 0%,
      transparent 65%),
    radial-gradient(ellipse 360px 320px at -10% 110%,
      color-mix(in srgb, #20c997, transparent 75%) 0%,
      transparent 65%),
    linear-gradient(140deg,
      rgba(255, 255, 255, 0.97) 0%,
      rgba(255, 255, 255, 0.92) 50%,
      color-mix(in srgb, var(--accent-color), #ffffff 86%) 100%);
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 88%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 color-mix(in srgb, var(--accent-color), transparent 88%),
    0 2px 4px rgba(13, 33, 55, 0.05),
    0 18px 36px -10px color-mix(in srgb, var(--accent-color), transparent 62%),
    0 36px 72px -22px color-mix(in srgb, #20c997, transparent 70%),
    0 60px 120px -34px rgba(13, 33, 55, 0.40);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  animation: authCardEnter 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Multi-color gradient ring border using mask compositing */
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-color), transparent 30%) 0%,
    color-mix(in srgb, #20c997, transparent 45%) 28%,
    rgba(255, 255, 255, 0.85) 55%,
    color-mix(in srgb, #6f42c1, transparent 50%) 78%,
    color-mix(in srgb, var(--accent-color), transparent 30%) 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

/* Top luminous glare to add curvature/depth */
.auth-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 220px at 50% -20%,
    color-mix(in srgb, var(--accent-color), transparent 78%) 0%,
    transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Lift on hover (desktop pointer only) */
@media (hover: hover) and (pointer: fine) {
  .auth-card:hover {
    transform: translateY(-3px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.95),
      inset 0 -1px 0 color-mix(in srgb, var(--accent-color), transparent 85%),
      0 2px 4px rgba(13, 33, 55, 0.05),
      0 22px 44px -10px color-mix(in srgb, var(--accent-color), transparent 55%),
      0 44px 88px -22px color-mix(in srgb, #20c997, transparent 62%),
      0 70px 140px -34px rgba(13, 33, 55, 0.46);
  }
}

/* Ensure all form content sits above the decorative gradient layers */
.auth-card > * {
  position: relative;
  z-index: 1;
}

.auth-mobile-brand {
  animation: authFadeDown 0.6s ease both;
}

.auth-mobile-brand .auth-page-logo {
  max-height: clamp(72px, 22vw, 140px);
}

.auth-card__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #2e7d32;
  margin-bottom: 0.35rem;
}

.auth-card__title {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: clamp(1.85rem, 2.4vw, 2.15rem);
  color: var(--heading-color);
  margin-bottom: 0.4rem;
  letter-spacing: -0.015em;
}

.auth-card__subtitle {
  color: color-mix(in srgb, var(--default-color), transparent 22%);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.auth-form .form-floating>label {
  color: color-mix(in srgb, var(--default-color), transparent 35%);
}

.auth-form .form-control {
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
  background-color: rgba(255, 255, 255, 0.85);
  padding-top: 1.15rem;
  padding-bottom: 0.35rem;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease,
    transform 0.2s ease;
}

.auth-form .form-control:focus {
  background-color: #ffffff;
  border-color: rgba(46, 125, 50, 0.60);
  box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.12);
}

/* ---- Password field with show/hide toggle ---- */
.auth-password-field {
  position: relative;
}

.auth-form .form-floating > .auth-password-input {
  padding-right: 3.25rem;
}

.auth-form .form-floating > .auth-password-input.is-invalid,
.auth-form .form-floating > .auth-password-input.is-valid {
  background-image: none;
  padding-right: 3.25rem;
}

.auth-form .form-floating > .auth-password-input ~ label {
  padding-right: 3.25rem;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--default-color), transparent 35%);
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.auth-password-toggle i {
  font-size: 1.15rem;
  line-height: 1;
}

.auth-password-toggle:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 90%);
  color: var(--accent-color);
}

.auth-password-toggle:focus-visible {
  outline: none;
  background-color: color-mix(in srgb, var(--accent-color), transparent 88%);
  color: var(--accent-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color), transparent 80%);
}

.auth-password-toggle:active {
  transform: translateY(-50%) scale(0.94);
  background-color: color-mix(in srgb, var(--accent-color), transparent 82%);
}

.auth-password-toggle[aria-pressed="true"] {
  color: var(--accent-color);
}

@media (max-width: 575.98px) {
  .auth-password-toggle {
    width: 44px;
    height: 44px;
    right: 0.35rem;
  }

  .auth-form .form-floating > .auth-password-input,
  .auth-form .form-floating > .auth-password-input.is-invalid,
  .auth-form .form-floating > .auth-password-input.is-valid,
  .auth-form .form-floating > .auth-password-input ~ label {
    padding-right: 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-password-toggle {
    transition: none;
  }

  .auth-password-toggle:active {
    transform: translateY(-50%);
  }
}

.auth-form .form-floating>.form-control:focus~label,
.auth-form .form-floating>.form-control:not(:placeholder-shown)~label {
  color: #2e7d32;
}

.auth-form .is-invalid {
  border-color: #dc3545;
}

.auth-form .invalid-feedback {
  font-size: 0.8125rem;
  margin-top: 0.35rem;
}

.auth-check {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--default-color), transparent 15%);
}

.auth-check .form-check-input:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.btn-auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 999px;
  color: #ffffff !important;
  background: linear-gradient(135deg,
      #2e7d32 0%,
      #43a047 50%,
      #1b5e20 100%);
  background-size: 160% 160%;
  box-shadow: 0 12px 32px rgba(46, 125, 50, 0.38);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease,
    background-position 0.5s ease;
}

.btn-auth-submit:hover {
  color: #ffffff !important;
  filter: brightness(1.08);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 16px 40px rgba(46, 125, 50, 0.48);
  background-position: 100% 50%;
}

.btn-auth-submit:active {
  transform: translateY(0) scale(0.99);
}

.auth-footer-links {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--default-color), transparent 18%);
}

.auth-footer-links a {
  color: #2e7d32;
  font-weight: 600;
  text-decoration: none;
}

.auth-footer-links a:hover {
  text-decoration: underline;
}

.auth-back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
  text-decoration: none;
  margin-top: 1.5rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.auth-back-home:hover {
  color: var(--accent-color);
  transform: translateX(-3px);
}

/* ---- Keyframes ---- */
@keyframes authGradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes authOrbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(12px, -18px) scale(1.05);
  }

  66% {
    transform: translate(-16px, 10px) scale(0.96);
  }
}

@keyframes authIllustrationFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes authCardEnter {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authFadeDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authShimmerBar {

  0%,
  100% {
    opacity: 0.55;
    filter: brightness(1);
  }

  50% {
    opacity: 1;
    filter: brightness(1.15);
  }
}

@media (max-width: 991.98px) {
  .auth-main {
    min-height: auto;
    padding-top: 2.5rem;
  }

  .auth-main::before {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .auth-card {
    border-radius: 20px;
    padding: 1.5rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {

  .auth-aside__bg,
  .auth-aside__bg::before,
  .auth-aside__bg::after,
  .auth-aside__img,
  .auth-card,
  .auth-card::before,
  .auth-card::after,
  .auth-mobile-brand,
  .auth-main::before,
  .btn-auth-submit {
    animation: none !important;
    transition: none !important;
  }

  .auth-card:hover {
    transform: none;
  }

  .btn-auth-submit:hover {
    transform: none;
  }
}