/**
 * Liquital authentication surfaces (login / registration)
 * --------------------------------------------------------------
 * Shared styling for the public auth pages. These pages do not load
 * platform-components.css (portal-only), so the brand tokens are
 * mirrored here under auth-scoped custom properties.
 *
 * Namespace: .auth-*  — never redefine portal component classes here.
 */

@import url("./platform-components.css");

:root {
  --auth-navy: #0B1F3B;
  --auth-teal: #0F766E;
  --auth-turquoise: #2DD4BF;
  --auth-silver: #F3F4F6;
  --auth-ink: rgba(11, 31, 59, 0.92);
  --auth-muted: rgba(11, 31, 59, 0.62);
  --auth-border: rgba(15, 23, 42, 0.12);
  --auth-danger: rgba(185, 28, 28, 0.95);
}

/*--------------------------------------------------------------
# Page frame
--------------------------------------------------------------*/
body.auth-body {
  font-family: "Open Sans", "Nunito", Helvetica, Arial, sans-serif;
  background: var(--auth-silver);
  color: var(--auth-ink);
  overflow-x: hidden;
}

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

.auth-main > .row {
  --bs-gutter-x: 0;
  min-height: 100vh;
}

/*--------------------------------------------------------------
# Header (fixed, minimal)
--------------------------------------------------------------*/
.auth-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  pointer-events: none; /* children re-enable, keeps panel clickable */
}

.auth-header a {
  pointer-events: auto;
}

.auth-header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(11, 31, 59, 0.10);
  box-shadow: 0 6px 16px rgba(11, 31, 59, 0.10);
  color: var(--auth-navy);
  font-size: var(--lm-icon-md);
  text-decoration: none;
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-home-link:hover,
.auth-home-link:focus {
  background: #ffffff;
  color: var(--auth-teal);
  box-shadow: 0 8px 20px rgba(11, 31, 59, 0.16);
}

.auth-switch-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(11, 31, 59, 0.10);
  box-shadow: 0 6px 16px rgba(11, 31, 59, 0.10);
  color: var(--auth-navy);
  font-size: var(--lm-text-caption);
  font-weight: 800;
  letter-spacing: var(--lm-tracking-ui);
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.auth-switch-link:hover,
.auth-switch-link:focus {
  background: #ffffff;
  color: var(--auth-teal);
  box-shadow: 0 8px 20px rgba(11, 31, 59, 0.16);
}

/*--------------------------------------------------------------
# Left panel — form
--------------------------------------------------------------*/
.auth-form-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 84px 26px 40px 26px;
  background:
    radial-gradient(circle at 12% 8%, rgba(45, 212, 191, 0.10), transparent 30%),
    radial-gradient(circle at 88% 92%, rgba(11, 31, 59, 0.06), transparent 34%),
    linear-gradient(180deg, #f9fcff 0%, #eef2f7 55%, #f5f8fb 100%);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  text-align: center;
}

.auth-brand img {
  width: 54px;
  height: auto;
}

.auth-brand-name {
  margin: 0;
  font-size: var(--lm-text-heading-lg);
  font-weight: 800;
  letter-spacing: var(--lm-tracking-heading);
  color: var(--auth-navy);
}

.auth-brand-tag {
  margin: 0;
  font-size: var(--lm-text-caption);
  text-transform: uppercase;
  letter-spacing: var(--lm-tracking-overline);
  font-weight: 700;
  color: var(--auth-muted);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid rgba(11, 31, 59, 0.08);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(11, 31, 59, 0.10);
  padding: 28px 26px 24px 26px;
}

.auth-card--wide {
  max-width: 460px;
}

.auth-card-title {
  margin: 0 0 4px 0;
  font-size: var(--lm-text-heading-md);
  font-weight: 800;
  color: var(--auth-ink);
  letter-spacing: var(--lm-tracking-heading);
  text-align: center;
}

.auth-card-sub {
  margin: 0 0 20px 0;
  font-size: var(--lm-text-caption);
  color: var(--auth-muted);
  text-align: center;
}

/*--------------------------------------------------------------
# Form fields
--------------------------------------------------------------*/
.auth-field {
  margin-bottom: 15px;
}

