/* ============================================
   VARIÁVEIS DE COR - ALTERE AQUI A COR PRINCIPAL
   ============================================ */
:root {
  --primary-color: #00458c;
  --primary-dark: #1a77db;
  --primary-light: #e6edfd;
  --primary-rgb: 13, 110, 253;
  --primary-shadow: rgba(13, 110, 253, 0.12);
  --primary-shadow-light: rgba(13, 110, 253, 0.06);
  
  --bg-body: #f2f5f9;
  --text-dark: #0b1a2a;
  --text-muted: #5e6f8d;
  --border-color: #e9edf4;
  --white: #ffffff;
  --danger: #dc3545;
  
  /* Container máximo - AUMENTADO para caber 5 produtos */
  --container-max: 1400px;
}

/* ============================================
   ESTILOS GLOBAIS
   ============================================ */
* { 
  box-sizing: border-box; 
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-body);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  padding-bottom: 80px;
  color: var(--text-dark);
}

/* ============================================
   CONTAINER PRINCIPAL - CENTRALIZADO E MAIS LARGO
   ============================================ */
.container-main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container-main {
    padding: 0 24px;
  }
}

/* ============================================
   CORES DINÂMICAS
   ============================================ */
.bg-primary-custom { background: var(--primary-color); }
.text-primary-custom { color: var(--primary-color); }
.border-primary-custom { border-color: var(--primary-color); }

.btn-primary-custom {
  background: var(--primary-color);
  color: white;
  border: none;
  transition: 0.15s;
  cursor: pointer;
}
.btn-primary-custom:hover {
  background: var(--primary-dark);
  transform: scale(0.97);
}

.btn-outline-primary-custom {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  transition: 0.15s;
  cursor: pointer;
}
.btn-outline-primary-custom:hover {
  background: var(--primary-color);
  color: white;
}

/* ============================================
   HEADER
   ============================================ */
.header-custom {
  background: var(--white);
  padding: 12px 16px;
  box-shadow: 0 2px 10px var(--primary-shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-custom .container-main {
  padding: 0;
}

/* ============================================
   LOGO - FONTE EXCLUSIVA DIFERENCIADA
   ============================================ */
.logo {
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--primary-color);
  cursor: pointer;
  text-decoration: none;
  font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  letter-spacing: -0.5px;
}

/* Versão mobile */
@media (max-width: 576px) {
  .logo {
    font-size: 1.3rem;
  }
}

/* Versão desktop */
@media (min-width: 768px) {
  .logo {
    font-size: 1.8rem;
  }
}

/* ============================================
   CAMPO DE PESQUISA - SEM BOTÃO
   ============================================ */
.search-wrapper {
  background: var(--white);
  border-radius: 40px;
  padding: 4px 18px;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.08), 0 2px 8px rgba(var(--primary-rgb), 0.06);
  transition: 0.3s;
  display: flex;
  align-items: center;
}
.search-wrapper:focus-within {
  box-shadow: 0 0 0 6px rgba(var(--primary-rgb), 0.15), 0 4px 12px rgba(var(--primary-rgb), 0.1);
  border-color: var(--primary-dark);
}

.search-bar {
  border: none;
  background: transparent;
  padding: 10px 8px;
  width: 100%;
  font-size: 0.95rem;
  outline: none;
  cursor: text;
}
.search-bar::placeholder {
  color: #8896a8;
  font-weight: 400;
}

/* Botão buscar removido - apenas a lupa no lado esquerdo */
.search-wrapper i {
  font-size: 1.1rem;
  color: var(--primary-color);
}

/* ============================================
   BOTÃO LOGIN
   ============================================ */
.btn-login {
  background: transparent;
  border: 1px solid var(--primary-color);
  border-radius: 30px;
  padding: 6px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary-color);
  transition: 0.2s;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn-login i { margin-right: 6px; }
.btn-login:hover {
  background: var(--primary-color);
  color: white;
}

/* ============================================
   BOTÃO ANUNCIAR
   ============================================ */
.btn-anunciar {
  background: var(--primary-color);
  color: white !important;
  border-radius: 40px;
  padding: 6px 18px;
  font-weight: 600;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.15s;
  text-decoration: none;
  display: inline-block;
}
.btn-anunciar i { margin-right: 6px; }
.btn-anunciar:hover { 
  background: var(--primary-dark); 
  color: white !important; 
  transform: scale(0.97); 
}

/* ============================================
   CATEGORIAS COMPACTAS - FUNDO TRANSPARENTE
   ============================================ */
