/* ═══ AGREEMENT, DEALS AND PAYMENT (Ren 2026-10-30, draft canvas "Agreement,
   Deals at Bayad"). One card everywhere: status chip, 4 steps (Sent,
   Accepted, Working, Paid), money in teal, one big button for the next step,
   cancel as a pink text button at the bottom. Markup comes from
   buildAgreementChatCard, viewAgreementFullDetail, _ccAgFinish and
   _showActiveDealsPicker in clientView.js; the create, rating, payment-sent
   and task-completion modals are restyled here by id. ═══ */
:root {
  --ag-ink: #1a2b20; --ag-text: #2f3b32; --ag-muted: #3b4a40; --ag-label: #4b5d52;
  --ag-line: #e3e9e5; --ag-soft: #eef2ef; --ag-page: #eef3ef; --ag-card: #ffffff;
  --ag-green: #1f8a3a; --ag-green-ink: #1f6b30; --ag-green-bg: #e5f5e8;
  --ag-teal: #0b7a6c; --ag-teal-ink: #0a5c51; --ag-teal-bg: #e2f5f1;
  --ag-blue: #1f6fd1; --ag-blue-ink: #174f96; --ag-blue-bg: #e6f0fc;
  --ag-purple: #5b3aa8; --ag-purple-bg: #efe9fb;
  --ag-orange: #c46a0c; --ag-orange-ink: #8a4a07; --ag-orange-bg: #fdf0e1;
  --ag-pink: #c22f56; --ag-pink-ink: #93203f; --ag-pink-bg: #fde8ee;
  --ag-track: #dbe5de;
}
body.dark-mode {
  --ag-ink: #eef3f0; --ag-text: #d6ded9; --ag-muted: #b9c4bd; --ag-label: #9fb0a5;
  --ag-line: #2a3a30; --ag-soft: #1d2a22; --ag-page: #101a14; --ag-card: #16221b;
  --ag-green-bg: rgba(46,168,74,.18); --ag-green-ink: #6fdc8c;
  --ag-teal-bg: rgba(15,138,122,.2); --ag-teal-ink: #5fd6c4;
  --ag-blue-bg: rgba(31,111,209,.2); --ag-blue-ink: #8fbaf0;
  --ag-purple-bg: rgba(91,58,168,.25);
  --ag-orange-bg: rgba(196,106,12,.2); --ag-orange-ink: #f3b46b;
  --ag-pink-bg: rgba(194,47,86,.2); --ag-pink-ink: #f39ab2;
  --ag-track: #2c3c32;
}

