.affiliate-chat-grid{display:grid;grid-template-columns:200px 300px minmax(0,1fr);border:1px solid var(--line);border-radius:12px;background:#fff;min-height:620px;overflow:hidden}
.chat-thread-status{padding:10px 24px;font-size:11px;color:var(--muted);border-bottom:1px solid var(--line)}
.chat-image-card{margin-top:6px;max-width:360px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:12px}.chat-image-card a{display:flex;flex-direction:column;gap:8px;font-size:11px;color:#405d89;text-decoration:none}.chat-message-image{display:block;max-width:100%;max-height:340px;object-fit:contain;border-radius:6px}.chat-image-unavailable{font-size:12px;line-height:1.6;color:var(--muted)}
.chat-sample-card{display:flex;gap:12px;align-items:center;margin-top:6px;border:1px solid var(--line);border-radius:10px;background:#fff;padding:16px;max-width:380px}.chat-sample-icon{width:40px;height:40px;background:#e6f3e3;color:#407a32;display:grid;place-items:center;border-radius:8px;font-size:26px;flex-shrink:0}.chat-sample-card strong{display:block;font-size:13px;margin-bottom:6px}.chat-sample-card span:not(.chat-sample-icon){display:block;font-size:11px;color:var(--muted);overflow-wrap:anywhere}.chat-sample-card b{font-weight:500;user-select:all}
.chat-message-image[hidden]{display:none}
.chat-shops,.chat-inbox{border-right:1px solid var(--line);min-width:0}.chat-shops{padding:20px 12px;background:#fafbfd}.chat-shops>h2{font-size:13px;padding:0 8px;margin-bottom:20px}.chat-shops>.muted{padding:20px 8px;font-size:11px;line-height:1.7}
.chat-shop{display:flex;align-items:center;gap:10px;border:1px solid transparent;background:none;width:100%;padding:14px 10px;text-align:left;border-radius:8px;margin-bottom:6px}.chat-shop.active{background:#e9eff8;border-color:#d6e1f0}.chat-market{font-size:11px;font-weight:700;color:#526d94;flex-shrink:0}.chat-shop strong{font-size:12px;display:block;overflow-wrap:anywhere}.chat-shop small{font-size:10px;color:var(--muted);display:block;margin-top:4px}
.chat-inbox>header{padding:20px 16px 16px;display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}.chat-inbox h2{font-size:14px}.chat-inbox .outline-button{font-size:11px;padding:8px 10px;min-height:32px}.chat-search{display:block;padding:0 16px 14px;font-size:11px;color:var(--muted)}.chat-search>span{display:block;margin-bottom:6px}.chat-search input{width:100%;min-width:0;border:1px solid var(--line);border-radius:7px;padding:10px;background:#fff;color:var(--ink)}
.chat-tabs{display:flex;overflow-x:auto;gap:3px;padding:0 10px 10px;border-bottom:1px solid var(--line)}.chat-tabs button{background:none;border:0;border-bottom:2px solid transparent;padding:9px 8px;font-size:11px;white-space:nowrap}.chat-tabs button[aria-pressed=true]{color:#405d89;border-bottom-color:#7b9ac4;font-weight:650}
#chat-inbox-time{padding:12px 16px;font-size:10px}.chat-conversation-list{max-height:520px;overflow-y:auto}.chat-conversation{display:flex;gap:10px;align-items:center;width:100%;border:0;border-top:1px solid #edf0f5;background:#fff;text-align:left;padding:17px 14px}.chat-conversation:hover,.chat-conversation.active{background:#f0f4fa}.chat-creator-avatar{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:#e9e3f4;color:#675383;font-weight:650;flex-shrink:0}.chat-conversation>span:nth-child(2){flex:1;min-width:0}.chat-conversation strong{font-size:12px;display:block;overflow-wrap:anywhere}.chat-conversation small{font-size:10px;color:var(--muted);display:block;margin-top:5px}.chat-unread{border-radius:20px;background:#edb0c7;color:#5f2540;min-width:22px;padding:2px 6px;text-align:center;font-size:10px}#chat-more{margin:12px}
.chat-thread{display:flex;flex-direction:column;min-width:0;min-height:620px}.chat-thread-header{padding:20px 24px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);gap:14px;flex-wrap:wrap}.chat-thread-header .eyebrow{font-size:9px;margin-bottom:6px}.chat-thread-header h2{overflow-wrap:anywhere}.chat-thread-header .outline-button{font-size:11px;padding:8px 12px}
.chat-empty{text-align:center;color:var(--muted);padding:40px 20px;line-height:1.8;font-size:12px}.chat-empty h3{font-size:13px;margin-bottom:8px;color:var(--ink)}.chat-thread-empty{margin:auto;max-width:340px}.chat-thread-empty img{opacity:.25;margin-bottom:22px}.chat-thread-empty h2{font-size:18px;margin-bottom:12px;color:var(--ink)}
.chat-message-list{flex:1;max-height:540px;min-height:300px;overflow-y:auto;padding:24px;display:flex;flex-direction:column;gap:18px;background:#fafbfd}.chat-message{max-width:90%;align-self:flex-start;min-width:100px}.chat-message small{font-size:10px;color:var(--muted)}.chat-message p{background:#fff;border:1px solid var(--line);padding:12px 15px;border-radius:0 12px 12px 12px;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:6px;font-size:13px}.chat-message.outgoing{align-self:flex-end}.chat-message.outgoing p{background:#eaf0f9;border-color:#d8e2f1;border-radius:12px 0 12px 12px}
.chat-composer{padding:18px 24px;border-top:1px solid var(--line)}.chat-composer label{font-size:12px;display:block;margin-bottom:9px}.chat-composer textarea{font:inherit;width:100%;resize:vertical;min-height:90px;border:1px solid #d9e0eb;border-radius:8px;padding:12px;color:var(--ink);background:#fff}.chat-composer textarea:disabled{background:#f6f7f9}.chat-composer>div{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:10px}.chat-composer small{font-size:10px;color:var(--muted);max-width:270px}.chat-composer .muted{font-size:11px;margin-top:10px}.chat-connection{margin-top:18px}.chat-send-confirmation{border:1px solid var(--line);border-radius:12px;max-width:500px;width:calc(100% - 32px);padding:26px}.chat-send-confirmation::backdrop{background:#17233766}.chat-send-confirmation>p{margin-top:12px;color:var(--muted)}.chat-send-confirmation pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;background:#f1f4f8;padding:16px;max-height:300px;overflow:auto}.chat-send-confirmation>div{display:flex;gap:12px;justify-content:flex-end}
@media(max-width:1250px){.affiliate-chat-grid{grid-template-columns:170px 250px minmax(0,1fr)}.chat-thread-header,.chat-composer{padding:18px}.chat-composer>div{flex-wrap:wrap}}
@media(max-width:1000px){.affiliate-chat-grid{grid-template-columns:230px minmax(0,1fr)}.chat-shops{grid-column:1/-1;border-right:0;border-bottom:1px solid var(--line);padding:12px}.chat-shops>h2,.chat-shops>.muted{display:none}#chat-shop-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.chat-shop{margin:0;padding:10px 7px}.chat-shop small{display:none}.chat-shop strong{font-size:10px}.chat-thread,.affiliate-chat-grid{min-height:580px}}
@media(max-width:700px){.affiliate-chat-grid{display:flex;flex-direction:column}.chat-inbox{border-right:0;border-bottom:1px solid var(--line)}#chat-shop-list{grid-template-columns:repeat(2,minmax(0,1fr))}.chat-conversation-list{max-height:220px}.chat-thread{min-height:420px}.chat-message-list{min-height:220px;max-height:420px}.chat-thread-empty{padding:48px 24px}.chat-inbox>header{padding-top:14px}.chat-composer{padding:16px}}
