/* mod-portal.css — MODULE D (2026-09-20): senior-friendly client portal.
 * Accessibility contract: 18px minimum base type inside the portal,
 * 56px minimum button height, high contrast, plain layout that works at
 * 390px wide. Scoped to .portal-onboard so staff UI is untouched. */

/* Staff views (#/portal/access, #/portal/messages) reuse these too. */
.portal-onboard {
  font-size: 18px;
  line-height: 1.55;
  color: #111827;
  max-width: 640px;
  margin: 0 auto;
}
.portal-onboard h1 { font-size: 1.75rem; line-height: 1.25; color: #111827; }
.portal-onboard h2 { font-size: 1.3rem; color: #111827; }
.portal-onboard .po-lede { font-size: 1.1rem; color: #1f2937; }
.portal-onboard .po-muted, .po-muted { color: #4b5563; font-size: 0.95rem; }
.portal-onboard a { color: #1d4ed8; }

/* Buttons: 56px minimum, full-width where it matters. */
.portal-onboard .po-btn {
  min-height: 56px;
  font-size: 1.1rem;
  padding: 0.85rem 1.4rem;
  border-radius: 12px;
}
.portal-onboard .po-btn-big { font-size: 1.2rem; font-weight: 700; }

/* Progress indicator. */
.po-progress { margin: 0.5rem 0 1rem; }
.po-stepcount { font-size: 1.15rem; font-weight: 700; color: #111827; margin-bottom: 0.5rem; }
.po-dots { display: flex; gap: 0.6rem; }
.po-dot {
  width: 52px; height: 52px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700;
  background: #e5e7eb; color: #374151; border: 2px solid #d1d5db;
}
.po-dot.is-now { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.po-dot.is-done { background: #047857; border-color: #047857; color: #fff; }

/* Step cards on the landing. */
.po-steps { display: grid; gap: 0.7rem; margin: 1rem 0 1.4rem; }
.po-stepcard {
  display: flex; gap: 0.9rem; align-items: center;
  background: #fff; border: 2px solid #d1d5db; border-radius: 14px;
  padding: 0.9rem 1rem;
}
.po-stepcard.is-done { border-color: #047857; background: #ecfdf5; }
.po-stepcard-n {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700; background: #e5e7eb; color: #374151;
}
.po-stepcard.is-done .po-stepcard-n { background: #047857; color: #fff; }

/* Form fields: large tap targets. */
.portal-onboard .po-label { display: block; font-size: 1.1rem; font-weight: 600; margin: 1rem 0 0.4rem; color: #111827; }
.portal-onboard .po-input {
  width: 100%; font-size: 1.15rem; line-height: 1.4;
  min-height: 56px; padding: 0.7rem 0.9rem;
  border: 2px solid #6b7280; border-radius: 12px; background: #fff; color: #111827;
}
.portal-onboard textarea.po-input { min-height: 110px; resize: vertical; }
.portal-onboard .po-input:focus { border-color: #1d4ed8; outline: 3px solid #bfdbfe; }
.portal-onboard .po-check {
  display: flex; gap: 0.8rem; align-items: flex-start;
  font-size: 1.1rem; margin: 1.2rem 0; padding: 0.9rem;
  border: 2px solid #6b7280; border-radius: 12px; background: #fff;
}
.portal-onboard .po-check input[type="checkbox"] { width: 32px; height: 32px; flex: 0 0 auto; margin-top: 2px; }
.portal-onboard .po-err { color: #b91c1c; font-weight: 700; font-size: 1.05rem; margin: 0.6rem 0; min-height: 1.4em; }
.portal-onboard .po-warn {
  background: #fef3c7; border: 2px solid #d97706; border-radius: 12px;
  padding: 0.9rem 1rem; font-size: 1.05rem; color: #111827;
}

/* Back / Continue row. */
.portal-onboard .po-navrow { display: flex; gap: 0.8rem; margin-top: 1.4rem; }
.portal-onboard .po-navrow .po-btn { flex: 1 1 0; }

/* Upload / sign rows. */
.po-uplrow {
  display: flex; gap: 0.9rem; align-items: center; justify-content: space-between;
  border: 2px solid #d1d5db; border-radius: 14px; padding: 0.9rem 1rem; margin: 0.7rem 0;
  background: #fff;
}
.po-uplinfo { flex: 1 1 auto; min-width: 0; }
.po-uploadbtn { cursor: pointer; flex: 0 0 auto; }
.po-center { text-align: center; }

/* Invoice badges. */
.po-badge { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.95rem; font-weight: 700; }
.po-badge.ok { background: #d1fae5; color: #065f46; }
.po-badge.warn { background: #fef3c7; color: #92400e; }

/* Confirmation panel. */
.po-confirm { background: #ecfdf5; border: 2px solid #047857; border-radius: 14px; padding: 1rem; margin-top: 1rem; }
.po-confirm h2 { color: #065f46; }

/* Message thread. */
.po-thread { margin-top: 1.2rem; display: grid; gap: 0.7rem; }
.po-msg { border-radius: 14px; padding: 0.8rem 1rem; font-size: 1.05rem; max-width: 100%; }
.po-msg.me { background: #dbeafe; border: 2px solid #93c5fd; justify-self: end; }
.po-msg.them { background: #f3f4f6; border: 2px solid #d1d5db; justify-self: start; }
.po-msg-who { font-weight: 700; font-size: 0.9rem; color: #374151; margin-bottom: 0.2rem; }
.po-msg-when { font-size: 0.85rem; color: #6b7280; margin-top: 0.3rem; }
.po-thread-staff .po-msg { max-width: 85%; }

/* Signature pad. */
.po-sig {
  width: 100%; height: auto; aspect-ratio: 2 / 1;
  border: 3px solid #111827; border-radius: 12px; background: #fff;
  touch-action: none; cursor: crosshair;
}

/* Staff views. */
.po-picklist { display: grid; gap: 0.5rem; margin-top: 0.7rem; }
.po-pick { justify-content: flex-start; text-align: left; min-height: 52px; }
.po-tablewrap { overflow-x: auto; margin-top: 1rem; }
.po-table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.po-table th, .po-table td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
.po-table th { background: #f3f4f6; font-size: 0.9rem; }
.po-dev { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 390px and narrow: stack rows, keep buttons full width. */
@media (max-width: 480px) {
  .portal-onboard { font-size: 18px; }
  .po-uplrow { flex-direction: column; align-items: stretch; }
  .po-uploadbtn, .po-uplrow .po-btn { width: 100%; text-align: center; }
  .po-dot { width: 46px; height: 46px; }
}