.categorias-compact {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  padding: 10px 0 12px;
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .categorias-compact {
    justify-content: flex-start;
    padding: 10px 0 12px;
  }
}

.categorias-compact::-webkit-scrollbar {
  height: 3px;
  background: var(--border-color);
}
.categorias-compact::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 12px;
}

.cat-item-compact {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-light);
  padding: 6px 14px 6px 12px;
  border-radius: 40px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
  transition: 0.15s;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.cat-item-compact i {
  font-size: 1rem;
  color: var(--primary-color);
}
.cat-item-compact.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}
.cat-item-compact.active i { color: white; }
.cat-item-compact:hover {
  background: #d4e3ff;
  border-color: var(--primary-color);
}
.cat-item-compact.active:hover {
  background: var(--primary-dark);
}

/* ============================================
   CARROSSEL DE ANÚNCIOS - FUNDO TRANSPARENTE
   ============================================ */
.carousel-section {
  padding: 12px 0 8px;
  background: transparent;
  border-bottom: 1px solid var(--border-color);
}

.carousel-section .container-main {
  padding: 0;
}

.carousel-item-custom img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 14px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(0,0,0,0.3);
  border-radius: 50%;
  padding: 16px;
  background-size: 60%;
}
.carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 10px;
  background-color: #6b7b93;
}
.carousel-indicators .active {
  background-color: var(--primary-color);
}

@media (min-width: 768px) {
  .carousel-item-custom img { height: 220px; }
}

/* ============================================
   CARDS DE PRODUTO - AJUSTADO PARA 5 POR LINHA
   ============================================ */
.card-produto {
  border: none;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 2px 12px var(--primary-shadow-light);
  transition: 0.2s;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
}
.card-produto:hover { 
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-shadow);
}

.card-produto .img-placeholder {
  height: 170px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 3.2rem;
}
.card-produto .card-body {
  padding: 14px 14px 12px;
}
.card-produto .card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text-dark);
}
.card-produto .preco {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
}
.card-produto .local {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.badge-cat {
  font-size: 0.6rem;
  background: var(--primary-light);
  color: var(--primary-color);
  padding: 3px 10px;
  border-radius: 30px;
  font-weight: 500;
  cursor: pointer;
}

.heart-icon {
  cursor: pointer;
  transition: 0.15s;
}
.heart-icon:hover {
  color: var(--danger) !important;
  transform: scale(1.15);
}

.grid-produtos {
  padding: 16px 0 0;
}

.grid-produtos .row {
  margin: 0 -8px;
}

/* AJUSTE: 5 produtos por linha em telas grandes */
@media (min-width: 1200px) {
  .grid-produtos .row > [class*="col-"] {
    flex: 0 0 20%; /* 5 colunas (100% / 5) */
    max-width: 20%;
    padding: 0 8px;
  }
}

/* 4 produtos por linha em telas médias */
@media (min-width: 992px) and (max-width: 1199px) {
  .grid-produtos .row > [class*="col-"] {
    flex: 0 0 25%; /* 4 colunas (100% / 4) */
    max-width: 25%;
    padding: 0 8px;
  }
}

/* 3 produtos por linha em tablets */
@media (min-width: 768px) and (max-width: 991px) {
  .grid-produtos .row > [class*="col-"] {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 8px;
  }
}

/* 2 produtos por linha em mobile */
@media (max-width: 767px) {
  .grid-produtos .row > [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 8px;
  }
}

/* ============================================
   BOTÃO CARREGAR MAIS
   ============================================ */
.load-more-wrapper {
  padding: 20px 0 40px;
  text-align: center;
}
.load-more-btn {
  background: var(--white);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 40px;
  padding: 10px 32px;
  font-weight: 600;
  transition: 0.2s;
  font-size: 0.95rem;
  cursor: pointer;
}
.load-more-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(0.97);
}
.load-more-btn i { margin-right: 8px; }
.load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   MENU INFERIOR (APP) - FUNDO BRANCO
   ============================================ */
.bottom-menu {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 12px;
  box-shadow: 0 -4px 12px rgba(var(--primary-rgb), 0.04);
  z-index: 20;
  backdrop-filter: blur(2px);
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.65rem;
  color: #6c7a94;
  text-decoration: none;
  gap: 2px;
  background: transparent;
  border: none;
  padding: 0 8px;
  cursor: pointer;
  transition: 0.1s;
}
.menu-item i {
  font-size: 1.6rem;
  line-height: 1.2;
  transition: 0.1s;
}
.menu-item.active {
  color: var(--primary-color);
  font-weight: 500;
}
.menu-item.active i { color: var(--primary-color); }
.menu-item:hover { color: var(--primary-color); }
.menu-item:hover i { color: var(--primary-color); }
.menu-item:active { transform: scale(0.92); }

