/* ==========================================================================
   Guestoque — auth shell
   Split-screen layout for login/register/password pages. Reuses the app's
   existing Bootstrap primary (#3461ff) and Roboto body face; adds Fraunces
   as a restrained display face for the hero panel only.
   ========================================================================== */

:root {
  --auth-primary: #3461ff;
  --auth-primary-dark: #1d3fcb;
  --auth-ink: #10182b;
  --auth-ink-soft: #5a6482;
  --auth-paper: #f7f8fa;
  --auth-card: #ffffff;
  --auth-line: #e4e7ef;
  --auth-amber: #ffcb32;
  --auth-green: #12bf24;
}

* { box-sizing: border-box; }

body.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: Roboto, sans-serif;
  color: var(--auth-ink);
  background: var(--auth-paper);
}

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

/* ---------- form side ---------- */

.auth-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem clamp(1.5rem, 6vw, 6rem);
}

.auth-form-wrap {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

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

.auth-brand span {
  font-family: "Fraunces", Roboto, sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--auth-ink);
}

.auth-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--auth-primary);
  margin-bottom: 0.6rem;
}

.auth-title {
  font-family: "Fraunces", Roboto, sans-serif;
  font-weight: 600;
  font-size: 1.85rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--auth-ink);
}

.auth-subtitle {
  color: var(--auth-ink-soft);
  font-size: 0.94rem;
  line-height: 1.55;
  margin: 0 0 2rem;
}

.auth-form .form-label {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--auth-ink);
  margin-bottom: 0.35rem;
}

.auth-form .form-control,
.auth-form .form-select {
  border-color: var(--auth-line);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  font-size: 0.94rem;
}

.auth-form .form-control:focus,
.auth-form .form-select:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 0.2rem rgba(52, 97, 255, 0.15);
}

.auth-form .invalid-feedback {
  font-size: 0.8rem;
}

.auth-form .form-group + .form-group,
.auth-form .mb-field {
  margin-bottom: 1.1rem;
}

.auth-submit {
  width: 100%;
  border: none;
  border-radius: 30px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.96rem;
  color: #fff;
  background: var(--auth-primary);
  box-shadow: 0 0.5rem 1rem rgba(52, 97, 255, 0.25);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  background: var(--auth-primary-dark);
}

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

.auth-links {
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--auth-ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

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

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

.auth-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--auth-primary);
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
}

.auth-link-btn:hover,
.auth-link-btn:focus-visible {
  text-decoration: underline;
}

.auth-status {
  border-radius: 10px;
  background: rgba(18, 191, 36, 0.1);
  border: 1px solid rgba(18, 191, 36, 0.25);
  color: #0b7a17;
  font-size: 0.86rem;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1.25rem;
}

/* visible keyboard focus everywhere on this shell */
.auth-shell a:focus-visible,
.auth-shell button:focus-visible,
.auth-shell input:focus-visible {
  outline: 2px solid var(--auth-primary);
  outline-offset: 2px;
}

/* ---------- hero side ---------- */

.auth-hero-side {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem clamp(2rem, 5vw, 4.5rem);
  background: linear-gradient(160deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
  color: #eef1ff;
  overflow: hidden;
}

.auth-hero-content {
  position: relative;
  z-index: 2;
  max-width: 26rem;
}

.auth-hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.9rem;
}

.auth-hero-title {
  font-family: "Fraunces", Roboto, sans-serif;
  font-weight: 600;
  font-size: clamp(1.9rem, 2.6vw, 2.5rem);
  line-height: 1.18;
  margin: 0 0 1rem;
  color: #fff;
}

.auth-hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--auth-amber);
}

.auth-hero-copy {
  color: rgba(238, 241, 255, 0.82);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 2.75rem;
}

.auth-hero-foot {
  position: relative;
  z-index: 2;
  margin-top: 3rem;
  font-size: 0.78rem;
  color: rgba(238, 241, 255, 0.6);
  line-height: 1.5;
  max-width: 24rem;
}

