/* Consent screens – shared theme tokens; tablet and mobile resilient. */
.consent-card{width:100%;max-width:none}.consent-terms{background:var(--accent2);padding:1rem;margin:1rem 0;border:1px solid var(--line);border-radius:10px}.consent-pad{width:100%;height:auto;aspect-ratio:850/240;border:2px solid var(--line);border-radius:8px;background:#fff;touch-action:none;display:block;margin:.6rem 0}.consent-ack{display:flex;flex-direction:row;align-items:center;gap:.55rem;margin:1rem 0}.consent-ack input{width:17px;height:17px;flex:none;accent-color:var(--accent);margin:0}.consent-saved-signature{width:min(100%,500px);border:1px solid var(--line);border-radius:8px;background:#fff}.consent-status-link{white-space:nowrap;font-weight:700}.consent-signed{color:var(--ok)!important}.consent-pending{color:var(--danger)!important}.consent-partial{color:var(--warn)!important}.consent-cancel-action{background:var(--panel);color:var(--muted);border-color:var(--line)}#consent-submit:disabled{opacity:.48;cursor:not-allowed;filter:grayscale(.35)}.consent-invoice-line{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid var(--line)}.consent-invoice-line:last-child{border-bottom:0}.consent-invoice-service{flex:1 1 220px;min-width:0;overflow-wrap:anywhere}.consent-invoice-action{flex:0 1 auto;max-width:100%;white-space:normal;text-align:center}.consent-capture-pending{color:var(--danger);border-color:var(--danger);background:var(--panel)}.service-consent-label{display:inline-flex;flex-direction:row;align-items:center;gap:7px;border:1px solid var(--line);border-radius:9px;padding:8px 9px;font-size:12px;font-weight:650;cursor:pointer;width:max-content;max-width:100%;background:var(--panel)}.service-consent-label input{width:16px;height:16px;flex:none;margin:0;accent-color:var(--accent)}.service-consent-label:has(input:checked){border-color:var(--accent);background:var(--accent2);color:var(--accent)}.service-unit{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.service-consent-form{margin-left:auto}.service-meta-row:has(.service-consent-form){flex-wrap:wrap;gap:10px}@media(max-width:620px){.consent-invoice-line{align-items:stretch;flex-direction:column}.consent-invoice-action{width:100%}.consent-pad{min-height:140px}.service-consent-form{margin-left:0}}

@media(max-width:620px) and (orientation:portrait){.consent-pad{height:230px;min-height:230px;aspect-ratio:auto}}
.invoice-visit-consent .consent-invoice-line{align-items:center} @media(max-width:620px){.invoice-visit-consent .consent-invoice-line{align-items:stretch}}

/* Signature form primary action follows the full-width mobile and tablet form layout. */
#consent-sign-form #consent-submit{display:block;width:100%;max-width:100%;box-sizing:border-box;text-align:center}

/* Signed-consent action keeps its semantic green label and branded outline. */
.consent-invoice-action.consent-signed { border-color: var(--accent); background-color: var(--panel, #fff); }
.consent-invoice-action.consent-signed:hover { border-color: var(--accent); background-color: var(--accent2); }

/* Security phase 1: pending signatures now begin with an explicitly authorized POST. */
.consent-start-inline{display:inline-flex;align-items:center;margin:0;max-width:100%}
.consent-start-inline button{cursor:pointer}
.consent-start-link{font:inherit;appearance:none;border:0;background:none;padding:0;text-decoration:underline;text-underline-offset:2px}
@media(max-width:620px){.invoice-visit-consent .consent-start-inline,.invoice-visit-consent .consent-start-inline .consent-invoice-action{width:100%}}