.menu-plus {
  font-size: 2.2rem;
  color: var(--primary-color);
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .bottom-menu { display: none; }
}

/* ============================================
   DESKTOP MENU
   ============================================ */
.desktop-menu {
  display: none;
  gap: 24px;
  align-items: center;
}
@media (min-width: 768px) {
  .desktop-menu { display: flex; }
}

.desktop-menu a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.15s;
}
.desktop-menu a i { margin-right: 4px; }
.desktop-menu a:hover { color: var(--primary-color); }

/* ============================================
   PÁGINA DE PERFIL
   ============================================ */
.profile-header {
  background: var(--white);
  padding: 30px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--primary-color);
  margin: 0 auto 12px;
  border: 3px solid var(--primary-color);
}
.profile-name {
  font-size: 1.4rem;
  font-weight: 700;
}
.profile-email {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 20px;
  background: var(--white);
  margin: 16px 0 0;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.stat-item {
  text-align: center;
}
.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-menu-list {
  padding: 16px 0;
}
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: 0.15s;
  text-decoration: none;
  color: var(--text-dark);
}
.profile-menu-item:hover {
  background: var(--primary-light);
  transform: translateX(4px);
}
.profile-menu-item i {
  font-size: 1.2rem;
  color: var(--primary-color);
  width: 24px;
}

/* ============================================
   PÁGINA DE CADASTRO DE ANÚNCIO
   ============================================ */
.form-anuncio {
  padding: 20px 0;
}
.form-anuncio .form-label {
  font-weight: 600;
  font-size: 0.9rem;
}
.form-anuncio .form-control,
.form-anuncio .form-select {
  border-radius: 12px;
  border: 2px solid var(--border-color);
  padding: 10px 14px;
  transition: 0.2s;
}
.form-anuncio .form-control:focus,
.form-anuncio .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}
.form-anuncio .form-control.is-invalid:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
  background: var(--bg-body);
}
.upload-area:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}
.upload-area i {
  font-size: 2.5rem;
  color: var(--primary-color);
  display: block;
  margin-bottom: 8px;
}
.upload-area p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   PÁGINA MEUS ANÚNCIOS (PAINEL VENDEDOR)
   ============================================ */
.dashboard-header {
  background: var(--primary-color);
  color: white;
  padding: 20px 0;
  margin-bottom: 40px;
}
.dashboard-header h4 {
  margin: 0;
  font-weight: 700;
}
.dashboard-header small {
  opacity: 0.85;
}
.dashboard-header .btn-primary-custom {
  background: white;
  color: var(--primary-color);
}
.dashboard-header .btn-primary-custom:hover {
  background: #f8f9fa;
  transform: scale(0.97);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: -10px auto -40px auto;
  padding: 0;
}

.dash-stat-card {
  background: var(--white);
  padding: 14px 10px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: 0.15s;
  border-left: 4px solid var(--primary-color);
}
.dash-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.dash-stat-card .number {
  font-size: 1.3rem;
  font-weight: 700;
}
.dash-stat-card .label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-total {
  border-left-color: var(--primary-color);
}
.stat-total .number {
  color: var(--primary-color);
}

.stat-ativo {
  border-left-color: #28a745;
}
.stat-ativo .number {
  color: #28a745;
}

.stat-pendente {
  border-left-color: #ffc107;
}
.stat-pendente .number {
  color: #ffc107;
}

.stat-inativo {
  border-left-color: #dc3545;
}
.stat-inativo .number {
  color: #dc3545;
}

@media (max-width: 576px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 100%;
    margin: -10px auto 16px auto;
    padding: 0 12px;
  }
  .dash-stat-card {
    padding: 12px 8px;
  }
  .dash-stat-card .number {
    font-size: 1.1rem;
  }
}

@media (min-width: 768px) {
  .dashboard-stats {
    padding: 0 20px;
  }
}

.anuncio-card {
  background: var(--white);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: 0.2s;
  border: 1px solid transparent;
  height: 100%;
}
.anuncio-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.anuncio-card .anuncio-img {
  width: 100%;
  height: 140px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 3rem;
  flex-shrink: 0;
}

