@charset "UTF-8";
/* The pages a company's CLIENTS see — the quote they approve (public/quote-approval.php) and the
   request form on the company's website (public/request.php). Loaded after app.css by those two
   pages only, and every rule here is under .cp so nothing leaks into the staff app.

   These pages belong to the company, not to Workforce: they open with the company's own logo,
   name and contact details (render_client_company_header(), lib/document_pdf.php), and the thin
   stripe across the top of that header is the accent colour the company chose for its quotes and
   invoices (--cp-brand, set inline from Settings → Branding & documents). Everything else follows
   the app's own warm dark palette, so the page reads as one finished thing on a laptop or a phone.

   Numbers line up the house way: right-aligned, tabular figures, the amounts in a column of their
   own. */

.cp {
  background: var(--color-bg-page);
}

.cp-page {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(1rem, 0.6rem + 2vw, 2.25rem) 16px 3rem;
}

/* ---------- The company's header ---------- */
.cp-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.35rem 1.5rem 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.cp-brand::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--cp-brand, var(--color-accent));
}
/* Logos are drawn for paper — dark ink on a transparent or white ground — and vanish against a dark
   page. A soft cream tile gives every logo the ground it was designed on. */
.cp-brand__mark {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4rem;
  max-width: 13rem;
  padding: 0.55rem 0.75rem;
  background: #f7f3e8;
  border-radius: var(--radius-md);
}
.cp-brand__mark img {
  display: block;
  max-width: 100%;
  max-height: 3.25rem;
  width: auto;
  height: auto;
  object-fit: contain;
}
.cp-brand__text { min-width: 0; }
.cp-brand__name {
  margin: 0;
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-ink);
  overflow-wrap: anywhere;
}
.cp-brand__tagline {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}
.cp-brand__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.5rem;
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}
.cp-brand__contact li { display: inline-flex; align-items: baseline; gap: 0.5rem; min-width: 0; }
.cp-brand__contact li + li::before {
  content: "\00b7";
  color: var(--color-muted);
}
.cp-brand__contact a {
  color: var(--color-body);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.cp-brand__contact a:hover,
.cp-brand__contact a:focus-visible { color: var(--color-accent); text-decoration: underline; }
.cp-brand__address {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ---------- The document ---------- */
/* One inner edge for both cards, so the approval card's text sits on the same line as the quote's. */
.cp-doc,
.cp-approve { padding: clamp(1.1rem, 0.8rem + 1.4vw, 1.75rem); }
.cp-doc__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.cp-doc__title {
  margin: 0;
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  line-height: 1.25;
  color: var(--color-ink);
  overflow-wrap: anywhere;
}
.cp-doc__number {
  flex: none;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-body);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Prepared for / property / date / valid until: label above value, as many to a row as fit. */
.cp-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 1rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid var(--color-border);
}
.cp-facts div { min-width: 0; }
.cp-facts dt {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.cp-facts dd {
  margin: 0;
  color: var(--color-ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.cp-doc__tools { margin: 1rem 0 0.25rem; }

.cp-items { margin-top: 1rem; }
.cp-items td { vertical-align: top; }
/* The table's outer edges sit on the card's own edges, so the item names line up under the facts
   above and the Amount column's figures line up with the totals below. */
.cp-items th:first-child, .cp-items td:first-child { padding-left: 0; }
.cp-items th:last-child, .cp-items td:last-child { padding-right: 0; }
.cp-items__name { color: var(--color-ink); font-weight: 600; }
.cp-items__desc { display: block; margin-top: 0.15rem; color: var(--color-muted); font-size: 0.85rem; }
/* On a phone the quantity and unit price fold into one line under the item, so the amount keeps a
   column of its own and nothing scrolls sideways. */
.cp-items__calc { display: none; margin-top: 0.2rem; color: var(--color-muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }

.cp-totals {
  width: 100%;
  max-width: 20rem;
  margin: 1rem 0 0 auto;
  font-size: 0.95rem;
}
.cp-totals__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 0.2rem 0;
}
.cp-totals__row span:first-child { color: var(--color-muted); }
.cp-totals__row span:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--color-ink); }
.cp-totals__row--total {
  margin-top: 0.3rem;
  padding-top: 0.5rem;
  border-top: 2px solid var(--color-border-strong);
  font-size: 1.15rem;
  font-weight: 800;
}
.cp-totals__row--total span:first-child { color: var(--color-ink); }

.cp-message {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-body);
}

/* ---------- Before you approve: valid until, the deposit, the terms ---------- */
.cp-section-title { margin: 0 0 0.35rem; font-size: 1.1rem; color: var(--color-ink); }
.cp-lead { margin: 0 0 1rem; color: var(--color-muted); }
.cp-conditions { display: grid; gap: 0.75rem; margin: 0 0 1.25rem; }
.cp-conditions--last { margin-bottom: 0; }
.cp-valid {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  margin: 0;
  color: var(--color-body);
}
.cp-valid strong { color: var(--color-ink); font-variant-numeric: tabular-nums; }
.cp-valid--past strong { color: var(--color-error); }
.cp-deposit {
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(244, 222, 85, 0.35);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  background: var(--color-accent-pale);
  color: var(--color-ink);
  font-weight: 600;
}
.cp-terms {
  margin: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface-raised);
}
.cp-terms__title {
  margin: 0;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.cp-terms__body {
  max-height: 20rem;
  overflow-y: auto;
  padding: 0.85rem 1rem 1rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--color-body);
  overflow-wrap: anywhere;
}
.cp-approve__button { font-size: 1.05rem; padding: 0.75rem 2.25rem; }

