/* Logins (Phase D4): sign-in / invite pages, crew "My jobs", People with access.
   Uses the theme's colors (theme.css); no new colors. */

/* ---------- Sign-in and link pages (cover the whole panel) ---------- */
.auth { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; background: var(--bg); overflow-y: auto; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px 24px; }
.auth-card .brand { margin-bottom: 22px; }
.auth-card h1 { font-size: 20px; margin: 0 0 6px; }
.auth-note { color: var(--text-2); font-size: 13.5px; margin: 0 0 18px; line-height: 1.5; }
.auth-card form { margin-top: 14px; }
.auth-card .btn { width: 100%; height: 40px; margin-top: 4px; }
.auth-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2); margin: 2px 0 14px; cursor: pointer; }
.auth-check input { margin-top: 2px; }
.auth-foot { color: var(--text-3); font-size: 12px; margin: 16px 0 0; line-height: 1.5; }
body.signed-out .app, body.signed-out .sim, body.signed-out .drawer { visibility: hidden; }

/* ---------- Who is signed in (the account menu, top right) ---------- */
.me-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.me-text b { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text span { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Crew logins: only My jobs ---------- */
body.crew-mode .nav, body.crew-mode .sim-launch, body.crew-mode #aiStatus, body.crew-mode #tbBell, body.crew-mode #tbDateBox,
body.crew-mode .switcher:has(select option:only-child), body.crew-mode .content > .panel { display: none; }
/* (only the crew's own job cards: the Schedule's .cell.crew-job and its legend swatch .sw.crew-job share the name) */
#tabCrew .crew-job { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 14px 16px;
  margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
#tabCrew .crew-job.done { opacity: .65; }
.crew-when { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.crew-what { font-size: 15px; }
.crew-line { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.crew-line.muted { color: var(--text-3); }
.crew-line a { color: var(--accent-text); text-decoration: none; }
#tabCrew .crew-job .btn { align-self: flex-start; flex: 0 0 auto; margin-top: 6px; height: 40px; }
.crew-done { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--good-text); }

/* ---------- Settings > People with access ---------- */
.access-card { margin-bottom: 18px; }
.access-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--border); }
.access-row .sub-note { margin: 0; }
.access-row.pending b { font-weight: 500; color: var(--text-2); }
.access-role { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.access-invite { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; align-items: end;
  border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; }
.access-invite .field { margin-bottom: 0; }
.access-invite .btn { flex: 0 0 auto; white-space: nowrap; }
.access-link { margin-top: 12px; }
.access-link-row { display: flex; gap: 8px; margin-top: 6px; }
.access-link-row input { flex: 1; min-width: 0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; }
.access-link-row .btn { flex: 0 0 auto; }

@media (max-width: 760px) {
  .access-row { grid-template-columns: 1fr auto; }
  .access-invite { grid-template-columns: 1fr; }
}