.anuncio-card .anuncio-info {
  flex: 1;
}
.anuncio-card .anuncio-titulo {
  text-decoration: none;
  color: var(--text-dark);
  display: inline-block;
}
.anuncio-card .anuncio-titulo h6 {
  margin: 0;
  font-weight: 600;
  transition: 0.15s;
}
.anuncio-card .anuncio-titulo:hover h6 {
  color: var(--primary-color);
}

.anuncio-card .anuncio-detalhes {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 4px 0 8px;
}
.anuncio-card .anuncio-detalhes .preco {
  font-weight: 600;
  color: var(--primary-color);
}
.anuncio-card .anuncio-detalhes .separador {
  margin: 0 6px;
}
.anuncio-card .anuncio-detalhes .local i {
  margin-right: 4px;
}

.anuncio-card .status {
  font-size: 0.7rem;
  padding: 4px 14px;
  border-radius: 30px;
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.status-ativo { 
  background: #d4edda; 
  color: #155724; 
}
.status-pendente { 
  background: #fff3cd; 
  color: #856404; 
}
.status-inativo { 
  background: #f8d7da; 
  color: #721c24; 
}

.anuncio-card .anuncio-acoes {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  margin-top: auto;
}
.anuncio-card .anuncio-acoes .btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.9rem;
}

@media (max-width: 576px) {
  .anuncio-card .anuncio-img {
    height: 120px;
    font-size: 2.5rem;
  }
  .anuncio-card {
    padding: 14px;
  }
}

@media (min-width: 768px) {
  .anuncio-card {
    padding: 20px;
  }
}

@media (min-width: 992px) {
  .anuncio-card .anuncio-img {
    height: 160px;
  }
}

/* ============================================
   RESPONSIVIDADE GERAL
   ============================================ */
@media (max-width: 576px) {
  .header-custom .row {
    flex-wrap: nowrap;
  }
  .btn-login span {
    display: none;
  }
  .btn-login i {
    margin-right: 0;
    font-size: 1.2rem;
  }
  .btn-login {
    padding: 6px 12px;
  }
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 12px 16px 12px;
  }
  .dash-stat-card {
    padding: 12px;
  }
  .dash-stat-card .number {
    font-size: 1.2rem;
  }
  .profile-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .anuncio-card .anuncio-img {
    height: 120px;
    font-size: 2.5rem;
  }
  .anuncio-card {
    padding: 14px;
  }
  .categorias-compact {
    padding: 8px 0 10px;
    gap: 4px;
    justify-content: flex-start;
  }
  .cat-item-compact {
    font-size: 0.7rem;
    padding: 5px 10px 5px 8px;
  }
  .cat-item-compact i {
    font-size: 0.9rem;
  }
}

@media (min-width: 768px) {
  .profile-stats {
    padding: 20px 40px;
  }
  .form-anuncio {
    padding: 20px 40px;
  }
  .dashboard-stats {
    padding: 0 40px 24px 40px;
  }
  .anuncio-card {
    padding: 20px;
  }
}

@media (min-width: 992px) {
  .anuncio-card .anuncio-img {
    height: 160px;
  }
}


/* ============================================
   ESTATÍSTICAS DO PERFIL - CARDS COLORIDOS
   ============================================ */
.profile-stats-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 16px 0;
}