.auth-label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--lm-text-caption);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: var(--lm-tracking-label);
  color: rgba(11, 31, 59, 0.66);
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.auth-input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: rgba(11, 31, 59, 0.42);
  pointer-events: none;
  line-height: 1;
  z-index: 3;
}

.auth-card .form-control {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: #fbfdff;
  color: var(--auth-ink);
  font-size: var(--lm-text-body);
  padding: 10px 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.auth-input-wrap .form-control {
  padding-left: 40px;
}

.auth-input-wrap--toggle .form-control {
  padding-right: 46px;
}

.auth-card .form-control:focus {
  outline: none;
  border-color: var(--auth-turquoise);
  background: #ffffff;
  box-shadow: 0 0 0 0.22rem rgba(45, 212, 191, 0.22);
}

.auth-card .form-control::placeholder {
  color: rgba(11, 31, 59, 0.34);
}

/* Validation states (Bootstrap 5 was-validated flow) */
.auth-card .was-validated .form-control:invalid,
.auth-card .form-control.is-invalid {
  border-color: rgba(185, 28, 28, 0.55);
  box-shadow: none;
  background-image: none;
}

.auth-card .was-validated .form-control:invalid:focus,
.auth-card .form-control.is-invalid:focus {
  box-shadow: 0 0 0 0.22rem rgba(185, 28, 28, 0.12);
}

.auth-card .invalid-feedback {
  font-size: var(--lm-text-caption);
  font-weight: 600;
  color: var(--auth-danger);
}

/* Password visibility toggle — a real button, keyboard reachable */
.auth-pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(11, 31, 59, 0.48);
  font-size: 16px;
  cursor: pointer;
  z-index: 3;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.auth-pw-toggle:hover,
.auth-pw-toggle:focus {
  color: var(--auth-teal);
  background: rgba(45, 212, 191, 0.12);
}

.auth-pw-toggle:focus-visible {
  outline: 2px solid var(--auth-turquoise);
  outline-offset: 1px;
}

/*--------------------------------------------------------------
# Meta row, submit, footer links
--------------------------------------------------------------*/
.auth-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  font-size: var(--lm-text-caption);
}

.auth-meta .form-check {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.auth-meta .form-check-input {
  width: 17px;
  height: 17px;
  margin-top: 0;
  border-color: rgba(11, 31, 59, 0.30);
  cursor: pointer;
}

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

.auth-meta .form-check-input:focus {
  border-color: var(--auth-turquoise);
  box-shadow: 0 0 0 0.2rem rgba(45, 212, 191, 0.22);
}

.auth-meta .form-check-label {
  color: rgba(11, 31, 59, 0.72);
  cursor: pointer;
}

.auth-link {
  color: var(--auth-teal);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.16s ease;
}

.auth-link:hover,
.auth-link:focus {
  color: #0B5B8C;
  text-decoration: underline;
}

.auth-submit {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--auth-teal) 0%, #0B5B8C 100%);
  color: #ffffff;
  font-size: var(--lm-text-body);
  font-weight: 800;
  letter-spacing: var(--lm-tracking-ui);
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.28);
  transition: opacity 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.auth-submit:hover {
  opacity: 0.95;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.34);
}

.auth-submit:focus-visible {
  outline: 2px solid var(--auth-turquoise);
  outline-offset: 2px;
}

.auth-submit:active {
  transform: translateY(1px);
}

a.auth-submit--link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
}

.auth-foot {
  margin-top: 16px;
  text-align: center;
  font-size: var(--lm-text-caption);
  color: var(--auth-muted);
}

.auth-foot p {
  margin: 0;
}

/* Secondary portal switch below the card */
.auth-alt {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.auth-alt-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 220px;
  color: rgba(11, 31, 59, 0.45);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--lm-tracking-overline);
  font-weight: 700;
}

.auth-alt-divider::before,
.auth-alt-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(11, 31, 59, 0.14);
}

.auth-alt-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(11, 31, 59, 0.14);
  background: #ffffff;
  color: rgba(11, 31, 59, 0.72);
  font-size: var(--lm-text-caption);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-alt-link:hover,
.auth-alt-link:focus {
  color: var(--auth-teal);
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 0 6px 16px rgba(11, 31, 59, 0.08);
}

/*--------------------------------------------------------------
# Registration step indicator
--------------------------------------------------------------*/
.auth-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 20px;
}

