/* Встроенный чат, профили клиентов и список переписок */

.nav-badge{display:inline-grid;place-items:center;min-width:17px;height:17px;margin-left:7px;padding:0 5px;border-radius:20px;background:#20231f;color:#f4e65d;font-size:9px;font-weight:800;vertical-align:middle}

.chat-card{margin-top:26px;padding:20px 22px;background:#fff;border:1px solid #eceee7;border-radius:16px;box-shadow:0 10px 30px rgba(20,25,18,.04)}
.chat-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-bottom:14px;border-bottom:1px solid #f0f1ec}
.chat-head-title{display:flex;align-items:center;gap:11px;min-width:0}
.chat-head-icon{width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:10px;background:#f4f1dc;color:#8b8032;font-size:14px;font-weight:800}
.chat-head-title div{display:grid;gap:2px;min-width:0}
.chat-head-title b{font-size:13px;letter-spacing:-.2px}
.chat-head-title span{font-size:10px;color:#92978d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-head-link{flex:none;font-size:10px;font-weight:800;color:#6f756a}
.chat-head-link:hover{color:#9a8b28}
.chat-thread{display:grid;gap:9px;max-height:340px;overflow-y:auto;padding:16px 2px;scrollbar-width:thin}
.chat-thread:empty{display:none}
.chat-bubble-row{display:flex;flex-direction:column;align-items:flex-start;gap:3px;max-width:78%}
.chat-bubble-row.is-mine{align-self:flex-end;align-items:flex-end}
.chat-bubble{padding:10px 13px;border-radius:12px;background:#f2f3ee;color:#242820;font-size:12px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-bubble-row.is-mine .chat-bubble{background:#20231f;color:#fff}
.chat-bubble-row time{font-size:9px;color:#a1a69d}
.chat-hint{margin:0;padding:16px 2px;font-size:11px;color:#8a9085;line-height:1.7}
.chat-form{display:flex;gap:9px;align-items:flex-end;padding-top:14px;border-top:1px solid #f0f1ec}
.chat-form textarea{flex:1;min-width:0;min-height:46px;max-height:140px;padding:11px 13px;border:1px solid #e7e9e2;border-radius:11px;background:#fafbf8;outline:none;font-size:12px;line-height:1.6;resize:vertical;transition:border .2s,box-shadow .2s}
.chat-form textarea:focus{border-color:#c9bb4f;box-shadow:0 0 0 3px rgba(201,187,79,.12)}
.chat-form textarea::placeholder{color:#a6aaa1}
.chat-form button{flex:none;min-height:46px;padding:0 18px}
.chat-form button[disabled]{opacity:.6;cursor:default;transform:none}
.chat-note{margin:9px 0 0;font-size:9px;color:#a1a69d}
.chat-guest{margin:14px 0 0;padding:12px 14px;border-radius:10px;background:#fafbf8;border:1px solid #eef0e9;font-size:11px;color:#7f867a}
.chat-guest a{font-weight:800;color:#8a8135;text-decoration:underline}
.chat-error{margin:9px 0 0;padding:9px 12px;border-radius:8px;background:#fae9e6;color:#994238;font-size:10px;font-weight:700}

.chat-owner-card .chat-hint{padding:18px 2px 6px}
.chat-dialog-list{display:grid;gap:8px;padding-top:14px}
.chat-dialog-row{display:flex;align-items:center;gap:11px;padding:10px 12px;border:1px solid #f0f1ec;border-radius:11px;transition:border-color .2s,background .2s}
.chat-dialog-row:hover{border-color:#dcdfd3;background:#fcfdfa}
.chat-dialog-row.is-unread{background:#fffdf2;border-color:#eee3ad}
.chat-dialog-avatar{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:50%;background:#e9e8d5;font-size:12px;font-weight:800}
.chat-dialog-main{flex:1;min-width:0;display:grid;gap:2px}
.chat-dialog-main b{font-size:11px}
.chat-dialog-main span{font-size:10px;color:#92978d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-dialog-row time{flex:none;font-size:9px;color:#a1a69d}
.chat-list-unread{flex:none;display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 6px;border-radius:20px;background:#20231f;color:#f4e65d;font-size:9px;font-weight:800}

.chat-list{display:grid;gap:10px;margin-bottom:40px}
.chat-list-row{display:flex;align-items:center;gap:15px;padding:15px;background:#fff;border:1px solid #eceee7;border-radius:13px;transition:transform .2s,box-shadow .2s}
.chat-list-row:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(21,27,18,.06)}
.chat-list-row.is-unread{border-color:#eee3ad;background:#fffdf4}
.chat-list-thumb{width:62px;height:62px;flex:none;display:grid;place-items:center;border-radius:11px;overflow:hidden;background:#eceee7;color:#80866f;font-size:20px;font-weight:800}
.chat-list-thumb img{width:100%;height:100%;object-fit:cover}
.chat-list-main{flex:1;min-width:0;display:grid;gap:3px}
.chat-list-top{display:flex;align-items:center;gap:8px}
.chat-list-top b{font-size:12px}
.chat-list-role{padding:3px 7px;border-radius:5px;background:#f1f2ed;color:#6f756a;font-size:8px;font-weight:800;text-transform:uppercase;letter-spacing:.4px}
.chat-list-listing{font-size:10px;color:#8f958a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-list-preview{margin:0;font-size:11px;color:#6f756a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-list-time{flex:none;font-size:9px;color:#a1a69d}

.chat-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;align-items:start;margin-bottom:40px}
.chat-layout-main .chat-card{margin-top:0}
.chat-layout-side{display:grid;gap:16px;position:sticky;top:92px}
.chat-listing-card{display:flex;gap:11px;padding:10px;border:1px solid #eef0e9;border-radius:10px;background:#fafbf8}
.chat-listing-thumb{width:48px;height:48px;flex:none;display:grid;place-items:center;border-radius:9px;overflow:hidden;background:#eceee7;color:#80866f;font-size:17px;font-weight:800}
.chat-listing-thumb img{width:100%;height:100%;object-fit:cover}
.chat-listing-main{display:grid;gap:3px;min-width:0}
.chat-listing-main b{font-size:11px;line-height:1.5}
.chat-listing-main span{font-size:9px;color:#92978d}

/* Профиль клиента */
.profile-wrap{max-width:1060px;margin:38px auto 60px}
.profile-hero{display:flex;align-items:center;justify-content:space-between;gap:22px;flex-wrap:wrap;padding:26px 28px;background:#fff;border:1px solid #eceee7;border-radius:16px;box-shadow:var(--shadow)}
.profile-hero-main{display:flex;align-items:center;gap:17px;min-width:0}
.profile-avatar{width:66px;height:66px;flex:none;display:grid;place-items:center;border-radius:18px;background:#e9e8d5;color:#5d6152;font-size:26px;font-weight:800}
.profile-hero-text{display:grid;gap:7px;min-width:0}
.profile-hero-name{display:flex;align-items:center;gap:11px;flex-wrap:wrap}
.profile-hero-name h1{font-size:27px;letter-spacing:-1.2px;margin:0}
.profile-hero-meta{display:flex;gap:16px;flex-wrap:wrap;margin:0;font-size:11px;color:#7f867a}
.profile-note{margin:0;font-size:10px;color:#92978d}
.profile-hero-side{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.profile-hero-side .button{flex:none}
.role-seller{background:#e5f2e9;color:#2c744b}
.profile-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0 26px}
.profile-stats .stat-card strong{font-size:22px}
.profile-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;align-items:start}
.profile-listings .section-heading{margin-bottom:16px}
.profile-listings .section-heading h2{font-size:22px}
.profile-grid{grid-template-columns:repeat(3,1fr)}
.profile-side{display:grid;gap:16px;position:sticky;top:92px}
.profile-facts{display:grid;gap:0;margin:0}
.profile-facts>div{display:flex;justify-content:space-between;gap:14px;padding:10px 0;border-bottom:1px solid #f0f1ec}
.profile-facts>div:last-child{border-bottom:0}
.profile-facts dt{font-size:10px;color:#92978d;flex:none}
.profile-facts dd{margin:0;font-size:11px;font-weight:700;text-align:right}
.profile-safety{margin:0;padding-left:17px;display:grid;gap:7px;font-size:10px;color:#6f756a;line-height:1.6}

@media(max-width:1050px){.chat-layout,.profile-layout{grid-template-columns:minmax(0,1fr) 290px}.profile-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.nav-badge{margin-left:5px}.chat-card{padding:16px;border-radius:13px}.chat-thread{max-height:280px}.chat-bubble-row{max-width:88%}.chat-form{flex-direction:column;align-items:stretch}.chat-form button{width:100%}.chat-layout,.profile-layout{grid-template-columns:1fr;gap:13px}.chat-layout-side,.profile-side{position:static;gap:13px}.chat-hero,.profile-hero{flex-direction:column;align-items:flex-start;padding:18px}.profile-hero-side{align-items:stretch;width:100%}.profile-hero-side .button{width:100%}.profile-stats{grid-template-columns:repeat(2,1fr);gap:9px}.profile-stats .stat-card strong{font-size:19px}.profile-grid{grid-template-columns:repeat(2,1fr)}.chat-list-row{padding:12px}.chat-list-thumb{width:50px;height:50px}}
@media(max-width:390px){.profile-grid{grid-template-columns:1fr}.profile-stats{grid-template-columns:1fr}}