.stat-card {
  background: var(--white);
  border-radius: 16px;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: 0.2s;
  border-left: 4px solid var(--primary-color);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-card-content {
  flex: 1;
}

.stat-card-number {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-card-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Card - Anúncios */
.stat-card-anuncios {
  border-left-color: #2c8fbd;
}
.stat-card-anuncios .stat-card-icon {
  background: rgba(44, 143, 189, 0.12);
  color: #2c8fbd;
}
.stat-card-anuncios .stat-card-number {
  color: #2c8fbd;
}

/* Card - Vendas */
.stat-card-vendas {
  border-left-color: #28a745;
}
.stat-card-vendas .stat-card-icon {
  background: rgba(40, 167, 69, 0.12);
  color: #28a745;
}
.stat-card-vendas .stat-card-number {
  color: #28a745;
}

/* Card - Avaliação */
.stat-card-avaliacao {
  border-left-color: #ffc107;
}
.stat-card-avaliacao .stat-card-icon {
  background: rgba(255, 193, 7, 0.15);
  color: #f59e0b;
}
.stat-card-avaliacao .stat-card-number {
  color: #f59e0b;
}

/* Responsivo - Mobile */
@media (max-width: 576px) {
  .profile-stats-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .stat-card {
    padding: 14px 10px;
    gap: 10px;
    flex-direction: column;
    text-align: center;
  }
  .stat-card-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  .stat-card-number {
    font-size: 1.2rem;
  }
  .stat-card-label {
    font-size: 0.65rem;
  }
}

/* Responsivo - Tablets */
@media (min-width: 768px) and (max-width: 991px) {
  .stat-card {
    padding: 18px 14px;
  }
  .stat-card-number {
    font-size: 1.3rem;
  }
}


/* ============================================
   ESTATÍSTICAS MODERNAS - MEUS ANÚNCIOS
   ============================================ */
.dashboard-stats-modern {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 16px 0 0;
}

.stat-card-modern {
  background: var(--white);
  border-radius: 16px;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: all 0.3s ease;
  border-left: 4px solid var(--primary-color);
}

.stat-card-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-card-info {
  flex: 1;
}

.stat-card-number {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-card-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Card - Total */
.stat-total-modern {
  border-left-color: #2c8fbd;
}
.stat-total-modern .stat-card-icon {
  background: rgba(44, 143, 189, 0.12);
  color: #2c8fbd;
}
.stat-total-modern .stat-card-number {
  color: #2c8fbd;
}

/* Card - Ativos */
.stat-ativo-modern {
  border-left-color: #28a745;
}
.stat-ativo-modern .stat-card-icon {
  background: rgba(40, 167, 69, 0.12);
  color: #28a745;
}
.stat-ativo-modern .stat-card-number {
  color: #28a745;
}

/* Card - Pendentes */
.stat-pendente-modern {
  border-left-color: #ffc107;
}
.stat-pendente-modern .stat-card-icon {
  background: rgba(255, 193, 7, 0.15);
  color: #f59e0b;
}
.stat-pendente-modern .stat-card-number {
  color: #f59e0b;
}

/* Card - Inativos */
.stat-inativo-modern {
  border-left-color: #dc3545;
}
.stat-inativo-modern .stat-card-icon {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
}
.stat-inativo-modern .stat-card-number {
  color: #dc3545;
}

/* Responsivo */
@media (max-width: 768px) {
  .dashboard-stats-modern {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .stat-card-modern {
    padding: 16px 12px;
  }
  .stat-card-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  .stat-card-number {
    font-size: 1.3rem;
  }
}

@media (max-width: 576px) {
  .dashboard-stats-modern {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-card-modern {
    padding: 12px 10px;
    gap: 10px;
  }
  .stat-card-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .stat-card-number {
    font-size: 1.1rem;
  }
  .stat-card-label {
    font-size: 0.6rem;
  }
}

/* ============================================
   SEPARADOR ENTRE ESTATÍSTICAS E ANÚNCIOS
   ============================================ */
.stats-divider {
  height: 2px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
  margin: 24px 0 16px 0;
  opacity: 0.8;
  border-radius: 2px;
}

/* ============================================
   PÁGINA DE FAVORITOS
   ============================================ */
.page-header {
  padding: 20px 0 10px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.page-header h4 {
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.page-header small {
  color: var(--text-muted);
}

.empty-favorites i {
  display: block;
}

/* Coração preenchido nos favoritos */
.heart-icon.bi-heart-fill {
  color: var(--danger) !important;
}

/*Logo*/

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    width: 150px;
    height: auto;
    display: block;
}


.img-placeholder {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f5f5f5;
}

.logo img {
    width: 150px;
    height: auto;
    display: block;
}

@media (max-width: 767px) {
    .logo img {
        width: 110px;
    }
}

@media (max-width: 767px) {
    .card-produto .img-placeholder img {
        height: 85%;
        width: 50%;
        object-fit: cover;
    }
}

/* ================================
   RODAPÉ INSTITUCIONAL
================================ */

.footer-institucional {
  margin-top: 60px;
  padding: 45px 0 20px;
  background: #f7f8fa;
  border-top: 1px solid #e9ecf1;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 35px;
}

.footer-brand img {
  width: 130px;
  height: auto;
  margin-bottom: 15px;
}

.footer-brand p {
  max-width: 280px;
  margin: 0;
  color: #70798a;
  font-size: 14px;
  line-height: 1.6;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-column h6 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #202633;
}

.footer-column a {
  color: #70798a;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s;
}

.footer-column a:hover {
  color: #0d6efd;
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid #e5e8ed;

  display: flex;
  align-items: center;
  justify-content: space-between;

  color: #8a93a3;
  font-size: 13px;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  color: #7d8797;
  font-size: 18px;
  transition: 0.2s;
}

.footer-social a:hover {
  color: #0d6efd;
}

/* MOBILE */
@media (max-width: 768px) {

  .footer-institucional {
    margin-top: 40px;
    padding: 35px 0 90px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 30px 20px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}


/* ============================================
   PÁGINA DE PERGUNTAS FREQUENTES - AGIPLACE
   ============================================ */

.faq-page {
  padding: 10px 0 30px;
}

/* Área principal das perguntas */
.faq-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* Cada pergunta */
.faq-item {
  background: var(--white);
  border-radius: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 10px var(--primary-shadow-light);
  overflow: hidden;
  transition: 0.2s;
}

.faq-item:hover {
  border-color: rgba(var(--primary-rgb), 0.18);
  box-shadow: 0 4px 16px var(--primary-shadow);
}

/* Pergunta */
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  color: var(--text-dark);
  font-size: 0.95rem;
  font-weight: 600;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::marker {
  display: none;
}

/* Ícone + */
.faq-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 400;
  transition: 0.2s;
}

/* Quando aberta */
.faq-item[open] {
  border-color: rgba(var(--primary-rgb), 0.2);
}

.faq-item[open] .faq-icon {
  background: var(--primary-color);
  color: white;
  transform: rotate(45deg);
}

/* Resposta */
.faq-answer {
  padding: 0 20px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.faq-answer p {
  margin: 0;
  padding-top: 2px;
}

/* Texto introdutório */
.faq-intro {
  text-align: center;
  padding: 25px 0 20px;
}

.faq-intro-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.faq-intro h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.faq-intro p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Busca da FAQ */
.faq-search {
  max-width: 700px;
  margin: 0 auto 25px;
}

/* Bloco final */
.faq-contact {
  max-width: 1000px;
  margin: 35px auto 0;
  padding: 28px;
  background: var(--primary-light);
  border-radius: 18px;
  text-align: center;
}

.faq-contact h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.faq-contact p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* MOBILE */
@media (max-width: 576px) {

  .faq-page {
    padding-top: 5px;
  }

  .faq-intro {
    padding: 20px 0 16px;
  }

  .faq-intro h1 {
    font-size: 1.4rem;
  }

  .faq-intro p {
    font-size: 0.85rem;
  }

  .faq-question {
    padding: 16px;
    font-size: 0.85rem;
  }

  .faq-answer {
    padding: 0 16px 17px;
    font-size: 0.83rem;
  }

  .faq-contact {
    padding: 22px 16px;
  }

}

/* ============================================
   PÁGINA DE CONFIGURAÇÕES - AGIPLACE
   ============================================ */
.config-page {
  padding: 10px 16px 30px;
  max-width: 900px;      /* não estica em telas grandes */
  margin: 0 auto;
}

/* garante margem lateral mesmo sem container padding */
@media (min-width: 768px) {
  .config-page { padding: 10px 24px 30px; }
}

.config-section {
  margin-bottom: 22px;
}

.config-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px 4px;
}

.config-card {
  background: var(--white);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 10px var(--primary-shadow-light);
  border: 1px solid var(--border-color);
}

.config-divider {
  margin: 14px 0;
  border-color: var(--border-color);
  opacity: 1;
}

/* Avatar */
.config-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.config-avatar {
  width: 60px;
  height: 60px;
  font-size: 1.8rem;
  margin: 0;
  border-width: 2px;
  flex-shrink: 0;
}

.config-avatar-info {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  min-width: 0;
}
.config-avatar-info small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Labels do form */
.config-card .form-label {
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.config-card .form-control,
.config-card .form-select {
  border-radius: 10px;
  border: 2px solid var(--border-color);
  padding: 8px 12px;
  font-size: 0.88rem;
  transition: 0.2s;
  max-width: 100%;
}

.config-card .form-control:focus,
.config-card .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.config-card .form-control:disabled {
  background: var(--bg-body);
  cursor: not-allowed;
}

/* Linhas com toggle */
.config-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: 0.15s;
}
.config-toggle-row:last-child { border-bottom: none; }
.config-toggle-row:hover { background: var(--primary-light); }

.config-toggle-row > div:first-child {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.config-toggle-row strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
}
.config-toggle-row small {
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-top: 2px;
}

/* Switch estilizado */
.config-toggle-row .form-check-input {
  width: 2.4em;
  height: 1.35em;
  cursor: pointer;
  border: 2px solid var(--border-color);
  background-color: #eef1f6;
  flex-shrink: 0;
}
.config-toggle-row .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}
.config-toggle-row .form-check-input:focus {
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15);
  border-color: var(--primary-color);
}

/* Botões padronizados */
.btn-config {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 110px;
  height: 38px;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-config-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 200px;
  height: 44px;
  padding: 0 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 40px;
}

/* Botão salvar */
.config-actions {
  text-align: center;
  margin: 6px 0 30px;
}

/* Zona de perigo */
.config-danger-zone .config-card {
  border-color: rgba(220, 53, 69, 0.2);
}

/* Responsivo */
@media (max-width: 576px) {
  .config-page { padding: 8px 12px 24px; }
  .config-card { padding: 12px 14px; }
  .config-toggle-row { padding: 12px 14px; }
  .config-avatar { width: 54px; height: 54px; font-size: 1.6rem; }
  .config-section-title { font-size: 0.74rem; }
  .config-toggle-row strong { font-size: 0.84rem; }
  .config-toggle-row small { font-size: 0.72rem; }
  .btn-config {
    min-width: 92px;
    height: 34px;
    font-size: 0.76rem;
    padding: 0 10px;
  }
  .btn-config-lg {
    min-width: 100%;
    height: 42px;
  }
}

/* ============================================
   TELA DE MENSAGENS – AGIPLACE
   ============================================ */
.chat-body {
  background: var(--bg-body);
}

.chat-page {
  padding: 10px 16px 90px;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .chat-page { padding: 10px 24px 30px; }
}

/* ---------- ESTRUTURA ---------- */
.chat-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 230px);
  min-height: 420px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 2px 14px var(--primary-shadow-light);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

/* ---------- LISTA ---------- */
.chat-list {
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background: var(--white);
  min-height: 0;
}

.chat-list-header {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.chat-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-body);
  border-radius: 30px;
  padding: 7px 14px;
  border: 1.5px solid transparent;
  transition: 0.2s;
}
.chat-search:focus-within {
  border-color: var(--primary-color);
  background: var(--white);
}
.chat-search i { color: var(--primary-color); font-size: 0.95rem; }
.chat-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.85rem;
  width: 100%;
  color: var(--text-dark);
}
.chat-search input::placeholder { color: #8896a8; }

.chat-list-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* ---------- ITEM DE CONVERSA ---------- */
.chat-item {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  cursor: pointer;
  transition: 0.15s;
  align-items: flex-start;
}
.chat-item:hover { background: var(--primary-light); }
.chat-item.active { background: var(--primary-light); border-left: 3px solid var(--primary-color); }

.chat-avatar {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.chat-avatar-sm { width: 38px; height: 38px; font-size: 0.95rem; }

.chat-online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #28a745;
  border: 2px solid var(--white);
  border-radius: 50%;
}

.chat-item-body { flex: 1; min-width: 0; }
.chat-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.chat-item-top strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-hora { font-size: 0.68rem; color: var(--text-muted); flex-shrink: 0; }

.chat-item-ad {
  font-size: 0.7rem;
  color: var(--primary-color);
  font-weight: 500;
  margin: 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-item-ad i { font-size: 0.65rem; }

.chat-item-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.chat-item-preview span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.chat-nao-lida { color: var(--text-dark); font-weight: 600; }
.chat-badge {
  background: var(--primary-color);
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}

/* ---------- JANELA DE CONVERSA ---------- */
.chat-window {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-body);
}

.chat-window-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
}
.chat-window-user { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.chat-window-user strong { font-size: 0.9rem; font-weight: 600; }
.chat-window-user small { font-size: 0.72rem; color: #28a745; font-weight: 500; }

.chat-action-btn {
  background: transparent;
  border: none;
  color: var(--primary-color);
  font-size: 1.1rem;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.15s;
  flex-shrink: 0;
}
.chat-action-btn:hover { background: var(--primary-light); }

.chat-back-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--primary-color);
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.chat-back-btn:hover { background: var(--primary-light); }

/* Banner do anúncio */
.chat-ad-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.78rem;
}
.chat-ad-banner i { color: var(--primary-color); font-size: 1rem; }
.chat-ad-banner div { display: flex; flex-direction: column; min-width: 0; }
.chat-ad-banner small { font-size: 0.68rem; color: var(--text-muted); }
.chat-ad-banner strong {
  font-size: 0.82rem;
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mensagens */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.msg-row { display: flex; }
.msg-me { justify-content: flex-end; }
.msg-other { justify-content: flex-start; }

.msg-bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.35;
  position: relative;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.msg-other .msg-bubble {
  background: var(--white);
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
}
.msg-me .msg-bubble {
  background: var(--primary-color);
  color: white;
  border-bottom-right-radius: 4px;
}

.msg-hora {
  display: block;
  font-size: 0.62rem;
  opacity: 0.7;
  margin-top: 3px;
  text-align: right;
}
.msg-other .msg-hora { color: var(--text-muted); }
.msg-me .msg-hora { color: rgba(255,255,255,0.8); }

/* Barra de input */
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: var(--white);
  border-top: 1px solid var(--border-color);
}
.chat-input-bar input {
  flex: 1;
  border: 1.5px solid var(--border-color);
  border-radius: 30px;
  padding: 9px 16px;
  font-size: 0.88rem;
  outline: none;
  background: var(--bg-body);
  transition: 0.2s;
}
.chat-input-bar input:focus {
  border-color: var(--primary-color);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.chat-send-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.15s;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--primary-dark); transform: scale(0.95); }

