/*
 * © 2026 Ael-Host — feito por Fakkwel. Todos os direitos reservados.
 * Proibida a cópia, revenda ou distribuição deste código sem autorização do autor.
 */
/* =========================================================
   Amigos e chat (/chat) e perfil público (/u/:usuario)
   ========================================================= */
.ch { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 14px; height: calc(100dvh - 150px); min-height: 460px; }
.ch > .panel { padding: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ch-side-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 8px; }
.ch-side-head h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; flex: 1; }
.ch-search { margin: 0 12px 8px; }
.ch-tabs { margin: 0 12px 6px; }
.ch-tabs button { flex: 1; justify-content: center; }
.ch-tabs .badge:empty { display: none; }
.ch-list { overflow-y: auto; padding: 4px 6px 10px; flex: 1; }
.ch-label { margin: 12px 8px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ch-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r); color: inherit; cursor: pointer; min-width: 0; }
.ch-row:hover { background: var(--raise); }
.ch-row.on { background: var(--accent-soft); }
.ch-row.unread b { color: var(--text); }
.ch-row b { display: block; font-weight: 600; }
.ch-row .ellipsis { display: block; }
.ch-row .btn-row { flex: none; gap: 4px; }
.ch-unread { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink, #fff); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.ch-av { position: relative; flex: none; display: inline-flex; }
.ch-av .avatar { width: 40px; height: 40px; font-size: 15px; }
.ch-av.on::after { content: ''; position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--panel-solid, #111); }
.empty.sm { padding: 24px 12px; }
.empty.sm .ic { width: 44px; height: 44px; }

.ch-main { position: relative; }
.ch-main.drop::after { content: 'Solte a foto para enviar'; position: absolute; inset: 8px; border: 2px dashed var(--accent); border-radius: var(--r-lg); display: grid; place-items: center; font-weight: 600; background: color-mix(in srgb, var(--bg) 70%, transparent); z-index: 5; }
.ch-empty { margin: auto; max-width: 360px; }
.ch-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ch-back { display: none; }
.ch-msgs { flex: 1; overflow-y: auto; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.ch-older { align-self: center; margin-bottom: 8px; }
.ch-day { align-self: center; margin: 10px 0 6px; }
.ch-day span { font-size: 11.5px; color: var(--muted); background: var(--raise); padding: 3px 10px; border-radius: 10px; }
.ch-msg { position: relative; max-width: min(78%, 520px); align-self: flex-start; background: var(--raise-2); border-radius: 14px 14px 14px 4px; padding: 7px 11px 18px; overflow-wrap: anywhere; }
.ch-msg.me { align-self: flex-end; background: color-mix(in srgb, var(--accent) 22%, var(--panel-solid, #15151f)); border-radius: 14px 14px 4px 14px; }
.ch-text { font-size: 14px; line-height: 1.45; white-space: normal; }
.ch-text a { color: inherit; text-decoration: underline; }
.ch-time { position: absolute; right: 9px; bottom: 3px; font-size: 10.5px; color: var(--muted); }
.ch-msg.k-image { padding: 4px 4px 18px; }
.ch-msg.k-image .ch-text { padding: 4px 6px 0; }
.ch-img { display: block; border: 0; padding: 0; background: var(--raise); border-radius: 11px; overflow: hidden; cursor: zoom-in; width: min(300px, 62vw); max-height: 360px; }
.ch-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-card { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 10px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line); border-left: 3px solid var(--cc, var(--accent)); color: inherit; min-width: 220px; }
.ch-card .ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--cc, var(--accent)) 18%, transparent); color: var(--cc, var(--accent)); flex: none; }
.ch-card b, .ch-card span { display: block; }
.ch-seen { align-self: flex-end; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; margin: 2px 4px 0; }
.ch-seen svg { width: 14px; height: 14px; color: var(--accent); }
.ch-compose { display: flex; align-items: flex-end; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.ch-compose .textarea { flex: 1; min-height: 40px; max-height: 140px; resize: none; padding: 9px 12px; line-height: 1.4; }
.ch-locked { padding: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }

@media (max-width: 820px) {
  .ch { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 170px); }
  .ch .ch-main { display: none; }
  .ch.has-conv .ch-side { display: none; }
  .ch.has-conv .ch-main { display: flex; }
  .ch-back { display: inline-flex; }
  .ch-msg { max-width: 86%; }
}

/* perfil público */
.up-page .up-cover { height: 150px; background: linear-gradient(120deg, var(--accent-soft), color-mix(in oklab, var(--violet, #7c3aed) 25%, transparent)); }
.up-page .up-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-page .up-id { display: flex; align-items: flex-end; gap: 14px; padding: 0 20px; margin-top: -42px; flex-wrap: wrap; }
.up-page .up-av .avatar.lg { width: 96px; height: 96px; font-size: 34px; box-shadow: 0 0 0 4px var(--bg); }
.up-page h1 { font-size: 24px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pf-share { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* equipe do bot */
.tm-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); }
.tm-row { display: flex; align-items: center; gap: 10px; min-width: 180px; flex: 1 1 200px; }
.tm-row .avatar { width: 38px; height: 38px; }
.tm-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--raise-2); }
.tm-perms { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-perm { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 15px; border: 1px solid var(--line); font-size: 12.5px; cursor: pointer; user-select: none; color: var(--muted); }
.tm-perm input { accent-color: var(--accent); }
.tm-perm.on { color: var(--text); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--accent-soft); }
.tm-perm.fixed { cursor: default; }
.team-note { margin: 0 0 14px; }
.inv-card { max-width: 520px; margin: 40px auto; }
.inv-top { display: flex; align-items: center; gap: 12px; }
.inv-bot { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.bot-shared { font-size: 11px; }
