/* portal-shell.css — the PUZL shell and sign-in pages
 * (spec-puzl-hub-rebrand.md P1a; approved mockups M1-M4 in
 * .omc/plans/mockup-puzl/). Linked by the portal's base.html and, since P1c,
 * by admin's base.html too, which adds admin-shell.css after it for where
 * admin differs (M5). Values come from tokens-portal.css and
 * tokens-admin.css, which hold the same palette.
 */

body { font-family: var(--font-body); background: var(--bg); color: var(--text); }

/* ── Wordmark ───────────────────────────────────────────────────────── */
.puzl-wordmark {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-hd);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  text-transform: none;
}
.puzl-wordmark:hover { color: var(--ink); }
.puzl-mark { flex-shrink: 0; display: block; }

/* ── Top bar (M4) ───────────────────────────────────────────────────── */
.topnav { background: var(--nav-bg); }
@media (min-width: 681px) {
  .topnav { padding: 0 32px; min-height: 62px; }
}
.topnav .puzl-wordmark { font-size: 20px; }
.nav-account > summary {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  border-color: var(--line);
  border-radius: var(--r-sm);
  padding: 6px 10px;
}
/* "Finish setup (2 of 3)": the marigold pill. */
.nav-setup.is-pending > summary {
  background: var(--marigold);
  border-color: var(--marigold);
  color: var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
}
.nav-setup.is-pending > summary::after { color: var(--ink); }
.nav-bell { color: var(--ink-soft); border-color: transparent; }
.nav-bell:hover { border-color: transparent; color: var(--ink); }

/* M4 puts Files and Reports beside the wordmark and the rest at the right, in
 * the order setup, bell, name, switcher. The links stay first in the DOM (and
 * in nav_right, which five pages override); a flex spacer splits the row, and
 * the setup pill moves visually ahead of the bell. Keyboard order is links,
 * bell, name, setup, switcher. */
.topnav .nav-right { flex: 1 1 auto; }
.topnav .nav-right::before { content: ""; order: 1; flex: 1 1 auto; }
.topnav .nav-right > * { order: 3; }
.topnav .nav-right > .nav-link { order: 0; }
.topnav .nav-right > .nav-setup { order: 2; }
.topnav .nav-right > .nav-link {
  border: 0; background: none;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  text-transform: none; letter-spacing: 0;
  color: var(--ink-soft);
  padding: 6px 4px;
}
.topnav .nav-right > .nav-link:hover { color: var(--ink); background: none; }
@media (min-width: 681px) {
  .topnav .nav-right { margin-left: 40px; column-gap: 14px; }
  .topnav .nav-right > .nav-link + .nav-link { margin-left: 12px; }
}

/* Trial banner (M4): sage, the link to the right. Scoped to the trial kind so
 * a paused-hub alert keeps its error colours. */
[data-plan-banner="trial"] {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 6px 16px;
  padding: 10px 16px;
  background: var(--sage);
  border: 0;
  border-radius: var(--r);
  font-size: 13px;
  color: var(--ink);
}
[data-plan-banner="trial"] a { color: var(--cobalt); font-weight: 700; text-decoration: none; }
[data-plan-banner="trial"] a::after { content: " \2192"; }

/* ── Sign-in, sign-up, invite (M1-M3) ───────────────────────────────── */
.auth-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh;
  padding: 40px 16px;
  box-sizing: border-box;
}
.auth-stack { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 14px; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 40px 48px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}
.auth-card--wide { max-width: 480px; padding: 44px 52px; text-align: left; }
.auth-card--narrow { max-width: 420px; padding: 48px 44px; }
.auth-card .puzl-wordmark { margin-bottom: 22px; }
.auth-card--wide .auth-brand { display: flex; justify-content: center; }

/* M1's rename notice: sage, an info glyph, above the card. */
.auth-notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--sage);
  border-radius: var(--r);
  padding: 14px 18px;
  font-size: 14px; line-height: 1.5;
  color: var(--ink);
  text-align: left;
}
.auth-notice svg { flex-shrink: 0; margin-top: 1px; }

.auth-copy { font-size: 14px; color: var(--ink-soft); margin: 0 0 28px; }
.auth-title {
  font-family: var(--font-hd);
  font-size: 22px; font-weight: 800; letter-spacing: -0.01em;
  text-transform: none; /* components.css uppercases every h1 */
  text-align: center; color: var(--ink);
  margin: 0 0 10px;
}
.auth-sub { font-size: 15px; color: var(--ink-soft); text-align: center; line-height: 1.6; margin: 0 0 26px; }
.auth-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 6px;
}
.auth-account {
  font-family: var(--font-hd);
  font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2;
  color: var(--ink); margin: 0 0 28px;
}
.auth-badge {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: 0 auto 18px;
  border-radius: var(--r-sm);
  background: var(--cobalt);
}