/* Estados vazios */
.chat-empty-list,
.chat-empty-window {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
  text-align: center;
  gap: 8px;
  height: 100%;
}
.chat-empty-list i,
.chat-empty-window i {
  font-size: 2.4rem;
  color: var(--primary-light);
}
.chat-empty-list p,
.chat-empty-window p { margin: 0; font-size: 0.85rem; }

/* ---------- RESPONSIVO ---------- */
@media (max-width: 767px) {
  .chat-shell {
    grid-template-columns: 1fr;
    height: calc(100vh - 260px);
    min-height: 400px;
    position: relative;
  }

  .chat-list { border-right: none; }

  .chat-window {
    position: absolute;
    inset: 0;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 5;
    border-radius: 16px;
  }

  .chat-shell.show-window .chat-window {
    transform: translateX(0);
  }

  .chat-back-btn { display: inline-flex; }

  .msg-bubble { max-width: 85%; font-size: 0.84rem; }
  .chat-item { padding: 10px 12px; }
  .chat-avatar { width: 42px; height: 42px; font-size: 1rem; }
}


/* ============================================
   CHAT POPUP – estilo Facebook
   ============================================ */
.chat-popup {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: var(--white);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  border: 1px solid var(--border-color);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* escondido por padrão */
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-height: 520px;
}