.auth-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 120px;
  text-align: center;
}

.auth-step-dot {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--lm-text-caption);
  font-weight: 800;
  border: 2px solid rgba(11, 31, 59, 0.18);
  background: #ffffff;
  color: rgba(11, 31, 59, 0.55);
}

.auth-step-label {
  font-size: var(--lm-text-caption);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--lm-tracking-label);
  color: rgba(11, 31, 59, 0.50);
}

.auth-step--active .auth-step-dot {
  border-color: var(--auth-teal);
  background: linear-gradient(135deg, var(--auth-teal) 0%, #0B5B8C 100%);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.30);
}

.auth-step--active .auth-step-label {
  color: var(--auth-teal);
}

.auth-step--done .auth-step-dot {
  border-color: var(--auth-teal);
  background: rgba(45, 212, 191, 0.14);
  color: var(--auth-teal);
}

.auth-step--done .auth-step-label {
  color: rgba(11, 31, 59, 0.66);
}

.auth-step-bar {
  flex: 0 1 70px;
  height: 2px;
  margin-top: 14px;
  background: rgba(11, 31, 59, 0.14);
}

.auth-step-bar--filled {
  background: var(--auth-teal);
}

/*--------------------------------------------------------------
# Form error summary
--------------------------------------------------------------*/
.auth-error {
  width: 100%;
  max-width: 420px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(185, 28, 28, 0.22);
  border-left: 4px solid rgba(185, 28, 28, 0.75);
  background: rgba(239, 68, 68, 0.07);
  color: rgba(120, 20, 20, 0.95);
  font-size: var(--lm-text-caption);
}

.auth-error-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 4px 0;
  font-size: var(--lm-text-compact);
  font-weight: 800;
}

.auth-error ul {
  margin: 0;
  padding-left: 18px;
}

.auth-error li {
  margin-top: 2px;
}

.auth-error .errorlist {
  list-style: disc;
}

/*--------------------------------------------------------------
# Right panel — quiet brand mark over photography
--------------------------------------------------------------*/
.auth-brand-panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  color: #ffffff;
  text-align: center;
}

/* Navy overlay — darkens the photo so white brand text stays readable */
.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      160deg,
      rgba(11, 31, 59, 0.62) 0%,
      rgba(11, 31, 59, 0.55) 50%,
      rgba(11, 31, 59, 0.64) 100%
    );
  z-index: 1;
}

.auth-brand-mark {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 420px;
}

.auth-brand-mark-name {
  margin: 0;
  font-size: var(--lm-text-brand);
  font-weight: 700;
  letter-spacing: var(--lm-tracking-display);
  line-height: 1.1;
  color: #ffffff;
}

.auth-brand-mark-rule {
  width: 36px;
  height: 2px;
  border-radius: 2px;
  background: rgba(45, 212, 191, 0.85);
}

.auth-brand-mark-line {
  margin: 0;
  font-size: var(--lm-text-body);
  font-weight: 500;
  letter-spacing: var(--lm-tracking-ui);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 991.98px) {
  .auth-main > .row {
    min-height: 0;
  }

  .auth-form-panel {
    min-height: 100vh;
    padding: 78px 16px 34px 16px;
  }

  .auth-brand-panel {
    min-height: 220px;
    padding: 40px 22px;
  }

  .auth-brand-mark-name {
    font-size: var(--lm-text-display);
  }

  .auth-brand-mark-line {
    font-size: var(--lm-text-compact);
  }

  .auth-card {
    padding: 24px 18px 20px 18px;
  }
}

@media (max-width: 575.98px) {
  .auth-card,
  .auth-error {
    max-width: 100%;
  }

  .auth-step {
    min-width: 96px;
  }

  .auth-step-bar {
    flex-basis: 40px;
  }
}

/*--------------------------------------------------------------
# Immersive flow (password reset / recovery)
# Centered interaction card over a blurred brand photograph.
# Scoped to .auth-body--immersive so login/register stay unchanged.
--------------------------------------------------------------*/
body.auth-body--immersive {
  background: var(--auth-navy);
  min-height: 100vh;
}

