.direct-chat-access{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:18px;padding:12px 16px;min-height:46px;font-weight:700;transition:transform .18s,box-shadow .18s}
.direct-chat-access{display:grid;grid-template-columns:21px minmax(0,1fr);column-gap:8px;row-gap:2px;text-align:left;width:152px;flex:0 0 auto;max-width:100%;white-space:nowrap;padding:9px 12px;min-height:48px}
.direct-chat-access>svg{grid-row:1/3}
.side-nav [data-tab="direct-chat"]{display:flex;align-items:center;justify-content:space-between;gap:10px}.admin-chat-count{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-width:25px;min-height:25px;padding:2px 7px;border-radius:999px;background:#e43f62;color:#fff;font-size:13px;font-weight:750;line-height:1.25;box-shadow:0 2px 7px #e43f6226}.chat-request-name{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-request .admin-chat-count{font-size:13px}
.direct-chat-access>span{grid-column:2;line-height:1.25;font-size:12px;min-width:0;overflow:hidden;text-overflow:ellipsis}
.direct-chat-access>em{grid-column:2;font-size:11px;font-style:normal;font-weight:500;color:var(--muted);line-height:1.25;min-width:0;overflow:hidden;text-overflow:ellipsis}
.direct-chat-access>svg{width:21px;height:21px;align-self:center}
.direct-chat-access,[data-chat-tab]{position:relative}
.direct-chat-access>.chat-unread-count,[data-chat-tab]>.chat-unread-count{position:absolute;top:-7px;right:-5px;grid-column:auto;display:flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 5px;border-radius:20px;background:#c8204c;color:#fff;border:2px solid var(--surface);font-size:12px;font-weight:800;line-height:1;box-shadow:0 3px 8px #0002;pointer-events:none}
.direct-chat-access svg,[data-chat-tab] svg,.chat-room svg,.chat-dialog svg{width:23px;height:23px;flex-shrink:0}
.direct-chat-access:hover{box-shadow:0 5px 20px #00b79b25;transform:translateY(-2px)}
.direct-chat-access:hover svg,[data-chat-tab]:hover svg{animation:chat-wave .5s ease}
.direct-chat-access:active,[data-chat-tab]:active{transform:scale(.96)}
@keyframes chat-wave{30%{transform:rotate(-10deg)}70%{transform:rotate(8deg)}}
.private-chat-page{max-width:900px;margin:auto;padding-bottom:110px}.chat-page-title h1,.chat-admin-title h1{margin:4px 0 20px;font-size:clamp(1.6rem,4vw,2.2rem)}
.chat-room{border:1px solid var(--border);border-radius:26px;overflow:hidden;background:var(--surface);box-shadow:var(--shadow);min-width:0}
.chat-room-head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--border);gap:12px}
.chat-partner{display:flex;align-items:center;gap:14px;min-width:0}.chat-partner strong{display:block;font-size:1.05rem;overflow-wrap:anywhere}.chat-partner small{display:block;color:var(--muted);font-size:.875rem}
.chat-avatar{position:relative;display:inline-grid;place-items:center;flex:0 0 46px;width:46px;height:46px;border-radius:50%;background:var(--surface-2);border:2px solid var(--surface);outline:1px solid var(--border);color:var(--text);font-weight:800}
.chat-avatar>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%;z-index:1}.chat-verified{position:absolute;right:-5px;bottom:-3px;color:#d6a52d;background:var(--surface);border-radius:50%;height:22px;width:22px;z-index:2}.chat-verified svg{width:22px;height:22px}
.chat-private{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:.875rem}.chat-private svg{width:16px;height:16px}
.chat-clock{padding:10px 18px;text-align:center;background:var(--surface-2);font-size:.875rem;font-variant-numeric:tabular-nums;border-bottom:1px solid var(--border)}
.chat-log{height:clamp(260px,49dvh,580px);padding:24px 20px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;display:flex;flex-direction:column;gap:18px;background:var(--bg)}
.private-chat-page .chat-log{height:clamp(320px,60vh,720px);height:clamp(320px,60svh,720px);overscroll-behavior-y:auto}
.private-chat-page .chat-composer{scroll-margin-block:24px 120px}
.chat-message{display:flex;align-items:flex-end;gap:10px;max-width:88%;align-self:flex-start;flex-shrink:0;min-width:0}.chat-message.mine{align-self:flex-end;flex-direction:row-reverse}.chat-message .chat-avatar{width:32px;height:32px;flex-basis:32px;font-size:.875rem}.chat-message .chat-verified,.chat-message .chat-verified svg{width:17px;height:17px}
.chat-bubble{min-width:0;background:var(--surface);border:1px solid var(--border);border-radius:18px 18px 18px 5px;padding:12px 15px;box-shadow:0 2px 5px #00000004}.mine .chat-bubble{background:var(--surface-2);border-radius:18px 18px 5px 18px;border-color:color-mix(in srgb,var(--teal) 24%,var(--border))}
.chat-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:1rem;line-height:1.6}.chat-meta{display:flex;align-items:center;justify-content:flex-end;gap:8px;color:var(--muted);font-size:.75rem;margin-top:6px;flex-wrap:wrap}.chat-ticks{font-weight:800;letter-spacing:-4px;padding-right:4px}.chat-ticks.read{color:#159ccc}
.chat-delete{display:grid;place-items:center;background:none;color:var(--muted);border:0;min-width:32px;min-height:32px;padding:5px}.chat-delete svg{width:16px;height:16px}.chat-delete:hover{color:var(--danger)}
.chat-composer{padding:16px;display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:8px;align-items:center;border-top:1px solid var(--border)}.chat-composer textarea{resize:vertical;min-height:48px;max-height:220px;border-radius:16px;padding:12px;font-size:1rem;background:var(--surface-2);color:var(--text);border:1px solid var(--border)}.chat-composer small{grid-column:1/-1;font-size:.75rem;color:var(--muted)}
.chat-send{display:grid;place-items:center;width:46px;height:46px;border-radius:15px;border:0;background:var(--teal);color:#062b35;transition:transform .18s}.chat-send:hover{transform:translateY(-2px)}.chat-send:disabled{opacity:.45;cursor:default}
.chat-connection{font-size:.875rem;color:var(--muted);margin:0;padding:0 18px}.chat-connection:empty{display:none}.chat-connection:not(:empty){padding:10px 18px}
.chat-empty{margin:auto;text-align:center;max-width:350px;color:var(--muted)}.chat-empty svg{width:40px;height:40px;color:var(--teal)}.chat-empty strong{display:block;margin:12px 0;color:var(--text)}
.chat-dialog{position:fixed;inset:0;margin:auto;width:min(520px,calc(100vw - 28px));max-height:90dvh;overflow:auto;padding:30px;border:1px solid var(--border);border-radius:26px;background:var(--surface);color:var(--text);box-shadow:var(--shadow);font-size:1rem}.chat-dialog::backdrop{background:#00142699;backdrop-filter:blur(5px)}.chat-dialog h2{font-size:1.75rem;line-height:1.2;margin:12px 0}.chat-dialog p{line-height:1.6}.chat-close{float:right;display:grid;place-items:center;width:36px;height:36px;background:var(--surface-2);color:var(--text);border:0;border-radius:50%}.chat-offer-icon{display:grid;place-items:center;width:58px;height:58px;background:var(--surface-2);color:var(--teal);border-radius:18px;margin-bottom:20px}.chat-offer-icon svg{width:30px;height:30px}
.chat-price{display:flex;align-items:center;gap:16px;border-block:1px solid var(--border);padding:16px 0;margin:20px 0}.chat-price strong{font-size:2.3rem}.chat-price span{color:var(--muted)}.chat-error{color:var(--danger)}.chat-error:empty{display:none}.chat-review-status{background:var(--surface-2);border:1px solid var(--border);padding:12px 16px;border-radius:12px;font-weight:700}.chat-destination{padding:16px;border-radius:14px;background:var(--surface-2);overflow-wrap:anywhere}.chat-destination:empty{display:none}.chat-destination code{font-size:1rem;user-select:all}.chat-payment input[type=file]{padding:10px;width:100%}.chat-reapply{margin-top:16px}
.chat-admin-grid{display:grid;grid-template-columns:280px minmax(0,1fr);gap:20px}.chat-inbox{align-self:start;padding:18px;max-height:78dvh;overflow:auto}.chat-inbox h2{font-size:1rem;margin-top:0}.chat-request{display:grid;text-align:left;gap:5px;width:100%;padding:14px;margin:8px 0;background:var(--surface-2);border:1px solid transparent;border-radius:14px;color:var(--text);overflow-wrap:anywhere}.chat-request.selected{border-color:var(--teal)}.chat-request span{font-size:.875rem}.chat-request small{color:var(--muted);font-size:.75rem}.chat-admin-detail{min-width:0}.chat-review-card{padding:24px}.chat-review-card dd{margin:0 0 16px;overflow-wrap:anywhere}.chat-review-card dt{color:var(--muted)}.chat-review-card .actions{margin-top:18px;flex-wrap:wrap}.chat-receipt img{max-height:260px;object-fit:contain;margin:10px 0;border-radius:12px}.chat-receipt a{display:block}.chat-review-card textarea{width:100%}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:850px){.chat-admin-grid{grid-template-columns:minmax(0,1fr)}.chat-inbox{max-height:250px}}
@media(max-width:600px){.direct-chat-access{padding:9px 11px;font-size:.8rem;border-radius:14px}.member-header-tools{flex-wrap:wrap}.bottom-nav.has-chat{max-width:calc(100vw - 16px);gap:2px;padding:6px}.bottom-nav.has-chat button{min-width:0;flex:1;padding:9px 5px;font-size:.7rem;gap:4px}.bottom-nav.has-chat svg{width:22px;height:22px}.chat-room-head{padding:14px}.chat-message{max-width:95%;gap:7px}.chat-log{padding:16px 10px;height:45dvh}.chat-bubble{padding:10px 12px}.chat-composer{padding:12px}.chat-dialog{padding:22px}.chat-private{font-size:0}.chat-private svg{width:18px;height:18px}}
@media(prefers-reduced-motion:reduce){.direct-chat-access,[data-chat-tab],.chat-send{transition:none!important;animation:none!important}.direct-chat-access svg,[data-chat-tab] svg{animation:none!important}}
.chat-work-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 20px}.chat-work-tabs button{display:flex;align-items:center;gap:10px;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--text);padding:14px 20px;font-weight:700;font-size:1rem}.chat-work-tabs [aria-selected=true]{color:var(--teal);border-color:var(--teal);background:var(--surface-2)}.chat-request-filters{display:flex;flex-wrap:wrap;align-items:end;gap:14px;padding:20px;margin-bottom:20px}.chat-request-filters[hidden]{display:none}.chat-request-filters label{display:grid;gap:6px;font-size:.875rem;flex:1 1 140px}.chat-request-filters input,.chat-request-filters select{width:100%;min-width:0;padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);color:var(--text);font:inherit}.chat-request-filters small{flex-basis:100%;color:var(--muted)}.consultation-receipt-meta{display:block;margin-top:6px;color:var(--muted);font-size:.875rem}.consultation-receipts{margin-top:20px}

