/* Sign in / sign up / reset (auth.html). Dark card over the study photo. */
body.auth {
  --gold-l: #e8c26f; --gold-b: #e0b45a; --cream: #f1ead8;
  background: #0a211d url(../img/auth-bg.jpg) left center / cover no-repeat fixed;
}
body.auth .auth-brand { position: absolute; top: 28px; left: clamp(20px, 4.5vw, 72px); }
body.auth .auth-brand span { font-size: 22px; }
body.auth .auth-brand img { width: 50px; height: 50px; }

.auth-page { position: relative; min-height: 100dvh; display: flex; align-items: center; justify-content: flex-end;
  padding: 90px clamp(20px, 5vw, 88px) 40px; box-sizing: border-box; }
.auth-card {
  width: 100%; max-width: 420px; padding: 30px 34px 28px; border-radius: 14px;
  background: rgba(8, 33, 28, .94); border: 1px solid rgba(232, 194, 111, .14); color: var(--cream);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55); backdrop-filter: blur(6px);
}
.auth-logo { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 22px;
  color: var(--gold-l); font: 600 18px/1.1 var(--heading); letter-spacing: .16em; }
.auth-logo img { width: 44px; height: 44px; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form h1 { margin: 0; text-align: center; font: 600 32px/1.15 var(--heading); color: #fff; }
.auth-form .sub { margin: 0 0 8px; text-align: center; color: #cdd8d0; font: 17px/1.4 var(--heading); }
.auth-form .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.field { position: relative; display: block; }
.field > svg.lead { position: absolute; left: 14px; top: 50%; width: 19px; height: 19px; transform: translateY(-50%);
  color: #b8c6bd; pointer-events: none; }
.field input {
  width: 100%; box-sizing: border-box; height: 50px; padding: 0 46px 0 46px; border-radius: 6px;
  background: rgba(255, 255, 255, .02); border: 1px solid rgba(214, 224, 216, .32); color: #fff; font: 15px var(--ui);
}
.field input::placeholder { color: #b3c1b8; }
.field input:focus { outline: none; border-color: var(--gold-l); box-shadow: 0 0 0 3px rgba(232, 194, 111, .18); }
.field input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 100px #0f2f29 inset; }
.field .reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px;
  display: grid; place-items: center; background: none; border: 0; color: #b8c6bd; cursor: pointer; border-radius: 6px; }
.field .reveal:hover { color: #fff; }
.field .reveal svg { width: 20px; height: 20px; }
.field .reveal .off { display: none; }
.field .reveal[aria-pressed=true] .on { display: none; }
.field .reveal[aria-pressed=true] .off { display: block; }

.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.keep { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: #dfe7e0; }
.keep input { position: absolute; opacity: 0; width: 0; height: 0; }
.keep .box { width: 20px; height: 20px; border-radius: 4px; border: 1px solid rgba(214, 224, 216, .5); display: grid; place-items: center; }
.keep .box svg { width: 14px; height: 14px; color: #0a211d; opacity: 0; }
.keep input:checked + .box { background: var(--gold-b); border-color: var(--gold-b); }
.keep input:checked + .box svg { opacity: 1; }
.keep input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(232, 194, 111, .35); }
.auth-form a, .auth-form .linklike { color: var(--gold-l); text-decoration: none; }
.auth-form a:hover, .auth-form .linklike:hover { text-decoration: underline; }
.auth-form .linklike { background: none; border: 0; cursor: pointer; font: 14px var(--ui); align-self: center; }

.auth-form .btn { border-radius: 6px; text-align: center; font: 600 16px var(--ui); }
.auth-form .btn.wide { width: 100%; height: 52px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.auth-form .btn.primary { background: var(--gold-b); border-color: var(--gold-b); color: #14201b; }
.auth-form .btn.primary:hover { filter: brightness(1.07); }
.auth-form .btn.primary:disabled { opacity: .65; cursor: default; }
.auth-form .btn.ghost { background: transparent; border: 1px solid rgba(214, 224, 216, .4); color: #fff; }
.auth-form .btn.ghost:hover { border-color: var(--gold-l); text-decoration: none; }

.oauth { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.oauth .or { display: flex; align-items: center; gap: 14px; color: #cdd8d0; font: 15px var(--heading); }
.oauth .or::before, .oauth .or::after { content: ""; flex: 1; height: 1px; background: rgba(214, 224, 216, .22); }
.oauth-buttons { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
.oauth-buttons .btn { height: 48px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 6px;
  background: transparent; border: 1px solid rgba(214, 224, 216, .4); color: #fff; font: 600 15px var(--ui); }
.oauth-buttons .btn svg { width: 22px; height: 22px; flex: none; }
.oauth-buttons .btn:hover { border-color: var(--gold-l); }

.auth-form .alt { margin: 6px 0 0; text-align: center; font: 16px var(--heading); color: #dfe7e0; }
.auth-form .alt a { margin-left: 6px; font-weight: 600; }
.auth-form .legal { margin: 10px 0 0; text-align: center; font: 14px/1.5 var(--heading); color: #cdd8d0; }
.auth-form .mail { width: 52px; height: 52px; margin: 0 auto; color: var(--gold-l); }
.auth-form code { color: var(--gold-l); }
.auth-form .hint { margin: -6px 0 0; font-size: 12.5px; color: #a9bdb4; }
.auth-banner { margin-bottom: 16px; padding: 10px 12px; border-radius: 7px; font-size: 14px; background: rgba(255, 255, 255, .08); color: #eef1ea; }
.auth-banner.error { background: rgba(214, 70, 98, .18); color: #ffc4d0; border: 1px solid rgba(214, 70, 98, .4); }
.auth-banner.ok { background: rgba(80, 180, 120, .16); color: #c3f0d4; border: 1px solid rgba(80, 180, 120, .4); }

@media (max-width: 860px) {
  body.auth { background-position: 22% center; }
  .auth-page { justify-content: center; padding-top: 100px; }
  .auth-card { background: rgba(8, 33, 28, .96); }
}
@media (max-width: 480px) {
  .oauth-buttons { grid-auto-flow: row; }
  body.auth .auth-brand { left: 20px; top: 20px; }
  body.auth .auth-brand span { font-size: 17px; }
  body.auth .auth-brand img { width: 40px; height: 40px; }
  .auth-page { padding: 84px 14px 24px; }
  .auth-card { padding: 28px 22px 26px; }
  .auth-form { gap: 18px; }
  .auth-form h1 { font-size: 28px; }
  .auth-form .sub { margin-bottom: 4px; }
  .field input { height: 56px; font-size: 16px; }
  .auth-form .btn.wide { height: 56px; }
  .row { flex-wrap: wrap; row-gap: 14px; font-size: 15px; }
  .keep .box { width: 22px; height: 22px; }
  .oauth-buttons .btn { height: 54px; }
  .auth-form .alt { margin-top: 10px; }
}