/* ── Shared pieces ── */
.cc-ag-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.cc-ag-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cc-ag-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.cc-ag-steps > span { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cc-ag-steps > span > i { display: block; height: 5px; border-radius: 5px; background: var(--ag-track); }
.cc-ag-steps.labels { gap: 6px; }
.cc-ag-steps.labels > span > i { height: 6px; }
.cc-ag-steps em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ag-label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-ag-tile { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cc-ag-tile svg, .cc-ag-btn svg, .cc-ag-x svg, .cc-ag-opt svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cc-ag-btn svg { width: 18px; height: 18px; }

/* ── Chat card ── */
#chatMessages .chat-agreement-card.cc-ag-chat, .chat-agreement-card.cc-ag-chat {
  width: 300px; max-width: 86%; box-sizing: border-box;
  background: var(--ag-card); border: 1px solid var(--ag-line); border-radius: 20px;
  padding: 14px; margin: 4px 0; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 6px 18px rgba(10,30,18,.08); cursor: pointer; font-family: 'Inter', system-ui, sans-serif; color: var(--ag-ink);
  transition: box-shadow .15s, transform .1s;
}
.chat-agreement-card.cc-ag-chat.sent { border-color: #cfe9d6; }
.chat-agreement-card.cc-ag-chat:hover { box-shadow: 0 8px 22px rgba(10,30,18,.12); }
.chat-agreement-card.cc-ag-chat:focus-visible { outline: 3px solid var(--ag-green); outline-offset: 2px; }
.chat-agreement-card.cc-ag-chat.closed { opacity: .72; }
.cc-ag-chat .cc-card-from { margin: 0; font-size: 11px; }
.cc-ag-chat-top { display: flex; align-items: center; gap: 10px; }
.cc-ag-kicker { flex: 1; min-width: 0; font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--ag-label); }
.cc-ag-chat-title { font-size: 16px; font-weight: 800; line-height: 1.3; color: var(--ag-ink); overflow-wrap: anywhere; }
.cc-ag-chat-money { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cc-ag-chat-money b { font-size: 21px; font-weight: 800; color: var(--ag-teal-ink); white-space: nowrap; }
.cc-ag-chat-money span { font-size: 12px; color: var(--ag-muted); text-align: right; }
.cc-ag-chat-note { font-size: 12px; line-height: 1.4; color: var(--ag-label); }
.cc-ag-chat-btn { height: 42px; border-radius: 12px; background: var(--ag-soft); color: var(--ag-ink); font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cc-ag-chat.needs .cc-ag-chat-btn { background: var(--ag-green); color: #fff; }
.cc-ag-ts { font-size: 10px; color: var(--ag-label); text-align: right; margin-top: -4px; }

/* ── Agreement details (pop-up) ── */
#agreeViewOverlay .modal-container.cc-ag-card {
  background: var(--ag-page); border: 0; display: flex; flex-direction: column;
  max-width: 460px; width: 94%; max-height: 92vh; border-radius: 24px; overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif; color: var(--ag-ink);
}
.cc-ag-head { height: 60px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 18px; background: var(--ag-card); border-bottom: 1px solid var(--ag-line); }
.cc-ag-head b { flex: 1; font-size: 17px; font-weight: 800; }
.cc-ag-head span { font-size: 12px; color: var(--ag-label); font-weight: 600; }
.cc-ag-x { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--ag-soft); color: var(--ag-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.cc-ag-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: none; }
.cc-ag-body::-webkit-scrollbar { display: none; }
.cc-ag-box { background: var(--ag-card); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.cc-ag-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cc-ag-small { font-size: 12px; color: var(--ag-label); }
.cc-ag-who { display: flex; align-items: center; gap: 12px; }
.cc-ag-av { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; flex-shrink: 0; background: var(--ag-pink-bg); color: var(--ag-pink-ink); }
.cc-ag-who > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc-ag-title { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.25; color: var(--ag-ink); overflow-wrap: anywhere; }
.cc-ag-desc { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ag-muted); overflow-wrap: anywhere; }
.cc-ag-info { display: flex; align-items: center; gap: 10px; border-radius: 14px; padding: 10px 12px; font-size: 13px; line-height: 1.4; }
.cc-ag-info .cc-ag-tile { width: 30px; height: 30px; border-radius: 10px; background: var(--ag-card); }
.cc-ag-info .cc-ag-tile svg { width: 16px; height: 16px; }
.cc-ag-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cc-ag-fact { background: var(--ag-card); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc-ag-fact > span:first-child { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--ag-label); }
.cc-ag-fact b { font-size: 17px; font-weight: 800; margin-top: 3px; overflow-wrap: anywhere; }
.cc-ag-fact > span:last-child { font-size: 12px; color: var(--ag-muted); }
.cc-ag-fact.money { background: var(--ag-teal-bg); }
.cc-ag-fact.money > span:first-child, .cc-ag-fact.money b { color: var(--ag-teal-ink); }
.cc-ag-fact.money b { font-size: 22px; }
.cc-ag-held { background: var(--ag-teal-bg); border-radius: 20px; padding: 16px; display: flex; align-items: center; gap: 14px; }
.cc-ag-held .cc-ag-tile { width: 44px; height: 44px; border-radius: 14px; background: var(--ag-card); color: #0f8a7a; }
.cc-ag-held > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc-ag-held small { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--ag-teal-ink); }
.cc-ag-held b { font-size: 25px; font-weight: 800; letter-spacing: -.5px; color: var(--ag-teal-ink); }
.cc-ag-held em { font-style: normal; font-size: 12px; line-height: 1.4; color: var(--ag-text); }
.cc-ag-sigs { gap: 10px; }
.cc-ag-sig { display: flex; align-items: center; gap: 10px; }
.cc-ag-sig > i { width: 32px; height: 32px; border-radius: 50%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cc-ag-sig > i.on { background: var(--ag-green-bg); color: var(--ag-green-ink); }
.cc-ag-sig > i.off { border: 2px dashed #b9c7bd; }
.cc-ag-sig > i svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cc-ag-sig > span { display: flex; flex-direction: column; min-width: 0; }
.cc-ag-sig b { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.cc-ag-lbl { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--ag-label); }
/* Full contract (every field the Create form has) folds away. */
.cc-ag-more { background: var(--ag-card); border-radius: 20px; padding: 0 16px; }
.cc-ag-more > summary { list-style: none; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 800; cursor: pointer; color: var(--ag-ink); }
.cc-ag-more > summary::-webkit-details-marker { display: none; }
.cc-ag-more > summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid var(--ag-label); border-bottom: 2px solid var(--ag-label); transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .15s; }
.cc-ag-more[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.cc-ag-more[open] { padding-bottom: 16px; }
.cc-ag-kv { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--ag-line); font-size: 14px; }
.cc-ag-kv > span { color: var(--ag-label); flex-shrink: 0; }
.cc-ag-kv > b { font-weight: 700; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.cc-ag-kv.block { flex-direction: column; gap: 4px; }
.cc-ag-kv.block > b { text-align: left; font-weight: 500; line-height: 1.45; white-space: pre-wrap; color: var(--ag-text); }
.cc-ag-qr { display: flex; align-items: center; gap: 10px; padding: 12px; margin-top: 6px; border-radius: 14px; border: 1px dashed #cfe0d4; }
.cc-ag-qr > div:nth-child(2) { flex: 1; text-align: center; font-size: 11px; color: var(--ag-label); line-height: 1.4; }
.cc-ag-qr.unsigned { opacity: .55; }
.cc-ag-auto { display: flex; gap: 10px; align-items: flex-start; background: var(--ag-orange-bg); color: var(--ag-orange-ink); border-radius: 14px; padding: 10px 12px; font-size: 13px; line-height: 1.4; font-weight: 600; }
.cc-ag-auto svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; }
.cc-ag-foot { flex-shrink: 0; background: var(--ag-card); border-top: 1px solid var(--ag-line); padding: 12px 16px; padding-bottom: max(14px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.cc-ag-pair { display: flex; gap: 8px; }
.cc-ag-pair > .cc-ag-btn { flex: 1; min-width: 0; }
.cc-ag-btn { min-height: 46px; padding: 0 14px; border: 0; border-radius: 14px; font-family: inherit; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; background: var(--ag-soft); color: var(--ag-ink); text-align: center; line-height: 1.25; }
.cc-ag-btn.big { min-height: 52px; font-size: 15px; }
.cc-ag-btn.green { background: var(--ag-green); color: #fff; }
.cc-ag-btn.teal { background: var(--ag-teal); color: #fff; }
.cc-ag-btn.purple { background: var(--ag-purple-bg); color: var(--ag-purple); }
.cc-ag-btn.orange { background: var(--ag-orange-bg); color: var(--ag-orange-ink); }
.cc-ag-btn.soft-teal { background: var(--ag-teal-bg); color: var(--ag-teal-ink); }
.cc-ag-btn.link { min-height: 40px; background: transparent; color: var(--ag-pink); }
.cc-ag-btn.waiting { background: var(--ag-teal-bg); color: var(--ag-teal-ink); }
.cc-ag-btn:active { transform: scale(.98); }
body.dark-mode .cc-ag-btn.purple { color: #c7b3f5; }

/* ── "Is the job done?" and the deals list (bottom sheets) ── */
.cc-ag-sheet-ov { position: fixed; inset: 0; background: rgba(10,30,18,.55); display: flex; align-items: flex-end; justify-content: center; font-family: 'Inter', system-ui, sans-serif; }
.cc-ag-sheet { width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; box-sizing: border-box; background: var(--ag-card); color: var(--ag-ink); border-radius: 24px 24px 0 0; padding: 10px 18px; padding-bottom: max(22px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; animation: ccAgUp .22s ease-out; }
@keyframes ccAgUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.cc-ag-handle { align-self: center; width: 40px; height: 5px; border-radius: 5px; background: #d5ddd7; flex-shrink: 0; }
.cc-ag-sheet h2 { margin: 0; font-size: 20px; font-weight: 800; }
.cc-ag-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px; }
.cc-ag-sheet-head > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cc-ag-holdline { background: var(--ag-teal-bg); border-radius: 16px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cc-ag-holdline span { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--ag-teal-ink); }
.cc-ag-holdline b { font-size: 21px; font-weight: 800; color: var(--ag-teal-ink); white-space: nowrap; }
.cc-ag-opt { width: 100%; border: 2px solid var(--ag-line); border-radius: 18px; padding: 14px; display: flex; align-items: center; gap: 12px; background: var(--ag-card); color: var(--ag-ink); font-family: inherit; text-align: left; cursor: pointer; }
.cc-ag-opt.pay { border-color: #0f8a7a; background: #f2fbf9; }
body.dark-mode .cc-ag-opt.pay { background: rgba(15,138,122,.12); }
.cc-ag-opt .cc-ag-tile { width: 44px; height: 44px; border-radius: 14px; }
.cc-ag-opt > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc-ag-opt b { font-size: 15px; font-weight: 800; }
.cc-ag-opt small { font-size: 13px; line-height: 1.4; color: var(--ag-muted); }
.cc-ag-opt > svg { width: 18px; height: 18px; color: var(--ag-label); flex-shrink: 0; }
.cc-ag-deal { width: 100%; border: 1px solid var(--ag-line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--ag-card); color: var(--ag-ink); font-family: inherit; text-align: left; cursor: pointer; }
.cc-ag-deal .cc-ag-row b { font-size: 16px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.cc-ag-deal .cc-ag-row b.m { font-size: 17px; color: var(--ag-teal-ink); white-space: nowrap; }
.cc-ag-deal .go { font-size: 13px; font-weight: 800; color: var(--ag-green-ink); }

/* ── Create agreement form (#agreementOverlay): same fields, softer look ── */
#agreementOverlay .agreement-container, #ratingOverlay .rating-modal-container, #paymentSuccessOverlay .pay-success-container, #taskCompleteOverlay .tc-container { background: var(--ag-card); border: 0; font-family: 'Inter', system-ui, sans-serif; color: var(--ag-ink); }
#agreementOverlay .agree-header, #taskCompleteOverlay .tc-header { background: var(--ag-card) !important; border-bottom: 1px solid var(--ag-line); padding: 14px 12px 12px 20px; }
#agreementOverlay .agree-header-brand { display: none; }
#agreementOverlay .agree-header-title { color: var(--ag-ink) !important; font-size: 20px !important; font-weight: 800 !important; display: flex; align-items: center; gap: 10px; margin: 0; }
#agreementOverlay .agree-header-title .icon-pill { width: 36px; height: 36px; border-radius: 12px; background: var(--ag-blue-bg); color: var(--ag-blue); display: inline-flex; align-items: center; justify-content: center; }
#agreementOverlay .task-detail-close-btn, #taskCompleteOverlay .task-detail-close-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--ag-soft); color: var(--ag-ink); border: 0; font-size: 22px; }
#agreementOverlay .agree-body { padding: 14px 20px; background: var(--ag-card); }
#agreementOverlay .agree-parties { background: transparent; border: 0; padding: 0 0 6px; justify-content: flex-start; gap: 8px; }
#agreementOverlay .agree-party { flex: 0 1 auto; min-width: 0; background: var(--ag-green-bg); border-radius: 999px; padding: 6px 12px; text-align: left; }
#agreementOverlay .agree-party + .agree-arrow + .agree-party { background: var(--ag-pink-bg); }
#agreementOverlay .agree-party-label { display: none; }
#agreementOverlay .agree-party-name { margin: 0; font-size: 13px; font-weight: 700; color: var(--ag-green-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#agreementOverlay .agree-party + .agree-arrow + .agree-party .agree-party-name { color: var(--ag-pink-ink); }
#agreementOverlay .agree-arrow { font-size: 16px; color: var(--ag-muted); align-self: center; }
#agreementOverlay .agree-label { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--ag-label); text-transform: uppercase; margin-bottom: 6px; }
#agreementOverlay .agree-input, #agreementOverlay .agree-select, #agreementOverlay .agree-textarea { min-height: 48px; border: 2px solid var(--ag-track); border-radius: 14px; padding: 10px 14px; font-family: inherit; font-size: 15px; color: var(--ag-ink); background: var(--ag-card); box-sizing: border-box; }
#agreementOverlay .agree-input:focus, #agreementOverlay .agree-select:focus, #agreementOverlay .agree-textarea:focus { border-color: var(--ag-green); outline: none; box-shadow: none; }
#agreementOverlay #agreePrice { border-color: #0f8a7a; font-size: 18px; font-weight: 800; }
#agreementOverlay #agreeTotal { border-color: transparent; background: var(--ag-teal-bg) !important; color: var(--ag-teal-ink) !important; font-size: 18px; font-weight: 800; cursor: default !important; }
#agreementOverlay #agreeFinancialBreakdown { background: var(--ag-teal-bg) !important; border: 0 !important; border-radius: 14px !important; min-height: 0 !important; }
#agreementOverlay #agreeFinancialBreakdown > p:first-child { color: var(--ag-teal-ink) !important; font-size: 11px !important; letter-spacing: 1px !important; }
#agreementOverlay #agreeFinancialBreakdownText { color: var(--ag-ink) !important; font-size: 14px !important; }
#agreementOverlay .agree-add-attach-btn { height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--ag-soft); color: var(--ag-ink); font-size: 13px; text-transform: none; letter-spacing: 0; }
#agreementOverlay .agree-terms-box { background: var(--ag-soft); border: 0; border-radius: 16px; padding: 14px; }
#agreementOverlay .agree-terms-title { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--ag-label); text-transform: uppercase; }
#agreementOverlay .agree-terms-list { font-size: 13px; line-height: 1.5; color: var(--ag-text); }
#agreementOverlay .agree-check-label { min-height: 44px; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--ag-ink); }
#agreementOverlay .agree-check-label input { width: 22px; height: 22px; accent-color: var(--ag-green); margin: 0; flex-shrink: 0; }
#agreementOverlay .agree-sig-label { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--ag-label); text-transform: uppercase; }
#agreementOverlay .agreement-signature-box { min-height: 56px; border: 2px dashed #b9c7bd; border-radius: 14px; background: var(--ag-card); }
#agreementOverlay .agreement-signature-box.signed { border-style: solid; border-color: var(--ag-green); background: var(--ag-green-bg); }
#agreementOverlay .agree-footer, #ratingOverlay .rate-footer { background: var(--ag-card); border-top: 1px solid var(--ag-line); padding: 12px 20px; padding-bottom: max(14px, env(safe-area-inset-bottom)); display: flex; gap: 10px; }
#agreementOverlay .agree-footer .cancel-btn, #ratingOverlay .rate-footer .cancel-btn { flex: 1; white-space: nowrap; padding: 0 12px; min-height: 52px; border: 0; border-radius: 14px; background: var(--ag-soft); color: var(--ag-ink); font-family: inherit; font-size: 15px; font-weight: 700; }
#agreementOverlay .agree-footer .agreement-submit-btn, #ratingOverlay .rate-footer .agreement-submit-btn { flex: 1.6; min-height: 52px; border: 0; border-radius: 14px; background: var(--ag-green); color: #fff; font-family: inherit; font-size: 15px; font-weight: 700; box-shadow: none; }

/* ── Rate (#ratingOverlay) ── */
#ratingOverlay .rate-header { background: var(--ag-card) !important; flex-direction: column; text-align: center; gap: 8px; padding: 22px 20px 6px; border: 0; }
#ratingOverlay .rate-avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--ag-pink-bg) !important; color: var(--ag-pink-ink) !important; font-size: 20px; font-weight: 800; border: 0; box-shadow: none; }
#ratingOverlay .rate-title { color: var(--ag-ink) !important; font-size: 21px; font-weight: 800; margin: 0; }
#ratingOverlay .rate-title span { color: inherit !important; }
#ratingOverlay .rate-sub { color: var(--ag-muted) !important; font-size: 14px; }
#ratingOverlay .rate-body { padding: 10px 20px 14px; }
#ratingOverlay .rate-stars-row { display: flex; justify-content: center; gap: 6px; }
#ratingOverlay .rate-star { width: 52px; height: 52px; border-radius: 14px; background: #f1f4f2; color: #c9d3cc; font-size: 30px; line-height: 52px; text-align: center; cursor: pointer; transition: transform .1s; }
#ratingOverlay .rate-star.active { background: var(--ag-orange-bg); color: #e08a12; }
#ratingOverlay .rate-star:active { transform: scale(.92); }
body.dark-mode #ratingOverlay .rate-star:not(.active) { background: var(--ag-soft); color: #4a5a50; }
#ratingOverlay .rate-label-text { font-size: 15px; font-weight: 800; color: var(--ag-orange-ink); margin: 8px 0 12px; }
#ratingOverlay .rate-comment { width: 100%; box-sizing: border-box; min-height: 84px; border: 2px solid var(--ag-track); border-radius: 14px; padding: 10px 14px; font-family: inherit; font-size: 15px; color: var(--ag-ink); background: var(--ag-card); }

/* 2026-11-05 (Ren): person rating + app rating on one screen. Body scrolls. */
#ratingOverlay .rating-modal-container { display: flex; flex-direction: column; }
#ratingOverlay .rate-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#ratingOverlay .rate-header, #ratingOverlay .rate-footer { flex-shrink: 0; }
#ratingOverlay .rate-note { display: flex; gap: 6px; align-items: flex-start; justify-content: center; font-size: 12px; line-height: 1.4; color: var(--ag-muted); margin: 8px 0 0; text-align: left; }
#ratingOverlay .rate-note .lucide-ico { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
#ratingOverlay .app-rate { margin-top: 16px; padding: 14px; border-radius: 16px; background: var(--ag-green-bg); text-align: left; }
#ratingOverlay .app-rate[hidden] { display: none; }
#ratingOverlay .app-rate-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
#ratingOverlay .app-rate-logo { width: 40px; height: 40px; border-radius: 12px; background: var(--ag-green); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
#ratingOverlay .app-rate-logo .lucide-ico { width: 22px; height: 22px; }
#ratingOverlay .app-rate-title { margin: 0; font-size: 16px; font-weight: 800; color: var(--ag-ink); }
#ratingOverlay .app-rate-sub { margin: 2px 0 0; font-size: 13px; color: var(--ag-muted); }
#ratingOverlay .app-stars-row { margin-bottom: 10px; }
#ratingOverlay .app-star { width: 48px; height: 48px; border: 0; border-radius: 14px; background: var(--ag-card); color: #c9d3cc; font-size: 28px; line-height: 48px; padding: 0; text-align: center; cursor: pointer; font-family: inherit; }
#ratingOverlay .app-star.active { background: var(--ag-orange-bg); color: #e08a12; }
#ratingOverlay .app-star:active { transform: scale(.92); }
body.dark-mode #ratingOverlay .app-star:not(.active) { background: var(--ag-soft); color: #4a5a50; }

/* ── Payment sent (#paymentSuccessOverlay) ── */
#paymentSuccessOverlay .pay-success-container { padding: 24px 18px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
#paymentSuccessOverlay .pay-success-icon { width: 84px; height: 84px; border-radius: 50%; background: var(--ag-teal-bg) !important; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; box-shadow: none; animation: none; }
#paymentSuccessOverlay .pay-success-icon .lucide-ico { width: 58px; height: 58px; padding: 14px; box-sizing: border-box; border-radius: 50%; background: var(--ag-teal); color: #fff; stroke-width: 2.6; }
#paymentSuccessOverlay .pay-success-title { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ag-teal-ink) !important; }
#paymentSuccessOverlay .pay-success-amount { margin: 0; font-size: 38px; font-weight: 800; letter-spacing: -1px; color: var(--ag-teal-ink) !important; }
#paymentSuccessOverlay .pay-success-to { margin: 0 0 8px; font-size: 15px; color: var(--ag-muted); }
#paymentSuccessOverlay .pay-success-to strong { color: var(--ag-ink); }
#paymentSuccessOverlay .pay-success-details { align-self: stretch; background: var(--ag-page); border: 0; border-radius: 18px; padding: 4px 16px; }
#paymentSuccessOverlay .pay-detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; font-size: 14px; border-bottom: 1px solid var(--ag-line); color: var(--ag-label); }
#paymentSuccessOverlay .pay-detail-row:last-child { border-bottom: 0; }
#paymentSuccessOverlay .pay-detail-row span:last-child { font-weight: 700; color: var(--ag-ink); text-align: right; overflow-wrap: anywhere; }
#paymentSuccessOverlay .cc-ag-btn { align-self: stretch; }
#paymentSuccessOverlay #paySuccessRateBtn { margin-top: 12px; }

/* ── Task completion (old #taskCompleteOverlay) — same options look ── */
#taskCompleteOverlay .tc-header-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--ag-teal-bg); color: #0f8a7a; }
#taskCompleteOverlay .tc-header-title { color: var(--ag-ink) !important; font-size: 20px; font-weight: 800; }
#taskCompleteOverlay .tc-header-sub { color: var(--ag-muted) !important; }
#taskCompleteOverlay .tc-summary { background: var(--ag-page); border: 0; border-radius: 16px; }
#taskCompleteOverlay .tc-price { color: var(--ag-teal-ink) !important; }
#taskCompleteOverlay .tc-option-btn { border: 2px solid var(--ag-line); border-radius: 18px; background: var(--ag-card); min-height: 64px; }
#taskCompleteOverlay .tc-option-btn.tc-accept { border-color: #0f8a7a; background: #f2fbf9; }
#taskCompleteOverlay .tc-accept .tc-opt-icon { background: var(--ag-teal); color: #fff; }
#taskCompleteOverlay .tc-dispute .tc-opt-icon { background: var(--ag-orange-bg); color: var(--ag-orange); }
#taskCompleteOverlay .tc-cancel-task .tc-opt-icon { background: var(--ag-pink-bg); color: var(--ag-pink); }

/* Phone: the pop-ups keep the app's floating-sheet size; the details card
   fills it so header and buttons stay put and only the middle scrolls. */
@media (max-width: 600px) {
  #agreeViewOverlay .modal-container.cc-ag-card { width: 100% !important; max-width: 100% !important; border-radius: 24px !important; }
  #agreementOverlay .agree-row-3col { grid-template-columns: 1fr 1fr; }
  #agreementOverlay .agree-row-3col > .agree-field:nth-child(3) { grid-column: 1 / -1; }
}
/* Price | Rate type stay level whatever the rate type (Ren 2026-11-02) */
#agreementOverlay .agree-row-3col { align-items: end; }
#agreementOverlay .agree-row-3col .agree-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-ag-qr > div:first-child, .cc-ag-qr > div:last-child { flex: 0 0 52px; width: 52px; height: 52px; }
.cc-ag-qr svg { display: block; width: 52px; height: 52px; }
body.dark-mode .chat-agreement-card.cc-ag-chat { border-color: var(--ag-line); }
#agreementOverlay .cc-ag-posthint { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: var(--ag-label); }

/* ── Cash deals (2026-11-01, canvas "Cash payment (Option A)") ── amber tone */
:root { --ag-cash: #8a5a00; --ag-cash-ink: #6e4600; --ag-cash-bg: #fbf1d6; }
body.dark-mode { --ag-cash-ink: #f2c66b; --ag-cash-bg: rgba(196,140,12,.2); }
.cc-cash-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--ag-cash-bg); color: var(--ag-cash-ink); font-size: 12px; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.cc-cash-chip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cc-cash-box { background: var(--ag-cash-bg); border-radius: 20px; padding: 16px; display: flex; align-items: center; gap: 14px; }
.cc-cash-box .cc-ag-tile { width: 44px; height: 44px; border-radius: 14px; background: var(--ag-card); color: var(--ag-cash); flex-shrink: 0; }
.cc-cash-box > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc-cash-box small { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--ag-cash-ink); }
.cc-cash-box b { font-size: 25px; font-weight: 800; letter-spacing: -.5px; color: var(--ag-cash-ink); }
.cc-cash-box em { font-style: normal; font-size: 12px; line-height: 1.4; color: var(--ag-text); }
.cc-cash-note { background: var(--ag-soft); border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; color: var(--ag-label); font-size: 13px; line-height: 1.45; }
.cc-cash-note > span { color: var(--ag-text); }
.cc-cash-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cc-cash-note.green { background: var(--ag-green-bg); color: var(--ag-green-ink); }
.cc-cash-note.orange { background: var(--ag-orange-bg); color: var(--ag-orange-ink); }
.cc-ag-btn.cash { background: var(--ag-cash); color: #fff; }
.cc-ag-btn.cash-wait { background: var(--ag-cash-bg); color: var(--ag-cash-ink); cursor: default; }
.cc-ag-btn.orange-solid { background: #a65a0a; color: #fff; }
.cc-cash-tile { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cc-cash-tile svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cc-cash-tile.cash { background: var(--ag-cash-bg); color: var(--ag-cash-ink); }
.cc-cash-tile.green { background: var(--ag-green-bg); color: var(--ag-green-ink); }
.cc-cash-tile.orange { background: var(--ag-orange-bg); color: var(--ag-orange-ink); }
.cc-cash-h { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.3; color: var(--ag-ink); }
.cc-cash-p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ag-muted); }
.cc-cash-rows { background: var(--ag-soft); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.cc-cash-rows > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ag-muted); }
.cc-cash-rows b { font-weight: 600; color: var(--ag-ink); white-space: nowrap; }
.cc-cash-rows .strong b { font-weight: 800; }
.cc-cash-rows .green b { color: var(--ag-green-ink); }
.cc-cash-radio { min-height: 48px; border-radius: 14px; border: 2px solid var(--ag-line); background: var(--ag-card); display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 14px; font-weight: 600; color: var(--ag-ink); cursor: pointer; }
.cc-cash-radio:has(input:checked) { border-color: #a65a0a; background: var(--ag-orange-bg); }
.cc-cash-radio input { accent-color: #a65a0a; width: 18px; height: 18px; margin: 0; }
.cc-cash-hint { margin: 6px 0 0; font-size: 11px; line-height: 1.4; color: var(--ag-teal-ink, #0a5c51); }
.cc-cash-hint.cash { color: var(--ag-cash-ink); font-weight: 600; }
