/* Shared layout for sign-in, reset-password and admin sign-in pages. */
body { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .5;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 10%, transparent 70%); }
.auth-top { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; }
.auth-top a.back { font-size: 14px; color: var(--text-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.auth-top a.back:hover { color: var(--text); }
.auth { width: 100%; max-width: 400px; margin: 0 auto; padding: 24px 24px 48px; align-self: center; }
.auth h1 { font-size: 28px; letter-spacing: -.03em; margin: 0 0 8px; }
.auth .sub { color: var(--text-2); font-size: 15px; margin-bottom: 32px; }
.auth form { display: grid; gap: 16px; }
.auth .row-between { display: flex; justify-content: space-between; align-items: baseline; }
.auth .row-between a { font-size: 13px; color: var(--text-2); text-decoration: none; }
.auth .row-between a:hover { color: var(--text); text-decoration: underline; }
.auth .btn.primary { width: 100%; margin-top: 8px; }
.auth .msg { font-size: 14px; padding: 10px 12px; border-radius: var(--r); background: var(--danger-soft); color: var(--danger); }
.auth .msg:empty { display: none; }
.auth .msg.good { background: var(--ok-soft); color: var(--ok); }
.auth .alt { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); text-align: center; }
.auth .alt a { color: var(--text); font-weight: 500; }
.pw { position: relative; }
.pw input { padding-right: 64px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 6px 8px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.pw button:hover { color: var(--text); background: var(--surface-2); }
.auth-foot { padding: 20px 24px; text-align: center; font-size: 12.5px; color: var(--text-3); }

/* entrance: header fades, form content rises in sequence */
.auth-top { animation: fade .6s var(--ease) both; }
.auth > *, .auth form > * { animation: rise .6s var(--ease) both; }
.auth > h1 { animation-delay: .1s; } .auth > .sub { animation-delay: .16s; }
.auth form > *:nth-child(2) { animation-delay: .22s; } .auth form > *:nth-child(3) { animation-delay: .28s; }
.auth form > *:nth-child(4) { animation-delay: .34s; } .auth form > *:nth-child(5) { animation-delay: .4s; }
.auth > .alt { animation-delay: .46s; }
.auth .btn.primary { position: relative; overflow: hidden; }
.auth .btn.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%); transform: translateX(-100%); }
.auth .btn.primary:hover::after { transform: translateX(100%); transition: transform .7s var(--ease); }
.auth .msg:not(:empty) { animation: shake .35s var(--ease); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
