/* Shared frame of the server-rendered /login, /signup and /reset-password pages: one
   centred card whose header carries the landing's headline + hero picture. Tokens are a copy of
   the SPA's src/main-frontend/src/lib/tokens.css — these pages must not depend on the
   SPA bundle. No inline styles/scripts: their CSP is script-src/style-src 'self'. */
@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url("../fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 500; font-display: swap; src: url("../fonts/public-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-display: swap; src: url("../fonts/public-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 800; font-display: swap; src: url("../fonts/public-sans-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }

:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --ink: #1f2328;
  --ink-soft: #3d444d;
  --muted: #59636e;
  --line: #d1d9e0;
  --line-strong: #b7c0ca;
  --accent: #1f6feb;
  --accent-hover: #1a5fcb;
  --on-accent: #ffffff;
  --ok: #1a7f37;
  --crit: #cf222e;
  --schedule-window: #ddebff;
  --radius: 6px;
  --font: "Public Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.auth {
  min-height: 100vh;
  background: var(--surface-2);
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 40px 16px 56px;
}

.auth-col {
  width: 100%;
  max-width: 400px;
  display: grid;
  gap: 20px;
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--ink);
  position: relative;
  flex: none;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  border-top-color: transparent;
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 4px;
  width: 2px;
  height: 8px;
  background: var(--paper);
  border-radius: 1px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(31, 35, 40, 0.06), 0 18px 40px -16px rgba(31, 35, 40, 0.22);
  overflow: hidden;
}

/* --- card header: headline + picture --- */
.pitch {
  background: linear-gradient(180deg, var(--schedule-window), var(--surface));
  border-bottom: 1px solid var(--line);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 16px;
  align-items: center;
}

.pitch-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}

.pitch-title .t {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--accent);
}

.pitch-foot {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.screen {
  width: 120px;
  display: block;
}

.hs-ink { fill: var(--ink); }
.hs-stand { fill: var(--line-strong); }
.hs-app { fill: var(--surface); stroke: var(--line); }
.hs-bar { fill: var(--surface-2); }
.hs-text { fill: var(--line); }
.hs-play-bg { fill: var(--schedule-window); }
.hs-accent { fill: var(--accent); }
.hs-pause-ring { fill: none; stroke: #c4defc; stroke-width: 2.5; }
.hs-pause { fill: #c4defc; }
.hs-split { stroke: var(--accent); stroke-width: 3; }
.hs-track { fill: var(--surface-2); stroke: var(--line); }
.hs-window { fill: var(--schedule-window); stroke: var(--accent); stroke-width: 2; }
.hs-cell { fill: var(--paper); opacity: 0.7; }
.hs-cell.hs-used { fill: var(--accent); opacity: 0.35; }
.hs-guide { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 4; }

/* --- form --- */
.login-card {
  padding: 24px;
}

.login-card h1 {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 4px;
}

.login-card .sub {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 20px;
}

.flash {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.flash-error {
  background: color-mix(in srgb, var(--crit) 8%, var(--surface));
  color: var(--crit);
  border-color: color-mix(in srgb, var(--crit) 25%, var(--surface));
}

.flash-success {
  background: color-mix(in srgb, var(--ok) 8%, var(--surface));
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 25%, var(--surface));
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.field input {
  font: inherit;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

button[type="submit"] {
  font: inherit;
  font-weight: 600;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
}

button[type="submit"]:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.alt {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.alt a {
  color: var(--accent);
  font-weight: 500;
  text-underline-offset: 2px;
}

@media (max-width: 400px) {
  .auth {
    align-content: start;
    padding: 24px 12px 32px;
  }

  .pitch,
  .login-card {
    padding-inline: 16px;
  }

  .pitch {
    grid-template-columns: minmax(0, 1fr) 96px;
  }

  .screen {
    width: 96px;
  }
}