.provider-stack { display: flex; flex-direction: column; gap: 10px; }
.btn-provider {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; box-sizing: border-box;
  padding: 11px 20px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.btn-provider:hover { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--accent-dim); color: var(--ink); }
.btn-provider:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.provider-icon { width: 18px; height: 18px; flex-shrink: 0; }

.email-form-wrap { margin-top: 4px; }
.email-form-wrap[aria-hidden="true"] { display: none; }
.email-form { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.auth-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-soft);
}
.email-input {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
}
.email-input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--accent-dim); }
.email-input[readonly] { background: var(--sage); color: var(--ink-soft); cursor: not-allowed; }
.email-submit {
  width: 100%; box-sizing: border-box;
  padding: 11px 20px;
  border-radius: var(--r-sm);
  border: 0;
  background: var(--cobalt);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: background var(--ease);
}
.email-submit:hover { background: var(--cobalt-deep); }
.email-submit:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.auth-hint { font-size: 12px; color: var(--ink-soft); line-height: 1.5; margin: 0; }

.auth-trouble { margin-top: 20px; font-size: 13px; color: var(--ink-soft); }
.auth-trouble a { color: var(--ink-soft); text-decoration: underline; }
.auth-new {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-soft);
}
.auth-new a, .auth-link { color: var(--cobalt); font-weight: 700; text-decoration: none; }
.auth-legal { margin-top: 22px; font-size: 13px; color: var(--ink-soft); text-align: center; line-height: 1.6; }
.auth-legal a { color: var(--cobalt); text-decoration: underline; }
.auth-fine { font-size: 11px; color: var(--ink-soft); line-height: 1.6; margin: 10px 0 0; }
.auth-fine a { color: var(--ink-soft); text-decoration: underline; }
.auth-fine .auth-link, .auth-legal .auth-link { color: var(--cobalt); text-decoration: none; }

.auth-error {
  margin-top: 16px; padding: 8px 12px;
  background: var(--error-bg); border: 1px solid var(--error-br);
  border-radius: var(--r-sm);
  font-size: 13px; color: var(--error);
}

@media (max-width: 480px) {
  .auth-card, .auth-card--wide, .auth-card--narrow { padding: 32px 22px; }
}
.auth-fine--first { margin-top: 22px; }
.auth-fine--company { margin-top: 14px; }

/* components.css (shared with admin) draws .custom-pill in the old violet;
 * the portal's version follows the accent. */
.custom-pill { border-color: rgba(43,69,240,0.35); background: var(--accent-dim); }

/* ── Inner screens (P1b) ─────────────────────────────────────────────
 * components.css, shared with admin, sets titles in letter-spaced capitals
 * and its small labels in the mono face. M4 sets page and section titles in
 * sentence case, and the sign-in mockups set small labels in the body face.
 * Code, DNS records, ids and the dashboard's field chips stay mono. */
.pg h1 { text-transform: none; letter-spacing: -0.015em; font-weight: 800; }
.pg h2 { text-transform: none; letter-spacing: -0.005em; font-weight: 700; font-size: 1.05rem; }
.breadcrumb,
.pg-eyebrow,
.section-label,
.stat-label,
.form-section-label,
.field label,
.data-table th,
.pg-tab,
.pg-subnav a,
.settings-nav a,
.field input,
.field-hint,
.stat-sub,
.src-tile-name,
.src-tile-ts,
.empty-src,
.rooftop-meta,
.empty-rooftop,
.nav-account-menu a,
.preview-field-label,
.badge,
.source-chip,
.surf-chip,
.count-chip,
.cat-chip,
.custom-pill,
.confidence-badge,
.conf-chip { font-family: var(--font-body); }
.breadcrumb { font-size: 0.8rem; }
.src-tile-name, .src-tile-ts { font-size: 0.72rem; }
/* Buttons and source names as the mockups set them: sentence case, no
 * tracking. Status badges keep their capitals. */
.btn { text-transform: none; letter-spacing: 0; font-size: 0.84rem; }
.src-tile-label, .rooftop-name { text-transform: none; letter-spacing: -0.005em; font-size: 0.92rem; }
