/* login.css — the standalone sign-in page's ENTIRE stylesheet.
 *
 * WHY THIS IS NOT A REACT PAGE (2026-09-19)
 * -----------------------------------------
 * /login renders before any session exists. It is the one page that must work
 * when everything else is broken, so it deliberately depends on nothing but
 * this file and css/tokens.css:
 *   - no hub JS bundle (a ~200KB download to draw a password box, and the
 *     React shell assumes an authenticated user it cannot have here),
 *   - no _base.html (login.html has its own <!doctype>; it never had the
 *     sidebar/topbar chrome),
 *   - no style.css (that link is what this file exists to remove).
 * A login page that cannot render because a bundle 404'd locks Jay out of the
 * dashboard entirely. Static CSS cannot fail that way.
 *
 * GLASS (03/10/2026). The page was the last Phosphor-era screen: an opaque card on a
 * hard-coded dark theme, the "Finn Tech" lockup, 15px fields. It is now the app's own
 * material and type — the Glass page glow, a translucent card, the sidebar's lockup, 16px
 * fields (iOS does not zoom them), a system-blue key — in whichever theme the viewer chose
 * (login.html sets data-theme before paint, from the same localStorage key as the shell).
 * Tokens only (scripts/css_lint.py); every one resolves under :root.daylight.
 */

@import "tokens.css";

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--sp-6) var(--sp-4) calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
  background: var(--page-glow), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.login-wrap { width: 100%; max-width: 380px; }

.login-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-7) var(--sp-6) var(--sp-6);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-2xl);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--glass-edge), var(--glass-shadow);
}

/* The sidebar's lockup, at a size for a page of its own. */
.login-brand { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.login-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 15px;
  background: var(--brand-mark);
  color: var(--on-brand);
  font-size: var(--fs-xl);
  font-weight: var(--fw-heavy);
  letter-spacing: -0.04em;
  box-shadow: var(--glass-edge);
}
.login-word {
  margin: 0;
  font-size: var(--fs-xl);
  font-weight: var(--fw-semi);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.login-sub {
  margin: 0 0 var(--sp-2);
  text-align: center;
  font-size: var(--fs-base);
  color: var(--text-muted);
}

.login-error {
  margin: 0;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: var(--fw-med);
  color: var(--bad-text);
  background: color-mix(in srgb, var(--bad) 12%, transparent);
}

/* 46px tall and 16px type: a finger-sized target, and iOS does not zoom a 16px field. */
.login-input {
  height: 46px;
  padding: 0 var(--sp-4);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--fill-quiet);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-no-zoom);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.login-input::placeholder { color: var(--text-muted); }
.login-input:focus {
  outline: none;
  border-color: var(--nav);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--nav) 24%, transparent);
}

/* The primary key is the system blue (Glass: blue for actions, green is money). */
.login-btn {
  height: 46px;
  margin-top: var(--sp-1);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--action-solid);
  color: var(--on-action);
  font: inherit;
  font-size: var(--fs-md);
  font-weight: var(--fw-semi);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--dur-press) var(--ease-out), filter var(--dur-press) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .login-btn:hover { filter: brightness(1.08); } }
.login-btn:active { transform: scale(var(--press)); }
.login-btn:focus-visible { outline: 2px solid var(--nav); outline-offset: 3px; }

@media (prefers-reduced-transparency: reduce) {
  .login-card { background: var(--surface-1); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .login-btn:active { transform: none; }
}
