:root {
  --social-navy: #0b2d4f;
  --social-blue: #1267b6;
  --social-teal: #0c8f94;
  --social-coral: #d05a62;
  --social-gold: #c08b2b;
  --social-ink: #18364e;
  --social-muted: #667d90;
  --social-line: #d7e3ec;
  --social-soft: #f3f8fb;
  --social-card: #fff;
  --social-shadow: 0 8px 24px rgba(13, 54, 86, .09);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.social-global-nav {
  position: sticky;
  top: 0;
  z-index: 110;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--social-line);
  backdrop-filter: blur(14px);
}

.social-global-nav-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 56px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.social-nav-link,
.social-mobile-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #3e5d74;
  text-decoration: none;
  font-size: .86rem;
  font-weight: 800;
}

.social-nav-link { min-width: 128px; padding: 0 16px; }
.social-nav-link::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}
.social-nav-link:hover { color: var(--social-blue); background: #f5f9fc; }
.social-nav-link[aria-current="page"] { color: var(--social-blue); }
.social-nav-link[aria-current="page"]::after { background: linear-gradient(90deg, var(--social-blue), var(--social-teal)); }
.social-nav-icon { width: 21px; height: 21px; display: grid; place-items: center; }
.social-nav-icon svg,
.social-button-icon svg,
.social-icon-button svg,
.social-action svg,
.social-dialog-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.social-nav-badge {
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: #c6404e;
  font-size: .65rem;
}

.social-mobile-nav { display: none; }

.social-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 48px;
}

.social-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 640px) minmax(230px, 280px);
  align-items: start;
  justify-content: center;
  gap: 16px;
}

.social-column { min-width: 0; display: grid; gap: 14px; }
.social-sticky { position: sticky; top: 80px; }
.social-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--social-line);
  border-radius: 16px;
  background: var(--social-card);
  box-shadow: var(--social-shadow);
}
.social-card-pad { padding: 18px; }
.social-card h2,
.social-card h3 { color: var(--social-ink); }

.social-identity-card { text-align: center; }
.social-mini-cover {
  height: 78px;
  background: radial-gradient(circle at 20% 10%, rgba(255,255,255,.34), transparent 36%), linear-gradient(135deg, #0b5ea8, #0b9692);
}
.social-avatar {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #dcecf7, #bcd9e8);
  background-position: center;
  background-size: cover;
  color: #1b5678;
  font-weight: 900;
  letter-spacing: .04em;
}
.social-identity-card .social-avatar { margin: -39px auto 10px; position: relative; }
.social-identity-card h2 { margin: 0; font-size: 1.02rem; }
.social-handle { margin: 4px 0 0; color: var(--social-muted); font-size: .8rem; }
.social-professional-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 5px 9px;
  border: 1px solid #b9dbea;
  border-radius: 999px;
  color: #176077;
  background: #edf9fc;
  font-size: .7rem;
  font-weight: 900;
}

