/* Talentport Client Portal — the app shell (KEO portal build, Phase 2).
   Apple-style and iOS-first: light ground, white rounded cards, the Talentport
   yellow as the one accent, the system font, 44px touch targets, a floating
   tab bar on phones that becomes a centred floating pill on wide screens.
   Colour and type values are copied from the team portal's desk2.css :root
   tokens (--d2-*), renamed --cp-*. That file is NOT linked: the two portals
   ship separately. */

:root {
  --cp-y: #F5C500;
  --cp-ink: #111;
  --cp-bg: #F4F4EF;
  --cp-card: #FFFFFF;
  --cp-line: #E3E3DC;
  --cp-line2: #EFEFE9;
  --cp-mute: #73736D;
  --cp-mute2: #66665F;
  --cp-pill: #FFF4B9;
  --cp-pill-ink: #6B5200;
  --cp-soft: #ECECE5;
  --cp-red: #D6362B;
  --cp-green: #1E9A4B;
  --cp-amber: #E0A100;
  --cp-link: #8A6B00;
  --cp-seg-track: #EBEBE4;
  --cp-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --cp-shadow: 0 18px 50px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .06);
  --cp-edge: 0 0 0 .5px rgba(0, 0, 0, .10), 0 1px 2px rgba(0, 0, 0, .05);
  --cp-edge-field: 0 0 0 .5px rgba(0, 0, 0, .18);
  --cp-t-34: 34px;
  --cp-t-26: 26px;
  --cp-t-20: 20px;
  --cp-t-17: 17px;
  --cp-t-15: 15px;
  --cp-t-13: 13px;
  --cp-t-12: 12px;
  --cp-t-11: 11px;
  --cp-radius: 18px;
  --cp-radius-sm: 12px;
  --cp-tap: 44px;
  --cp-banner: 0px;
  --cp-safe-b: env(safe-area-inset-bottom, 0px);
  --cp-safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cp-bg); color: var(--cp-ink); font-family: var(--cp-font); font-size: var(--cp-t-15); line-height: 1.4; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
.cp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shell ---------- */
.cp-shell { min-height: 100vh; }
.cp-main { max-width: 1080px; margin: 0 auto; padding: calc(18px + var(--cp-banner) + var(--cp-safe-t)) 20px calc(118px + var(--cp-safe-b)); }
.cp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--cp-tap); }
.cp-logo { height: 22px; display: block; filter: brightness(0); }
.cp-avatar { width: var(--cp-tap); height: var(--cp-tap); border-radius: 22px; border: 0; background: var(--cp-ink); color: var(--cp-y); font-weight: 700; font-size: var(--cp-t-15); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
.cp-avatar.is-sm { width: 30px; height: 30px; border-radius: 15px; font-size: var(--cp-t-12); }
.cp-view { margin-top: 14px; }
.cp-view:focus { outline: none; }

/* Large title block */
.cp-hello { margin-top: 10px; }
.cp-date { font-size: var(--cp-t-15); color: var(--cp-mute2); }
.cp-title { font-size: var(--cp-t-34); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; }
.cp-sub { font-size: var(--cp-t-15); color: var(--cp-mute2); margin-top: 4px; }
.cp-titlerow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cp-h2 { font-size: var(--cp-t-20); font-weight: 700; }
.cp-sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px; margin: 26px 0 10px; }
.cp-sechead a, .cp-link { color: var(--cp-link); font-size: var(--cp-t-15); }
.cp-back { display: inline-flex; align-items: center; gap: 4px; min-height: var(--cp-tap); color: var(--cp-link); font-size: var(--cp-t-17); margin-left: -4px; }
.cp-back svg { width: 20px; height: 20px; }

/* ---------- Cards and rows ---------- */
.cp-card { background: var(--cp-card); border-radius: var(--cp-radius); box-shadow: var(--cp-edge); }
.cp-card.is-pad { padding: 16px; }
.cp-card + .cp-card { margin-top: 12px; }
.cp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.cp-grid > .cp-card + .cp-card { margin-top: 0; }
.cp-tile { display: block; padding: 16px; min-height: 120px; }
.cp-tile .cp-k { font-size: var(--cp-t-13); color: var(--cp-mute2); margin-top: 12px; }
.cp-tile .cp-v { font-size: 22px; font-weight: 700; margin-top: 2px; letter-spacing: -0.01em; }
.cp-tile .cp-s { font-size: var(--cp-t-13); color: var(--cp-mute2); margin-top: 2px; }
.cp-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--cp-ink); color: var(--cp-y); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cp-mark img { width: 20px; height: 20px; display: block; }
.cp-mark.is-sm { width: 22px; height: 22px; border-radius: 6px; }
.cp-mark.is-sm img { width: 15px; height: 15px; }
.cp-mark.is-text { color: var(--cp-y); font-size: var(--cp-t-12); font-weight: 700; }
.cp-mark svg { width: 18px; height: 18px; }

.cp-list { list-style: none; margin: 0; padding: 0; }
.cp-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; border-bottom: .5px solid var(--cp-line); width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; }
.cp-list > :last-child > .cp-row, .cp-list > .cp-row:last-child, .cp-row.is-last { border-bottom: 0; }
a.cp-row, button.cp-row { cursor: pointer; }
a.cp-row:active, button.cp-row:active { background: var(--cp-line2); }
.cp-row-main { flex: 1; min-width: 0; }