.chat-popup.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Quando recolhido: só o header aparece */
.chat-popup.collapsed .chat-popup-body { display: none; }
.chat-popup.collapsed { max-height: 56px; }

/* ---------- HEADER ---------- */
.chat-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--primary-color);
  color: white;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.chat-popup-user {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.chat-popup-user strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: white;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-popup-user small {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  gap: 5px;
}

.chat-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
}

.chat-popup-actions {
  display: flex;
  gap: 4px;
}

.chat-popup-icon {
  background: transparent;
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.15s;
}
.chat-popup-icon:hover { background: rgba(255,255,255,0.18); }

/* No header, avatar do popup precisa do anel branco */
.chat-popup .chat-avatar-sm {
  border: 2px solid rgba(255,255,255,0.4);
}

/* ---------- BODY ---------- */
.chat-popup-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--bg-body);
}

.chat-popup-ad {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-dark);
  font-weight: 500;
}
.chat-popup-ad i { color: var(--primary-color); }
.chat-popup-ad span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-popup-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  max-height: 320px;
}

/* Bolhas reutilizam .msg-bubble do style.css principal */

/* ---------- INPUT ---------- */
.chat-popup-input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--white);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.chat-popup-input .chat-popup-icon {
  color: var(--primary-color);
}
.chat-popup-input .chat-popup-icon:hover { background: var(--primary-light); }

.chat-popup-input input {
  flex: 1;
  border: 1.5px solid var(--border-color);
  border-radius: 30px;
  padding: 7px 12px;
  font-size: 0.82rem;
  outline: none;
  background: var(--bg-body);
  transition: 0.2s;
  min-width: 0;
}
.chat-popup-input input:focus {
  border-color: var(--primary-color);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.chat-popup-send {
  background: var(--primary-color);
  color: white;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.15s;
  flex-shrink: 0;
}
.chat-popup-send:hover { background: var(--primary-dark); transform: scale(0.94); }

/* ---------- MOBILE ---------- */
@media (max-width: 576px) {
  .chat-popup {
    right: 8px;
    left: 8px;
    bottom: 72px; /* acima do bottom-menu */
    width: auto;
    max-width: none;
    border-radius: 14px;
    max-height: 70vh;
  }
  .chat-popup-messages { max-height: 40vh; }
}