/* =============================================
   COMUNIDADES - Estilo Orkut Aquarismo Sereno
   Paleta: #315a9e (azul), #42b72a (verde),
           #f0f2f5 (cinza), #fff, #dddfe2 (bordas)
   ============================================= */

/* --- Avatar Classes --- */
.avatar-sm  { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #e4e6eb; }
.avatar-md  { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #e4e6eb; }
.avatar-lg  { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #e4e6eb; }
.avatar-xl  { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #e4e6eb; }

/* --- Widget Box (componente reutilizável sidebar) --- */
.widget-box { background: #fff; border: 1px solid #dddfe2; border-radius: 8px; margin-bottom: 12px; overflow: hidden; }
.widget-header { padding: 10px 12px; font-weight: 600; font-size: .9rem; color: #1c1e21; background: #f0f2f5; border-bottom: 1px solid #dddfe2; display: flex; align-items: center; justify-content: space-between; }
.widget-header a { color: #315a9e; font-size: .8rem; font-weight: 400; text-decoration: none; }
.widget-header a:hover { text-decoration: underline; }
.widget-body { padding: 12px; }

/* --- Avatar Grid (3x3, estilo Orkut) --- */
.avatar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.avatar-grid-item { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: #1c1e21; }
.avatar-grid-item:hover { color: #315a9e; }
.avatar-grid-item .avatar-name { font-size: .75rem; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 72px; line-height: 1.2; }

/* --- Stacked Avatars (mini, para cards) --- */
.stacked-avatars { display: flex; align-items: center; }
.stacked-avatars img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; margin-left: -8px; background: #e4e6eb; }
.stacked-avatars img:first-child { margin-left: 0; }
.stacked-avatars .more-count { font-size: .75rem; color: #65676b; margin-left: 6px; font-weight: 500; }

/* --- Core Container --- */
.comunidades-container { display: grid; gap: 1rem; position: relative; }
.comunidades-list { display: flex; flex-direction: column; gap: .6rem; }

/* --- Community Cards (Home) --- */
.comunidade-card { border: 1px solid #dddfe2; border-radius: 8px; background: #fff; transition: box-shadow 0.2s ease; }
.comunidade-card:hover { box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.comunidade-link { display: grid; grid-template-columns: 56px 1fr; gap: .75rem; align-items: flex-start; padding: 12px; text-decoration: none; color: inherit; }
.comunidade-link:hover { text-decoration: none; color: inherit; }
.comunidade-icone { width: 56px; height: 56px; display: grid; place-items: center; font-size: 28px; background: #f0f2f5; border-radius: 8px; }
.comunidade-header { display: flex; align-items: center; gap: 1rem; position: relative; }
.comunidade-info { flex: 1; min-width: 0; }
.comunidade-nome { margin: 0; font-size: 1rem; font-weight: 600; color: #1c1e21; }
.comunidade-desc { font-size: .875rem; color: #65676b; margin: .2rem 0 0; line-height: 1.4; }
.comunidade-categoria-btn {
  padding: .2rem .5rem; background: #f0f2f5; color: #315a9e; border: 1px solid #dddfe2;
  border-radius: 4px; font-size: .7rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: all 0.2s ease; position: absolute; right: 0; top: 0; z-index: 10;
}
.comunidade-categoria-btn:hover { background: #315a9e; color: #fff; border-color: #315a9e; }

/* Info Cards (contadores flat) */
.comunidade-info-cards {
  display: flex; align-items: center; gap: 0.5rem; margin-top: 8px;
}
.info-card-compact {
  display: flex; align-items: center; gap: 4px; padding: 3px 8px;
  background: #f0f2f5; border-radius: 4px; font-size: .75rem; color: #65676b;
  border: none;
}
.info-card-compact:hover { background: #e4e6eb; }
.info-card-icon { font-size: .75rem; }
.info-card-number { font-weight: 600; color: #1c1e21; font-size: .75rem; }

/* --- 3-Column Layout --- */
.comunidade-layout {
  display: grid; grid-template-columns: 220px 1fr 260px; gap: 12px;
  min-width: 0; overflow-x: hidden;
}

/* --- Sidebar Left --- */
.comunidade-sidebar {
  border: 1px solid #dddfe2; border-radius: 8px; padding: 12px; background: #fff;
  position: sticky; top: 0; height: fit-content; min-width: 0;
}
.side-nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.side-nav a {
  text-decoration: none; color: #1c1e21; padding: 6px 10px; border-radius: 6px;
  font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-nav a:hover { background: #f0f2f5; }
.side-nav a.active { background: #e7f3ff; color: #315a9e; font-weight: 600; }
.side-stats { font-size: .875rem; color: #65676b; display: grid; gap: 4px; padding-top: 8px; border-top: 1px solid #dddfe2; }
.stat-line { display: flex; align-items: center; gap: .4rem; }
.stat-line strong { color: #1c1e21; }

/* --- Sidebar Right --- */
.sidebar-right { display: flex; flex-direction: column; gap: 0; height: fit-content; position: sticky; top: 0; }

/* Related community items */
.related-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; text-decoration: none; color: #1c1e21; }
.related-item:hover { color: #315a9e; }
.related-item + .related-item { border-top: 1px solid #f0f2f5; }
.related-icon { width: 32px; height: 32px; display: grid; place-items: center; background: #f0f2f5; border-radius: 6px; font-size: 16px; flex-shrink: 0; }
.related-info { min-width: 0; }
.related-name { font-size: .85rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-meta { font-size: .75rem; color: #65676b; }

/* Author widget */
.author-widget-card { display: flex; align-items: center; gap: 12px; }
.author-widget-info { min-width: 0; }
.author-widget-name { font-weight: 600; font-size: .9rem; color: #1c1e21; }
.author-widget-name a { color: #315a9e; text-decoration: none; }
.author-widget-name a:hover { text-decoration: underline; }
.author-widget-specialty { font-size: .8rem; color: #65676b; }

/* --- Main Content --- */
.comunidade-main { display: grid; gap: 12px; position: relative; min-width: 0; overflow-x: hidden; }

/* --- Community Header --- */
.comunidade-header { border: 1px solid #dddfe2; border-radius: 8px; padding: 14px; background: #fff; min-width: 0; }
.header-top { display: flex; justify-content: space-between; }
.header-row { display: grid; grid-template-columns: 56px 1fr; gap: .75rem; align-items: flex-start; }
.header-icon { width: 56px; height: 56px; display: grid; place-items: center; background: #f0f2f5; border-radius: 8px; font-size: 28px; flex-shrink: 0; }
.com-title { margin: 0 0 .2rem; font-size: 1.15rem; word-wrap: break-word; overflow-wrap: break-word; color: #1c1e21; }
.pill { display: inline-block; padding: .15rem .5rem; border-radius: 4px; background: #e7f3ff; color: #315a9e; font-size: .75rem; font-weight: 600; margin-right: .4rem; }
.meta { color: #65676b; font-size: .85rem; }
.creator-link { color: #315a9e; text-decoration: none; font-weight: 500; }
.creator-link:hover { text-decoration: underline; }
.com-desc { margin-top: .4rem; color: #1c1e21; font-size: .9rem; line-height: 1.5; word-wrap: break-word; overflow-wrap: break-word; }
.actions-bar { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; justify-content: flex-end; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  background: #f0f2f5; color: #1c1e21; border: none; border-radius: 6px;
  font-size: .875rem; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.15s ease;
}
.btn:hover { background: #e4e6eb; }
.btn-primary { padding: 8px 16px; background: #315a9e; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: .875rem; }
.btn-primary:hover { background: #264a87; }
.btn-outline { background: #fff; color: #315a9e; border: 1px solid #315a9e; }
.btn-outline:hover { background: #e7f3ff; }
.btn-success { background: #42b72a; color: #fff; border: none; font-weight: 600; }
.btn-success:hover { background: #36a420; }
.btn-danger { background: #e74c3c; color: #fff; border: none; }
.btn-danger:hover { background: #c0392b; }
.btn-sidebar { width: 100%; text-align: center; margin-top: 8px; }
.btn-cancel { background: #f0f2f5; color: #1c1e21; border: 1px solid #dddfe2; border-radius: 6px; padding: 7px 14px; cursor: pointer; font-size: .875rem; }
.btn-cancel:hover { background: #e4e6eb; }

/* --- Panel --- */
.panel { border: 1px solid #dddfe2; border-radius: 8px; padding: 14px; background: #fff; min-width: 0; }

/* --- Topics List --- */
.topics-header { display: flex; align-items: center; justify-content: space-between; }
.topics-list { display: grid; gap: .4rem; }
.topic-row {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 12px; border: 1px solid #dddfe2; border-radius: 8px; background: #fff;
  min-width: 0; transition: background 0.1s ease;
}
.topic-row:hover { background: #f7f8fa; }
.topic-avatar { flex-shrink: 0; }
.topic-main { min-width: 0; }
.topic-title { font-weight: 600; margin-bottom: 2px; }
.topic-title a { color: #1c1e21; text-decoration: none; }
.topic-title a:hover { color: #315a9e; text-decoration: underline; }
.topic-title .badge { display: inline-block; margin-right: .3rem; padding: .1rem .35rem; font-size: .7rem; background: #fff3cd; color: #856404; border-radius: 3px; }
.topic-meta { color: #65676b; font-size: .8rem; margin-top: 1px; }
.topic-actions .icon { font-size: 16px; }
.topic-stats { font-size: .8rem; color: #65676b; text-align: right; white-space: nowrap; }

/* Search results - community/topic linking */
.topic-community { display: flex; align-items: center; gap: .4rem; margin-top: .2rem; }
.community-icon { font-size: .8rem; }
.community-link { color: #65676b; text-decoration: none; font-size: .8rem; }
.community-link:hover { color: #315a9e; text-decoration: underline; }
.badge { display: inline-block; padding: .1rem .35rem; background: #e7f3ff; color: #315a9e; border-radius: 3px; font-size: .7rem; font-weight: 600; margin-right: .3rem; }

/* --- Posts / Scraps (estilo Orkut) --- */
.post-item {
  border: 1px solid #dddfe2; border-radius: 8px; padding: 12px; background: #fff; margin-bottom: 8px;
  display: grid; grid-template-columns: 48px 1fr; gap: 10px;
}
.post-first { border-left: 3px solid #315a9e; }
.post-avatar { flex-shrink: 0; padding-top: 2px; }
.post-body { min-width: 0; }
.post-meta { color: #65676b; font-size: .8rem; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.post-meta-name { font-weight: 600; color: #315a9e; }
.post-meta-name a { color: #315a9e; text-decoration: none; }
.post-meta-name a:hover { text-decoration: underline; }
.post-meta-time { color: #65676b; }
.post-content { line-height: 1.6; font-size: .9rem; color: #1c1e21; word-wrap: break-word; overflow-wrap: break-word; }
.post-content a { color: #315a9e; }
.post-actions { margin-top: 6px; padding-top: 6px; border-top: 1px solid #f0f2f5; }

/* --- Members Grid (com avatares) --- */
.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.member-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 12px 8px; border-radius: 8px; text-decoration: none; color: #1c1e21;
  transition: background 0.15s ease;
}
.member-card:hover { background: #f0f2f5; }
.member-card .avatar-lg { margin-bottom: 6px; }
.member-name { font-size: .85rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.member-specialty { font-size: .7rem; color: #65676b; margin-top: 2px; }
.member-joined { font-size: .7rem; color: #65676b; }
/* Legacy member tags (fallback) */
.membros-list .user-tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: .25rem 0 0; }
.membros-list .user-tags li { background: #f0f2f5; border-radius: 999px; padding: .25rem .5rem; font-size: .85rem; }

/* --- Polls --- */
.poll-options { display: grid; gap: .5rem; }
.poll-row { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: .5rem; align-items: center; }
.poll-text { white-space: normal; font-weight: 500; font-size: .9rem; }
.poll-bar { background: #f0f2f5; border-radius: 999px; height: 10px; overflow: hidden; }
.poll-bar > div { height: 10px; background: #315a9e; transition: width 0.3s ease; }
.poll-votes { font-size: .8rem; color: #65676b; font-weight: 500; }

/* --- Pager --- */
.pager { display: flex; align-items: center; gap: .6rem; }

/* --- Forms/Inputs --- */
.comunidades-filtros {
  background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px;
  border: 1px solid #dddfe2;
}
.filtros-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid #f0f2f5; }
.filtros-header h3 { margin: 0; color: #1c1e21; font-size: 1.1rem; font-weight: 600; }
.filtros-header h3 i { margin-right: 6px; color: #315a9e; }
.filtros-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 12px; margin-bottom: 16px; align-items: end; width: 100%; }
.cc-grid-row1 { grid-template-columns: 1.3fr 1fr auto; }
.icon-picker-btn { height: 40px; padding: 0 12px; border: 1px solid #dddfe2; background: #fff; border-radius: 6px; font-size: .9rem; display: inline-flex; align-items:center; gap:.4rem; cursor:pointer; }
.icon-picker-btn:hover { border-color: #315a9e; background: #f7f8fa; }
.filtros-grid .filtro-grupo { width: 100%; min-width: 0; }
.filtro-grupo { display: flex; flex-direction: column; flex: 1; min-width: 0; width: 100%; }
.filtro-grupo.compact { flex: 0 0 auto; min-width: 160px; }
.busca-autocomplete { min-width: 0; }
.filtro-grupo label { font-weight: 600; margin-bottom: 6px; color: #1c1e21; font-size: .85rem; display: flex; align-items: center; gap: 5px; }
.filtro-grupo label i { color: #315a9e; font-size: .8rem; }
.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; }
.input-with-icon { position: relative; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #65676b; font-size: .85rem; z-index: 2; pointer-events: none; font-style: normal; }
.input-icon:not(.fas):not(.fa) { font-size: .9rem; }
.busca-input {
  padding: 10px 14px 10px 38px; border: 1px solid #dddfe2; border-radius: 20px;
  font-size: .9rem; background: #f0f2f5; color: #1c1e21; width: 100%;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.busca-input:focus { outline: none; border-color: #315a9e; background: #fff; }
.filtro-select {
  padding: 10px 34px 10px 38px; border: 1px solid #dddfe2; border-radius: 6px;
  font-size: .9rem; background: #fff; color: #1c1e21; width: 100%; appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 10px center; background-repeat: no-repeat; background-size: 14px;
  transition: border-color 0.2s ease;
}
.filtro-select:focus { outline: none; border-color: #315a9e; }
.filtro-label { font-weight: 600; margin-bottom: 6px; color: #1c1e21; font-size: .85rem; display: flex; align-items: center; gap: 5px; }
.filtro-label i { color: #315a9e; font-size: .8rem; }
.filtro-input {
  padding: 10px 14px; border: 1px solid #dddfe2; border-radius: 6px;
  font-size: .9rem; background: #fff; color: #1c1e21; width: 100%;
  transition: border-color 0.2s ease;
}
.filtro-input:focus { outline: none; border-color: #315a9e; }
.filtro-textarea {
  padding: 10px 14px; border: 1px solid #dddfe2; border-radius: 6px;
  font-size: .9rem; background: #fff; color: #1c1e21; width: 100%; max-width: 100%;
  min-width: 0; box-sizing: border-box; resize: vertical; font-family: inherit;
  transition: border-color 0.2s ease;
}
.filtro-textarea:focus { outline: none; border-color: #315a9e; }
.help-text { font-size: .78rem; color: #65676b; margin-top: 3px; display: block; }

/* Checkboxes */
.filtros-checkboxes { margin-bottom: 16px; }
.checkbox-group { display: flex; gap: 16px; flex-wrap: wrap; }
.checkbox-label { display: flex; align-items: center; cursor: pointer; font-weight: 500; color: #1c1e21; position: relative; }
.checkbox-label input[type="checkbox"] { position: absolute; opacity: 0; cursor: pointer; }
.checkmark { height: 18px; width: 18px; background-color: #fff; border: 1px solid #dddfe2; border-radius: 4px; margin-right: 8px; position: relative; transition: all 0.15s ease; }
.checkbox-label:hover .checkmark { border-color: #315a9e; }
.checkbox-label input:checked ~ .checkmark { background-color: #315a9e; border-color: #315a9e; }
.checkmark:after { content: ""; position: absolute; display: none; left: 5px; top: 1px; width: 5px; height: 9px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.checkbox-label input:checked ~ .checkmark:after { display: block; }
.checkbox-text { font-size: .85rem; user-select: none; }

/* Actions */
.filtros-acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filtros-row { display: flex; gap: 12px; align-items: end; margin-bottom: 16px; }
.filtros-row-compact { flex-wrap: wrap; }

/* Status */
.status-line { margin-left:.4rem; font-size:.85rem; color: #65676b; }
.status-line.ok { color: #42b72a; }
.status-line.err { color: #e74c3c; }

/* --- Alerts --- */
.alert-info, .alert-empty { padding: .6rem .8rem; border-radius: 6px; background: #e7f3ff; color: #315a9e; border: 1px solid #b3d4fc; font-size: .9rem; }
.alert-empty { background: #f0f2f5; color: #65676b; border-color: #dddfe2; }
.empty { color: #65676b; font-size: .9rem; }
.loading { color: #65676b; font-size: .9rem; }
.erro { color: #e74c3c; font-size: .9rem; }

/* --- Poll Builder --- */
.poll-builder { margin-top: 12px; }
.poll-builder-section { margin-bottom: 16px; }
.poll-builder-section h3 { font-size: 1rem; color: #1c1e21; margin: 0 0 12px; }
.poll-builder-section h3 i { color: #315a9e; margin-right: 6px; }
.poll-preview { padding: 12px; background: #f0f2f5; border-radius: 6px; }
.poll-status { margin-top: 8px; }
.options-list { display: grid; gap: .4rem; }
.option-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 6px; background: #f0f2f5; border-radius: 6px; }
.option-item input { flex: 1; padding: 7px 10px; border: 1px solid #dddfe2; border-radius: 4px; font-size: .875rem; }
.option-item button { padding: 5px 8px; background: #e74c3c; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: .78rem; }
.option-item button:hover { background: #c0392b; }
.option-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; }
.options-actions { margin-top: .4rem; }
.options-actions button:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-add { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; background: #f0f2f5; border: 1px solid #dddfe2; border-radius: 6px; cursor: pointer; font-size: .85rem; color: #315a9e; font-weight: 500; }
.btn-add:hover { background: #e7f3ff; }
.options-counter { font-size: .8rem; color: #65676b; margin-left: 8px; }
.form-help { font-size: .78rem; color: #65676b; margin-top: 3px; }

/* --- Emoji/Icon Modals --- */
.emoji-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: none; z-index: 1000; align-items: center; justify-content: center; }
.emoji-picker { background: #fff; border-radius: 10px; padding: 16px; width: min(600px, 92vw); max-height: 400px; overflow-y: auto; overflow-x: hidden; }
.emoji-picker h3 { margin: 0 0 10px; font-size: 1rem; color: #1c1e21; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; margin-bottom: 12px; overflow-x: hidden; }
.emoji-btn { padding: 6px; border: 1px solid #f0f2f5; border-radius: 6px; background: #fff; cursor: pointer; font-size: 1.1rem; transition: all 0.15s ease; width: 100%; text-align: center; }
.emoji-btn:hover { background: #e7f3ff; transform: scale(1.05); }
.emoji-categories { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.emoji-category { padding: 5px 10px; background: #f0f2f5; border: 1px solid #dddfe2; border-radius: 4px; cursor: pointer; font-size: .78rem; font-weight: 500; }
.emoji-category.active { background: #315a9e; color: #fff; border-color: #315a9e; }
.link-actions { margin-top: 8px; }

/* Floating buttons */
.floating-emoji-btn {
  position: absolute; bottom: 8px; right: 8px; width: 32px; height: 32px;
  border: none; border-radius: 50%; background: #315a9e; color: white; font-size: 16px;
  cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.15); transition: background 0.15s ease; z-index: 10;
}
.floating-emoji-btn:hover { background: #264a87; }
.floating-back-btn, .floating-home-btn {
  position: absolute; top: -10px; left: -10px; width: 32px; height: 32px; border-radius: 999px;
  border: 1px solid #dddfe2; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: grid; place-items: center; cursor: pointer; font-size: .85rem;
}
.floating-back-btn:hover, .floating-home-btn:hover { background: #f0f2f5; }

/* --- Modal (join/leave) --- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: grid; place-items: center; z-index: 999; }
.modal-box { background: #fff; border-radius: 8px; padding: 16px; width: min(420px, 90vw); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.modal-actions { display: flex; justify-content: flex-end; gap: .4rem; margin-top: .6rem; }

/* Success modal */
.success-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; z-index: 1000; align-items: center; justify-content: center; }
.success-modal-content { background: #fff; border-radius: 10px; padding: 24px; text-align: center; max-width: 360px; width: 90%; box-shadow: 0 8px 24px rgba(0,0,0,.15); position: relative; }
.success-icon { font-size: 2.5rem; margin-bottom: 10px; }
.success-modal-content h3 { margin: 0 0 8px; color: #42b72a; font-size: 1.1rem; }
.success-modal-content p { margin: 0; color: #1c1e21; font-size: .9rem; }

/* Reply actions */
.comunidades-reply-actions { display: flex; align-items: center; gap: .4rem; margin-top: .4rem; justify-content: flex-start; }

/* "Suas Comunidades" scroll horizontal */
.my-communities-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding: 8px 0 12px;
  scrollbar-width: thin; scrollbar-color: #dddfe2 transparent;
}
.my-communities-scroll::-webkit-scrollbar { height: 4px; }
.my-communities-scroll::-webkit-scrollbar-thumb { background: #dddfe2; border-radius: 2px; }
.my-com-chip {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #fff;
  border: 1px solid #dddfe2; border-radius: 20px; white-space: nowrap;
  text-decoration: none; color: #1c1e21; font-size: .85rem; font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease; flex-shrink: 0;
}
.my-com-chip:hover { border-color: #315a9e; background: #e7f3ff; }
.my-com-chip .chip-icon { font-size: 1.1rem; }

/* --- Breadcrumb (MANTER animação gradiente) --- */
.breadcrumb-tool {
  display: flex; align-items: center; margin-bottom: 16px; padding: 10px 18px;
  font-size: .9rem; color: #fff;
  background: linear-gradient(120deg, #315a9e, #5b7fc7, #315a9e);
  background-size: 200% 200%;
  border-radius: 24px; box-shadow: 0 2px 8px rgba(49,90,158,0.15);
  min-height: 42px; gap: 0.2em; border: none;
  animation: breadcrumb-gradient-move 6s ease-in-out infinite;
  flex-wrap: wrap; overflow: hidden; word-wrap: break-word;
}
@keyframes breadcrumb-gradient-move {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.breadcrumb-tool .breadcrumb-home,
.breadcrumb-tool .breadcrumb-item {
  display: flex; align-items: center; text-decoration: none; color: #fff;
  transition: background 0.2s; padding: 4px 10px; border-radius: 12px;
}
.breadcrumb-tool .breadcrumb-home:hover,
.breadcrumb-tool .breadcrumb-item:hover { background: rgba(255,255,255,0.12); }
.breadcrumb-tool .breadcrumb-icon { font-size: 1.15rem; margin-right: 5px; }
.breadcrumb-tool .breadcrumb-text { font-weight: 600; }
.breadcrumb-tool .breadcrumb-separator { margin: 0 6px; font-size: 1rem; color: rgba(255,255,255,0.6); font-weight: bold; }
.breadcrumb-tool .breadcrumb-current {
  font-weight: 700; color: #fff; background: rgba(255,255,255,0.15);
  border-radius: 12px; padding: 4px 12px; border: 1px solid rgba(255,255,255,0.3);
}

/* Sidebar section (aquários do autor) */
.sidebar-section { margin-top: 12px; padding: 12px; background: #f0f2f5; border-radius: 8px; }
.sidebar-section h4 { margin: 0 0 10px; font-size: .85rem; color: #1c1e21; }

/* --- Responsive --- */
@media (max-width: 1100px) {
  .comunidade-layout { grid-template-columns: 220px 1fr; }
  .sidebar-right { display: none; }
}
@media (max-width: 900px) {
  .comunidade-layout { grid-template-columns: 1fr; gap: 8px; padding: 4px; }
  .comunidade-sidebar { position: static; margin-bottom: 8px; }
  .sidebar-right { display: flex; }
  .comunidade-main { padding: 0; }
  .header-row { grid-template-columns: 48px 1fr; gap: 8px; }
  .header-icon { width: 48px; height: 48px; font-size: 24px; }
  .actions-bar { justify-content: flex-start; flex-wrap: wrap; }
  .post-item { grid-template-columns: 40px 1fr; gap: 8px; }
  .topic-row { grid-template-columns: 28px 1fr auto; gap: 8px; padding: 8px 10px; }
}
@media (max-width: 768px) {
  .comunidade-link { grid-template-columns: 44px 1fr; gap: 8px; padding: 10px; }
  .comunidade-icone { width: 44px; height: 44px; font-size: 22px; }
  .comunidade-info-cards { margin-top: 6px; gap: 4px; }
  .filtros-grid { grid-template-columns: 1fr; gap: 10px; }
  .filtro-grupo.compact { min-width: 100%; }
  .checkbox-group { flex-direction: column; gap: 8px; }
  .filtros-acoes { flex-direction: column; width: 100%; }
  .filtros-acoes .btn { width: 100%; justify-content: center; }
  .members-grid { grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)); gap: 8px; }
}
@media (max-width: 600px) {
  .breadcrumb-tool { font-size: .82rem; padding: 6px 8px; border-radius: 12px; min-height: 32px; }
  .breadcrumb-tool .breadcrumb-home,
  .breadcrumb-tool .breadcrumb-item,
  .breadcrumb-tool .breadcrumb-current { padding: 3px 6px; border-radius: 8px; flex-shrink: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .breadcrumb-tool .breadcrumb-icon { font-size: 1rem; margin-right: 4px; }
  .breadcrumb-tool .breadcrumb-separator { margin: 0 3px; font-size: .9rem; }
  .breadcrumb-tool .breadcrumb-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100px; }
}
@media (max-width: 480px) {
  .breadcrumb-tool { font-size: .78rem; padding: 5px 4px; gap: 0.1em; }
  .breadcrumb-tool .breadcrumb-text { max-width: 70px; }
  .breadcrumb-tool .breadcrumb-home,
  .breadcrumb-tool .breadcrumb-item,
  .breadcrumb-tool .breadcrumb-current { padding: 2px 4px; border-radius: 6px; }
  .breadcrumb-tool .breadcrumb-separator { margin: 0 2px; font-size: .85rem; }
  .comunidade-layout { padding: 2px; gap: 6px; }
  .comunidade-sidebar, .comunidade-main, .comunidade-header, .panel { padding: 10px; }
  .side-nav a { font-size: .85rem; padding: 5px 8px; }
  .header-row { grid-template-columns: 36px 1fr; gap: 6px; }
  .header-icon { width: 36px; height: 36px; font-size: 18px; }
}
