body.auth-loading .app-shell,
body.auth-loading .auth-screen {
  display: none !important;
}

body.auth-required {
  background: #e9f1e9;
}

body.auth-required .app-shell { display: none !important; }

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px 18px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 86% 8%, rgba(221, 184, 91, .16), transparent 20rem),
    linear-gradient(145deg, #f8f4e9 0%, #e7f0e7 100%);
}

.auth-panel {
  width: min(100%, 420px);
  min-height: min(744px, calc(100svh - 48px));
  overflow: hidden;
  padding: 0 24px 24px;
  color: var(--prescription-ink);
  background: #fffdf6;
  border: 1px solid rgba(211, 196, 156, .68);
  border-radius: 28px;
  box-shadow: 0 18px 50px rgba(19, 65, 46, .14);
}

.auth-hero {
  position: relative;
  min-height: 352px;
  margin: 0 -24px;
  overflow: hidden;
  padding: 16px 24px 38px;
  color: #3e2b16;
  background:
    linear-gradient(90deg, rgba(255, 248, 225, .80) 0%, rgba(255, 248, 225, .22) 61%, rgba(255, 244, 211, .06) 100%),
    linear-gradient(0deg, rgba(255, 251, 235, .20), rgba(255, 251, 235, .05)),
    url("/generated/login-lingnan-paper-4k.webp") center 18% / cover no-repeat,
    #efd89f;
}

.auth-hero::after {
  content: none;
}

.auth-arcade {
  display: none;
}

.auth-arcade::after {
  content: "";
  position: absolute;
  top: 48px;
  left: -2px;
  width: 68px;
  height: 68px;
  border: 2px solid rgba(221, 240, 219, .3);
  border-bottom: 0;
  border-radius: 38px 38px 0 0;
}

.auth-arcade--left { right: 32px; }
.auth-arcade--right { right: 104px; opacity: .58; transform: scale(.78); transform-origin: top; }

.auth-tea-cup {
  display: none;
}

.auth-tea-cup::before {
  content: "";
  position: absolute;
  top: 13px;
  right: -20px;
  width: 19px;
  height: 25px;
  border: 2px solid #ffefc5;
  border-left: 0;
  border-radius: 0 18px 18px 0;
}

.auth-tea-cup span,
.auth-tea-cup span::after {
  position: absolute;
  display: block;
  content: "";
  width: 2px;
  height: 22px;
  border-radius: 99px;
  background: rgba(255, 247, 218, .75);
  transform: rotate(26deg);
}

.auth-tea-cup span { left: 17px; top: -25px; }
.auth-tea-cup span::after { left: 13px; top: -7px; transform: rotate(-24deg); }

.auth-brand {
  position: relative;
  z-index: 2;
  width: min(100%, 372px);
  margin: 0 auto;
  text-align: center;
}

.auth-brand img {
  width: 100%;
  height: auto;
  display: block;
}

.auth-origin-tag {
  position: relative;
  z-index: 2;
  display: none;
  align-items: center;
  min-height: 28px;
  margin-top: 32px;
  padding: 0 12px;
  color: #87561f;
  border: 1px solid rgba(134, 85, 30, .23);
  border-radius: 999px;
  background: rgba(255, 247, 220, .74);
  font-size: 12px;
  font-weight: 700;
}

.auth-hero > p {
  position: relative;
  z-index: 2;
  margin: 73px 0 0;
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.22;
  text-shadow: 0 1px rgba(255, 253, 237, .72);
}

.auth-hero > small {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 8px;
  color: #684a25;
  font-size: 14px;
}

.auth-welcome { margin-top: 28px; }
.auth-welcome h1 { margin: 0; color: #173b2b; font-size: 29px; line-height: 1.2; }
.auth-welcome p { margin: 8px 0 0; color: #6f7e75; font-size: 14px; }

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 25px;
}

.auth-form label {
  position: relative;
  display: grid;
  gap: 8px;
  color: #365a49;
  font-size: 14px;
  font-weight: 700;
}

.auth-form label::before,
.auth-form label::after {
  position: absolute;
  z-index: 1;
  content: "";
  pointer-events: none;
}

.auth-form label:first-child::before { left: 18px; bottom: 18px; width: 16px; height: 16px; border: 1.8px solid #5c806e; border-radius: 50%; }
.auth-form label:first-child::after { left: 15px; bottom: 9px; width: 22px; height: 11px; border: 1.8px solid #5c806e; border-top: 0; border-radius: 0 0 14px 14px; }
.auth-form label:nth-child(2)::before { left: 18px; bottom: 17px; width: 17px; height: 15px; border: 1.8px solid #5c806e; border-radius: 4px; }
.auth-form label:nth-child(2)::after { left: 22px; bottom: 30px; width: 9px; height: 12px; border: 1.8px solid #5c806e; border-bottom: 0; border-radius: 8px 8px 0 0; }

.auth-form input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px 0 50px;
  color: var(--ink);
  background: #f8f4e9;
  border: 1px solid #ded0ab;
  border-radius: 14px;
  font-size: 16px;
}

.auth-form input:focus { border-color: #2f7658; outline: 3px solid rgba(47, 118, 88, .14); }

.auth-submit {
  min-height: 60px;
  margin-top: 2px;
  color: #fffdf6;
  border-color: #b56425;
  border-radius: 16px;
  background: linear-gradient(135deg, #cb7b2d, #ae5c21);
  box-shadow: 0 9px 18px rgba(122, 69, 25, .2);
  font-size: 18px !important;
}

.auth-submit:hover { background: linear-gradient(135deg, #b96827, #914818); }

.auth-submit::before { content: "✓"; margin-right: 10px; color: #f9d67b; }

.auth-reset-request {
  justify-self: center;
  min-height: 34px;
  margin-top: -8px;
  padding: 4px 10px;
  color: #397154;
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-reset-request:hover { color: #b96827; }

.auth-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: #a54136;
  font-size: 13px;
  font-weight: 700;
}

.auth-privacy-note {
  margin: 14px 0 0;
  padding: 15px 0 0 30px;
  color: #587268;
  border-top: 1px solid #e6ddc7;
  font-size: 12px;
  line-height: 1.45;
}

.auth-privacy-note span { position: absolute; margin-left: -25px; color: #3c765b; font-size: 17px; }
.auth-boundary { margin: 18px 0 0; color: #8a968e; font-size: 11px; text-align: center; }

@media (max-width: 600px) {
  .auth-screen { display: block; padding: 0; }
  .auth-panel {
    width: 100%;
    min-height: 100svh;
    padding: 0 24px 28px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .auth-hero {
    min-height: 308px;
    margin-inline: -24px;
    padding: 14px 24px 28px;
  }
  .auth-brand { width: min(100%, 300px); }
  .auth-hero > p { margin-top: 51px; font-size: 27px; }
}