/* ---------- Sign and approve (v0.9.70) ---------- */
/* The pad, the typed signature and the signed record are PAPER — a cream ground with dark ink — the
   way a signature is made and the way the PDF prints it; on this dark page that reads as the one thing
   to write on. Every part sits on the card's own left edge, under the Full name box. */
.cp-sign { margin: 0; }
.cp-sign__field { margin-bottom: 1rem; }
/* app.css's .field-error is display:block, which beats [hidden]: the pad's script hides the server's
   complaint once it is dealt with, and its own when there is none. */
.cp-sign__field .field-error[hidden] { display: none; }
.cp-sign__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-body);
}
/* forced-color-adjust: the ink is dark pixels on a transparent canvas, and the server counts DARK
   pixels, so it cannot turn light — the paper keeps its cream in High Contrast instead of turning black
   under it. user-select and -webkit-touch-callout stop an iPhone's long press on the pad selecting
   text or opening its callout in the middle of a stroke. */
.cp-sign__pad {
  position: relative;
  height: 11rem;
  background: #fbf9f2;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  forced-color-adjust: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* "Sign here": a line two-thirds of the way down, with the cross and the words above its left end. */
.cp-sign__pad::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 2.4rem;
  border-top: 1.5px solid #c9c3b2;
  pointer-events: none;
}
.cp-sign__here {
  position: absolute;
  left: 1rem;
  bottom: 2.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #6f6a5c;
  pointer-events: none;
  transition: opacity 0.2s;
}
.cp-sign__here::before { content: "\00d7\00a0"; font-size: 1rem; }
.cp-sign__pad.is-signed .cp-sign__here { opacity: 0; }
/* touch-action:none keeps a finger drawing on the pad from scrolling the page instead. */
.cp-sign__canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
/* The keyboard's ring in the ink's own colour, just inside the paper: yellow on cream barely showed. */
.cp-sign__canvas:focus-visible { outline: 2px solid #1d2433; outline-offset: -4px; }
.cp-sign__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 0.45rem;
}
.cp-sign__hint { display: block; font-size: 0.82rem; color: var(--color-muted); }
.cp-sign__typed {
  padding: 1rem 1rem 0.85rem;
  background: #fbf9f2;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  forced-color-adjust: none;
}
.cp-sign__typed .cp-sign__hint { color: #6f6a5c; margin-top: 0.4rem; }
/* The typed name in a signature's hand: the system's script faces, italic, dark ink on paper. */
.cp-sign__script {
  margin: 0;
  min-height: 2.6rem;
  padding-bottom: 0.2rem;
  border-bottom: 1.5px solid #c9c3b2;
  font-family: "Segoe Script", "Brush Script MT", "Snell Roundhand", "Apple Chancery", "URW Chancery L", cursive;
  font-style: italic;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
  line-height: 1.25;
  color: #1d2433;
  overflow-wrap: anywhere;
}
.cp-sign__script:empty::before {
  content: attr(data-placeholder);
  font-family: inherit;
  font-size: 1rem;
  font-style: normal;
  color: #6f6a5c;
}
.cp-sign__switch {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}
.cp-sign__switch:hover, .cp-sign__switch:focus-visible { color: var(--color-accent-deep); }
.cp-sign__switch[hidden] { display: none; }
/* The agreement: the box on the first line of the sentence, the sentence wrapping beside it — not
   under it. Doubled class so it beats app.css's ".form-row label { display: block }". */
.cp-consent.cp-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-body);
  cursor: pointer;
}
.form-row .cp-consent input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.15rem 0 0;
  accent-color: var(--color-accent);
}
.form-row label.cp-consent { margin: 0; font-size: 0.92rem; font-weight: 400; color: var(--color-body); }
/* The one box every signer must tick: the app's soft focus ring (app.css, .form-row input:focus) is
   about 1.8:1 on this dark card, so a keyboard user gets a solid outline instead. */