/* decorative grid + glow behind the manifest card */
.auth-hero-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.5;
  z-index: 0;
}

.auth-hero-side::after {
  content: "";
  position: absolute;
  width: 26rem;
  height: 26rem;
  right: -8rem;
  bottom: -10rem;
  background: radial-gradient(circle, rgba(255, 203, 50, 0.22) 0%, rgba(255, 203, 50, 0) 70%);
  z-index: 0;
}

/* ---------- signature element: the requisition manifest card ---------- */

.manifest-card {
  position: relative;
  z-index: 2;
  width: min(21rem, 100%);
  background: #fff;
  color: var(--auth-ink);
  border-radius: 14px;
  padding: 1.4rem 1.5rem 1.6rem;
  box-shadow: 0 1.75rem 3rem rgba(9, 15, 45, 0.35);
  transform: rotate(-3deg);
}

.manifest-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  margin-bottom: 0.95rem;
  border-bottom: 1px dashed var(--auth-line);
}

.manifest-card__id {
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--auth-ink-soft);
}

.manifest-card__qr {
  width: 20px;
  height: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 2px;
}

.manifest-card__qr span {
  background: var(--auth-ink);
  border-radius: 1px;
}
.manifest-card__qr span:nth-child(2n) { background: var(--auth-primary); }
.manifest-card__qr span:nth-child(5) { background: transparent; }
.manifest-card__qr span:nth-child(11) { background: transparent; }

.manifest-step {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  position: relative;
  padding-bottom: 1.05rem;
  opacity: 0;
  transform: translateX(-6px);
  animation: manifest-step-in 0.5s ease forwards;
}

.manifest-step:nth-child(2) { animation-delay: 0.15s; }
.manifest-step:nth-child(3) { animation-delay: 0.3s; }
.manifest-step:nth-child(4) { animation-delay: 0.45s; }

.manifest-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 16px;
  width: 1px;
  height: calc(100% - 6px);
  background: var(--auth-line);
}

.manifest-step__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-top: 3px;
  flex: none;
  background: var(--auth-line);
  border: 2px solid var(--auth-line);
}

.manifest-step--done .manifest-step__dot {
  background: var(--auth-primary);
  border-color: var(--auth-primary);
}

.manifest-step--current .manifest-step__dot {
  background: var(--auth-green);
  border-color: var(--auth-green);
  box-shadow: 0 0 0 3px rgba(18, 191, 36, 0.18);
}

.manifest-step__label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--auth-ink);
  line-height: 1.3;
}

.manifest-step__meta {
  font-size: 0.72rem;
  color: var(--auth-ink-soft);
}

.manifest-card__stamp {
  position: absolute;
  right: -0.6rem;
  bottom: -0.9rem;
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 50%;
  border: 2px solid var(--auth-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(12deg);
  background: #fff;
  box-shadow: 0 0.5rem 1rem rgba(9, 15, 45, 0.18);
  opacity: 0;
  animation: manifest-stamp-in 0.4s ease 0.65s forwards;
}

.manifest-card__stamp span {
  font-family: "Fraunces", Roboto, sans-serif;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--auth-amber);
  line-height: 1.15;
}

@keyframes manifest-step-in {
  to { opacity: 1; transform: translateX(0); }
}

@keyframes manifest-stamp-in {
  from { opacity: 0; transform: rotate(12deg) scale(0.6); }
  to { opacity: 1; transform: rotate(12deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .manifest-step,
  .manifest-card__stamp {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .manifest-card__stamp { transform: rotate(12deg) !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 991.98px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-hero-side {
    order: -1;
    padding: 2.25rem 1.5rem;
    min-height: 0;
  }

  .auth-hero-copy {
    margin-bottom: 1.5rem;
  }

  .manifest-card {
    display: none;
  }

  .auth-hero-foot {
    display: none;
  }

  .auth-form-side {
    padding: 2.5rem 1.5rem 3rem;
  }
}