@media(max-width:600px){.direct-chat-access{width:126px;padding:8px 10px;min-height:44px;column-gap:6px}.direct-chat-access>span{font-size:11px}.direct-chat-access>em{font-size:10px}.direct-chat-access>svg{width:20px;height:20px}}

@media(min-width:360px) and (max-width:600px){.member-app .topbar .member-header-tools{gap:5px}}

/* Member chat shares the complete media composer and paid-content renderer. */
.chat-room .chat-composer>.chat-tools,.chat-room .chat-composer>.voice-recording-card,.chat-room .chat-composer>.voice-preview-card,.chat-room #chat-send-error{grid-column:1/-1;min-width:0}.chat-room .chat-tools{position:relative;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.chat-room .chat-tools>button,.chat-room .chat-attach-label{color:var(--text);background:var(--surface-2);border:1px solid var(--border);border-radius:12px;min-width:40px;min-height:40px;display:inline-flex;align-items:center;justify-content:center}.chat-room .chat-tools .chat-emoji-picker[hidden]{display:none}.chat-room .chat-text{white-space:normal}.chat-room .chat-text>p{white-space:pre-wrap;margin:6px 0;line-height:1.5}.chat-room .chat-text:has(.paid-chat-card){min-width:0}.chat-room .paid-chat-card{max-width:100%;color:var(--text);background:var(--surface)}.chat-room .paid-card-body{padding:16px}.chat-room .paid-card-body h3{font-size:16px;line-height:1.4}.chat-room .chat-text>.chat-attachment{margin-top:8px}.chat-room #chat-send-error:empty{display:none}.chat-room .chat-emoji-picker{z-index:20}.chat-room .chat-text{overflow-wrap:anywhere}.chat-room .chat-bubble:has(.paid-chat-card){padding:8px}.chat-room .chat-text:not(:has(p)):not(:has(section)):not(:has(.chat-attachment)){white-space:pre-wrap}


/* Payment route selector */
.chat-route-choice{display:grid;gap:14px}.chat-route-choice label{display:grid;gap:8px;font-weight:600}.chat-route-choice select{width:100%;min-height:48px;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);color:var(--text);font:inherit}.chat-route-choice [aria-pressed=true]{outline:2px solid var(--teal);outline-offset:2px}.chat-route-choice .btn{width:100%}
