/* ===========================================================================
   public_login.css — the SIGN-IN POP-UP of the public pages.

   It used to live inside `portfolio_public_page.html`, which meant the company
   page had no way to offer the same door: a visitor who pressed "Follow" there
   was thrown into the app's own login screen instead of the page's pop-up. The
   styles moved here so BOTH pages render the same card, and the markup/JS moved
   to `templates/_public_login_modal.html` + `static/public_login.js`.

   Every colour is `var(--brand, fallback)`: the portfolio page defines --brand /
   --brand-2 / --ink / --muted / --line and the company page defines its own, so
   the pop-up picks up each page's palette without either template overriding it.
   =========================================================================== */
.pf-login {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 23, 42, .62);
  display: flex; align-items: center;
  /* `safe` keeps the card's top (and its half-outside face) reachable when the
     card is taller than the screen; the overlay scrolls instead of clipping. */
  align-items: safe center;
  justify-content: center; overflow-y: auto;
  padding: 60px 16px 18px;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.pf-login[hidden] { display: none; }
.pf-login-card {
  position: relative; width: min(380px, 100%); background: #fff;
  border-radius: 20px; padding: 56px 24px 16px; text-align: center;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .42);
  display: flex; flex-direction: column; gap: 10px;
  /* NO `overflow` here: the face badge sits half OUTSIDE the top border
     (`top:-44px`), and any overflow (even `auto`) clips it in half. A card
     taller than a short screen scrolls the OVERLAY instead. */
}
.pf-login-avatar {
  position: absolute; top: -44px; left: 50%; transform: translateX(-50%);
  width: 88px; height: 88px; border-radius: 50%; border: 4px solid #fff;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--brand, #4f46e5), var(--brand-2, #06b6d4));
  box-shadow: 0 10px 26px rgba(15, 23, 42, .26);
}
.pf-login-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-login-x {
  position: absolute; top: 10px; inset-inline-end: 10px; border: 0;
  background: #f1f5f9; color: #334155; width: 32px; height: 32px;
  border-radius: 999px; font-size: 18px; line-height: 1; cursor: pointer;
}
.pf-login-x:hover { background: #e2e8f0; color: #0f172a; }
.pf-login-title {
  margin: 0; font-size: 20px; font-weight: 800; color: var(--ink, #0f172a);
}
.pf-login-tabs {
  display: flex; gap: 4px; padding: 4px; background: #f1f5f9; border-radius: 999px;
}
.pf-login-tab {
  flex: 1; border: 0; background: transparent; font: inherit; font-size: 12.5px;
  font-weight: 800; color: #64748b; padding: 8px 10px; border-radius: 999px;
  cursor: pointer;
}
.pf-login-tab.on {
  background: #fff; color: var(--brand, #4f46e5);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .1);
}
.pf-login-panel { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.pf-login-panel[hidden] { display: none; }
.pf-login-step { display: flex; flex-direction: column; gap: 10px; }
.pf-login-step[hidden] { display: none; }
.pf-login-row { display: flex; gap: 10px; }
.pf-login-row .pf-login-field { flex: 1 1 0; min-width: 0; }
.pf-login-hint { font-size: 10.5px; color: var(--muted, #64748b); line-height: 1.45; }
.pf-login-check {
  display: flex; align-items: flex-start; gap: 7px; text-align: start;
  font-size: 11.5px; color: #475569; line-height: 1.45; cursor: pointer;
}
.pf-login-check input { margin: 2px 0 0; accent-color: var(--brand, #4f46e5); flex: none; }
.pf-login-link {
  border: 0; background: none; color: var(--brand, #4f46e5); font: inherit;
  font-size: 12px; font-weight: 800; cursor: pointer; padding: 4px;
}
.pf-login-link:hover { text-decoration: underline; }
.pf-login-sub {
  margin: 0 0 4px; font-size: 12.5px; color: var(--muted, #64748b); line-height: 1.55;
}
/* The inline error line under each panel. It lived in the portfolio page's own
   CSS, so the company page rendered a black sentence instead of a red one. */
.pf-auth-err { font-size: 12.5px; font-weight: 700; color: #b91c1c; min-height: 16px; }
.pf-login-field { display: flex; flex-direction: column; gap: 5px; text-align: start; }
.pf-login-field label { font-size: 12px; font-weight: 800; color: #334155; }
.pf-login-field input {
  font: inherit; font-size: 14px; padding: 11px 12px;
  border: 1px solid var(--line, #e2e8f0); border-radius: 12px; background: #fff;
  color: var(--ink, #0f172a); width: 100%;
}
.pf-login-field input:focus {
  outline: 2px solid var(--brand, #4f46e5); outline-offset: 0;
  border-color: var(--brand, #4f46e5);
}
.pf-login-go {
  margin-top: 4px; padding: 12px 16px; border: 0; border-radius: 12px;
  font: inherit; font-size: 14px; font-weight: 800; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--brand, #4f46e5), var(--brand-2, #06b6d4));
}
.pf-login-go:hover { filter: brightness(.96); }
.pf-login-go:disabled { opacity: .6; cursor: progress; }
.pf-login-foot {
  margin: 14px -24px -16px; padding: 14px 24px 16px;
  border-top: 1px solid var(--line, #e2e8f0); border-radius: 0 0 20px 20px;
  background: color-mix(in srgb, var(--brand, #4f46e5) 8%, #fff);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap;
}
.pf-login-brand { display: inline-flex; align-items: center; }
.pf-login-brand img {
  height: 20px; width: auto; max-width: 110px; display: block; opacity: .9;
}
.pf-login-brand:hover img { opacity: 1; }
.pf-login-apps { display: flex; align-items: center; gap: 8px; }
/* The packaged icons are WHITE artwork (they were drawn for dark marketing
   chips), so on the pale footer band they need an accent tile to be seen. */
.pf-login-app {
  width: 34px; height: 34px; border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, var(--brand, #4f46e5), var(--brand-2, #06b6d4));
  border: 1px solid transparent; display: inline-flex; align-items: center;
  justify-content: center; box-shadow: 0 3px 8px rgba(15, 23, 42, .14);
  transition: transform .15s, filter .15s;
}
.pf-login-app:hover { transform: translateY(-1px); filter: brightness(1.06); }
.pf-login-app img { width: 20px; height: 20px; display: block; }
@media (prefers-reduced-motion: reduce) {
  .pf-login-app { transition: none; }
}