.cp-row-title, .cp-row-sub { display: block; }
.cp-row-title { font-size: var(--cp-t-15); font-weight: 600; overflow-wrap: anywhere; }
.cp-row-sub { font-size: var(--cp-t-13); color: var(--cp-mute2); margin-top: 2px; overflow-wrap: anywhere; }
.cp-chev { width: 16px; height: 16px; color: #8A8A83; flex: 0 0 auto; }
.cp-kv { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: .5px solid var(--cp-line); font-size: var(--cp-t-15); }
.cp-kv:last-child { border-bottom: 0; }
.cp-kv span:first-child { color: var(--cp-mute2); }
.cp-kv span:last-child { text-align: right; overflow-wrap: anywhere; }
.cp-empty { padding: 18px 16px; color: var(--cp-mute2); font-size: var(--cp-t-15); line-height: 1.5; }
.cp-note { font-size: var(--cp-t-13); color: var(--cp-mute2); line-height: 1.5; margin-top: 10px; padding: 0 4px; }

/* Status pills */
.cp-pill { display: inline-flex; align-items: center; font-size: var(--cp-t-12); font-weight: 600; padding: 4px 9px; border-radius: 10px; background: var(--cp-soft); color: #3D3D38; white-space: nowrap; flex: 0 0 auto; }
.cp-pill.is-progress, .cp-pill.is-y { background: var(--cp-pill); color: var(--cp-pill-ink); }
.cp-pill.is-done, .cp-pill.is-good { background: #E3F4E8; color: #17663A; }
.cp-pill.is-declined, .cp-pill.is-bad { background: #FBE5E3; color: #9E2A21; }
.cp-pill.is-blocked { background: #FDF0D5; color: #7A5300; }

/* Progress bar on request cards (4 steps) */
.cp-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 14px; }
.cp-steps span { height: 5px; border-radius: 3px; background: var(--cp-line); }
.cp-steps span.on { background: var(--cp-y); }
.cp-reqcard { display: block; padding: 16px; }
.cp-reqcard .cp-meta { display: flex; align-items: center; gap: 8px; font-size: var(--cp-t-13); color: var(--cp-mute2); }
.cp-reqcard .cp-rt { font-size: var(--cp-t-17); font-weight: 600; margin-top: 10px; overflow-wrap: anywhere; }
.cp-reqcard .cp-rs { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: var(--cp-t-13); }
.cp-reqcard .cp-rs b { font-weight: 600; color: #3D3D38; }
.cp-reqcard .cp-rs b.is-y { color: var(--cp-pill-ink); }

/* ---------- Controls ---------- */
.cp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--cp-tap); padding: 0 18px; border-radius: var(--cp-radius-sm); border: 0; background: var(--cp-card); box-shadow: var(--cp-edge); font-size: var(--cp-t-15); font-weight: 600; cursor: pointer; }
.cp-btn.is-primary { background: var(--cp-y); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .14), 0 1px 1.5px rgba(0, 0, 0, .1); color: var(--cp-ink); }
.cp-btn.is-ink { background: var(--cp-ink); color: #fff; box-shadow: none; }
.cp-btn.is-block { width: 100%; }
.cp-btn[disabled] { opacity: .5; cursor: default; }
.cp-btn svg { width: 18px; height: 18px; }
.cp-iconbtn { width: var(--cp-tap); height: var(--cp-tap); border-radius: 22px; border: 0; background: var(--cp-y); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
.cp-iconbtn svg { width: 22px; height: 22px; }
.cp-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--cp-seg-track); border-radius: 10px; padding: 2px; margin-top: 16px; }
.cp-seg button { min-height: 40px; border: 0; border-radius: 8px; background: transparent; font-size: var(--cp-t-15); font-weight: 500; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.cp-seg button.is-on { background: var(--cp-card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); font-weight: 600; }
.cp-field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.cp-field > span { font-size: var(--cp-t-13); font-weight: 600; color: #3D3D38; padding: 0 4px; }
.cp-input, .cp-textarea { width: 100%; min-height: var(--cp-tap); border: 0; border-radius: var(--cp-radius-sm); background: var(--cp-card); box-shadow: var(--cp-edge-field); padding: 10px 14px; font: inherit; font-size: 16px; color: var(--cp-ink); }
.cp-textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
.cp-input:focus, .cp-textarea:focus { outline: 2px solid var(--cp-y); outline-offset: 0; }
.cp-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.cp-choice { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--cp-card); box-shadow: var(--cp-edge); text-align: left; cursor: pointer; font-size: var(--cp-t-15); font-weight: 600; }
.cp-choice small { display: block; font-weight: 400; color: var(--cp-mute2); font-size: var(--cp-t-13); margin-top: 2px; }
.cp-choice.is-on { box-shadow: 0 0 0 2px var(--cp-y), 0 1px 2px rgba(0, 0, 0, .05); }
.cp-choice[disabled] { opacity: .45; cursor: not-allowed; }
.cp-err { color: var(--cp-red); font-size: var(--cp-t-13); font-weight: 600; margin-top: 10px; padding: 0 4px; }
.cp-ok { color: var(--cp-green); font-size: var(--cp-t-13); font-weight: 600; margin-top: 10px; padding: 0 4px; }
.cp-readonly { display: flex; gap: 10px; align-items: flex-start; background: var(--cp-pill); color: #3D3D38; border-radius: 14px; padding: 12px 14px; font-size: var(--cp-t-13); line-height: 1.45; margin-top: 14px; }
.cp-readonly svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }

/* Notes thread (request detail) */
.cp-notes { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.cp-msg { background: var(--cp-card); border-radius: 16px; padding: 12px 14px; box-shadow: var(--cp-edge); }
.cp-msg.is-team { background: #FFFBE3; }
.cp-msg .cp-who { display: flex; justify-content: space-between; gap: 10px; font-size: var(--cp-t-13); color: var(--cp-mute2); }
.cp-msg .cp-who b { color: var(--cp-ink); font-weight: 600; }
.cp-msg p { margin-top: 6px; font-size: var(--cp-t-15); line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.cp-tl { padding: 6px 16px; }
.cp-tl-ev { display: flex; gap: 12px; padding: 10px 0; border-bottom: .5px solid var(--cp-line2); }
.cp-tl-ev:last-child { border-bottom: 0; }
.cp-tl-dot { width: 10px; height: 10px; border-radius: 5px; background: var(--cp-line); margin-top: 5px; flex: 0 0 auto; }
.cp-tl-ev.is-cur .cp-tl-dot { background: var(--cp-y); box-shadow: 0 0 0 3px var(--cp-pill); }
.cp-tl-ev b { font-weight: 600; font-size: var(--cp-t-15); }
.cp-tl-ev small { display: block; color: var(--cp-mute2); font-size: var(--cp-t-13); margin-top: 1px; }
.cp-two { display: grid; gap: 12px; }

/* ---------- Tab bar ---------- */
.cp-tabs { position: fixed; left: 12px; right: 12px; bottom: calc(14px + var(--cp-safe-b)); height: 66px; border-radius: 33px; background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 10px 30px rgba(0, 0, 0, .10); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center; z-index: 40; max-width: 520px; margin: 0 auto; }
.cp-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--cp-tap); font-size: 10.5px; font-weight: 500; color: var(--cp-mute2); }
.cp-tab .cp-ti { height: 30px; min-width: 30px; display: flex; align-items: center; justify-content: center; border-radius: 15px; }
.cp-tab svg { width: 22px; height: 22px; }
.cp-tab.is-on { color: var(--cp-ink); font-weight: 600; }
.cp-tab.is-on .cp-ti { width: 52px; background: var(--cp-pill); }
.cp-fab { position: fixed; right: 20px; bottom: calc(96px + var(--cp-safe-b)); width: 56px; height: 56px; border-radius: 28px; background: var(--cp-y); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); z-index: 39; }
.cp-fab svg { width: 24px; height: 24px; }

/* ---------- View-as banner ---------- */
.cp-viewas { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: var(--cp-y); color: var(--cp-ink); padding: calc(6px + var(--cp-safe-t)) 12px 6px 16px; display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: var(--cp-t-13); box-shadow: 0 1px 0 rgba(0, 0, 0, .08); }
.cp-viewas svg { width: 16px; height: 16px; flex: 0 0 auto; }
.cp-viewas .cp-va-text { flex: 1; min-width: 0; line-height: 1.3; }
.cp-viewas .cp-va-text b { font-weight: 700; }
.cp-viewas, .cp-pv-bar { flex-wrap: wrap; }
.cp-viewas .cp-end-err, .cp-pv-bar .cp-end-err { flex-basis: 100%; margin: 0; padding: 0; color: #8A1C14; }
.cp-viewas .cp-va-end { min-height: 32px; padding: 0 14px; border-radius: 16px; border: 0; background: var(--cp-ink); color: #fff; font-weight: 600; font-size: var(--cp-t-13); cursor: pointer; flex: 0 0 auto; }
body.is-viewas { --cp-banner: 56px; }

/* ---------- Wide screens (iPad, 820 px+): centred floating pill at the top ----------
   Phase 8b: was 900 px; now the same 820 px as the split views. The Account tab leaves the
   pill there (the avatar opens Account), so the pill clears the logo and the avatar. */
@media (min-width: 820px) {
  .cp-main { padding: calc(98px + var(--cp-banner)) 32px 60px; }
  .cp-tabs { top: calc(16px + var(--cp-banner)); bottom: auto; left: 50%; right: auto; transform: translateX(-50%); height: 52px; border-radius: 26px; display: flex; gap: 2px; padding: 0 6px; max-width: none; margin: 0; }
  .cp-tab { flex-direction: row; gap: 7px; padding: 0 16px; height: 40px; min-height: 40px; border-radius: 20px; font-size: var(--cp-t-15); }
  .cp-tab .cp-ti { height: auto; min-width: 0; }
  .cp-tab svg { width: 18px; height: 18px; }
  .cp-tab.is-on { background: var(--cp-pill); }
  .cp-tab.is-on .cp-ti { width: auto; background: none; }
  .cp-top { position: fixed; top: calc(20px + var(--cp-banner)); left: 32px; right: 32px; pointer-events: none; z-index: 41; }
  .cp-top > * { pointer-events: auto; }
  .cp-fab { display: none; }
  .cp-grid.is-wide3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cp-two { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: 20px; }
  .cp-viewas { padding-left: 24px; padding-right: 16px; font-size: var(--cp-t-15); }
  body.is-viewas { --cp-banner: 48px; }
  .cp-tab[data-tab="account"] { display: none; }
  .cp-tab { padding: 0 11px; }
}
/* iPad (820-1179 px): centre the pill in the space between the logo and the avatar. */
@media (min-width: 820px) and (max-width: 1179px) {
  .cp-tabs { left: calc(50% + 36px); }
}
@media (max-width: 359px) {
  .cp-tab { font-size: 9.5px; }
  .cp-title { font-size: 30px; }
}

/* ---------- Notices (expired links, ended previews) + sign-in ---------- */
body.cp-notice, body.cp-auth { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.cp-notice-card, .cp-auth-card { width: 100%; max-width: 420px; background: var(--cp-card); border-radius: 22px; box-shadow: var(--cp-edge); padding: 28px 24px; }
.cp-notice-card .cp-logo, .cp-auth-card .cp-logo { margin-bottom: 22px; }
.cp-notice-card h1, .cp-auth-card h1 { font-size: var(--cp-t-26); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.cp-notice-card p, .cp-auth-card p { color: var(--cp-mute2); margin-top: 8px; line-height: 1.5; }
.cp-auth-wrap { width: 100%; max-width: 420px; }
.cp-auth-foot { color: var(--cp-mute2); font-size: var(--cp-t-13); line-height: 1.55; text-align: center; margin-top: 20px; padding: 0 10px; }
.cp-auth-foot a { color: var(--cp-link); }
.cp-textlink { background: none; border: 0; color: var(--cp-link); font-size: var(--cp-t-15); font-weight: 600; cursor: pointer; min-height: var(--cp-tap); padding: 0; }

/* ---------- Preview (device frames) ---------- */
body.cp-preview { background: #E6E6DF; overflow: hidden; height: 100vh; display: flex; flex-direction: column; }
.cp-pv-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--cp-y); min-height: 56px; flex-wrap: wrap; }
.cp-pv-bar .cp-pv-text { flex: 1; min-width: 200px; font-size: var(--cp-t-13); line-height: 1.35; }
.cp-pv-bar .cp-pv-text b { font-size: var(--cp-t-15); }
.cp-pv-bar .cp-seg { margin-top: 0; background: rgba(0, 0, 0, .12); min-width: 240px; }
.cp-pv-bar .cp-seg button { min-height: 32px; font-size: var(--cp-t-13); }
.cp-pv-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 18px; overflow: hidden; }
.cp-pv-device { background: #111; border-radius: 48px; padding: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .22); transform-origin: center center; flex: 0 0 auto; }
.cp-pv-device.is-ipad { border-radius: 36px; padding: 18px; }
.cp-pv-device.is-mac { border-radius: 14px; padding: 30px 10px 10px; position: relative; }
.cp-pv-device.is-mac::before { content: ""; position: absolute; top: 11px; left: 14px; width: 10px; height: 10px; border-radius: 5px; background: #FF5F57; box-shadow: 16px 0 0 #FEBC2E, 32px 0 0 #28C840; }
.cp-pv-device iframe { display: block; border: 0; background: var(--cp-bg); border-radius: 36px; }
.cp-pv-device.is-ipad iframe { border-radius: 20px; }
.cp-pv-device.is-mac iframe { border-radius: 4px; }
.cp-pv-ended { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; }

/* ---- Quotes tracker (Phase 4: KeoQuotes, KeoTrack) ---------------------------------------- */
.cp-trk-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: #0F1115; color: #FFF; border-radius: var(--cp-radius); padding: 16px; }
.cp-trk-sum b { display: block; font-size: 26px; font-weight: 700; }
.cp-trk-sum b.is-y { color: #FFC629; }
.cp-trk-sum span { font-size: var(--cp-t-12); color: #BDBDB5; }
.cp-trk-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.cp-trk-row { display: flex; flex-direction: column; gap: 3px; background: var(--cp-card); border-radius: var(--cp-radius); padding: 14px 16px; box-shadow: var(--cp-edge); text-decoration: none; color: inherit; min-height: 44px; }
.cp-trk-row:active { background: var(--cp-line2); }
.cp-trk-top { display: flex; justify-content: space-between; gap: 8px; font-size: var(--cp-t-13); color: var(--cp-mute2); }
.cp-trk-top b { color: var(--cp-ink); font-size: var(--cp-t-15); }
.cp-trk-title { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.cp-trk-sub { font-size: var(--cp-t-13); color: var(--cp-mute2); overflow-wrap: anywhere; }
.cp-trk-dots { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 3px; margin-top: 10px; }
.cp-trk-dot { height: 5px; border-radius: 3px; background: var(--cp-line); }
.cp-trk-dot.is-on { background: #FFC629; }
.cp-trk-stage { margin-top: 7px; }
.cp-trk-card { padding: 16px; }
.cp-trk-steps { list-style: none; margin: 0; padding: 0; }
.cp-trk-step { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.cp-trk-step:last-child { padding-bottom: 0; }
.cp-trk-step:not(:last-child)::before { content: ""; position: absolute; left: 10px; top: 24px; bottom: 2px; width: 2px; background: var(--cp-line); }
.cp-trk-step.is-done:not(:last-child)::before { background: #0F1115; }
.cp-trk-node { width: 22px; height: 22px; border-radius: 11px; border: 2px solid #D6D6CE; flex: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.cp-trk-step.is-done .cp-trk-node { background: #0F1115; border-color: #0F1115; color: #FFC629; }
.cp-trk-step.is-done .cp-trk-node svg { width: 12px; height: 12px; stroke: #FFC629; stroke-width: 3.5; }
.cp-trk-step.is-now .cp-trk-node { background: #FFC629; border-color: #FFC629; box-shadow: 0 0 0 5px #FFF4B9; }
.cp-trk-step.is-declined .cp-trk-node { background: var(--cp-red); border-color: var(--cp-red); box-shadow: none; }
.cp-trk-steptext b { display: block; font-size: var(--cp-t-15); font-weight: 600; }
.cp-trk-step:not(.is-done):not(.is-now) .cp-trk-steptext b { color: var(--cp-mute2); font-weight: 500; }
.cp-trk-steptext small { display: block; font-size: var(--cp-t-13); color: var(--cp-mute2); margin-top: 1px; }
.cp-trk-answer { display: flex; flex-direction: column; gap: 12px; }
.cp-trk-pick { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cp-trk-pick legend { font-weight: 600; margin-bottom: 8px; }
.cp-trk-opt { display: flex; gap: 12px; align-items: center; min-height: 52px; padding: 8px 12px; border-radius: 12px; box-shadow: var(--cp-edge-field); cursor: pointer; }
.cp-trk-opt.is-on { box-shadow: 0 0 0 2px #0F1115; }
.cp-trk-opt input { width: 20px; height: 20px; accent-color: #0F1115; }
.cp-trk-opt b { display: block; font-size: var(--cp-t-15); }
.cp-trk-opt small { display: block; color: var(--cp-mute2); font-size: var(--cp-t-13); }
.cp-trk-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cp-trk-acts .cp-btn { min-height: 48px; }
.cp-trk-ok { padding: 12px 16px; margin-top: 12px; background: #E3F4E8; color: #17663A; font-weight: 600; }
.cp-trk-optrow.is-picked, .cp-trk-ghead.is-picked { background: #FFF4B9; }
.cp-trk-optrow i { font-style: normal; margin-left: 6px; }
.cp-trk-ghead { display: flex; justify-content: space-between; padding: 12px 16px 6px; font-weight: 600; border-bottom: .5px solid var(--cp-line); }
.cp-trk-scope { margin: 0; white-space: pre-wrap; line-height: 1.5; overflow-wrap: anywhere; }
@media (max-width: 420px) { .cp-trk-acts { grid-template-columns: minmax(0, 1fr); } }
.cp-trk-optrow span:last-child, .cp-trk-ghead span { white-space: nowrap; }

/* ---------- Messages (Phase 5): the client's chat with their team ---------- */
.cp-tab .cp-ti { position: relative; }
.cp-badge { position: absolute; top: -3px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--cp-red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.cp-chat { display: flex; flex-direction: column; min-height: calc(100vh - 170px); max-width: 720px; margin: 0 auto; }
.cp-msg-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 4px 0 12px; border-bottom: .5px solid var(--cp-line); }
.cp-msg-avs { display: flex; }
.cp-msg-av { width: 36px; height: 36px; border-radius: 18px; background: var(--cp-pill); color: var(--cp-ink); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--cp-bg); margin-left: -10px; }
.cp-msg-av:first-child { margin-left: 0; }
.cp-msg-av.is-client { background: #0F1115; color: #FFC629; }
.cp-msg-title { font-size: var(--cp-t-15); font-weight: 600; margin-top: 6px; }
.cp-msg-sub { font-size: var(--cp-t-12); color: var(--cp-mute2); margin-top: 1px; max-width: 100%; overflow-wrap: anywhere; }
.cp-msg-thread { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 12px 2px 16px; min-width: 0; }
.cp-msg-thread > * { min-width: 0; }
.cp-msg-day { text-align: center; font-size: var(--cp-t-11); color: var(--cp-mute2); font-weight: 600; margin: 10px 0 2px; }
.cp-msg-name { font-size: var(--cp-t-11); color: var(--cp-mute2); padding-left: 12px; margin-top: 6px; }
.cp-msg-item { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: min(78%, 420px); }
.cp-msg-item.is-mine { align-self: flex-end; align-items: flex-end; }
.cp-msg-item.is-pending { opacity: .72; }
.cp-msg-bubble { background: #F0F0EA; border-radius: 18px; overflow: hidden; max-width: 100%; cursor: default; outline: none; }
.cp-msg-item.is-mine .cp-msg-bubble { background: #0F1115; color: #fff; }
.cp-msg-item.is-sel .cp-msg-bubble { box-shadow: 0 0 0 2px var(--cp-y); }
.cp-msg-text { padding: 8px 12px; font-size: var(--cp-t-15); line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.cp-msg-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #0F1115; color: #fff; text-decoration: none; }
.cp-msg-card svg { width: 18px; height: 18px; color: #FFC629; flex: 0 0 auto; }
.cp-msg-card-t { font-size: var(--cp-t-13); font-weight: 600; }
.cp-msg-card-s { font-size: var(--cp-t-11); color: #BDBDB5; margin-top: 1px; }
.cp-msg-item.is-mine .cp-msg-card { background: #26282E; }
.cp-msg-quoted { margin: 8px 10px 0; padding: 6px 9px; border-radius: 10px; background: rgba(0,0,0,.06); font-size: var(--cp-t-12); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.cp-msg-item.is-mine .cp-msg-quoted { background: rgba(255,255,255,.12); }
.cp-msg-quoted b { display: block; font-size: var(--cp-t-11); }
.cp-msg-photo { display: block; border-radius: 18px; overflow: hidden; max-width: 240px; background: #D9D9D1; }
.cp-msg-photo img { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.cp-msg-photo-ph { width: 210px; height: 150px; display: flex; align-items: center; justify-content: center; color: #3D3D38; }
.cp-msg-photo-ph svg { width: 30px; height: 30px; }
.cp-msg-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: var(--cp-tap); color: inherit; }
.cp-msg-file svg { width: 22px; height: 22px; flex: 0 0 auto; }
.cp-msg-file span { display: flex; flex-direction: column; min-width: 0; }
.cp-msg-file b { font-size: var(--cp-t-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.cp-msg-file small { font-size: var(--cp-t-11); opacity: .7; }
.cp-msg-voice { display: flex; align-items: center; gap: 10px; background: #F0F0EA; border-radius: 18px; padding: 7px 14px 7px 7px; width: 240px; max-width: 100%; }
.cp-msg-item.is-mine .cp-msg-voice { background: #0F1115; color: #fff; }
.cp-msg-play { width: 32px; height: 32px; border-radius: 16px; border: 0; background: #FFC629; color: #0F1115; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; padding: 0; }
.cp-msg-play svg { width: 13px; height: 13px; }
.cp-msg-wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 22px; min-width: 0; }
.cp-msg-wave i { flex: 1; background: currentColor; opacity: .55; border-radius: 2px; min-height: 3px; }
.cp-msg-dur { font-size: var(--cp-t-12); opacity: .75; font-variant-numeric: tabular-nums; }
.cp-msg-transcript { font-size: var(--cp-t-12); color: var(--cp-mute2); padding: 0 8px; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cp-msg-transcript span { font-weight: 600; }
.cp-msg-transcript.is-wait { font-style: italic; }
.cp-msg-sys { align-self: center; margin: 6px 0; max-width: 100%; }
.cp-msg-sys > a, .cp-msg-sys > span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--cp-t-12); color: #3D3D38; background: var(--cp-soft); border-radius: 12px; padding: 5px 10px; overflow-wrap: anywhere; }
.cp-msg-dot { width: 7px; height: 7px; border-radius: 4px; background: #FFC629; flex: 0 0 auto; }
.cp-msg-state { font-size: var(--cp-t-11); color: var(--cp-mute2); padding: 0 6px; }
.cp-msg-retry { border: 0; background: none; color: var(--cp-red); font: inherit; font-weight: 600; min-height: var(--cp-tap); cursor: pointer; padding: 0; }
.cp-msg-acts button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: var(--cp-card); box-shadow: var(--cp-edge); border-radius: 16px; padding: 0 12px; min-height: 32px; font-size: var(--cp-t-13); cursor: pointer; }
.cp-msg-acts svg { width: 15px; height: 15px; }
.cp-msg-older { text-align: center; margin-bottom: 6px; }
.cp-msg-empty { margin: 40px auto; max-width: 300px; text-align: center; display: flex; flex-direction: column; gap: 6px; color: var(--cp-mute2); font-size: var(--cp-t-13); }
.cp-msg-empty b { color: var(--cp-ink); font-size: var(--cp-t-17); }
.cp-msg-readonly { position: sticky; bottom: calc(92px + var(--cp-safe-b)); display: flex; gap: 10px; align-items: flex-start; background: var(--cp-pill); color: #3D3D38; border-radius: 14px; padding: 12px 14px; font-size: var(--cp-t-13); line-height: 1.45; }
.cp-msg-readonly svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.cp-msg-composer { position: sticky; bottom: calc(90px + var(--cp-safe-b)); background: rgba(250,250,247,.96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: 22px; box-shadow: var(--cp-edge); padding: 6px; z-index: 5; }
.cp-msg-row { display: flex; align-items: flex-end; gap: 6px; }
.cp-msg-iconbtn { width: var(--cp-tap); height: var(--cp-tap); border-radius: 22px; border: 0; background: #ECECE5; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; color: var(--cp-ink); padding: 0; }
.cp-msg-iconbtn.is-mic { background: transparent; color: var(--cp-mute2); }
.cp-msg-iconbtn svg { width: 20px; height: 20px; }
.cp-msg-send { width: var(--cp-tap); height: var(--cp-tap); border-radius: 22px; border: 0; background: var(--cp-y); color: var(--cp-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; padding: 0; }
.cp-msg-send svg { width: 20px; height: 20px; }
.cp-msg-send[hidden], .cp-msg-iconbtn[hidden] { display: none; }
.cp-msg-field { flex: 1; min-width: 0; display: flex; background: #fff; border-radius: 20px; box-shadow: var(--cp-edge-field); }
.cp-msg-field textarea { flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: transparent; font: inherit; font-size: 16px; line-height: 1.35; padding: 11px 14px; min-height: var(--cp-tap); max-height: 140px; }
.cp-msg-plus { position: relative; }
.cp-msg-menu { position: absolute; bottom: calc(100% + 8px); left: 0; background: var(--cp-card); border-radius: 14px; box-shadow: var(--cp-shadow); padding: 6px; min-width: 200px; z-index: 6; }
.cp-msg-menuitem { display: flex; align-items: center; gap: 10px; min-height: var(--cp-tap); padding: 0 10px; border-radius: 10px; cursor: pointer; font-size: var(--cp-t-15); }
.cp-msg-menuitem:hover { background: var(--cp-soft); }
.cp-msg-menuitem svg { width: 18px; height: 18px; }
.cp-msg-menuitem input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cp-msg-staged { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 4px 8px; }
.cp-msg-staged[hidden], .cp-msg-reply[hidden], .cp-msg-recbar[hidden], .cp-msg-row[hidden] { display: none; }
.cp-msg-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--cp-soft); border-radius: 12px; padding: 4px 4px 4px 6px; font-size: var(--cp-t-12); max-width: 100%; }
.cp-msg-chip img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.cp-msg-chip svg { width: 16px; height: 16px; }
.cp-msg-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.cp-msg-chip button { width: 28px; height: 28px; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.cp-msg-reply { display: flex; align-items: center; gap: 8px; padding: 4px 4px 8px 10px; font-size: var(--cp-t-12); }
.cp-msg-reply div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cp-msg-reply span { color: var(--cp-mute2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-msg-reply button { width: var(--cp-tap); height: var(--cp-tap); border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cp-msg-reply svg { width: 16px; height: 16px; }
.cp-msg-recbar { display: flex; align-items: center; gap: 10px; }
.cp-msg-recdot { width: 10px; height: 10px; border-radius: 5px; background: var(--cp-red); animation: cpRec 1s ease-in-out infinite; }
.cp-msg-rectime { font-variant-numeric: tabular-nums; font-weight: 600; }
.cp-msg-rechint { flex: 1; font-size: var(--cp-t-12); color: var(--cp-mute2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes cpRec { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .cp-msg-recdot { animation: none; } }
.cp-msg-err { margin: 6px 6px 2px; }
.cp-msg-err[hidden] { display: none; }
@media (min-width: 820px) {
  .cp-chat { min-height: calc(100vh - 160px); }
  .cp-msg-composer { bottom: 16px; }
  .cp-msg-readonly { bottom: 16px; }
  .cp-msg-item { max-width: min(64%, 460px); }
}

/* ---------- Split views and the Mac board (Phase 8b) ----------
   iPad and up (820 px+): Requests, Quotes and Messages show the list and the selected
   item side by side (views render both panes when ctx.wide). The detail pane scrolls on its own.
   Mac (1180 px+): a left sidebar replaces the floating pill, as in the redesign's Mac board. */
.cp-side { display: none; }
.cp-split-pick { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--cp-mute2); padding: 60px 20px; text-align: center; }
.cp-split-pick svg { width: 28px; height: 28px; }
.cp-trk-row.is-sel, .cp-reqcard.is-sel { box-shadow: 0 0 0 2px var(--cp-y), var(--cp-edge); }
.cp-msg-side { display: none; }
@media (min-width: 820px) {
  .cp-split { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .cp-split-list { min-width: 0; }
  .cp-split-detail { position: sticky; top: calc(84px + var(--cp-banner)); max-height: calc(100vh - 100px - var(--cp-banner)); overflow-y: auto; overscroll-behavior: contain;
    background: var(--cp-card); border-radius: var(--cp-radius); box-shadow: var(--cp-edge); padding: 16px 20px 22px; min-height: 280px; min-width: 0; }
  .cp-split-detail .cp-two { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cp-split-detail .cp-card { box-shadow: 0 0 0 .5px rgba(0, 0, 0, .10); }
  .cp-split-detail .cp-hello { margin-top: 0; }
  .cp-split-detail .cp-title { font-size: 26px; }
  .cp-split-list .cp-reqcard + .cp-reqcard { margin-top: 10px; }
  /* Messages: the conversation and what's been shared in it on the left, the thread on the right. */
  .cp-msg-split { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .cp-msg-side { display: block; position: sticky; top: calc(84px + var(--cp-banner)); max-height: calc(100vh - 100px - var(--cp-banner)); overflow-y: auto; }
  .cp-msg-split .cp-chat { max-width: none; margin: 0; min-width: 0; }
  .cp-msg-conv { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--cp-pill); border-radius: 14px; }
  .cp-msg-conv .cp-msg-avs { flex: 0 0 auto; }
  .cp-msg-conv b { display: block; font-size: var(--cp-t-15); overflow-wrap: anywhere; }
  .cp-msg-conv small { display: block; font-size: var(--cp-t-12); color: #5A4500; margin-top: 1px; overflow-wrap: anywhere; }
  .cp-msg-shared .cp-row { min-height: 48px; padding: 10px 14px; }
  .cp-msg-shared .cp-row svg { width: 18px; height: 18px; flex: 0 0 auto; color: #3D3D38; }
}
@media (min-width: 1180px) {
  body { --cp-side-w: 252px; }
  .cp-side { display: flex; flex-direction: column; gap: 2px; position: fixed; top: var(--cp-banner); bottom: 0; left: 0; width: var(--cp-side-w); padding: 20px 12px 14px;
    background: rgba(232, 232, 225, .94); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); border-right: .5px solid #D3D3CA; overflow-y: auto; z-index: 45; }
  #cp-tabs-host, .cp-top { display: none; }
  .cp-main { max-width: 1240px; margin: 0 0 0 var(--cp-side-w); padding: calc(30px + var(--cp-banner)) 36px 48px; }
  .cp-split { grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 28px; }
  .cp-split-detail, .cp-msg-side { top: calc(24px + var(--cp-banner)); max-height: calc(100vh - 48px - var(--cp-banner)); }
  .cp-msg-split { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
  .cp-side-head { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; }
  .cp-side-tile { width: 36px; height: 36px; border-radius: 10px; background: var(--cp-ink); color: var(--cp-y); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: 0 0 auto; }
  .cp-side-head b { display: block; font-size: var(--cp-t-15); line-height: 1.25; overflow-wrap: anywhere; }
  .cp-side-head small { display: block; font-size: var(--cp-t-12); color: var(--cp-mute2); }
  .cp-side-sec { display: flex; align-items: center; gap: 6px; font-size: var(--cp-t-11); font-weight: 700; letter-spacing: .06em; color: var(--cp-mute2); padding: 14px 10px 4px; }
  .cp-side-sec .cp-mark.is-sm { width: 16px; height: 16px; border-radius: 4px; }
  .cp-side-sec .cp-mark.is-sm img { width: 11px; height: 11px; }
  .cp-side-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 10px; font-size: var(--cp-t-15); color: #26261F; }
  .cp-side-item svg { width: 19px; height: 19px; flex: 0 0 auto; color: #3D3D38; }
  .cp-side-item:hover { background: rgba(0, 0, 0, .04); }
  .cp-side-item.is-on { background: var(--cp-card); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .05); font-weight: 600; color: var(--cp-ink); }
  .cp-side-item.is-on svg { color: var(--cp-ink); }
  .cp-side-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--cp-red); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
  .cp-side-rule { height: .5px; background: #D3D3CA; margin: 10px 10px; }
  .cp-side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 2px; border-radius: 10px; }
  .cp-side-foot .cp-avatar { width: 30px; height: 30px; border-radius: 15px; font-size: var(--cp-t-12); }
  .cp-side-foot b { display: block; font-size: var(--cp-t-13); overflow-wrap: anywhere; }
  .cp-side-foot small { display: block; font-size: var(--cp-t-11); color: var(--cp-mute2); overflow-wrap: anywhere; }
}

/* Quotes and Invoices option A (9 Oct 2026): document tags, the type toggle, invoice
   rows, quote <-> invoice links, the PDF sheet and per-document comments.
   Quote = gold, invoice = navy: they differ in lightness as well as colour. */
.cp-doc-seg { margin: 0 0 12px; }
.cp-doc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-doc-tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--cp-pill); color: #5C4700; border-radius: 6px; padding: 3px 7px; }
.cp-doc-tag.is-inv { background: #1F3A68; color: #fff; }
.cp-doc-tag.is-sm { font-size: 10px; padding: 2px 5px; vertical-align: 1px; }
.cp-pill.is-inv { background: #E4E9F2; color: #1F3A68; }
.cp-trk-stage { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-doc-chip { font-size: var(--cp-t-12); color: #55554F; background: var(--cp-soft); border-radius: 8px; padding: 3px 8px; }
.cp-doc-link { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 12px 14px; min-height: 56px; text-align: left; text-decoration: none; color: inherit; border: 0; font: inherit; cursor: pointer; }
.cp-doc-link > svg { width: 18px; height: 18px; color: #9A9A92; flex: 0 0 auto; }
.cp-doc-link-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cp-doc-link-main b { font-size: var(--cp-t-15); }
.cp-doc-link-main small { font-size: var(--cp-t-12); color: var(--cp-mute2); }
.cp-pdf-ic { width: 34px; height: 42px; flex: 0 0 auto; border-radius: 4px; background: #fff; box-shadow: 0 0 0 1px #D8D8D0; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; color: #A3261B; }
a.cp-doc-row { color: inherit; text-decoration: none; }
a.cp-doc-row:hover { background: rgba(0, 0, 0, .025); }
.cp-pdf-sheet { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.cp-pdf-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .38); }
.cp-pdf-panel { position: relative; width: min(920px, 100%); height: min(92vh, 1100px); background: #F4F4EF; border-radius: 14px 14px 0 0; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .2); }
.cp-pdf-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: .5px solid var(--cp-line); }
.cp-pdf-bar b { flex: 1; text-align: center; font-size: var(--cp-t-15); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-pdf-bar .cp-btn { min-height: 36px; padding: 0 14px; }
.cp-pdf-acts { display: flex; gap: 8px; }
.cp-pdf-frame { flex: 1; width: 100%; border: 0; background: #4A4A46; }
@media (min-width: 820px) { .cp-pdf-sheet { align-items: center; } .cp-pdf-panel { border-radius: 14px; } }
.cp-dt-sub { margin: 0 0 8px; }
.cp-dt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cp-dt-msg { align-self: flex-start; max-width: 92%; background: var(--cp-bg); border-radius: 14px 14px 14px 4px; padding: 8px 12px; }
.cp-dt-msg.is-mine { align-self: flex-end; background: var(--cp-ink); color: #fff; border-radius: 14px 14px 4px 14px; }
.cp-dt-msg.is-mine .cp-dt-meta { color: #C9C9C2; }
.cp-dt-msg.is-sys { align-self: center; background: transparent; font-size: var(--cp-t-12); color: var(--cp-mute2); display: flex; gap: 8px; padding: 2px 4px; }
.cp-dt-meta { font-size: var(--cp-t-11); color: var(--cp-mute2); margin-bottom: 2px; }
.cp-dt-body { font-size: var(--cp-t-15); line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.cp-dt-files { display: block; font-size: var(--cp-t-12); opacity: .8; margin-top: 2px; }
.cp-dt-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.cp-dt-form textarea { flex: 1; min-height: 44px; resize: vertical; border: 0; border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; background: var(--cp-bg); box-shadow: var(--cp-edge-field); }