.auth-immersive-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-immersive-bg::before {
  content: "";
  position: absolute;
  inset: -48px;
  background-image: var(--auth-flow-image);
  background-size: cover;
  background-position: center;
  filter: blur(7px) saturate(1.05);
  transform: scale(1.12);
  animation: auth-flow-drift 28s ease-in-out infinite alternate;
}

.auth-immersive-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(45, 212, 191, 0.16), transparent 58%),
    radial-gradient(circle at 12% 88%, rgba(15, 118, 110, 0.28), transparent 42%),
    linear-gradient(
      165deg,
      rgba(11, 31, 59, 0.58) 0%,
      rgba(11, 31, 59, 0.72) 48%,
      rgba(11, 31, 59, 0.82) 100%
    );
}

.auth-header--immersive {
  z-index: 20;
}

.auth-header--immersive .auth-home-link,
.auth-header--immersive .auth-switch-link {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(11, 31, 59, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-header--immersive .auth-home-link:hover,
.auth-header--immersive .auth-home-link:focus,
.auth-header--immersive .auth-switch-link:hover,
.auth-header--immersive .auth-switch-link:focus {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(45, 212, 191, 0.55);
}

.auth-main--immersive {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 88px 20px 40px;
}

.auth-immersive-stage {
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: auth-flow-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-immersive-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 10px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(11, 31, 59, 0.22);
  color: #ffffff;
}

.auth-immersive-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  padding: 5px;
  box-sizing: border-box;
}

.auth-immersive-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.auth-immersive-kicker {
  margin: 0;
  font-size: var(--lm-text-caption);
  font-weight: 700;
  letter-spacing: var(--lm-tracking-overline);
  text-transform: uppercase;
  color: rgba(45, 212, 191, 0.95);
}

.auth-immersive-title {
  margin: 0;
  font-family: "Poppins", "Nunito", "Open Sans", sans-serif;
  font-size: var(--lm-text-heading-sm);
  font-weight: 700;
  letter-spacing: var(--lm-tracking-heading);
  line-height: 1.2;
  color: #ffffff;
}

.auth-card--immersive {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px 26px 24px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.94) 100%);
  box-shadow:
    0 28px 60px rgba(11, 31, 59, 0.34),
    0 2px 0 rgba(255, 255, 255, 0.65) inset;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.auth-card-sheen {
  position: absolute;
  top: -40%;
  left: -20%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.14), transparent 68%);
  pointer-events: none;
  animation: auth-flow-sheen 6.5s ease-in-out infinite alternate;
}

.auth-secure-chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 14px 0;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.16);
  color: var(--auth-teal);
  font-size: var(--lm-text-caption);
  font-weight: 800;
  letter-spacing: var(--lm-tracking-label);
  text-transform: uppercase;
}

.auth-card--immersive .auth-card-title,
.auth-card--immersive .auth-card-sub,
.auth-card--immersive .auth-field,
.auth-card--immersive .auth-submit,
.auth-card--immersive .auth-foot,
.auth-card--immersive .auth-error {
  position: relative;
  z-index: 1;
}

.auth-card--immersive .auth-card-title {
  font-family: "Poppins", "Nunito", "Open Sans", sans-serif;
  font-size: var(--lm-text-page-title);
  letter-spacing: var(--lm-tracking-display);
}

.auth-card--immersive .auth-submit {
  margin-top: 6px;
}

.auth-immersive-footnote {
  margin: 0;
  text-align: center;
  font-size: var(--lm-text-caption);
  font-weight: 600;
  letter-spacing: var(--lm-tracking-label);
  color: rgba(255, 255, 255, 0.62);
}

@keyframes auth-flow-drift {
  from {
    transform: scale(1.12) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.18) translate3d(-1.5%, 1%, 0);
  }
}

@keyframes auth-flow-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes auth-flow-sheen {
  from {
    transform: translate3d(0, 0, 0);
    opacity: 0.7;
  }
  to {
    transform: translate3d(28%, 18%, 0);
    opacity: 1;
  }
}

@media (max-width: 575.98px) {
  .auth-main--immersive {
    padding: 78px 14px 28px;
  }

  .auth-immersive-brand {
    width: 100%;
    border-radius: 18px;
  }

  .auth-card--immersive {
    padding: 24px 18px 20px;
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-immersive-bg::before,
  .auth-immersive-stage,
  .auth-card-sheen {
    animation: none;
  }
}