.social-side-links { display: grid; padding: 8px; }
.social-side-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 11px;
  color: #395970;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 800;
}
.social-side-links a:hover { background: #edf6fb; color: var(--social-blue); }

.social-composer { padding: 16px; }
.social-composer h2 { margin: 0 0 10px; font-size: .95rem; }
.social-textarea,
.social-input,
.social-select,
.social-dialog textarea,
.social-dialog select {
  width: 100%;
  border: 1px solid #c9d9e5;
  border-radius: 12px;
  background: #fff;
  color: var(--social-ink);
  font: inherit;
  outline: none;
}
.social-textarea,
.social-dialog textarea { min-height: 84px; resize: vertical; padding: 12px 13px; line-height: 1.5; }
.social-input,
.social-select,
.social-dialog select { min-height: 43px; padding: 9px 11px; }
.social-textarea:focus,
.social-input:focus,
.social-select:focus,
.social-dialog textarea:focus,
.social-dialog select:focus { border-color: #4d9bd0; box-shadow: 0 0 0 3px rgba(40, 133, 194, .13); }
.social-composer-footer { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.social-composer-footer .social-select { width: auto; max-width: 210px; }

.social-button,
.social-icon-button,
.social-action {
  border: 0;
  border-radius: 11px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.social-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--social-blue), #168ba3);
}
.social-button.secondary { color: var(--social-ink); background: #fff; border: 1px solid var(--social-line); }
.social-button.danger { color: #942f3a; background: #fff0f1; border: 1px solid #f1c6ca; }
.social-button:disabled,
.social-action:disabled { opacity: .55; cursor: not-allowed; }
.social-button-icon { width: 19px; height: 19px; }

.social-post { padding: 16px; }
.social-post + .social-post { border-top: 1px solid #e6edf3; }
.social-post-header { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.social-post-header .social-avatar { width: 46px; height: 46px; border-width: 1px; font-size: .72rem; }
.social-post-author { min-width: 0; }
.social-post-author a { display: block; overflow: hidden; color: var(--social-ink); font-size: .88rem; font-weight: 900; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.social-post-author a:hover { color: var(--social-blue); text-decoration: underline; }
.social-post-author span { display: block; margin-top: 2px; color: var(--social-muted); font-size: .7rem; }
.social-icon-button { width: 38px; height: 38px; display: grid; place-items: center; color: #536d80; background: transparent; }
.social-icon-button:hover { background: #edf5fa; }
.social-icon-button svg { width: 19px; height: 19px; }
.social-post-body { margin: 13px 0 12px; color: #253f54; font-size: 1rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.social-post-meta { color: var(--social-muted); font-size: .7rem; }
.social-post-actions { display: flex; align-items: center; gap: 6px; margin-top: 13px; padding-top: 11px; border-top: 1px solid #edf2f5; }
.social-action { min-height: 39px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; color: #48677c; background: transparent; font-size: .78rem; }
.social-action:hover { background: #edf6fb; color: var(--social-blue); }
.social-action.active { color: var(--social-blue); background: #e8f4fb; }
.social-action svg { width: 18px; height: 18px; }

.social-comments { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #d7e4ec; }
.social-comment { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; padding: 8px 0; }
.social-comment .social-avatar { width: 34px; height: 34px; border-width: 1px; font-size: .61rem; }
.social-comment-bubble { min-width: 0; padding: 9px 11px; border-radius: 12px; background: #f2f7fa; }
.social-comment-bubble a { color: #284e68; font-size: .75rem; font-weight: 900; text-decoration: none; }
.social-comment-bubble p { margin: 4px 0 0; color: #37556a; font-size: .8rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.social-comment-delete { align-self: start; border: 0; background: transparent; color: #8e4450; cursor: pointer; font-size: .7rem; }
.social-comment-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; }

.social-empty { padding: 36px 22px; color: var(--social-muted); text-align: center; }
.social-empty svg { width: 44px; height: 44px; fill: none; stroke: #6791aa; stroke-width: 1.5; }
.social-empty h2 { margin: 12px 0 6px; font-size: 1rem; }
.social-empty p { margin: 0 auto; max-width: 440px; color: var(--social-muted); font-size: .84rem; line-height: 1.55; }

.social-status { margin: 10px 0; padding: 10px 12px; border-radius: 10px; font-size: .8rem; line-height: 1.45; }
.social-status.info { color: #24516e; border: 1px solid #c9e3f2; background: #eef8fd; }
.social-status.success { color: #22634f; border: 1px solid #c5e6d8; background: #edf9f4; }
.social-status.error { color: #8b303a; border: 1px solid #f0c8cc; background: #fff0f1; }

.social-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #e7eef3; }
.social-section-heading h1,
.social-section-heading h2 { margin: 0; font-size: 1rem; }
.social-section-heading p { margin: 3px 0 0; color: var(--social-muted); font-size: .75rem; }
.social-list { display: grid; }
.social-person-row { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 16px; border-top: 1px solid #edf2f5; }
.social-person-row:first-child { border-top: 0; }
.social-person-row .social-avatar { width: 50px; height: 50px; border-width: 1px; font-size: .72rem; }
.social-person-copy { min-width: 0; }
.social-person-copy a { color: var(--social-ink); font-size: .88rem; font-weight: 900; text-decoration: none; }
.social-person-copy p { margin: 3px 0 0; color: var(--social-muted); font-size: .73rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.social-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.social-row-actions .social-button { min-height: 36px; padding: 7px 10px; font-size: .72rem; }

.social-tabs { display: flex; overflow-x: auto; padding: 8px; gap: 5px; border-bottom: 1px solid #e5edf3; }
.social-tab { min-height: 38px; flex: 0 0 auto; border: 0; border-radius: 10px; padding: 8px 12px; color: #536f82; background: transparent; font: inherit; font-size: .78rem; font-weight: 850; cursor: pointer; }
.social-tab.active { color: var(--social-blue); background: #eaf5fb; }
.social-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 16px; }

.social-list-pagination {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 16px;
  border-top: 1px solid #e5edf3;
  background: #fbfdff;
}
.social-list-pagination[hidden] { display: none; }
.social-page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--social-muted);
  font-size: .76rem;
  font-weight: 800;
}
.social-page-size .social-select {
  width: auto;
  min-width: 132px;
  min-height: 38px;
  padding: 7px 30px 7px 10px;
  font-size: .76rem;
}
.social-pagination-summary {
  color: var(--social-muted);
  font-size: .74rem;
  font-weight: 800;
  white-space: nowrap;
}
.social-pagination-pages {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
}
.social-page-button {
  min-width: 36px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 6px 9px;
  border: 1px solid var(--social-line);
  border-radius: 10px;
  color: #45657b;
  background: #fff;
  font: inherit;
  font-size: .74rem;
  font-weight: 900;
  cursor: pointer;
}
.social-page-button:hover:not(:disabled) { color: var(--social-blue); border-color: #9ec7df; background: #eef7fc; }
.social-page-button[aria-current="page"] { color: #fff; border-color: var(--social-blue); background: var(--social-blue); }
.social-page-button:disabled { opacity: .42; cursor: not-allowed; }
.social-pagination-ellipsis {
  min-width: 24px;
  color: var(--social-muted);
  text-align: center;
  font-weight: 900;
}

.social-profile-cover { min-height: 210px; position: relative; display: flex; align-items: flex-end; padding: 22px; color: #fff; }
.social-profile-cover.theme-aurora { background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.3), transparent 31%), linear-gradient(135deg, #135ea2, #0d9995 70%, #78bd91); }
.social-profile-cover.theme-oceano { background: radial-gradient(circle at 76% 20%, rgba(255,255,255,.2), transparent 30%), linear-gradient(135deg, #08365e, #0574a4 58%, #14a5ae); }
.social-profile-cover.theme-serra { background: radial-gradient(circle at 18% 30%, rgba(255,244,205,.25), transparent 27%), linear-gradient(135deg, #3f5e4b, #758551 52%, #bb8d51); }
.social-profile-cover.theme-ipê { background: radial-gradient(circle at 80% 18%, rgba(255,255,255,.24), transparent 28%), linear-gradient(135deg, #6c397d, #b24c85 55%, #d98a52); }
.social-profile-cover.pattern-waves::before,
.social-profile-cover.pattern-rings::before,
.social-profile-cover.pattern-grid::before { content: ""; position: absolute; inset: 0; opacity: .18; pointer-events: none; }
.social-profile-cover.pattern-waves::before { background: repeating-radial-gradient(ellipse at 0 100%, transparent 0 22px, #fff 23px 25px); }
.social-profile-cover.pattern-rings::before { background: repeating-radial-gradient(circle at 88% 18%, transparent 0 28px, #fff 29px 31px); }
.social-profile-cover.pattern-grid::before { background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px); background-size: 28px 28px; }
.social-profile-identity { position: relative; display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 16px; align-items: end; width: 100%; }
.social-profile-identity .social-avatar { width: 104px; height: 104px; border-width: 4px; color: #1a526f; }
.social-profile-name h1 { margin: 0; color: #fff; font-size: clamp(1.35rem, 3vw, 2rem); text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.social-profile-name p { margin: 5px 0 0; color: rgba(255,255,255,.88); }
.social-profile-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.social-profile-actions .social-button.secondary { background: rgba(255,255,255,.93); }
.social-profile-grid { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); gap: 18px; padding: 18px; }
.social-profile-module { padding: 17px; border: 1px solid #e0e9ef; border-radius: 14px; background: #fff; }
.social-profile-module h2 { margin: 0 0 10px; font-size: .95rem; }
.social-profile-module p { margin: 0; color: #4d687b; font-size: .84rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.social-chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.social-chip { padding: 6px 9px; border-radius: 999px; background: #edf6fa; color: #376479; font-size: .7rem; font-weight: 800; }

.social-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.social-field { display: grid; gap: 6px; }
.social-field.wide { grid-column: 1 / -1; }
.social-field label,
.social-dialog label { color: #38566c; font-size: .75rem; font-weight: 850; }
.social-module-order { display: flex; flex-wrap: wrap; gap: 8px; }
.social-module-order label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--social-line); border-radius: 10px; background: #fff; }
.social-module-order-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px; align-items: center; }
.social-module-order-row .social-button { min-height: 36px; padding: 6px 10px; font-size: .72rem; }

.social-notification { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 11px; padding: 14px 16px; border-top: 1px solid #edf2f5; }
.social-notification.unread { background: #f1f8fc; box-shadow: inset 3px 0 var(--social-blue); }
.social-notification.judicial.unread { background: #fffaf0; box-shadow: inset 3px 0 #b97900; }
.social-notification.judicial .social-avatar { background: #fff3c9; color: #704b00; font-size: 1.2rem; }
.social-notification .social-avatar { width: 44px; height: 44px; border-width: 1px; font-size: .7rem; }
.social-notification p { margin: 0; color: #38566a; font-size: .83rem; line-height: 1.45; }
.social-notification time { display: block; margin-top: 4px; color: var(--social-muted); font-size: .68rem; }

.social-dialog {
  width: min(460px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--social-ink);
  box-shadow: 0 30px 90px rgba(5, 32, 52, .36);
}
.social-dialog::backdrop { background: rgba(5, 28, 48, .58); backdrop-filter: blur(3px); }
.social-dialog form { display: grid; gap: 12px; padding: 24px; }
.social-dialog h2 { margin: 0; font-size: 1.16rem; }
.social-dialog p { margin: 0; color: var(--social-muted); font-size: .84rem; line-height: 1.55; }
.social-dialog-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--social-blue); }
.social-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 5px; }

.social-admin-report { padding: 17px; border-top: 1px solid #e5edf3; }
.social-admin-report:first-child { border-top: 0; }
.social-admin-report h3 { margin: 0 0 7px; font-size: .9rem; }
.social-admin-report p { margin: 4px 0; color: #4d687a; font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere; }
.social-report-target { margin: 10px 0; padding: 11px 13px; border-left: 4px solid #4c8faf; border-radius: 0 10px 10px 0; background: #f2f8fb; color: #203f55; white-space: pre-wrap; overflow-wrap: anywhere; }

.hub-card.hub-card-warning { border-color: #e5c36b; background: #fffaf0; }
.hub-card.hub-card-compact {
  min-height: 96px;
  padding: 12px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  justify-content: stretch;
  gap: 4px 10px;
  border-radius: 14px;
}
.hub-card.hub-card-compact .hub-card-icon { width: 48px; height: 48px; grid-row: 1 / 3; border-radius: 14px; }
.hub-card.hub-card-compact .hub-card-icon img { width: 42px; height: 42px; border-radius: 12px; }
.hub-card.hub-card-compact .hub-card-icon svg { width: 28px; height: 28px; }
.hub-card.hub-card-compact > span:not(.hub-card-icon):not(.hub-card-arrow) { min-width: 0; }
.hub-card.hub-card-compact h3 { margin: 0; font-size: .88rem; line-height: 1.25; overflow-wrap: anywhere; }
.hub-card.hub-card-compact p { display: none; }
.hub-card.hub-card-compact .hub-card-arrow { align-self: start; font-size: .75rem; line-height: 1.25; }
.social-shortcuts .portal-grid { grid-template-columns: 1fr; padding: 10px; gap: 8px; }

.social-skeleton { min-height: 120px; position: relative; overflow: hidden; background: #f1f5f7; }
.social-skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent); animation: social-shimmer 1.3s infinite; }
@keyframes social-shimmer { to { transform: translateX(100%); } }

:where(.social-nav-link,.social-mobile-nav-link,.social-button,.social-action,.social-icon-button,.social-tab,.social-page-button,.social-person-copy a,.social-post-author a):focus-visible {
  outline: 3px solid #f0b949;
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  .social-layout { grid-template-columns: 220px minmax(0, 680px); }
  .social-layout > .social-column:last-child { grid-column: 2; position: static; grid-template-columns: 1fr; }
  .social-shortcuts .portal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  body.has-social-navigation { padding-bottom: 76px; }
  .social-global-nav { display: none; }
  .social-mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 13000;
    min-height: 66px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    padding: 5px max(5px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left));
    border-top: 1px solid #cddde8;
    background: rgba(255,255,255,.98);
    box-shadow: 0 -8px 28px rgba(13, 50, 78, .12);
  }
  .social-mobile-nav-link { min-width: 0; flex-direction: column; gap: 2px; padding: 5px 2px; border-radius: 10px; font-size: .65rem; }
  .social-mobile-nav-link[aria-current="page"] { color: var(--social-blue); background: #edf6fb; }
  .social-nav-icon { width: 22px; height: 22px; }
  .social-shell { width: min(100% - 20px, 680px); margin-top: 10px; }
  .social-layout { display: block; }
  .social-layout > .social-column { margin-bottom: 13px; }
  .social-layout > .social-column:first-child .social-side-links { display: none; }
  .social-layout > .social-column:last-child { display: grid; grid-template-columns: 1fr; }
  .social-sticky { position: static; }
  .social-identity-card { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 11px; align-items: center; padding: 12px; text-align: left; }
  .social-identity-card .social-mini-cover { display: none; }
  .social-identity-card .social-avatar { width: 58px; height: 58px; margin: 0; border-width: 1px; grid-row: 1 / span 3; }
  .social-identity-card .social-professional-badge { justify-self: start; margin: 0; }
  .social-shortcuts .portal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .social-profile-cover { min-height: 260px; padding: 18px 14px; }
  .social-profile-identity { grid-template-columns: 82px minmax(0,1fr); align-items: end; }
  .social-profile-identity .social-avatar { width: 82px; height: 82px; }
  .social-profile-actions { grid-column: 1 / -1; justify-content: stretch; }
  .social-profile-actions .social-button { flex: 1 1 130px; }
  .social-profile-grid { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .social-form-grid { grid-template-columns: 1fr; }
  .social-field.wide { grid-column: auto; }
  .social-person-row { grid-template-columns: 46px minmax(0,1fr); }
  .social-person-row .social-avatar { width: 46px; height: 46px; }
  .social-row-actions { grid-column: 1 / -1; justify-content: flex-start; padding-left: 58px; }
  .social-search-form { grid-template-columns: 1fr; }
  .social-search-form .social-button { width: 100%; }
  .social-list-pagination { align-items: stretch; padding: 12px; }
  .social-page-size { width: 100%; justify-content: space-between; }
  .social-page-size .social-select { min-height: 44px; }
  .social-pagination-summary { width: 100%; text-align: center; }
  .social-pagination-pages { width: 100%; justify-content: center; }
  .social-page-button { min-width: 44px; min-height: 44px; }
  .social-comment-form { grid-template-columns: 1fr; }
  .social-row-actions .social-button,
  .social-tab,
  .social-comment-delete { min-height: 44px; }
  .social-comment-delete { padding: 8px; }
  .social-composer-footer { align-items: center; flex-direction: row; }
  .social-composer-footer .social-select { width: auto; min-width: 0; max-width: none; flex: 1 1 auto; }
  .social-composer-footer .social-button { width: auto; flex: 0 0 auto; }
  .portal-chat { bottom: 78px !important; }
}

@media (max-width: 360px) {
  .social-shell { width: calc(100% - 12px); }
  .social-card { border-radius: 14px; }
  .social-post, .social-composer { padding: 14px; }
  .social-post-actions { overflow-x: auto; }
  .social-action { flex: 0 0 auto; }
  .social-profile-cover { min-height: 280px; }
  .social-profile-identity { grid-template-columns: 70px minmax(0,1fr); gap: 10px; }
  .social-profile-identity .social-avatar { width: 70px; height: 70px; }
  .social-profile-name h1 { font-size: 1.22rem; }
}

/* O celular pode anunciar uma viewport larga (modo desktop/zoom do navegador).
   A classe aplicada pela Home garante uma composição de aplicativo nesses casos. */
body.mobile-home-mode.has-social-navigation {
  padding-bottom: calc(clamp(108px, 15vw, 150px) + env(safe-area-inset-bottom));
}

body.mobile-home-mode .social-global-nav { display: none; }

body.mobile-home-mode .social-mobile-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 13000;
  min-height: clamp(96px, 13.5vw, 132px);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  padding: clamp(8px, 1.2vw, 12px) max(8px, env(safe-area-inset-right)) calc(clamp(8px, 1.2vw, 12px) + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  border-top: 2px solid #b9cfdd;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 -8px 24px rgba(13, 50, 78, .16);
}

body.mobile-home-mode .social-mobile-nav-link {
  min-width: 0;
  min-height: clamp(88px, 12vw, 117px);
  flex-direction: column;
  gap: clamp(4px, .7vw, 8px);
  padding: clamp(7px, 1.1vw, 11px) 4px;
  border-radius: 16px;
  font-size: clamp(18px, 2.85vw, 27px);
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
}

body.mobile-home-mode .social-mobile-nav-link[aria-current="page"] {
  color: var(--social-blue);
  background: #e5f3fb;
  box-shadow: inset 0 4px var(--social-blue);
}

body.mobile-home-mode .social-mobile-nav-link .social-nav-icon {
  width: clamp(40px, 5.55vw, 54px);
  height: clamp(40px, 5.55vw, 54px);
}

body.mobile-home-mode .social-mobile-nav-link .social-nav-badge {
  min-width: clamp(29px, 3.9vw, 39px);
  height: clamp(29px, 3.9vw, 39px);
  font-size: clamp(14px, 1.95vw, 19.5px);
  position: absolute;
  top: clamp(3px, .6vw, 6px);
  left: calc(50% + clamp(12px, 1.8vw, 18px));
}

body.mobile-home-mode .social-shell {
  width: 100%;
  margin: 0 auto clamp(40px, 6vw, 60px);
  padding: clamp(13px, 2.1vw, 21px) clamp(13px, 2.1vw, 21px) 0;
  font-size: clamp(21px, 3.225vw, 31.5px);
}

body.mobile-home-mode .social-layout {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.8vw, 18px);
}

body.mobile-home-mode .social-layout > .social-column {
  width: 100%;
  margin: 0;
  gap: clamp(12px, 1.8vw, 18px);
}

body.mobile-home-mode .social-profile-rail { display: none; }
body.mobile-home-mode .social-feed-column { order: 1; }
body.mobile-home-mode .social-tools-rail {
  order: 2;
  display: block;
  position: static;
}

body.mobile-home-mode .social-card {
  border-radius: clamp(18px, 2.7vw, 27px);
  box-shadow: 0 3px 13px rgba(13, 54, 86, .09);
}

body.mobile-home-mode .social-composer {
  padding: clamp(18px, 2.85vw, 28.5px);
}

body.mobile-home-mode .social-composer h2 {
  margin-bottom: clamp(12px, 1.8vw, 18px);
  font-size: 1em;
}

body.mobile-home-mode .social-textarea {
  min-height: clamp(108px, 14.7vw, 144px);
  padding: clamp(14px, 2.25vw, 22.5px);
  border-radius: 20px;
  font-size: 1em;
  line-height: 1.45;
}

body.mobile-home-mode .social-composer-footer {
  margin-top: clamp(12px, 1.8vw, 18px);
  align-items: center;
  flex-direction: row;
  gap: clamp(10px, 1.8vw, 18px);
}

body.mobile-home-mode .social-composer-footer .social-select {
  width: auto;
  min-width: 0;
  max-width: none;
  min-height: clamp(64px, 9.3vw, 90px);
  flex: 1 1 auto;
  padding: clamp(13px, 1.95vw, 19.5px) clamp(15px, 2.25vw, 22.5px);
  font-size: .95em;
}

body.mobile-home-mode .social-composer-footer .social-button {
  width: auto;
  min-width: clamp(136px, 18vw, 177px);
  min-height: clamp(64px, 9.3vw, 90px);
  flex: 0 0 auto;
  padding-right: clamp(18px, 2.7vw, 27px);
  padding-left: clamp(18px, 2.7vw, 27px);
}

body.mobile-home-mode .social-status {
  margin: 0;
  padding: clamp(14px, 2.1vw, 21px);
  font-size: .9em;
}
body.mobile-home-mode .social-skeleton { min-height: clamp(145px, 19.5vw, 192px); }

body.mobile-home-mode .social-post { padding: clamp(18px, 2.85vw, 28.5px); }
body.mobile-home-mode .social-post-header {
  grid-template-columns: clamp(60px, 7.95vw, 78px) minmax(0, 1fr) clamp(64px, 8.7vw, 84px);
  gap: clamp(12px, 1.8vw, 18px);
}
body.mobile-home-mode .social-post-header .social-avatar {
  width: clamp(60px, 7.95vw, 78px);
  height: clamp(60px, 7.95vw, 78px);
}
body.mobile-home-mode .social-post-author a { font-size: .95em; }
body.mobile-home-mode .social-post-author span,
body.mobile-home-mode .social-post-meta { font-size: .78em; }
body.mobile-home-mode .social-icon-button {
  width: clamp(64px, 8.7vw, 84px);
  height: clamp(64px, 8.7vw, 84px);
}
body.mobile-home-mode .social-post-body {
  margin: clamp(16px, 2.25vw, 22.5px) 0 clamp(13px, 1.95vw, 19.5px);
  font-size: 1em;
  line-height: 1.5;
}
body.mobile-home-mode .social-post-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 3px;
  margin-top: 15px;
  padding-top: 11px;
}
body.mobile-home-mode .social-action {
  min-width: 0;
  min-height: clamp(64px, 9vw, 87px);
  justify-content: center;
  padding: clamp(9px, 1.5vw, 15px) 6px;
  font-size: .85em;
}
body.mobile-home-mode .social-action svg {
  width: clamp(27px, 3.75vw, 36px);
  height: clamp(27px, 3.75vw, 36px);
}

body.mobile-home-mode .social-comments {
  margin-top: 14px;
  padding-top: 14px;
}
body.mobile-home-mode .social-comment .social-avatar {
  width: clamp(50px, 6.75vw, 66px);
  height: clamp(50px, 6.75vw, 66px);
}
body.mobile-home-mode .social-comment-bubble a { font-size: .82em; }
body.mobile-home-mode .social-comment-bubble p { font-size: .9em; }
body.mobile-home-mode .social-comment-delete { font-size: .8em; }
body.mobile-home-mode .social-comment-form {
  grid-template-columns: minmax(0, 1fr) auto;
}
body.mobile-home-mode .social-comment-form .social-input,
body.mobile-home-mode .social-comment-form .social-button {
  min-height: clamp(64px, 8.7vw, 84px);
}

body.mobile-home-mode .social-empty { padding: clamp(37px, 6vw, 60px) clamp(24px, 3.75vw, 36px); }
body.mobile-home-mode .social-empty svg { width: clamp(58px, 7.95vw, 78px); height: clamp(58px, 7.95vw, 78px); }
body.mobile-home-mode .social-empty h2 { margin-top: clamp(13px, 2.1vw, 21px); font-size: 1em; }
body.mobile-home-mode .social-empty p { font-size: .9em; line-height: 1.5; }
body.mobile-home-mode #socialFeedMore { width: 100%; min-height: clamp(66px, 9.3vw, 90px); }

body.mobile-home-mode .social-shortcuts { margin-top: 3px; }
body.mobile-home-mode .social-shortcuts .social-section-heading {
  padding: clamp(17px, 2.7vw, 27px) clamp(18px, 2.85vw, 28.5px) clamp(12px, 1.8vw, 18px);
  border-bottom: 0;
}
body.mobile-home-mode .social-shortcuts .social-section-heading h2 { font-size: 1em; }
body.mobile-home-mode .social-shortcuts .social-section-heading p { display: none; }
body.mobile-home-mode .social-shortcuts .portal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.8vw, 18px);
  padding: 3px clamp(13px, 2.1vw, 21px) clamp(14px, 2.25vw, 22.5px);
}
body.mobile-home-mode .social-shortcuts .hub-card.hub-card-compact {
  min-height: clamp(168px, 23.25vw, 228px);
  padding: clamp(14px, 2.25vw, 22.5px) clamp(8px, 1.5vw, 15px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(10px, 1.65vw, 16.5px);
  border-radius: 20px;
  text-align: center;
}
body.mobile-home-mode .social-shortcuts .hub-card.hub-card-compact .hub-card-icon {
  width: clamp(72px, 9.75vw, 96px);
  height: clamp(72px, 9.75vw, 96px);
  margin: 0;
  border-radius: 20px;
}
body.mobile-home-mode .social-shortcuts .hub-card.hub-card-compact .hub-card-icon img {
  width: clamp(66px, 9.15vw, 90px);
  height: clamp(66px, 9.15vw, 90px);
  border-radius: 18px;
}
body.mobile-home-mode .social-shortcuts .hub-card.hub-card-compact .hub-card-icon svg {
  width: clamp(45px, 6.3vw, 63px);
  height: clamp(45px, 6.3vw, 63px);
}
body.mobile-home-mode .social-shortcuts .hub-card.hub-card-compact > span:not(.hub-card-icon):not(.hub-card-arrow) {
  width: 100%;
}
body.mobile-home-mode .social-shortcuts .hub-card.hub-card-compact h3 {
  margin: 0;
  font-size: .88em;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}
body.mobile-home-mode .social-shortcuts .hub-card.hub-card-compact .hub-card-arrow { display: none; }
body.mobile-home-mode .social-shortcuts .social-card-pad { padding: 0 clamp(13px, 2.1vw, 21px) clamp(14px, 2.25vw, 22.5px); }
body.mobile-home-mode .social-shortcuts .social-card-pad .social-button {
  width: 100%;
  min-height: clamp(66px, 9.3vw, 90px);
}
body.mobile-home-mode .social-safety-card { display: none; }

body.mobile-home-mode .portal-chat {
  bottom: calc(clamp(126px, 16.5vw, 168px) + env(safe-area-inset-bottom)) !important;
}

@media (max-width: 390px) {
  body.mobile-home-mode .social-shell { padding-right: 10px; padding-left: 10px; }
  body.mobile-home-mode .social-composer,
  body.mobile-home-mode .social-post { padding-right: 15px; padding-left: 15px; }
  body.mobile-home-mode .social-shortcuts .portal-grid { gap: 8px; padding-right: 10px; padding-left: 10px; }
  body.mobile-home-mode .social-shortcuts .hub-card.hub-card-compact { min-height: 165px; padding-right: 6px; padding-left: 6px; }
  body.mobile-home-mode .social-shortcuts .hub-card.hub-card-compact h3 { font-size: .86em; }
}

@media (prefers-reduced-motion: reduce) {
  .social-skeleton::after { animation: none; }
  .social-button,
  .social-action,
  .social-nav-link { scroll-behavior: auto; transition: none !important; }
}

@media (forced-colors: active) {
  .social-card,
  .social-button,
  .social-action,
  .social-profile-module { border: 1px solid CanvasText; }
  .social-nav-link[aria-current="page"] { outline: 2px solid Highlight; }
}


/* Busca social na barra superior da Home — desktop somente. */
@media (min-width: 901px) {
  .social-global-user-search {
    position: relative;
    flex: 1 1 430px;
    min-width: 300px;
    max-width: 520px;
    display: flex;
    align-items: center;
    padding: 7px 4px 7px 8px;
  }
  .social-global-user-search-box { position: relative; width: 100%; }
  .social-global-user-search-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    color: #55728a;
    pointer-events: none;
  }
  .social-global-user-search-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .social-global-user-search-input {
    width: 100%;
    min-height: 42px;
    padding: 9px 16px 9px 42px;
    border: 1px solid #c8d9e6;
    border-radius: 999px;
    outline: none;
    background: #f7fafc;
    color: var(--social-ink);
    font: inherit;
    font-size: .9rem;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  }
  .social-global-user-search-input:focus {
    border-color: #54a3d8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(18,103,182,.11);
  }
  .social-global-user-search-results {
    position: absolute;
    top: calc(100% + 7px);
    right: 4px;
    left: 8px;
    z-index: 260;
    max-height: min(460px, calc(100vh - 150px));
    overflow-y: auto;
    border: 1px solid #cfdee9;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 52px rgba(13,49,87,.22);
  }
  .social-global-user-search-message {
    padding: 17px 18px;
    color: var(--social-muted);
    font-size: .84rem;
  }
  .social-global-user-search-result {
    display: grid;
    grid-template-columns: 44px minmax(0,1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border-bottom: 1px solid #e6eef4;
  }
  .social-global-user-search-result:last-child { border-bottom: 0; }
  .social-global-user-search-result:hover { background: #f7fbfd; }
  .social-global-user-search-avatar {
    width: 44px;
    height: 44px;
    border-width: 2px;
    font-size: .68rem;
  }
  .social-global-user-search-copy { min-width: 0; }
  .social-global-user-search-copy a {
    display: block;
    overflow: hidden;
    color: var(--social-ink);
    font-size: .86rem;
    font-weight: 850;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .social-global-user-search-copy a:hover { color: var(--social-blue); }
  .social-global-user-search-copy span {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    color: var(--social-muted);
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .social-global-user-search-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }
  .social-global-user-search-actions .social-button {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: .74rem;
  }
  .social-global-user-search-profile {
    padding: 7px 5px;
    color: #245b83;
    font-size: .72rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
  }
  .social-global-user-search-profile:hover { text-decoration: underline; }
}
