/* Catalyst Client Portal — front-end */
@font-face {
  font-family: "CCP Signature";
  src: url("../fonts/signature.ttf") format("truetype");
  font-display: swap;
}

.ccp-dashboard, .ccp-document-view { font-family: var(--awb-typography4-font-family, inherit); color: #101a2b; }
.ccp-dashboard h2, .ccp-document-view h2, .ccp-document-view h3 { font-family: var(--awb-typography1-font-family, inherit); }

/* ---- shell: every portal screen (dashboard, ticket, document, login) sits
 *  inside this so the plugin's own markup reads as one deliberate app
 *  rather than loose fragments dropped into the page. Left-aligned (not
 *  centered) at a real working width — this is a dashboard, not a poster —
 *  but never so narrow that it strands in a sea of empty page. ---- */
.ccp-shell { max-width: 900px; margin: 0; }

/* ---- incident banner (Session S9/T3) — a page-width strip above
 *  everything else, on by a staff toggle in Settings -> Tickets, for a
 *  known outage or ongoing issue. Three severities, not just an
 *  on/off, so "we're aware of a brief delay" doesn't read as loudly as
 *  "email is down". ---- */
.ccp-incident-banner { max-width: 1180px; margin: 0 0 16px; padding: 12px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.ccp-incident-info { background: #e3edf7; color: #215d8f; border: 1px solid #c3d8ec; }
.ccp-incident-warning { background: #fbeee0; color: #a94f21; border: 1px solid #f0d4b8; }
.ccp-incident-critical { background: #f9e2e1; color: #a02622; border: 1px solid #f0c0be; }

/* Emergency-route notice reuses the critical incident palette but sits inline
 * in the new-ticket form (dashboard.php), so it needs its own spacing rather
 * than the page-width banner's margin. */
/* Same bold alert-red treatment as the sidebar box (owner: the original light-pink version
 * "doesn't stand out enough"). The #id selector outranks .ccp-incident-critical's class rule
 * regardless of source order, so this doesn't touch the general incident-banner severities. */
#ccp-emergency-notice { margin: -6px 0 14px; padding: 12px 14px; border-radius: 8px; font-size: 14px; font-weight: 700; line-height: 1.4; background: #b91c1c; color: #fff; border: none; }
#ccp-emergency-notice a { color: #fff !important; text-decoration: underline !important; font-weight: 800; }

/* "My tickets" search/status filter bar (Portal proposal Group F). */
.ccp-ticket-filters { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 0 0 16px; }
.ccp-ticket-filters label { font-size: 12.5px; color: #5b6b7a; display: flex; flex-direction: column; gap: 4px; }
.ccp-ticket-filters__q { flex: 1 1 220px; }
.ccp-ticket-filters input[type="text"], .ccp-ticket-filters select { padding: 8px 10px; border: 1px solid #c9d0cf; border-radius: 6px; font-size: 13.5px; }
.ccp-ticket-filters .ccp-btn { padding: 8px 16px; font-size: 13px; }

/* Service catalogue (Session S9/T3) — a pending colleague's request awaiting this viewer's approval. */
.ccp-approval-row { border: 1px solid #eef1f0; border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.ccp-approval-row p { margin: 0 0 8px; }
.ccp-approval-row form { display: inline-block; margin-right: 8px; }

/* ---- persistent contact sidebar, wrapped around every authenticated
 *  portal view (dashboard/ticket/document) in class-shortcode.php's
 *  render() — so a client always has a real person to reach, one click
 *  away, without hunting for it. ---- */
.ccp-withsidebar { display: flex; gap: 24px; max-width: 1180px; margin: 0; align-items: stretch; }
.ccp-withsidebar-main { flex: 1 1 auto; min-width: 0; }
/* .ccp-sidebar stretches to the main column's full height (align-items:
 * stretch above) purely so its sticky child has room to travel — the card
 * itself stays its natural compact height and never shows empty padding.
 * Sticky lives on the CARD, not this wrapper, so it sticks at top:20 and
 * comes to rest exactly flush with the bottom of whatever height the main
 * column ends up being, instead of detaching early against a container
 * that was only ever as tall as the card's own content. */
/* E-198b (owner 2026-10-25): the "Need anything?" card a step up — wider, larger text, a bigger initial */
.ccp-sidebar { flex: 0 0 280px; }
.ccp-sidebar-card { background: #101a2b; color: #d3dbe6; border-radius: 14px; padding: 26px 24px; position: sticky; top: calc(var(--ccp-pinned, 0px) + 20px); max-height: calc(100vh - var(--ccp-pinned, 0px) - 40px); overflow: auto; }
/* --ccp-pinned = the height of whatever is pinned to the top of the window (admin bar, the theme's sticky header, the Client
 * Area bar), measured by portal.js on scroll — the card used to slide under it (owner 2026-10-25, E-198b) */
div.ccp-sidebar-mark { width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg,#c4622b,#8f3f18); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 20px; margin-bottom: 14px; }
/* E-198: the business's logo keeps its own shape at the width chosen in Company Info (set inline by crmng_brand_mark) — no 32 px white square */
img.ccp-sidebar-mark { margin: 0 0 16px; }
.ccp-sidebar-card h3 { margin: 0 0 6px; font-size: 19px; color: #fff !important; font-family: var(--awb-typography1-font-family, inherit) !important; }
.ccp-sidebar-sub { margin: 0 0 16px; font-size: 14px; color: #8593a6; }
.ccp-sidebar-name { margin: 0 0 8px; font-weight: 600; color: #fff; font-size: 15.5px; }
.ccp-sidebar-link { display: block; margin: 0 0 8px; font-size: 15.5px; color: #e0a774 !important; text-decoration: none !important; }
.ccp-sidebar-link:hover { text-decoration: underline !important; }
.ccp-sidebar-note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid #223354; font-size: 13px; color: #6b7890; }
/* Owner (2026-09-30): the original dark-maroon-on-navy treatment "doesn't stand out enough to be
 * an emergency banner." Switched to a solid alert red — deliberately far from the site's orange
 * brand color so it can never be mistaken for a normal CTA. */
.ccp-sidebar-emergency { margin: 14px 0 0; padding: 12px 14px; background: #b91c1c; border-radius: 8px; }
.ccp-sidebar-emergency-label { margin: 0 0 4px; font-size: 12px; color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.ccp-sidebar-emergency-link.ccp-sidebar-link { color: #fff !important; font-weight: 800; font-size: 15px; margin: 0; }
.ccp-sidebar-emergency-link.ccp-sidebar-link:hover { text-decoration: underline !important; }

@media (max-width: 760px) {
  .ccp-withsidebar { flex-direction: column; }
  .ccp-sidebar { flex: 0 0 auto; width: 100%; }
  .ccp-sidebar-card { position: static; }
}
.ccp-portal-head { margin: 0 0 28px; }
.ccp-portal-head h1 { margin: 0 0 8px; font-size: 30px; line-height: 1.15; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ccp-portal-sub { margin: 0; font-size: 15px; color: #5b6b7a; max-width: 56ch; }

/* Expected-response line (Portal proposal Group F) — mirrors the admin side's cgcrm-pill
 * state colors so "on track/due soon/overdue" reads the same to staff and clients. */
.ccp-sla-line { margin: 10px 0 0; font-size: 13.5px; color: #5b6b7a; display: flex; align-items: center; gap: 8px; }
.ccp-sla-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.ccp-sla-pill.is-green  { background: #e3f1ea; color: #2c6b50; }
.ccp-sla-pill.is-orange { background: #f8e9e0; color: #a94f21; }
.ccp-sla-pill.is-red    { background: #f9e2e1; color: #a02622; }
.ccp-sla-pill.is-faint  { background: transparent; color: #9aa0a6; border: 1px dashed #c3c4c7; }

/* Client-facing status timeline (Portal proposal Group F). */
.ccp-timeline { list-style: none; margin: 0; padding: 0; }
.ccp-timeline li { display: flex; gap: 12px; padding: 0 0 16px; position: relative; }
.ccp-timeline li:not(:last-child)::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: 0; width: 1px; background: #e1e6e4; }
.ccp-timeline-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: #c4622b; margin-top: 4px; }
.ccp-timeline-body { font-size: 13.5px; color: #101a2b; }
.ccp-timeline-when { display: block; font-size: 11.5px; color: #8593a6; margin-top: 2px; }

.ccp-summary-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 28px; }
.ccp-summary-stat { flex: 1 1 140px; background: #fff; border: 1px solid #dce1e0; border-radius: 10px; padding: 14px 16px; }
.ccp-summary-stat b { display: block; font-size: 24px; font-weight: 700; line-height: 1.2; }
.ccp-summary-stat span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #5b6b7a; }

.ccp-card { background: #fff; border: 1px solid #dce1e0; border-radius: 12px; padding: 24px 26px 26px; margin: 0 0 20px; }
.ccp-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 4px; }
.ccp-card-head h2 { margin: 0; font-size: 18px; font-weight: 700; font-family: var(--awb-typography4-font-family, inherit) !important; }
.ccp-card-empty { color: #5b6b7a; font-size: 14px; padding: 6px 0 2px; }

/* ---- dashboard table ---- */
.ccp-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.ccp-table th, .ccp-table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid #eef1f0; font-size: 14px; }
.ccp-table th { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #5b6b7a; padding-top: 0; }
.ccp-table tr:last-child td { border-bottom: none; }
.ccp-table td .ccp-btn { padding: 8px 16px; font-size: 13px; }

/* ---- contact-info card on the dashboard ---- */
.ccp-kv { width: 100%; border-collapse: collapse; }
.ccp-kv td { padding: 7px 2px; border-bottom: 1px solid #eef1f0; font-size: 14px; text-align: left; vertical-align: top; }
.ccp-kv tr:last-child td { border-bottom: 0; }
.ccp-kv td:first-child { font-weight: 600; width: 110px; color: #5b6b7a; }
.ccp-muted { color: #9aa0a6; }

/* ---- staff-only preview section: same card, a quiet blue accent so it
 *  reads as "this bit is for us", not part of the client-facing content. ---- */
.ccp-admin-metrics { border-color: #2e6fb0; border-width: 1px 1px 1px 4px; }

/* ---- "Updates from your team" — notes a staff member marked visible to
 *  this client, on their Client record's Notes card. ---- */
.ccp-updates { list-style: none; margin: 0; padding: 0; }
.ccp-updates li { padding: 12px 0; border-bottom: 1px solid #eef1f0; }
.ccp-updates li:last-child { border-bottom: 0; }
.ccp-update-body { margin: 0 0 4px; font-size: 14px; line-height: 1.5; }
.ccp-update-date { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #9aa0a6; }

.ccp-status { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.ccp-status-pending { background: rgba(196,98,43,.14); color: #a94f21; }
.ccp-status-signed { background: rgba(63,143,109,.16); color: #2c6b50; }
.ccp-status-open, .ccp-status-in-progress { background: rgba(196,98,43,.14); color: #a94f21; }
.ccp-status-waiting-on-client, .ccp-status-waiting-on-vendor { background: rgba(37,99,196,.14); color: #1d4fa9; }
.ccp-status-resolved, .ccp-status-closed { background: rgba(63,143,109,.16); color: #2c6b50; }

/* ---- support tickets ---- */
/* Owner (2026-09-30): the entry point was too easy to miss (a small "+" and 14px text), but a
 * solid-fill orange button (the site's normal CTA treatment) read as too loud/salesy for
 * something a client opens routinely. This lands in between: an outlined, tinted card, sized
 * like a real button, but never confusable with .ccp-btn's filled style. */
.ccp-new-ticket { margin-top: 20px; border-top: 1px solid #eef1f0; padding-top: 18px; }
.ccp-new-ticket summary {
  cursor: pointer; font-weight: 700; color: #101a2b; font-size: 16px; list-style: none;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; border: 2px solid #c4622b; border-radius: 10px; background: #fff8f2;
  transition: background .15s ease, border-color .15s ease;
}
.ccp-new-ticket summary:hover { background: #fbeee0; }
.ccp-new-ticket summary::-webkit-details-marker { display: none; }
.ccp-new-ticket summary::before { content: "+"; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 999px; background: #c4622b; color: #fff; font-size: 16px; line-height: 1; flex: none; }
.ccp-new-ticket[open] summary { border-color: #c9d0cf; background: #fff; }
.ccp-new-ticket[open] summary::before { content: "–"; }
.ccp-new-ticket form { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.ccp-new-ticket label, .ccp-ticket-reply label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13px; color: #46556a; }
.ccp-new-ticket input[type="text"], .ccp-new-ticket select, .ccp-new-ticket textarea, .ccp-ticket-reply textarea {
  font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid #c9d0cf; border-radius: 6px; background: #fbfcfc; color: #101a2b;
}
.ccp-new-ticket input:focus, .ccp-new-ticket select:focus, .ccp-new-ticket textarea:focus, .ccp-ticket-reply textarea:focus {
  outline: 2px solid #c4622b; outline-offset: 1px; border-color: #c4622b; background: #fff;
}
.ccp-new-ticket input[type="file"] { font-size: 13px; }
.ccp-new-ticket button, .ccp-ticket-reply button { align-self: flex-start; }

/* KB deflection while typing (Session S9/T3) — sits right under the Subject field. */
.ccp-kb-suggestions { margin-top: -6px; border: 1px solid #e2c4a8; background: #fff8f2; border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ccp-kb-suggestions__label { font-size: 12px; font-weight: 700; color: #a94f21; text-transform: uppercase; letter-spacing: .03em; }
.ccp-kb-suggestions a { display: block; font-size: 13px; font-weight: 600; color: #101a2b; text-decoration: none; }
.ccp-kb-suggestions a:hover { color: #c4622b; }
.ccp-kb-suggestions__snippet { display: block; font-size: 12px; font-weight: 400; color: #5b6b7a; margin-top: 1px; }

.ccp-ticket h2 { display: flex; align-items: center; gap: 10px; }
.ccp-ticket-meta-row { color: #5b6b7a; font-size: 13px; margin: -4px 0 18px; }
.ccp-ticket-thread { margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.ccp-ticket-msg { background: #f4f6f5; border-radius: 8px; padding: 14px 16px; }
.ccp-ticket-msg.is-staff { background: rgba(37,99,196,.07); }
.ccp-ticket-meta { margin: 8px 0 0; font-size: 12px; color: #5b6b7a; }
.cgt-attachments { margin: 8px 0 0; }
.cgt-attachment { display: inline-block; margin: 2px 8px 2px 0; font-size: 12px; color: #1d4fa9; text-decoration: none; }
.cgt-attachment:hover { text-decoration: underline; }
.ccp-ticket-reply { display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #eef1f0; }

/* ---- buttons ---- */
.ccp-btn {
  display: inline-block; font-family: var(--awb-typography2-font-family, inherit); font-weight: 600;
  font-size: 14px; line-height: 1.2; padding: 11px 22px; border: 1px solid #c4622b;
  background: #c4622b; color: #fff !important; text-decoration: none !important; border-radius: 6px; cursor: pointer;
}
.ccp-btn:hover { background: #a94f21; border-color: #a94f21; }
.ccp-btn:disabled { background: #d9c3b6; border-color: #d9c3b6; cursor: not-allowed; }
.ccp-btn-secondary { background: #fff; color: #101a2b !important; border-color: #c9d0cf; }
.ccp-btn-secondary:hover { background: #f4f6f5; border-color: #101a2b; }

.ccp-document-view > p a, .ccp-dashboard a:not(.ccp-btn) { color: #c4622b; }

.ccp-pdf-frame { width: 100%; height: 68vh; min-height: 460px; border: 1px solid #dce1e0; border-radius: 8px; margin: 14px 0 20px; }

.ccp-signed-notice { padding: 14px 16px; background: rgba(63,143,109,.12); color: #2c6b50; border-radius: 8px; font-size: 14px; }

/* ---- sign panel ---- */
.ccp-sign-panel {
  border: 1px solid #dce1e0; border-radius: 12px; background: #fff;
  padding: 22px 22px 20px; max-width: 640px;
}
.ccp-sign-panel h3 { margin: 0 0 14px; font-size: 18px; }

.ccp-sign-tabs { display: inline-flex; background: #eceeed; border-radius: 8px; padding: 3px; margin-bottom: 16px; }
.ccp-sign-tab {
  border: 0; background: none; cursor: pointer; font-family: var(--awb-typography2-font-family, inherit);
  font-weight: 600; font-size: 13px; color: #5b6b7a; padding: 8px 16px; border-radius: 6px;
}
.ccp-sign-tab.is-active { background: #fff; color: #101a2b; box-shadow: 0 1px 3px rgba(16,26,43,.12); }

.ccp-sign-body label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
#ccp-typed-name {
  width: 100%; max-width: 380px; font-size: 16px; padding: 11px 14px;
  border: 1px solid #c9d0cf; border-radius: 8px; color: #101a2b; background: #f4f6f5;
}
#ccp-typed-name:focus { outline: 2px solid #c4622b; outline-offset: 1px; border-color: #c4622b; }
.ccp-typed-preview {
  margin-top: 12px; min-height: 78px; display: flex; align-items: center;
  padding: 6px 18px; border: 1px solid #dce1e0; border-bottom: 2px solid #101a2b;
  border-radius: 8px 8px 0 0; background: #fff;
  font-family: "CCP Signature", "Segoe Script", "Bradley Hand", cursive;
  font-size: 40px; line-height: 1; color: #101a2b; overflow: hidden; white-space: nowrap;
}
.ccp-typed-preview:empty::after { content: "Your signature"; color: #b8c0bf; font-size: 34px; }
.ccp-sign-hint { font-size: 12px; color: #5b6b7a; margin: 8px 0 0; }

#ccp-signature-pad { border: 1px solid #c9d0cf; border-radius: 8px; touch-action: none; background: #fff; max-width: 100%; }

.ccp-sign-extra { margin-top: 16px; padding-top: 14px; border-top: 1px solid #eceeed; }
#ccp-initials {
  width: 140px; font-size: 16px; padding: 10px 12px; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid #c9d0cf; border-radius: 8px; color: #101a2b; background: #f4f6f5;
}
#ccp-initials:focus { outline: 2px solid #c4622b; outline-offset: 1px; border-color: #c4622b; }

.ccp-agree { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0; font-size: 13.5px; color: #46556a; line-height: 1.45; }
.ccp-agree input { margin-top: 2px; width: 16px; height: 16px; accent-color: #c4622b; flex: none; }

#ccp-sign-status { font-size: 13px; color: #5b6b7a; margin: 6px 0 0; }

/* ---- portal login ---- */
.ccp-login-shell { max-width: 940px; margin: 0; min-height: 60vh; display: flex; align-items: center; }
.ccp-login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; width: 100%; border: 1px solid #dce1e0; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 12px 32px rgba(16,26,43,.06); }
@media (max-width: 780px) { .ccp-login-grid { grid-template-columns: 1fr; } }
.ccp-login-pitch { background: #101a2b; color: #fff; padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; }
.ccp-login-pitch div.ccp-mark { width: 44px; height: 44px; border-radius: 10px; background: #c4622b; color: #fff !important; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; margin-bottom: 22px; }
.ccp-login-pitch img.ccp-mark { margin: 0 0 22px; }
.ccp-login-pitch h2 { color: #fff !important; margin: 0 0 12px; font-size: 24px; line-height: 1.25; font-family: var(--awb-typography4-font-family, inherit) !important; }
.ccp-login-pitch p { color: #b7c0cf !important; font-size: 14.5px; line-height: 1.6; margin: 0 0 22px; }
.ccp-login-pitch ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ccp-login-pitch li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #dfe4ea !important; }
.ccp-login-pitch li::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: #c4622b; flex: none; }
@media (max-width: 780px) { .ccp-login-pitch { padding: 34px 28px; } }

.ccp-login-form-side { padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 780px) { .ccp-login-form-side { padding: 36px 28px; } }
.ccp-login-form-side h2 { margin: 0 0 6px; font-size: 20px; }
.ccp-login-form-side .ccp-login-hint { margin: 0 0 24px; font-size: 13.5px; color: #5b6b7a; }

.ccp-login { max-width: 400px; margin-top: 4px; }
.ccp-login label { display: block; font-weight: 600; font-size: 13px; color: #46556a; margin: 0 0 14px; }
.ccp-login input[type="text"], .ccp-login input[type="password"] {
  display: block; width: 100%; margin-top: 5px; font-size: 16px; padding: 12px 14px;
  border: 1px solid #c9d0cf; border-radius: 8px; background: #f4f6f5; color: #101a2b;
}
.ccp-login input:focus { outline: 2px solid #c4622b; outline-offset: 1px; border-color: #c4622b; }
.ccp-login__remember { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.ccp-login__remember input { width: 16px; height: 16px; accent-color: #c4622b; flex: none; }
.ccp-login__btn { font-size: 16px; padding: 15px 44px; border-radius: 999px; width: 100%; text-align: center; }
.ccp-login__err {
  background: rgba(179,45,46,.10); color: #a12b2c; border: 1px solid rgba(179,45,46,.28);
  border-radius: 8px; padding: 11px 14px; font-size: 14px; margin: 0 0 16px;
}
.ccp-login__lost { margin: 14px 0 0; font-size: 13px; }
.ccp-login__lost a { color: #c4622b; }
.ccp-login.is-failed .ccp-login__btn { animation: ccp-shake .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes ccp-shake {
  10%,90% { transform: translateX(-2px); }
  20%,80% { transform: translateX(4px); }
  30%,50%,70% { transform: translateX(-9px); }
  40%,60% { transform: translateX(9px); }
}
@media (prefers-reduced-motion: reduce) { .ccp-login.is-failed .ccp-login__btn { animation: none; } }

/* ---- PDF preview on touch devices ----
 * iOS/Android browsers can't reliably render a PDF inside an <iframe> — iPhones show an empty box, which at a fixed
 * min-height filled an entire landscape screen. On touch devices and small screens the preview is dropped in favour
 * of the "Open PDF" button (which uses the phone's native PDF viewer); desktop keeps the inline preview. */
.ccp-pdf-actions { margin: 10px 0 0; }
@media (hover: none) and (pointer: coarse), (max-width: 760px) {
	.ccp-pdf-frame { display: none; }
	.ccp-pdf-actions { margin: 14px 0 20px; }
	.ccp-pdf-actions .ccp-btn { display: block; text-align: center; }
}
@media (hover: hover) and (pointer: fine) and (min-width: 761px) {
	.ccp-pdf-actions { display: none; }
}

/* ---- E-163: welcome card, money cards, filters, statements, quotes ---- */
.ccp-welcome { border-color: #f0c9ac; background: linear-gradient(180deg, #fff8f2, #fff); }
.ccp-welcome-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ccp-welcome-tile { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid #dce1e0; border-radius: 10px; background: #fff; text-decoration: none; color: #101a2b; }
.ccp-welcome-tile:hover { border-color: #c4622b; }
.ccp-welcome-tile span { font-size: 12.5px; color: #5b6b7a; }
.ccp-money { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 8px 0 14px; }
.ccp-money div { border: 1px solid #eef1f0; border-radius: 10px; padding: 12px 14px; background: #fafbfb; }
.ccp-money b { display: block; font-size: 22px; line-height: 1.25; }
.ccp-money span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #5b6b7a; }
.ccp-money .is-bad b { color: #b42318; }
.ccp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ccp-filter { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.ccp-filter a { padding: 6px 12px; border: 1px solid #dce1e0; border-radius: 999px; font-size: 13px; text-decoration: none; color: #101a2b; background: #fff; }
.ccp-filter a.is-on { background: #101a2b; color: #fff; border-color: #101a2b; }
.ccp-pill { display: inline-block; white-space: nowrap; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef1f0; color: #3c4a57; }
.ccp-pill.is-bad { background: #fde8e6; color: #b42318; }
.ccp-pill.is-warn { background: #fff1e0; color: #9a4b12; }
.ccp-pill.is-good { background: #e6f4ec; color: #1f6b43; }
.ccp-table td:last-child .ccp-btn { white-space: nowrap; }
.ccp-num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ccp-period { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin: 0 0 14px; }
.ccp-custom { display: contents; }
.ccp-custom[hidden] { display: none; }
.ccp-period label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #5b6b7a; }
.ccp-period select, .ccp-period input { padding: 7px 9px; border: 1px solid #ccd3d1; border-radius: 8px; font-size: 14px; }
.ccp-statement { border: 1px solid #e3e6ec; border-radius: 8px; padding: 26px 28px; overflow-x: auto; background: #fff; font-size: 13px; }
.ccp-statement table { border-collapse: collapse; }
.ccp-quote-respond textarea { width: 100%; min-height: 80px; border: 1px solid #ccd3d1; border-radius: 8px; padding: 8px 10px; font: inherit; box-sizing: border-box; }
.ccp-quote-respond .ccp-actions { margin-top: 10px; }
.ccp-btn-danger { background: #fff !important; color: #b42318 !important; border: 1px solid #f1b5ae !important; }
@media (max-width: 640px) { .ccp-statement { padding: 14px; } }
@media print { .cg-clientnav-wrap, .ccp-sidebar, .ccp-period, .ccp-actions, header.ccp-portal-head p, .ccp-incident-banner { display: none !important; } .ccp-statement { border: 0; padding: 0; } }

/* E-171: signed in, the page's own intro block just before the portal (and a theme's page title) is hidden — the
   portal's "Client Dashboard" header says the same. Signed out, the intro shows above the sign-in form. */
:where(div, section, header, p):has(+ .ccp-signedin):has(h1, h2),
.post-content:has(.ccp-signedin) .cg-contact-title,
.post-content:has(.ccp-signedin) .cg-contact-sub,
body:has(.ccp-signedin) .fusion-page-title-bar,
body:has(.ccp-signedin) .entry-header:has(> .entry-title) { display: none !important; }
