@import url('https://fonts.googleapis.com/css2?family=Geologica:wght@100..900&display=swap');

:root {
  --teddy-orange: #eb6625;
  --teddy-orange-dark: #c94f17;
  --teddy-orange-soft: #fff1ea;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-soft: #64748b;
  --border: rgba(0, 0, 0, 0.06);
  --radius-xl: 32px;
  --radius-lg: 20px;
  --shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.06);
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Geologica", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

.app-container {
  display: none;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.app-container.visible {
  display: grid;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 40px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  padding-left: 10px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  background: var(--teddy-orange);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  font-size: 22px;
  box-shadow: 0 10px 20px rgba(235, 102, 37, 0.2);
}

.nav-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: 24px 14px 10px;
  opacity: 0.6;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  color: var(--text-soft);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 4px;
  font-size: 15px;
}

.nav-item i {
  font-size: 20px;
}

.nav-item:hover {
  background: var(--bg);
  color: var(--text);
}

.nav-item.active {
  background: var(--teddy-orange-soft);
  color: var(--teddy-orange);
}

.main-content {
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  min-width: 0;
}

.header {
  height: 90px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.search-box {
  background: var(--bg);
  border-radius: 50px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 350px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  width: 100%;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;     /* fotos de perfil sempre circulares */
  background: var(--teddy-orange);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  overflow: hidden;       /* garante recorte circular pra <img> filhos */
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Phosphor não traz utility de spin; replica o efeito do bx-spin antigo. */
.ph-spin {
  animation: ph-spin-rot 1s linear infinite;
  display: inline-block;
}
@keyframes ph-spin-rot {
  to { transform: rotate(360deg); }
}

/* @menções — dropdown + link */
.mention-dropdown {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.2);
  max-height: 280px; overflow-y: auto;
  z-index: 3000;
}
.mention-dropdown[hidden] { display: none !important; }
.mention-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  cursor: pointer; transition: background 0.15s;
  border-bottom: 1px solid var(--border, #f1f5f9);
}
.mention-item:last-child { border-bottom: 0; }
.mention-item:hover,
.mention-item.active { background: var(--teddy-orange-soft, #fff1ea); }
.mention-item .mention-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--teddy-orange); color: white;
  display: grid; place-items: center; font-weight: 800; font-size: 11px; overflow: hidden;
}
.mention-item .mention-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mention-item .mention-body { flex: 1; min-width: 0; }
.mention-item .mention-body strong {
  display: block; font-size: 13px; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mention-item .mention-body span {
  font-size: 11px; color: var(--text-soft); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; margin-top: 1px;
}

a.mention {
  display: inline-block;
  background: var(--teddy-orange-soft, #fff1ea);
  color: var(--teddy-orange);
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}
a.mention:hover { background: var(--teddy-orange); color: white; }

/* Global search dropdown (header) */
.global-search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.18);
  max-height: 480px; overflow-y: auto;
  z-index: 200;
}
.global-search-dropdown[hidden] { display: none !important; }
.gsd-section-label {
  padding: 10px 16px 4px; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-soft);
  background: var(--bg, #f8fafc);
  position: sticky; top: 0;
}
.gsd-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--border, #f1f5f9); cursor: pointer;
  transition: var(--transition, 0.2s); text-decoration: none; color: inherit;
}
.gsd-item:hover { background: var(--bg, #f8fafc); }
.gsd-item:last-child { border-bottom: 0; }
.gsd-item .gsd-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--teddy-orange-soft, #fff1ea); color: var(--teddy-orange);
  display: grid; place-items: center; font-size: 16px; font-weight: 800;
  flex-shrink: 0; overflow: hidden;
}
.gsd-item .gsd-icon img { width: 100%; height: 100%; object-fit: cover; }
.gsd-item .gsd-body { flex: 1; min-width: 0; }
.gsd-item .gsd-title {
  font-weight: 800; font-size: 13px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gsd-item .gsd-subtitle {
  font-size: 11px; color: var(--text-soft); font-weight: 600; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gsd-empty {
  padding: 30px; text-align: center; color: var(--text-soft); font-size: 13px;
}
.gsd-loading {
  padding: 20px; text-align: center; color: var(--text-soft); font-size: 12px;
}

/* Reações da timeline — SAM picker */
.react-btn.reacted { font-weight: 800; }
.react-picker {
  position: absolute; bottom: calc(100% + 8px); left: 0;
  display: flex; gap: 4px; padding: 10px 12px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 999px;
  box-shadow: 0 8px 24px -6px rgba(15,23,42,0.25);
  z-index: 50;
}
.react-picker[hidden] { display: none !important; }
.react-opt {
  background: none; border: none; cursor: pointer;
  font-size: 22px; line-height: 1;
  width: 40px; height: 40px; border-radius: 50%;
  transition: transform 0.12s;
}
.react-opt:hover { transform: scale(1.35) translateY(-4px); background: var(--bg, #f1f5f9); }
/* Badge tooltip */
.badge-tip-wrap { overflow: visible !important; }
.badge-tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  z-index: 100;
  background: #1e293b;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  padding: 10px 16px;
  border-radius: 10px;
  white-space: normal;
  width: 240px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s, transform .18s;
}
.badge-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1e293b;
}
.badge-tip-wrap:hover .badge-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Community post comments */
.com-comment-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 6px 0;
}
.com-comments-section { padding: 0 2px; }

/* Popover "quem reagiu" */
.reactors-pop {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(15,23,42,.18);
  min-width: 210px;
  max-width: 280px;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 0;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(4px) } }
.reactors-group { padding: 6px 0 2px; }
.reactors-group + .reactors-group { border-top: 1px solid #f1f5f9; margin-top: 4px; padding-top: 8px; }
.reactors-group-head {
  display: flex; align-items: center; gap: 6px;
  padding: 2px 14px 6px;
  font-size: 11px; font-weight: 800; color: var(--text-soft);
  text-transform: uppercase; letter-spacing: .04em;
}
.reactors-row {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 14px; font-size: 13px; font-weight: 600; color: var(--text);
}
.reactors-row:hover { background: var(--bg, #f8fafc); }
.reactors-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--teddy-orange); color: #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; overflow: hidden;
}
/* SAM reaction picker */
.sam-react-opt {
  width: auto; height: auto; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 8px; font-size: 0;
}
.sam-react-opt img { transition: transform .15s; border-radius: 50%; }
.sam-react-opt:hover img { transform: scale(1.2) translateY(-4px); }
.react-opt-label {
  font-size: 10px; font-weight: 700; color: var(--text-soft);
  font-family: inherit; white-space: nowrap;
  opacity: 0; transform: translateY(4px);
  transition: opacity .15s, transform .15s;
}
.sam-react-opt:hover .react-opt-label { opacity: 1; transform: none; color: var(--teddy-orange); }
.poll-vote-btn:hover { border-color: var(--teddy-orange) !important; background: var(--teddy-orange-soft) !important; }
#btnTogglePoll.active { background: var(--teddy-orange); color: white; }

/* Notificações — dropdown do sino */
.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 360px; max-height: 480px; overflow-y: auto;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  box-shadow: 0 12px 32px -8px rgba(15,23,42,0.2);
  z-index: 300;
}
.notif-dropdown[hidden] { display: none !important; }
.notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.notif-header h4 { margin: 0; font-size: 14px; font-weight: 900; }
.notif-header button {
  background: none; border: none; color: var(--teddy-orange);
  font-size: 11px; font-weight: 800; cursor: pointer;
}
.notif-item {
  display: flex; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background 0.15s; text-decoration: none; color: inherit;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--bg, #f8fafc); }
.notif-item.unread { background: var(--teddy-orange-soft, #fff1ea); }
.notif-item.unread:hover { background: #ffe6d6; }
.notif-item .notif-icon {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--teddy-orange-soft, #fff1ea); color: var(--teddy-orange);
  display: grid; place-items: center; font-size: 18px; overflow: hidden;
}
.notif-item .notif-icon img { width: 100%; height: 100%; object-fit: cover; }
.notif-item .notif-body { flex: 1; min-width: 0; }
.notif-item .notif-title { font-size: 13px; font-weight: 800; color: var(--text); }
.notif-item .notif-text { font-size: 12px; color: var(--text-soft); margin-top: 1px; line-height: 1.4; }
.notif-item .notif-time { font-size: 10px; color: var(--text-soft); font-weight: 700; margin-top: 3px; }
.notif-empty { padding: 40px 20px; text-align: center; color: var(--text-soft); font-size: 13px; }

/* Header — atalho rápido pro chat (entre busca e avatar) */
.header-chat-btn {
  position: relative;
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg, #f1f5f9);
  color: var(--text-soft);
  font-size: 20px;
  transition: var(--transition, 0.2s);
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 8px;
}
.header-chat-btn:hover { background: var(--teddy-orange-soft); color: var(--teddy-orange); }

/* Botão Escuta RH na topbar */
.btn-escuta-rh {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 50px;
  background: var(--teddy-orange); color: #fff;
  font-size: 13px; font-weight: 800; text-decoration: none;
  transition: background .2s, transform .15s;
  flex-shrink: 0; white-space: nowrap;
}
.btn-escuta-rh:hover { background: var(--teddy-orange-dark, #c94f17); transform: translateY(-1px); }
.header-chat-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--teddy-orange); color: white;
  font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--surface, #fff);
}
.header-chat-badge[hidden] { display: none !important; }

/* ghost-btn — usado em banners escuros (comunidade view, profile hero).
   Estava sem regras CSS, então caía no estilo padrão do <button>. */
.ghost-btn {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition, 0.2s);
  backdrop-filter: blur(8px);
}
.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}
.ghost-btn.solid {
  background: white;
  color: var(--text);
  border-color: white;
}
.ghost-btn.solid:hover { background: rgba(255,255,255,0.9); }

/* Variante compacta — ícone-only, usado no banner da comunidade */
.ghost-btn-sm {
  background: rgba(15, 23, 42, 0.55);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.22);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-grid; place-items: center;
  font-size: 16px;
  transition: var(--transition, 0.2s);
  backdrop-filter: blur(8px);
}
.ghost-btn-sm:hover {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.page-padding {
  padding: 48px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.welcome-label {
  color: var(--teddy-orange);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  display: block;
}

.page-title {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.05em;
  margin-bottom: 8px;
  color: var(--text);
}

.page-subtitle {
  color: var(--text-soft);
  font-size: 16px;
  margin-bottom: 32px;
  font-weight: 500;
}

.hero-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: var(--radius-xl);
  padding: 56px;
  color: white;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-tag {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-card h2 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  max-width: 800px;
}

.hero-card p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 700px;
}

/* ── Carrossel de comunicados (dashboard) ───────────── */
.cbanner-carousel {
  position: relative;
  margin-bottom: 40px;
  border-radius: var(--radius-xl, 20px);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.cbanner-viewport { overflow: hidden; width: 100%; }
.cbanner-track { display: flex; transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.cbanner-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  display: block;
  text-decoration: none;
  background: #1e293b;
  overflow: hidden;
  line-height: 0; /* remove inline-block gap below img */
  aspect-ratio: 1920 / 712; /* tamanho oficial do banner */
}
.cbanner-slide .cb-img {
  /* Imagem maior OU menor: contém e centraliza (sem cortar; letterbox no fundo). */
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform .5s ease;
}
.cbanner-slide:hover .cb-img { transform: scale(1.02); }
/* Subtle bottom shadow so dots stay visible on any image */
.cbanner-slide::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 56px;
  background: linear-gradient(to top, rgba(0,0,0,.38), transparent);
  pointer-events: none;
}
.cbanner-slide .cb-bg {
  background-size: cover; background-position: center;
}
.cbanner-slide--empty .cb-bg { background: linear-gradient(135deg, #334155 0%, #1e293b 100%); aspect-ratio: 1920 / 712; }

/* Botão "Ver comunicado" — canto inferior esquerdo do banner */
.cb-cta-btn {
  position: absolute;
  bottom: 20px;
  left: 24px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px 11px 20px;
  background: var(--teddy-orange, #eb6625);
  border: none;
  border-radius: var(--radius-full, 999px);
  color: #fff;
  font-family: var(--font-sans, inherit);
  font-size: var(--font-size-sm, 14px);
  font-weight: var(--font-weight-extra, 800);
  line-height: 1;
  letter-spacing: .01em;
  pointer-events: none;
  box-shadow: 0 2px 12px rgba(235,102,37,.40), 0 1px 3px rgba(0,0,0,.18);
  transition: background .18s, box-shadow .18s, transform .18s;
  white-space: nowrap;
  text-decoration: none;
}
.cb-cta-btn::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M221.66 133.66l-72 72a8 8 0 0 1-11.32-11.32L196.69 136H40a8 8 0 0 1 0-16h156.69l-58.35-58.34a8 8 0 0 1 11.32-11.32l72 72a8 8 0 0 1 0 11.32Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M221.66 133.66l-72 72a8 8 0 0 1-11.32-11.32L196.69 136H40a8 8 0 0 1 0-16h156.69l-58.35-58.34a8 8 0 0 1 11.32-11.32l72 72a8 8 0 0 1 0 11.32Z'/%3E%3C/svg%3E") center / contain no-repeat;
  flex-shrink: 0;
  transition: transform .18s;
}
.cbanner-slide:hover .cb-cta-btn {
  background: #d45a1a;
  box-shadow: 0 4px 18px rgba(235,102,37,.55), 0 1px 4px rgba(0,0,0,.22);
  transform: translateY(-2px);
}
.cbanner-slide:hover .cb-cta-btn::after {
  transform: translateX(3px);
}

/* Setas */
.cb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.92); color: #0f172a;
  display: grid; place-items: center; font-size: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,.2); transition: background .2s;
}
.cb-arrow:hover { background: #fff; }
.cb-prev { left: 16px; } .cb-next { right: 16px; }

/* Indicadores (dots) */
.cb-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.cb-dot { width: 9px; height: 9px; border-radius: 50%; border: none; cursor: pointer; background: rgba(255,255,255,.45); padding: 0; transition: .25s; }
.cb-dot.active { background: #fff; width: 24px; border-radius: 5px; }

.cbanner-carousel.is-single .cb-arrow, .cbanner-carousel.is-single .cb-dots { display: none; }
.cbanner-skeleton { aspect-ratio: 4 / 1; min-height: 200px; border-radius: var(--radius-xl, 20px); }

@media (max-width: 640px) {
  .cb-arrow { width: 36px; height: 36px; font-size: 16px; }
}

.button {
  padding: 16px 32px;
  border-radius: 16px;
  border: none;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.btn-orange {
  background: var(--teddy-orange);
  color: white;
}

.btn-dark {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost {
  background: var(--bg);
  color: var(--text);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: stretch; /* os 3 cards com a mesma altura */
}
/* Card vira coluna flex pra a lista preencher a altura toda do card,
   distribuindo os itens (sem sobra de espaço embaixo). */
.dash-grid > .col-card { display: flex; flex-direction: column; }
.dash-grid > .col-card > [id$="List"] {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* itens no topo; cards curtos não espalham (gap feio) */
  gap: 16px;
}
.dash-grid > .col-card > [id$="List"] > .news-item { margin-bottom: 0; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.col-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.col-header h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.link-all {
  color: var(--teddy-orange);
  font-size: 14px;
  font-weight: 700;
}

.news-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
}

.news-item:last-child {
  margin-bottom: 0;
}

.news-img {
  width: 85px;
  height: 65px;
  border-radius: 12px;
  object-fit: cover;
}

.news-content h4 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 4px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-content p {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 600;
}

.profile-cover {
  height: 180px;
  background: linear-gradient(135deg, var(--teddy-orange), #0f172a);
  border-radius: var(--radius-xl);
  position: relative;
  margin-bottom: 60px;
}

.profile-avatar-box {
  position: absolute;
  bottom: -40px;
  left: 40px;
  width: 120px;
  height: 120px;
  border-radius: 32px;
  border: 6px solid var(--bg);
  background: var(--teddy-orange);
  display: grid;
  place-items: center;
  font-size: 48px;
  color: white;
  font-weight: 900;
}

#login-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-dark);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
}

#login-overlay.hidden {
  display: none;
}

.login-box {
  text-align: center;
  color: white;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 64px;
  border-radius: 40px;
  backdrop-filter: blur(20px);
  max-width: 420px;
  width: 90%;
}

.login-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: white;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
  outline: none;
}

.login-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.stat-card .label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.stat-card .value {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.stat-card .trend {
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
}

.trend-up {
  color: #10b981;
}

.trend-down {
  color: #ef4444;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 800;
  background: var(--teddy-orange-soft);
  color: var(--teddy-orange);
}

.tag-blue {
  background: #e0f2fe;
  color: #0284c7;
}

.tag-green {
  background: #d1fae5;
  color: #059669;
}

.tag-gray {
  background: #f1f5f9;
  color: #64748b;
}

.progress-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar>div {
  height: 100%;
  background: var(--teddy-orange);
  border-radius: 3px;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
}

table.data-table th,
table.data-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

table.data-table th {
  color: var(--text-soft);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table.data-table tr:last-child td {
  border-bottom: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
}

.gallery-grid img:hover {
  transform: scale(1.03);
}

.system-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

.system-tile:hover {
  transform: translateY(-4px);
}

.system-tile .icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--teddy-orange-soft);
  color: var(--teddy-orange);
  display: grid;
  place-items: center;
  font-size: 28px;
  margin-bottom: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--teddy-orange);
}

.toggle {
  width: 44px;
  height: 24px;
  background: var(--bg);
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.toggle.on {
  background: var(--teddy-orange);
  border-color: var(--teddy-orange);
}

.toggle.on::after {
  left: 22px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-row .info strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.setting-row .info span {
  font-size: 12px;
  color: var(--text-soft);
}

/* ── Mídia de post (timeline + comunidades): tamanho padronizado ──
   Antes a timeline usava width:100% sem teto de altura → imagem alta tomava
   a tela toda. Padrão único: 1 imagem até 480px (cover), várias em grade. */
.post-media-grid { margin-top: 14px; display: grid; gap: 4px; }
.post-media-grid.count-1 { grid-template-columns: 1fr; justify-items: center; }
.post-media-grid.count-2,
.post-media-grid.count-3,
.post-media-grid.count-4 { grid-template-columns: 1fr 1fr; border-radius: 12px; overflow: hidden; }
.post-media { width: 100%; display: block; object-fit: cover; background: var(--color-surface-2, #f1f5f9); cursor: zoom-in; }
/* Imagem única / GIF: já vem no formato escolhido (recorte no post) — preserva
   o aspecto e só limita a ALTURA (não recorta de novo), centralizada. */
.post-media-grid.count-1 .post-media {
  width: auto; max-width: 100%; max-height: 480px;
  object-fit: contain; border-radius: 12px;
}
.post-media-grid.count-2 .post-media,
.post-media-grid.count-3 .post-media,
.post-media-grid.count-4 .post-media { height: 220px; }
.post-media-grid.count-3 .post-media:first-child { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .post-media-grid.count-1 .post-media { max-height: 340px; }
  .post-media-grid.count-2 .post-media,
  .post-media-grid.count-3 .post-media,
  .post-media-grid.count-4 .post-media { height: 150px; }
}

/* ── Strip de preview do composer (carrossel até 6) ── */
.media-preview-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.media-preview-strip .mp-thumb {
  position: relative; flex: 0 0 auto; width: 120px; height: 120px;
  border-radius: 12px; overflow: hidden; background: #0f172a; scroll-snap-align: start;
}
.media-preview-strip .mp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-preview-strip .mp-remove {
  position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.62); color: #fff;
  border: none; border-radius: 50%; width: 26px; height: 26px; cursor: pointer;
  display: grid; place-items: center; font-size: 13px;
}
.media-preview-strip .mp-remove:hover { background: rgba(0,0,0,0.82); }

/* ── Carrossel de post (múltiplas imagens) ── */
.post-carousel { margin-top: 14px; position: relative; border-radius: 12px; overflow: hidden; background: #0f172a; }
.post-carousel-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.post-carousel-track::-webkit-scrollbar { display: none; }
.post-carousel-slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; }
.post-carousel-slide img {
  width: 100%; max-height: 480px; object-fit: contain; display: block; cursor: zoom-in;
}
.post-carousel-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(15,23,42,0.5);
}
.post-carousel-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.55); transition: background .2s; }
.post-carousel-dots span.active { background: #fff; }
.post-carousel-count {
  position: absolute; top: 10px; right: 10px; background: rgba(15,23,42,0.6); color: #fff;
  font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
}
@media (max-width: 560px) { .post-carousel-slide img { max-height: 360px; } }
/* Botões ‹ › do carrossel no feed (aparecem no hover; sempre visíveis em touch) */
.post-carousel .pc-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(15,23,42,0.55); color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
  opacity: 0; transition: opacity .15s, background .15s;
}
.post-carousel:hover .pc-nav { opacity: 1; }
.post-carousel .pc-nav:hover { background: rgba(15,23,42,0.82); }
.post-carousel .pc-prev { left: 8px; }
.post-carousel .pc-next { right: 8px; }
@media (hover: none) { .post-carousel .pc-nav { opacity: 1; } }
/* Slide não colapsa se a imagem quebrar (placeholder escuro em vez de sumir) */
.post-carousel-slide { min-height: 200px; }
.post-carousel-slide img.pc-broken { width: 100%; min-height: 200px; background: #1e293b; }

/* Marcador "editado" + post fixado */
.post-edited-tag { font-size: 11px; color: var(--text-soft); }
/* Links automáticos (URLs viradas em link em posts/comentários/comunicados) */
.autolink { color: var(--teddy-orange, #eb6625); text-decoration: underline; word-break: break-word; }
.autolink:hover { text-decoration: none; }
.post-pinned-tag {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800;
  color: var(--teddy-orange); background: var(--teddy-orange-soft, #fef0e8);
  padding: 2px 8px; border-radius: 999px; margin-bottom: 8px;
}
/* Tag "VENDIDO" (anúncios de venda na comunidade) — sem editar o texto */
.post-sold-tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 900;
  letter-spacing: .04em; color: #fff; background: #16a34a;
  padding: 3px 11px; border-radius: 999px; margin-bottom: 8px; margin-left: 6px;
  box-shadow: 0 1px 4px rgba(22,163,74,.35);
}
/* Post vendido: esmaece a mídia e o texto pra sinalizar que o item saiu */
.com-sold .post-carousel,
.com-sold .post-media-grid { opacity: .55; filter: grayscale(.4); }
.com-sold .com-post-content { opacity: .7; }

/* ── Recortador de imagem do composer ── */
.crop-modal { position: fixed; inset: 0; background: rgba(15,23,42,0.6); z-index: 1000; display: grid; place-items: center; padding: 16px; }
.crop-box { background: #fff; border-radius: 16px; width: min(440px, 96vw); max-height: 94vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.crop-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border, #e2e8f0); font-size: 15px; }
.crop-x { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-soft, #64748b); }
.crop-formats { display: flex; gap: 8px; padding: 14px 18px 4px; flex-wrap: wrap; }
.crop-formats button { flex: 1; min-width: 90px; padding: 8px 10px; border: 1px solid var(--border, #e2e8f0); background: #fff; border-radius: 10px; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--text-soft, #64748b); display: flex; align-items: center; justify-content: center; gap: 6px; }
.crop-formats button.active { border-color: var(--teddy-orange, #ff6a00); color: var(--teddy-orange, #ff6a00); background: var(--color-brand-soft, #fff4ec); }
.crop-stage { padding: 16px 18px; display: grid; place-items: center; }
.crop-viewport { position: relative; overflow: hidden; border-radius: 12px; background: #0f172a; touch-action: none; cursor: grab; user-select: none; }
.crop-viewport.dragging { cursor: grabbing; }
.crop-viewport img { position: absolute; top: 0; left: 0; max-width: none; pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 10px; padding: 0 18px 8px; color: var(--text-soft, #64748b); }
.crop-zoom input { flex: 1; accent-color: var(--teddy-orange, #ff6a00); }
.crop-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 6px 18px 18px; }

/* ── Hambúrguer + overlay do drawer (escondidos no desktop) ── */
.hamburger-btn { display: none; background: none; border: none; cursor: pointer; font-size: 26px; color: var(--text); padding: 4px 8px; margin-right: 4px; flex-shrink: 0; }
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.5); z-index: 90; }
.mobile-overlay.show { display: block; }

/* ── Skeleton shimmer global (loading states consistentes) ── */
.skeleton, .skeleton-card, .skeleton-avatar, .skeleton-text, .skeleton-image, .skeleton-item {
  position: relative; overflow: hidden;
  background: #e9edf2;
  border-radius: 8px;
}
.skeleton::after, .skeleton-card::after, .skeleton-avatar::after, .skeleton-text::after,
.skeleton-image::after, .skeleton-item::after {
  content: ''; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
  animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer { 100% { transform: translateX(100%); } }

@media (max-width: 1100px) {
  .search-box { width: 100%; min-width: 0; }
}

@media (max-width: 900px) {
  /* Layout vira coluna única; main ocupa tudo */
  .app-container.visible { grid-template-columns: 1fr; }
  .main-content { width: 100%; }

  /* Sidebar vira drawer off-canvas */
  .hamburger-btn { display: inline-grid; place-items: center; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100vh;
    width: 270px; max-width: 82vw; z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
  }
  .sidebar.open { transform: translateX(0); }

  /* Grids colapsam — !important pra vencer os grid-template-columns inline
     usados em community/timeline/profile/gamification/farm. */
  .dash-grid, .grid-2, .grid-3 { grid-template-columns: 1fr !important; }
  #farmLayout, .msg-shell { grid-template-columns: 1fr !important; }
  .grid-4, .gallery-grid, .com-grid { grid-template-columns: repeat(2, 1fr); }

  .header, .page-padding { padding: 16px; }
  .hero-card { padding: 28px 22px; }
  .hero-card h2 { font-size: 26px; }
  .page-title { font-size: 26px; }

  /* Header: busca encolhe, dá espaço */
  .header { gap: 8px; }
}

@media (max-width: 560px) {
  .grid-4, .gallery-grid, .com-grid { grid-template-columns: 1fr; }
  .user-profile > span { display: none; }
  .hero-card h2 { font-size: 22px; }
  .page-title { font-size: 22px; }
  .notif-dropdown, .global-search-dropdown { width: calc(100vw - 32px); right: -8px; }
}

/* ============================================================
 * RESPONSIVO — CORREÇÕES ADICIONAIS
 * Cobre gaps identificados em grids, modais e touch targets.
 * ============================================================ */

/* Touch targets mínimos */
@media (max-width: 900px) {
  button, .button, a.button, .nav-item, .farm-tab,
  .tab-item, .msg-conv-item, .kb-item { min-height: 44px; }

  /* Modais ficam fullscreen em mobile */
  .modal-overlay > div, [id$="Modal"] > div {
    max-width: 100% !important;
    max-height: 96dvh !important;
    border-radius: 16px 16px 0 0 !important;
    margin: auto 0 0 !important;
    overflow-y: auto;
  }

  /* Profile badges: 4 cols → 2 cols */
  #badgeGrid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Academy: sidebar colapsa */
  .academy-layout,
  .academy-content-grid { grid-template-columns: 1fr !important; }

  /* Bolão: corrige minmax muito grande */
  .bolao-grid,
  [style*="minmax(440px"] { grid-template-columns: 1fr !important; }

  /* GIF picker: 3 cols → 2 cols */
  #gifGrid, #tlGifGrid { columns: 2 !important; }

  /* Reaction picker: cabeça em uma linha */
  .react-picker, .com-react-picker {
    flex-wrap: wrap;
    max-width: calc(100vw - 48px);
  }

  /* Admin KPIs: 4 → 2 */
  #engageKpis,
  #adminMetricsGrid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Org chart: cards menores */
  #orgGrid > .admin-card > div[style*="minmax(180px"] {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  }

  /* Carrossel botão "Ver comunicado" menor */
  .cb-cta-btn { font-size: 12px; padding: 9px 16px 9px 14px; bottom: 14px; left: 16px; }
}

@media (max-width: 560px) {
  /* Profile badges: 2 cols → 1 col */
  #badgeGrid { grid-template-columns: 1fr !important; }

  /* Admin KPIs: 2 → 1 */
  #engageKpis,
  #adminMetricsGrid { grid-template-columns: 1fr !important; }

  /* Esconde label nos nav buttons de comunidade em telas muito pequenas */
  .farm-tab .farm-tab-badge { font-size: 8px; }

  /* Post media grid: 1 coluna */
  .post-media-grid { grid-template-columns: 1fr !important; }

  /* Reaction picker SAM: 3 colunas no max */
  .sam-react-opt img { width: 38px !important; height: 38px !important; }

  /* Mensagens: input menor */
  .msg-send-form textarea { font-size: 16px; } /* evita zoom no iOS */
  .comment-input, #communityPostText, #msgInput { font-size: 16px; } /* mesmo */
}

/* Mensagens: botão Voltar em mobile */
@media (max-width: 800px) {
  .msg-back-btn { display: flex !important; }

  /* Input de busca de mensagens: largura total */
  .msg-search input { width: 100%; }

  /* Bolhas menores */
  .msg-bubble { max-width: 88% !important; }
}

/* Utilitários de visibilidade */
@media (max-width: 560px) {
  .hide-xs { display: none !important; }
}

/* PWA standalone: remove algumas margens desnecessárias */
@media (display-mode: standalone) {
  .header { padding-top: env(safe-area-inset-top); }
  body     { padding-bottom: env(safe-area-inset-bottom); }
}

/* ============================================================
 * RESPONSIVO — tabelas largas rolam na horizontal (em vez de cortar
 * dentro de cards com overflow:hidden ou empurrar a página).
 * Cobre: standings do bolão (9 colunas), rankings/data-table do app
 * e qualquer tabela do painel admin.
 * ============================================================ */
@media (max-width: 900px) {
  .standings,
  table.data-table,
  .col-card table,
  .group-card table,
  .admin-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  /* a tabela rola internamente; o card pode manter o recorte das bordas */
  .group-card { overflow: hidden; }
}

/* ============================================================
 * RESPONSIVO — VARREDURA 2026-06-08 (lacunas das telas principais)
 * Fecha os casos não cobertos pelas classes (grids inline, min-width
 * grandes, formulários) e mata o scroll horizontal da página.
 * ============================================================ */
@media (max-width: 900px) {
  /* Causa nº1 de "quebrado": a página toda rolando de lado por algum
     elemento largo. Clipa só no container principal — tabelas e áreas que
     precisam rolar têm overflow próprio e continuam funcionando. */
  .main-content { overflow-x: clip; max-width: 100%; }

  /* Grids "conteúdo + coluna lateral fixa" definidos inline (sem .grid-2/3)
     colapsam pra 1 coluna: academy, bolão mata-mata, etc. */
  .knockout-grid,
  [style*="1fr 350px"], [style*="1fr 320px"], [style*="1fr 300px"],
  [style*="350px 1fr"], [style*="320px 1fr"], [style*="300px 1fr"],
  [style*="1.6fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Blocos flex com min-width grande encolhem em vez de empurrar a página. */
  [style*="min-width: 300px"], [style*="min-width:300px"],
  [style*="min-width: 280px"], [style*="min-width:280px"],
  [style*="min-width: 200px"], [style*="min-width:200px"] { min-width: 0 !important; }

  /* Formulários: campos lado a lado quebram em vez de estourar. */
  .field-row { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  /* Cartões de stat lado a lado (gamificação/loja) ocupam a linha toda. */
  [style*="min-width: 140px"], [style*="min-width:140px"] { flex: 1 1 100% !important; min-width: 0 !important; }

  /* Grids auto-fill com min alto definidos inline colapsam de vez. */
  [style*="minmax(280px"], [style*="minmax(320px"], [style*="minmax(220px"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Heros com padding grande + linhas de botões (CTA) que estouravam no mobile.
   Cobre community (.com-hero/.hero-cta) e qualquer hero com .hero-cta. ── */
@media (max-width: 768px) {
  .com-hero { padding: 28px 22px !important; }
  .com-hero h2 { font-size: 26px !important; }
  .hero-cta { flex-wrap: wrap; }
  .hero-cta .button { flex: 1 1 140px; justify-content: center; }
  /* Linhas de ação (botões lado a lado) em cabeçalhos de página quebram em vez de cortar. */
  .page-header-actions, .actions-row, .toolbar-actions { flex-wrap: wrap; }
}

/* ── Badges/medalhas: pílula de tier + tag ESPECIAL + destaque do card especial ── */
.tier-pill { display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:800;
  color: var(--tc,#475569); background: color-mix(in srgb, var(--tc,#475569) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--tc,#475569) 28%, #fff); padding:4px 11px; border-radius:999px; }
.badge-especial-tag { position:absolute; top:10px; left:10px; background:var(--teddy-orange,#eb6625); color:#fff;
  font-size:9px; font-weight:900; letter-spacing:.06em; padding:3px 9px; border-radius:999px; z-index:3; }
.badge-special { background:linear-gradient(180deg,#fff7ed,#ffffff) !important; border-color:#fed7aa !important;
  box-shadow:0 0 0 1px #fed7aa, 0 10px 28px rgba(234,88,12,.14) !important; }

/* ============================================================
 * RESPONSIVO — VARREDURA MOBILE 2026-06-15 (telas principais)
 * Corrige 3 quebras confirmadas no navegador a 390px:
 *  1) Header cortando o avatar/menu do usuário (Escuta RH + busca empurravam
 *     as ações p/ fora da viewport — main-content tem overflow-x:clip, então
 *     o avatar sumia em vez de rolar).
 *  2) Ranking: a tabela (min-content largo) forçava o item do grid p/ 518px.
 *  3) Perfil: os 3 cards de stat estouravam pela direita.
 * ============================================================ */

/* (2) Itens de grid não podem manter min-width:auto no mobile — o conteúdo
   largo (tabelas com nowrap, textos) força a coluna além da tela. min-width:0
   deixa a coluna encolher e o overflow-x:auto interno da tabela rolar. */
@media (max-width: 900px) {
  .grid-2 > *, .grid-3 > *, .grid-4 > *, .dash-grid > * { min-width: 0; }
}

/* (1) Header em telas pequenas: a busca encolhe e o "Escuta RH" vira ícone,
   garantindo que o sino, convites e o avatar (menu) sempre caibam. */
@media (max-width: 640px) {
  .header-actions { margin-left: 0 !important; }
  .search-box { flex: 1 1 0; min-width: 0; padding: 10px 14px; }
  .btn-escuta-rh { width: 40px; height: 40px; padding: 0; gap: 0; border-radius: 50%; justify-content: center; }
  .btn-escuta-rh .erh-label { display: none; }
  .header-chat-btn { margin-right: 0; }
}

/* (3) Cards de stat do perfil dividem a linha igualmente em vez de estourar.
   A própria .profile-stats precisa de min-width:0 (é flex item do header e não
   encolhia abaixo do min-content "RECONHECIMENTOS"). O padding inline (24px) era
   maior que o disponível → !important. A label longa cai p/ 9px e, no pior caso
   (telas <360px), quebra em 2 linhas em vez de vazar do card. */
@media (max-width: 560px) {
  .profile-stats { min-width: 0; gap: 8px; }
  .profile-stats > .col-card { flex: 1 1 0; min-width: 0; padding: 10px 6px !important; }
  .profile-stats > .col-card > div:last-child { font-size: 9px !important; letter-spacing: 0 !important; line-height: 1.25; overflow-wrap: anywhere; }
}