:root {
  --psm-content-max: 1400px;
  --psm-text: #1a1a1a;
  --psm-muted: #5c5c5c;
  --psm-accent: #1a5fb4;
  --psm-accent-hover: #164a8f;
  --psm-line: #e2e2e2;
  --psm-bg: #f6f7f9;
  --psm-ok: #0a7a0a;
  --psm-warn: #9a6700;
  --psm-err: #b00020;
  --psm-radius: 10px;
}
* { box-sizing: border-box; }
body.psm {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--psm-text);
  line-height: 1.55;
  background: #fff;
}
.psm-wrap { max-width: var(--psm-content-max); margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.psm-wrap--wide { max-width: var(--psm-content-max); }
.psm h1 { font-size: 1.6rem; font-weight: 600; margin: 0 0 1rem; letter-spacing: -0.02em; }
.psm h2 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 0.75rem; }
.psm h3.psm-subhead { font-size: 0.95rem; font-weight: 600; margin: 1.25rem 0 0.5rem; color: var(--psm-muted); }
.psm h3.psm-subhead:first-of-type { margin-top: 0; }
.app-nav,
.psm-nav {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--psm-line);
}
.app-nav a,
.psm-nav a {
  margin-right: 1rem;
  color: var(--psm-accent);
  text-decoration: none;
  font-size: 0.95rem;
}
.app-nav a:hover,
.psm-nav a:hover { text-decoration: underline; }
.psm-card {
  background: var(--psm-bg);
  border: 1px solid var(--psm-line);
  border-radius: var(--psm-radius);
  padding: 1.1rem 1rem;
  margin-bottom: 1rem;
}
.psm-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.psm-table th, .psm-table td { border: 1px solid var(--psm-line); padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; }
.psm-table th { background: var(--psm-bg); }
.psm-btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  background: var(--psm-accent);
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
}
.psm-btn:hover { background: var(--psm-accent-hover); }
.psm-btn--secondary { background: #fff; color: var(--psm-accent) !important; border: 1px solid var(--psm-line); }
.psm-btn--small { font-size: 0.85rem; padding: 0.35rem 0.75rem; }
.psm-field { margin-bottom: 1rem; }
.psm-field label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.9rem; }
.psm-field input, .psm-field select, .psm-field textarea {
  width: 100%; max-width: 28rem; padding: 0.5rem 0.6rem;
  border: 1px solid #bbb; border-radius: 6px; font: inherit;
}
.psm-ok { color: var(--psm-ok); }
.psm-err { color: var(--psm-err); }
.psm-muted { color: var(--psm-muted); font-size: 0.9rem; }
.psm-pill {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; background: #e8eef5; color: #1a3d6b;
}
.psm-pill--warn { background: #fff4e0; color: var(--psm-warn); }
.psm-pill--ok { background: #e6f4e6; color: var(--psm-ok); }
.psm-empty { text-align: center; padding: 2rem 1rem; color: var(--psm-muted); }
.psm-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.psm-split {
  display: grid;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}
.psm-split--70-30 { grid-template-columns: 7fr 3fr; }
.psm-split__main { display: flex; flex-direction: column; gap: 1rem; }
.psm-split .psm-card { margin-bottom: 0; }
.psm-split .psm-card h2 { margin-top: 0; }
.psm-split__side .psm-field input,
.psm-split__side .psm-field select,
.psm-split__side .psm-field textarea { max-width: none; }
.psm-step-list { margin: 0; padding-left: 1.25rem; }
.psm-step-list__item { margin-bottom: 0.75rem; }
.psm-step-list__remove { display: inline; margin-top: 0.35rem; }
@media (max-width: 900px) {
  .psm-split--70-30 { grid-template-columns: 1fr; }
}
/* Client portal */
.psm-portal { max-width: 28rem; margin: 0 auto; padding: 1.25rem 1rem 2.5rem; }
.psm-portal .psm-progress { height: 8px; background: var(--psm-line); border-radius: 4px; overflow: hidden; margin: 1rem 0; }
.psm-portal .psm-progress-bar { height: 100%; background: var(--psm-accent); }
.psm-portal .psm-btn { width: 100%; text-align: center; padding: 0.85rem 1rem; font-size: 1.05rem; }
.psm-sig-canvas { border: 1px solid #999; border-radius: 8px; touch-action: none; width: 100%; max-width: 400px; height: 140px; background: #fff; }