.form-row .cp-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  box-shadow: none;
}

/* Signed: who and when, then the signature on its paper. */
.cp-signed { padding: clamp(1.1rem, 0.8rem + 1.4vw, 1.75rem); }
/* A name typed with no spaces (an email address, a long hyphenated one) wraps instead of pushing the
   page sideways on a phone. */
.cp-signed .cp-section-title { overflow-wrap: anywhere; }
/* The signed line is a <p> (it comes before the page's h1), drawn as the h2 titles are. */
p.cp-section-title { font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.cp-signed__mark {
  display: inline-block;
  max-width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: #fbf9f2;
  border-radius: var(--radius-md);
  forced-color-adjust: none;
}
.cp-signed__image {
  display: block;
  max-width: 100%;
  max-height: 6rem;
  width: auto;
  height: auto;
}
.cp-signed__note { margin: 0.6rem 0 0; font-size: 0.85rem; color: var(--color-muted); }

.cp-changes {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}
.cp-changes h2 { margin: 0 0 0.6rem; font-size: 1rem; color: var(--color-ink); }
/* Decline (WP B4): an answer, said in the error tone, never the page's one yellow button. */
.cp-decline__button { color: var(--color-error); }

/* ---------- The foot of the page ---------- */
.cp-foot {
  margin: 2rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--color-muted);
}
.cp-foot a { color: inherit; }

/* ---------- The request form ---------- */
.cp-intro { margin: 0 0 1rem; color: var(--color-body); }
.cp-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem);
  line-height: 1.2;
  color: var(--color-ink);
}
.cp-form-note { margin: 0.75rem 0 0; color: var(--color-muted); font-size: 0.82rem; }
/* Side-by-side fields that fold to one column on a phone keep the same space between them as the
   fields that were always stacked. */
.cp .field-row { row-gap: 1rem; }

/* ---------- A phone ---------- */
@media (max-width: 559.98px) {
  .cp-brand { flex-direction: column; align-items: flex-start; padding: 1.2rem 1.1rem 1.1rem; }
  .cp-brand__mark { max-width: 100%; }
  /* Two facts to a row with a long date ("November 12, 2026") on one line, not broken over two. */
  .cp-facts { column-gap: 0.75rem; }
  .cp-facts dd { font-size: 0.95rem; }
  /* One contact detail to a line: a wrapped row would start its second line with a stray dot. */
  .cp-brand__contact { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
  .cp-brand__contact li + li::before { content: none; }
  .cp-items .cp-col-sm-hide { display: none; }
  /* Two columns on a phone always fit, so the table stays a full-width table — app.css turns every
     table into a shrink-to-fit scroll box here, which left the amounts short of the totals' edge. */
  .cp-items { display: table; width: 100%; }
  .cp-items__calc { display: block; }
  .cp-totals { max-width: none; }
  .cp-approve__button { width: 100%; white-space: normal; }
  .cp .actions-row .btn { flex: 1 1 100%; }
  .cp-sign__pad { height: 9.5rem; }
}

/* The quote's photos the office chose to show (WP B5, 2026-11-03): equal tiles, each caption under its
   picture, two to a row on a phone. */
.cp-photos__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 1rem; }
.cp-photos__item { display: grid; gap: 0.4rem; align-content: start; min-width: 0; }
.cp-photos__link { display: block; }
.cp-photos__img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-md, 8px); border: 1px solid var(--color-border); }
.cp-photos__caption { margin: 0; font-size: 0.9rem; color: var(--color-body); overflow-wrap: anywhere; }
@media (max-width: 559.98px) {
  .cp-photos__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
}
