/* NEXBLD flat theme — carried from the old site's visual language:
   warm-dark gradient top bar, NEX(bold)+BLD(muted) wordmark, amber active
   accents, white cards on light gray, plain uppercase bordered buttons
   (never pills). */

/* Inter, self-hosted (SIL OFL) — same file the console serves, so public and
   admin pages render one identical face everywhere. */
@font-face {
  font-family: "Inter";
  src: url("InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --nav-grad: linear-gradient(135deg, #0a0a09, #6b665e);
  /* The same gold as the app chrome (--nx-gold in tokens.css, which these
     pre-auth pages do not load). Kept in step by hand: if one moves, move
     both, or signing in changes the brand colour halfway through. */
  --amber: #aa210f;  /* the house red replaced the amber, 2026-08-30 */
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --page: #f5f6f8;
  --card: #ffffff;
  --green: #16a34a;
  --red: #dc2626;
  --blue: #3b82f6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  /* Same stack as the console (tokens.css) — one typeface across the site. */
  font-family: Inter, "PP Neue Montreal", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  background: var(--page);
  color: var(--ink);
  min-height: 100vh;
}

/* ---- top bar ---- */
.topbar {
  background: var(--nav-grad);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 52px;
  gap: 28px;
}
/* The one wordmark treatment, matching the console header (nav.css
   .nxm-brand): NEX at 400, BLD at 350, tight tracking — Rodney 2026-08-22,
   "use it throughout". Colors stay per surface (white on dark, ink on light). */
.wordmark { font-size: 20px; font-weight: 400; letter-spacing: -0.02em; color: #fff; text-decoration: none; }
.wordmark span { font-weight: 350; color: #c9c4bb; }
.topnav { display: flex; gap: 24px; align-items: center; flex: 1; }
.topnav .nav-item { color: #d6d3cd; font-size: 14px; text-decoration: none; padding: 15px 2px; }
.topnav .nav-item.active { color: var(--amber); border-bottom: 2px solid var(--amber); }
.topnav .nav-item.soon { opacity: 0.45; cursor: default; }
.whoami { color: #d6d3cd; font-size: 13px; position: relative; }
.whoami b { color: #fff; }
.whoami button {
  background: none; border: none; color: inherit; font: inherit; cursor: pointer;
}
.menu {
  position: absolute; right: 0; top: 34px; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px; min-width: 150px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); display: none; z-index: 20;
}
.menu.open { display: block; }
.menu button {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  font-size: 14px; color: var(--ink);
}
.menu button:hover { background: var(--page); }

/* ---- layout ---- */
.wrap { max-width: 1160px; margin: 0 auto; padding: 24px; }
.page-head { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 20px; }
.page-head h1 { font-size: 26px; font-weight: 700; }
.page-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }

.grid { display: grid; gap: 16px; }
.grid.tiles { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid.two { grid-template-columns: 2fr 1fr; }
.grid.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 900px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 18px 20px;
}
.card h2 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }

.tile .label { font-size: 13px; color: var(--muted); }
.tile .value { font-size: 30px; font-weight: 700; margin: 6px 0 4px; }
.tile .sub { font-size: 12px; color: var(--muted); border-top: 2px solid var(--line); padding-top: 8px; margin-top: 8px; }

/* ---- lists / status ---- */
.status-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.status-row:last-child { border-bottom: none; }
.ok { color: var(--green); font-size: 13px; }
.warn { color: var(--red); font-size: 13px; }
.dim { color: var(--muted); font-size: 13px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }

/* ---- buttons & forms (plain, no pills) ---- */
.btn {
  display: inline-block; padding: 9px 16px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
  border: 1px solid #cfd4da; border-radius: 4px; background: #fff; color: var(--ink);
}
.btn:hover { background: var(--page); }
/* Outline-glass treatment (same sheet as the auth buttons). */
.btn-dark { background: rgba(17, 24, 39, 0.03); border: 1px solid rgba(17, 24, 39, 0.5); color: var(--muted); font-weight: 450; }
.btn-dark:hover { background: rgba(17, 24, 39, 0.08); border-color: var(--ink); color: #374151; }
.btn[disabled] { opacity: 0.55; cursor: default; }

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%; padding: 10px 12px; font-size: 15px;
  border: 1px solid #cfd4da; border-radius: 4px; background: #fff;
}
input:focus { outline: 2px solid #b8bcc4; outline-offset: 0; }

/* ---- split photo pages (reset.html): the sign-in page's photo treatment on
   the left, a white form pane on the right. Reuses the auth-* panel pieces. */
.split-page { display: flex; min-height: 100vh; }
.split-photo {
  position: relative; flex: 1; color: #fff;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 48px 64px 110px;
  background:
    linear-gradient(180deg, rgba(12, 13, 16, 0.55) 0%, rgba(12, 13, 16, 0.35) 45%, rgba(12, 13, 16, 0.6) 100%),
    url("login-bg.jpg") center / cover no-repeat #16181d;
}
.split-form { flex: 1; display: flex; align-items: center; justify-content: center; background: #fff; padding: 48px 24px; }
.split-card { width: 380px; max-width: 100%; }
.split-card .wordmark { color: var(--ink); font-size: 26px; }
.split-card .wordmark span { color: #9aa0a8; }
.split-card .tagline { color: var(--muted); font-size: 14px; margin: 8px 0 14px; }
.split-card .btn { width: 100%; margin-top: 20px; padding: 12px; }
@media (max-width: 860px) {
  .split-photo { display: none; }
}

/* ---- password creation (invite.html + reset.html): eye + live checklist,
   the same behaviour as the console's password dialog. Pairs with pwfield.js. */
/* Edge draws its own reveal eye inside password inputs, doubling ours
   (Rodney, 2026-08-23). Ours is the only one. */
input::-ms-reveal, input::-ms-clear { display: none; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; color: var(--muted);
  padding: 5px; display: inline-flex; border-radius: 6px;
}
.pw-eye:hover { color: var(--ink); }
.pw-eye svg { width: 18px; height: 18px; display: block; }
.pw-rules { list-style: none; margin: 10px 0 0; padding: 0; }
.pw-rule { font-size: 13px; color: var(--muted); padding: 3px 0 3px 18px; position: relative; }
.pw-rule::before { content: "\2022"; position: absolute; left: 4px; }
.pw-rule.pass { color: var(--green); }
.pw-rule.pass::before { content: "\2713"; left: 2px; }
.pw-rule.fail { color: var(--red); }
.pw-rule.fail::before { content: "\00d7"; left: 3px; }

/* ---- login (invite.html and account flows still use these cards) ---- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 36px; }
.login-card .wordmark { color: var(--ink); font-size: 26px; }
.login-card .wordmark span { color: #9aa0a8; }
.login-card .tagline { color: var(--muted); font-size: 13px; margin: 6px 0 10px; }
.login-card .btn { width: 100%; margin-top: 20px; padding: 12px; }
.error { color: var(--red); font-size: 13px; margin-top: 12px; min-height: 18px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

/* ---- split sign-in / create-account (index.html) --------------------------
   Two halves in one card, styled after the reference design (2026-08-22):
   off-white form side with floating-label fields, photo panel on the right
   (assets/login-bg.jpg under a dark wash). In create-account mode the photo
   overlay slides LEFT to cover the sign-in half while the sign-up form fades
   in on the right. All movement is transform-only. */
/* Full-bleed like the reset page (Rodney, 2026-08-22) — the shell IS the
   viewport; the sliding overlay machinery is all percentages, so the motion
   is unchanged. */
.auth-page { min-height: 100vh; }
.auth-shell {
  position: relative; width: 100%; min-height: 100vh;
  background: #f8f8f6; overflow: hidden;
}
.auth-form {
  position: absolute; top: 0; bottom: 0; width: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 44px 56px; text-align: center; background: #f8f8f6;
}
.auth-signin { left: 0; }
.auth-signup { left: 50%; opacity: 0; pointer-events: none; transition: opacity 0.3s ease 0.25s; }
.auth-shell.signup-mode .auth-signup { opacity: 1; pointer-events: auto; }

.auth-mark { width: 60px; height: 60px; margin-bottom: 12px; }
.auth-wordmark { font-size: 26px; font-weight: 400; letter-spacing: -0.02em; color: var(--ink); }
.auth-wordmark span { font-weight: 350; color: #9aa0a8; }
.auth-wordmark.dark { color: #fff; }
.auth-wordmark.dark span { color: #b9b4ac; }
/* Display headings sit at 550, not bold — hierarchy comes from size, matching
   the console's weight discipline (Rodney, 2026-08-22). */
.auth-title { font-size: 34px; font-weight: 550; margin: 18px 0 10px; letter-spacing: -0.02em; }
.auth-sub { color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 320px; margin-bottom: 26px; }

/* Floating-label fields: white card, no icon (Rodney 2026-08-22), small grey
   label ABOVE the value inside the same box. */
.auth-field {
  width: 100%; max-width: 340px; margin-bottom: 14px;
  display: flex; align-items: center; text-align: left;
  background: #fff; border: 1px solid #dcdfe4; border-radius: 10px;
  padding: 6px 14px; cursor: text;
}
.auth-field:focus-within { border-color: #9aa0a8; }
.auth-field-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.auth-field-label { font-size: 11px; color: var(--muted); }
.auth-field input {
  border: 0; background: none; padding: 1px 0 0; font-size: 14px;
  color: var(--ink); min-width: 0; width: 100%;
}
.auth-field input:focus { outline: none; }
.auth-eye {
  background: none; border: 0; cursor: pointer; color: var(--muted);
  padding: 4px; display: inline-flex; flex: none;
}
.auth-eye:hover { color: var(--ink); }

/* Tucked directly under the password box, smaller than the field text. */
.auth-links { width: 100%; max-width: 340px; text-align: right; margin: -8px 0 0; }
.auth-links .auth-textlink { font-size: 12px; }
.auth-textlink {
  background: none; border: 0; cursor: pointer; font-size: 14px;
  color: var(--blue); text-decoration: none; padding: 0;
}
.auth-textlink:hover { text-decoration: underline; }
/* Desktop reaches sign-up through the sliding overlay; the swap link exists
   only for small screens (shown in the media query below — base rule first,
   never after its own media query). */
.auth-swap { display: none; }
.auth-note { font-size: 13px; color: var(--muted); max-width: 340px; margin-bottom: 12px; }
/* Forgot-password dialog internals (the dialog shell is .auth-scrim/.auth-dialog). */
.auth-dialog .auth-field { margin: 4px auto 8px; }
.auth-reset-status { font-size: 12px; color: var(--muted); min-height: 16px; margin: 0 0 4px; text-align: center; }

/* Outline-glass buttons (Rodney's reference sheet, 2026-08-22): translucent
   fill behind a 1px outline, arrow at the far edge; hover lifts the fill and
   brightens the outline. Ink outline on white surfaces, white outline on the
   photo, amber outline for Create Account. Sizes stay a matched 340px pair. */
.auth-btn {
  position: relative; width: 100%; max-width: 340px; padding: 15px 44px; cursor: pointer;
  font-size: 16px; font-weight: 450; letter-spacing: 0.01em;
  background: rgba(17, 24, 39, 0.03); color: var(--muted);
  border: 1px solid rgba(17, 24, 39, 0.45); border-radius: var(--radius, 8px);
  margin-top: 26px; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.auth-btn:hover { background: rgba(17, 24, 39, 0.08); border-color: var(--ink); color: #374151; }
.auth-btn[disabled] { opacity: 0.55; cursor: default; }
.auth-btn-arrow { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 18px; }
/* Frosted, not clear (Rodney, 2026-08-23): a stronger white fill plus a
   backdrop blur so the photo behind reads as texture, not detail. */
.auth-btn.light {
  background: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.auth-btn.light:hover { background: rgba(255, 255, 255, 0.26); border-color: #fff; color: #fff; }
.auth-foot { color: var(--muted); font-size: 13px; margin-top: 24px; line-height: 1.6; }
.auth-foot u { cursor: default; }

/* The moving photo panel. Track = the visible window (half the shell);
   overlay = a double-wide strip inside it carrying both panels. */
.auth-overlay-track {
  position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
  overflow: hidden; transition: transform 0.6s ease-in-out; z-index: 5;
}
.auth-shell.signup-mode .auth-overlay-track { transform: translateX(-100%); }
.auth-overlay {
  position: relative; left: -100%; width: 200%; height: 100%;
  color: #fff; transform: translateX(0); transition: transform 0.6s ease-in-out;
  background:
    linear-gradient(180deg, rgba(12, 13, 16, 0.55) 0%, rgba(12, 13, 16, 0.35) 45%, rgba(12, 13, 16, 0.6) 100%),
    url("login-bg.jpg") center / cover no-repeat #16181d;
}
.auth-shell.signup-mode .auth-overlay { transform: translateX(50%); }
.auth-panel {
  position: absolute; top: 0; height: 100%; width: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  /* Centered over the photo (Rodney, 2026-08-22); the spacer margins below
     level each panel's wordmark and button with the form column beside it —
     measured, not guessed. */
  padding: 48px 56px 12px; text-align: center;
}
.auth-panel-left { left: 0; }
/* Panel-right pairs with the taller sign-in form: +13px under the kicker and
   a 39px lift land its wordmark and button level with the form's (measured). */
.auth-panel-right { right: 0; padding-bottom: 51px; }
.auth-panel-right .auth-kicker { margin-bottom: 57px; }
.auth-panel .auth-wordmark { font-size: 24px; }
/* Literal orange, NOT var(--amber): the 2026-08-30 red pivot moved --amber
   to the house red, and Rodney kept exactly these two auth accents orange —
   the only survivors of the old palette. Do not "fix" them back to the var. */
.auth-kicker { color: #e6a147; font-size: 13px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; margin: 12px 0 44px; }
.auth-hello { font-size: 38px; font-weight: 550; line-height: 1.2; margin-bottom: 18px; letter-spacing: -0.01em; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45); }
.auth-rule { width: 56px; height: 4px; background: #e6a147; border-radius: 2px; margin-bottom: 22px; }
.auth-panel-copy { font-size: 16px; line-height: 1.6; color: #e6e3de; max-width: 340px; margin-bottom: 4px; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5); }
.auth-panel-foot {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 20px 0;
  background: rgba(10, 10, 11, 0.82); text-align: center;
  font-size: 12px; letter-spacing: 0.35em; color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

/* Thank-you dialog */
.auth-scrim {
  position: fixed; inset: 0; z-index: 50; background: rgba(17, 24, 39, 0.5);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
/* display:flex would silently beat the hidden attribute (this exact bug
   shipped once on the credentials page) — state it explicitly. */
.auth-scrim[hidden] { display: none; }
.auth-dialog {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  max-width: 460px; width: 100%; padding: 32px 36px; text-align: center;
}
/* Dialogs close from an X in the corner, the way every modal in the app does
   (Rodney, 2026-09-01 — the reset dialog had a "Close" text link under the
   button instead). Same shape as .nx-modal-close in settings.css. */
.auth-dialog-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: 0; padding: 4px 8px; border-radius: 8px;
  color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer;
}
.auth-dialog-close:hover { background: rgba(17, 24, 39, 0.06); color: var(--ink); }
.auth-dialog .auth-title { margin-top: 0; font-size: 24px; }
.auth-dialog-copy { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 14px; }
.auth-dialog .auth-btn { max-width: 240px; margin-top: 8px; padding-left: 20px; padding-right: 20px; }

/* Small screens: no room for the slider — one form at a time, swapped by a
   plain link. The overlay is decorative there and simply hidden. */
@media (max-width: 760px) {
  .auth-shell { min-height: 0; }
  .auth-form { position: static; width: 100%; padding: 36px 24px; }
  .auth-signup { display: none; opacity: 1; pointer-events: auto; }
  .auth-shell.signup-mode .auth-signin { display: none; }
  .auth-shell.signup-mode .auth-signup { display: flex; }
  .auth-overlay-track { display: none; }
  .auth-swap { display: block; margin: 0 auto 28px; }
}

