/* Shared styling for the sign-in family of pages.
 *
 * Two distinct jobs, deliberately separated:
 *
 * 1. The Google button and its divider (.gbtn, .authdivider) are unscoped,
 *    because login.html and register.html load this file purely for those and
 *    already carry their own copies of everything else inline. Nothing here may
 *    define a class those pages style themselves, or one of the two definitions
 *    silently wins.
 * 2. Everything for the standalone /forgot and /reset cards is scoped under
 *    .authcard for exactly the same reason — .field and .submit exist on the
 *    login page too, with different values.
 *
 * Colours come from theme.css, so both themes work with no extra rules here.
 */

:root {
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ── Google button (all four pages) ─────────────────────────────────────── */

.gbtn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 11px;
  font: 700 15px/1 var(--font); color: var(--ink); cursor: pointer;
  background: rgba(255, 255, 255, .045); border: 1px solid var(--line);
  border-radius: 12px; padding: 15px 18px; text-decoration: none;
  transition: border-color .15s, background .15s, transform .06s;
}
.gbtn:hover { border-color: var(--purple-line); background: rgba(255, 255, 255, .075); }
.gbtn:active { transform: translateY(1px); }
/* The mark keeps Google's own colours on every theme — their brand guidelines
   require it, and a monochrome G is also just harder to recognise. */
.gbtn svg { width: 19px; height: 19px; flex: none; }

.authdivider {
  display: flex; align-items: center; gap: 14px; margin: 22px 0;
  font: 500 9.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint);
}
.authdivider::before, .authdivider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* The "forgot?" affordance sits inside the password field's label row. */
.forgotlink {
  font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
}
.forgotlink:hover { text-decoration: underline; }

/* ── standalone card pages: /forgot and /reset ──────────────────────────── */

body.authpage {
  margin: 0; min-height: 100vh; color: var(--ink);
  font: 400 15px/1.6 var(--font); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(820px 420px at 50% -10%, rgba(139, 92, 246, .18), transparent 64%),
    var(--bg);
}
.authwrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 22px; }
.authcard { width: 100%; max-width: 430px; }

.authcard .brand {
  display: inline-flex; align-items: center; gap: 13px; text-decoration: none;
  color: var(--ink); font-weight: 800; letter-spacing: -.025em; margin-bottom: 30px;
}
.authcard .brand .mark {
  width: 56px; height: 56px; border-radius: 14px; flex: none;
  display: grid; place-items: center; overflow: visible;
  filter: drop-shadow(0 0 4px rgba(167, 139, 250, .85)) drop-shadow(0 0 12px rgba(124, 58, 237, .55));
}
.authcard .brand .mark img { width: 118%; height: 118%; object-fit: contain; display: block; }
.authcard .brand .brand-txt { display: flex; flex-direction: column; gap: 4px; line-height: 1; }
.authcard .brand .bname { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.authcard .brand .brand-tag {
  font: 600 9px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}

.authcard h1 { font-size: clamp(24px, 3.2vw, 30px); font-weight: 800; letter-spacing: -.03em; margin: 0; line-height: 1.15; }
.authcard .sub { color: var(--muted); font-size: 14.5px; margin: 12px 0 28px; max-width: 42ch; }

.authcard .field { margin-bottom: 18px; }
.authcard .flabel {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 9px;
}
.authcard .inwrap { position: relative; }
.authcard input {
  width: 100%; font: 400 15px/1.6 var(--font); color: var(--ink);
  background: rgba(255, 255, 255, .025); border: 1px solid var(--line);
  border-radius: 11px; padding: 15px 16px; transition: border-color .15s;
}
.authcard input::placeholder { color: var(--faint); }
.authcard input:focus { outline: none; border-color: var(--purple-line); }
.authcard .inicon {
  position: absolute; left: 1px; top: 1px; bottom: 1px; width: 48px;
  display: grid; place-items: center; color: var(--accent);
  background: rgba(139, 92, 246, .08); border-right: 1px solid var(--line-soft);
  border-radius: 10px 0 0 10px; pointer-events: none;
}
.authcard .inicon svg { width: 17px; height: 17px; }
.authcard input.hasIcon { padding-left: 62px; }
.authcard input.hasEye { padding-right: 50px; }
.authcard .eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 8px; border: none; background: none;
  color: var(--faint); display: grid; place-items: center; cursor: pointer;
}
.authcard .eye:hover { color: var(--body-ink); }
.authcard .eye svg { width: 18px; height: 18px; }

.authcard button.submit {
  width: 100%; margin-top: 24px; font: 700 15.5px/1 var(--font);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: none; border-radius: 12px; padding: 17px; cursor: pointer;
  background: var(--grad); color: #fff;
  box-shadow: 0 14px 36px -10px rgba(124, 58, 237, .75), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: filter .15s, transform .06s;
}
.authcard button.submit:hover:not(:disabled) { filter: brightness(1.06); }
.authcard button.submit:active:not(:disabled) { transform: translateY(1px); }
.authcard button.submit:disabled { opacity: .55; cursor: progress; }
.authcard button.submit svg { width: 18px; height: 18px; flex: none; transition: transform .18s; }
.authcard button.submit:hover:not(:disabled) svg { transform: translateX(3px); }

/* Requirements/strength hint under a new-password field. */
.authcard .hint { margin: 9px 0 0; font-size: 12.5px; color: var(--faint); }
.authcard .hint.bad { color: var(--amber); }
.authcard .hint.good { color: var(--green); }

.error, .note {
  display: none; margin-top: 18px; padding: 13px 15px; font-size: 13.5px;
  line-height: 1.55; border-radius: 11px;
}
.error {
  color: var(--red); background: rgba(248, 113, 113, .09);
  border: 1px solid rgba(248, 113, 113, .3);
}
.note {
  color: var(--body-ink); background: rgba(52, 211, 153, .08);
  border: 1px solid rgba(52, 211, 153, .3);
}
.note b { color: var(--green); }
.error.show, .note.show { display: block; }

.authcard .alt { text-align: center; margin-top: 26px; font-size: 14px; color: var(--muted); }
.authcard .alt a { color: var(--accent); font-weight: 700; text-decoration: none; }
.authcard .alt a:hover { text-decoration: underline; }
