/* Config-driven attendee authentication templates */

.auth-body {
  min-height: 100vh;
  margin: 0;
  background: #07111f;
  color: #fff;
}

.auth-shell {
  --auth-surface: #fff;
  --auth-ink: #132238;
  --auth-muted: #65758b;
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
  overflow: hidden;
  background-color: #07111f;
  background-image: var(--auth-background-image);
  background-position: center;
  background-size: cover;
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.auth-brandbar {
  position: relative;
  z-index: 5;
  min-height: 76px;
  padding: 0.9rem clamp(1rem, 4vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.auth-brand,
.auth-brandbar-right,
.auth-nav {
  display: flex;
  align-items: center;
}

.auth-brand {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-brand img {
  width: auto;
  max-width: min(280px, 52vw);
  /* height: clamp(42px, 5vw, 58px); */
}

.auth-brandbar-right {
  gap: clamp(1rem, 3vw, 2.5rem);
}

.auth-secondary-logo {
  width: auto;
  max-width: 160px;
  max-height: 46px;
  object-fit: contain;
}

.auth-nav {
  gap: 1.25rem;
}

.auth-nav a {
  position: relative;
  padding: 0.35rem 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.auth-nav a:hover,
.auth-nav a.is-active {
  color: #fff;
}

.auth-nav a:hover::after,
.auth-nav a.is-active::after {
  transform: scaleX(1);
}

.auth-layout {
  width: 100%;
  display: grid;
  align-items: center;
}

.auth-visual,
.auth-form-region {
  min-width: 0;
  padding: clamp(1.25rem, 4vw, 4.5rem);
}

.auth-visual-content {
  width: min(760px, 100%);
}

.auth-illustration {
  display: block;
  width: min(660px, 100%);
  height: auto;
  margin: 0 auto clamp(1rem, 3vw, 2rem);
  filter: drop-shadow(0 30px 55px rgba(0, 0, 0, 0.28));
}

.auth-welcome {
  max-width: 680px;
}

.auth-kicker {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-welcome h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4.6vw, 4.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.auth-welcome p {
  max-width: 610px;
  margin: 1.15rem 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(0.98rem, 1.5vw, 1.16rem);
  line-height: 1.75;
}

.auth-form-region {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: min(470px, 100%);
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border-radius: 22px;
  background: var(--auth-surface);
  color: var(--auth-ink);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.auth-page-registration .auth-card {
  width: min(700px, 100%);
}

.auth-card-heading {
  margin-bottom: 1.4rem;
}

.auth-card-heading h2 {
  margin: 0;
  color: var(--auth-ink);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.auth-card-heading p {
  margin: 0.45rem 0 0;
  color: var(--auth-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.auth-card label {
  display: block;
  margin-bottom: 0.4rem;
  color: #2b3b50;
  font-size: 0.83rem;
  font-weight: 600;
}

.auth-card .req {
  color: var(--color-primary);
}

.auth-card .form-control {
  min-height: 46px;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  background: #f8fafc;
  color: #102034;
  font-size: 0.92rem;
}

.auth-card .form-control:focus {
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 0.2rem rgba(226, 1, 119, 0.12);
}

.auth-card .btn-auth {
  width: 100%;
  min-height: 48px;
  margin-top: 0.35rem;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(120deg, var(--color-primary), #b30060);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(226, 1, 119, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.auth-card .btn-auth:hover {
  color: #fff;
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 15px 28px rgba(226, 1, 119, 0.28);
}

.auth-alert {
  margin-bottom: 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.86rem;
}

.auth-alert-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.auth-alert-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.auth-alert-info {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #075985;
}

.auth-links {
  margin-top: 1.1rem;
  color: var(--auth-muted);
  font-size: 0.86rem;
  text-align: center;
}

.auth-links a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}

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

.auth-footer {
  position: relative;
  z-index: 4;
  padding: 1rem clamp(1rem, 4vw, 4rem) 1.35rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  text-align: center;
}

/* Template 1 — corporate centered card over artwork */
.auth-template1::before {
  background: linear-gradient(110deg, rgba(3, 12, 25, 0.78), rgba(3, 12, 25, 0.48));
}

.auth-template1 .auth-layout {
  grid-template-columns: minmax(0, 1fr);
}

.auth-template1 .auth-visual {
  position: absolute;
  inset: 76px 0 54px;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

.auth-template1 .auth-visual-content {
  margin: 0 auto;
  text-align: center;
}

.auth-template1 .auth-illustration {
  position: absolute;
  bottom: 1.5rem;
  left: clamp(1rem, 4vw, 4rem);
  width: min(320px, 22vw);
  margin: 0;
  opacity: 0.8;
}

.auth-template1 .auth-welcome {
  margin: 0 auto;
}

.auth-template1 .auth-welcome h1 {
  font-size: clamp(1.45rem, 3vw, 2.5rem);
}

.auth-template1 .auth-welcome p {
  margin: 0.65rem auto 0;
}

.auth-template1 .auth-form-region {
  position: relative;
  z-index: 2;
  align-items: center;
  padding-bottom: clamp(9rem, 20vh, 14rem);
}

/* Template 2 — modern split screen */
.auth-template2 {
  background-image: none;
  background-color: #f3f6fa;
}

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

.auth-template2 .auth-brandbar {
  position: absolute;
  inset: 0 0 auto;
}

.auth-template2 .auth-layout {
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.12fr) minmax(440px, 0.88fr);
}

.auth-template2 .auth-visual {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding-top: 7rem;
  background-color: #0b1d34;
  background-image:
    linear-gradient(rgba(5, 17, 34, 0.48), rgba(5, 17, 34, 0.78)),
    var(--auth-background-image);
  background-position: center;
  background-size: cover;
}

.auth-template2 .auth-form-region {
  min-height: 100vh;
  padding-top: 7rem;
  background: #f3f6fa;
}

.auth-template2 .auth-card {
  box-shadow: 0 20px 55px rgba(22, 41, 68, 0.13);
}

.auth-template2 .auth-nav a {
  color: #65758b;
}

.auth-template2 .auth-nav a:hover,
.auth-template2 .auth-nav a.is-active {
  color: #132238;
}

.auth-template2 .auth-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 44%;
  color: #748196;
}

/* Template 3 — premium glass */
.auth-template3::before {
  background:
    radial-gradient(circle at 50% 10%, rgba(1, 139, 194, 0.2), transparent 38%),
    rgba(2, 8, 18, 0.7);
  backdrop-filter: blur(2px);
}

.auth-template3 .auth-layout {
  grid-template-columns: minmax(0, 1fr);
}

.auth-template3 .auth-visual {
  position: absolute;
  inset: 76px 0 54px;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.auth-template3 .auth-visual-content {
  margin: 0 auto;
  transform: translateY(-230px);
  text-align: center;
}

.auth-template3 .auth-illustration {
  position: absolute;
  right: clamp(1rem, 4vw, 4rem);
  bottom: 1.5rem;
  width: min(300px, 21vw);
  margin: 0;
  opacity: 0.65;
}

.auth-template3 .auth-welcome {
  margin: 0 auto;
}

.auth-template3 .auth-welcome h1 {
  font-size: clamp(1.7rem, 4vw, 3.4rem);
}

.auth-template3 .auth-welcome p {
  margin-inline: auto;
}

.auth-template3 .auth-form-region {
  position: relative;
  z-index: 2;
  padding-top: clamp(10rem, 25vh, 15rem);
}

.auth-template3 .auth-card {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(24px);
}

.auth-template3 .auth-card-heading h2,
.auth-template3 .auth-card label {
  color: #fff;
}

.auth-template3 .auth-card-heading p,
.auth-template3 .auth-links {
  color: rgba(255, 255, 255, 0.7);
}

.auth-template3 .form-control {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.92);
}

@media (min-width: 700px) {
  .auth-page-registration form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
  }

  .auth-page-registration form > .btn-auth {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .auth-template2 .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-template2 .auth-visual {
    min-height: 42vh;
    padding-top: 7rem;
    padding-bottom: 2rem;
  }

  .auth-template2 .auth-illustration {
    display: none;
  }

  .auth-template2 .auth-welcome {
    text-align: center;
    margin-inline: auto;
  }

  .auth-template2 .auth-form-region {
    min-height: auto;
    padding-top: 2.5rem;
    padding-bottom: 5rem;
  }

  .auth-template2 .auth-footer {
    position: relative;
    width: 100%;
    background: #f3f6fa;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    overflow: auto;
  }

  .auth-brandbar {
    min-height: 64px;
    align-items: flex-start;
  }

  .auth-brand img {
    max-width: 180px;
    height: 40px;
  }

  .auth-brandbar-right {
    align-items: flex-end;
    flex-direction: column;
    gap: 0.35rem;
  }

  .auth-secondary-logo {
    max-width: 100px;
    max-height: 28px;
  }

  .auth-nav {
    gap: 0.85rem;
  }

  .auth-visual,
  .auth-form-region {
    padding-inline: 1rem;
  }

  .auth-card {
    padding: 1.3rem;
    border-radius: 16px;
  }

  .auth-template1 .auth-visual {
    display: none;
  }

  .auth-template1 .auth-form-region {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
  }

  .auth-template3 .auth-visual-content {
    transform: translateY(-215px);
    padding-inline: 1rem;
  }

  .auth-template3 .auth-welcome p {
    display: none;
  }

  .auth-template3 .auth-form-region {
    padding-top: 8rem;
    padding-bottom: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-shell *,
  .auth-shell *::before,
  .auth-shell *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
