/* ==========================================================================
   Sign-in, sign-up and password pages (layouts/application): the auth card,
   its form, errors and flash messages, and the top bar a signed-in visitor
   sees on the marketing pages, which load this file too. The signed-in
   dashboard does not load it: see app.css.
   ========================================================================== */
.auth-shell, .topbar { font-size: 15px; }
/* ---- App top bar -------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px clamp(16px, 4vw, 40px);
  background: rgba(255, 254, 251, 0.88);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-size: 1.05rem;
}
.topbar__brand:hover {
  text-decoration: none;
}
.topbar__spacer {
  flex: 1;
}
.topbar__nav {
  display: flex;
  gap: 4px;
}
.topbar__nav a {
  color: var(--ink-soft);
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--pill);
  font-size: 0.9rem;
}
.topbar__nav a:hover {
  color: var(--indigo);
  box-shadow: inset 0 0 0 1.5px var(--indigo);
  text-decoration: none;
}
.topbar__nav a.is-active {
  color: var(--cream);
  background: var(--indigo);
  box-shadow: none;
}
.topbar__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.topbar__meta strong {
  color: var(--ink-soft);
  font-weight: 600;
}
.topbar form {
  margin: 0;
}


/* ---- Auth card ----------------------------------------------------------- */
.auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow);
  padding: 34px;
}
.auth-card__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  margin-bottom: 22px;
}
.auth-card h1 {
  font-size: 1.55rem;
}
.auth-card .sub {
  color: var(--ink-soft);
  margin-top: -0.3em;
}
.auth-foot {
  margin: 18px 0 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.auth-foot a {
  font-weight: 600;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 0.9rem;
}

/* ---- Forms ----------------------------------------------------------------- */
form {
  margin: 0;
}
.field {
  display: block;
  margin-bottom: 14px;
}
.field > label,
.field > .field__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='url'],
input[type='number'],
input[type='search'],
textarea,
select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  appearance: none;
}
input::placeholder,
textarea::placeholder {
  color: var(--ink-faint);
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px var(--lila);
}

/* Buttons — covers form.submit (input[type=submit]) and button_to (button) */
:where(.auth-card) button,
:where(.topbar) button,
input[type='submit'],
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  border: 0;
  border-radius: var(--pill);
  padding: 0.7rem 1.15rem;
  background: var(--indigo);
  color: var(--cream);
  transition:
    transform 0.2s var(--ease),
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
  text-decoration: none;
}
:where(.auth-card) button:hover,
:where(.topbar) button:hover,
input[type='submit']:hover,
.btn:hover {
  background: var(--indigo-deep);
  text-decoration: none;
}
:where(.auth-card) button:active,
:where(.topbar) button:active,
input[type='submit']:active,
.btn:active {
  transform: translateY(1px);
}
input[type='submit'] {
  width: 100%;
  padding-block: 0.9rem;
}

.btn--secondary,
button.btn--secondary {
  background: transparent;
  color: var(--indigo);
  box-shadow: inset 0 0 0 1.5px var(--indigo);
}
.btn--secondary:hover,
button.btn--secondary:hover {
  background: var(--indigo);
  color: var(--cream);
}

/* ---- Flash --------------------------------------------------------------------- */
.flash-stack {
  max-width: var(--maxw);
  margin: 16px auto -4px;
  padding: 0 clamp(20px, 4vw, 40px);
}
.auth-shell .flash-stack {
  max-width: 408px;
  margin: 0 auto 14px;
  padding: 0;
}
.flash {
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  margin-bottom: 10px;
}
.flash--notice {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: transparent;
}
.flash--alert {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
}

.errors {
  background: var(--danger-soft);
  border: 1px solid transparent;
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}
.errors p {
  font-weight: 600;
  margin: 0 0 6px;
}
.errors ul {
  margin: 0;
  padding-left: 1.1em;
}
