/* =========================================
   1. VARIÁVEIS E RESET
   ========================================= */
:root {
  --primary-color: #4A4A4A;
  --primary-light: #EDEDED;
  --primary-dark: #2D2D2D;
  --bg-color: #FFFFFF;
  --text-color: #1A1A1A;
  --text-secondary: #6E6E6E;
  --gray-light: #F5F5F5;
  --gray-200: #E0E0E0;
  --gray-300: #D1D1D1;
  --gray-500: #9E9E9E;
  --gray-600: #757575;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  line-height: 1.5;
}

/* Tipografia */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-color);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

::selection {
  background-color: var(--gray-300);
  color: var(--text-color);
}

/* =========================================
   2. LAYOUT & SIDEBAR
   ========================================= */
.container {
  display: flex;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: 360px;
  background-color: var(--bg-color);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  border-right: 1px solid var(--gray-200);
  z-index: 10;
  transition: var(--transition);
}

.sidebar-topo {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-base {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

.logo-container {
  margin-bottom: 32px;
  padding: 0 12px;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 32px;
  width: auto;
  filter: contrast(0.9);
  transition: var(--transition);
}

.logo-img:hover {
  opacity: 0.9;
}

/* Menu de Navegação */
.menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: "Inter", sans-serif;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: var(--transition);
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  font-weight: 500;
}

.menu a:hover,
.menu a.active {
  background-color: var(--gray-light);
  color: var(--text-color);
}

.menu a.active {
  font-weight: 600;
}

.menu .btn-ajuda {
  background: #000;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.menu .btn-ajuda:hover {
  background: #222;
  transform: translateY(-2px);
  color: #fff; /* Garantir contraste */
}

/* Conteúdo Principal */
.main-content {
  margin-left: 340px;
  padding: 40px;
  width: calc(100% - 280px);
  transition: var(--transition);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.page-title {
  font-size: 28px;
  font-weight: 700;
}

/* Seções */
.section {
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
}

/* =========================================
   3. COMPONENTES (CARDS, BOTÕES)
   ========================================= */

/* Cards Gerais */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.card {
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  text-decoration: none;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--gray-light);
  border-radius: 50%;
  margin-bottom: 24px;
  color: var(--text-color);
}

.card h2 {
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 600;
}

.card p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Cards Especiais */
a.card[data-funcao] {
  border: 1px solid #96b6fb;
  border-radius: 8px;
}

.card.bloqueado {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
}

.card.bloqueado::after {
  content: "🔒";
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 22px;
  color: #6b7280;
  cursor: default;
}

.card.bloqueado:hover::before {
  content: "Acesso restrito";
  position: absolute;
  top: -32px;
  right: 8px;
  background: #1f2937;
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Botões */
.btn {
  padding: 10px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--gray-300);
  background-color: var(--bg-color);
  color: var(--text-color);
}

.btn:hover {
  background-color: var(--gray-light);
  border-color: var(--gray-500);
}

.btn-primary {
  background-color: var(--text-color);
  color: var(--bg-color);
  border-color: var(--text-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-atalho {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  transition: all 0.2s ease-in-out;
}

.btn-atalho:hover {
  background: #f4f4f4;
  border-color: #ccc;
}

.btn-filtrar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: #111827;
  color: #fff;
  padding: 9px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  height: 36px;
}

.btn-filtrar:hover {
  filter: brightness(1.08);
}

/* =========================================
   4. ANALYTICS, GALERIA E DASHBOARD
   ========================================= */

/* Analytics */
.analytics-row {
  display: flex;
  gap: 16px;
  align-items: stretch;
  width: 100%;
}

.analytics-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  padding: 22px 28px;
  border: 1px solid rgba(0,0,0,.06);
  transition: box-shadow .25s ease;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.analytics-card:hover {
  box-shadow: 0 14px 40px rgba(0,0,0,.08);
}

.analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.analytics-header .title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-header h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: .2px;
}

/* Filtros */
.filters {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: end;
  column-gap: 12px;
}

.filters label {
  display: grid;
  gap: 4px;
  white-space: nowrap;
  font-size: .85rem;
  color: #374151;
}

.filters input[type="date"],
.filters select {
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #fff;
  min-width: 140px;
  font: inherit;
}

.filters select {
  min-width: 220px;
}

.filter-obra-bottom {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  padding: 8px 0;
}

.filter-obra-bottom label {
  font-weight: 500;
  font-size: 0.9rem;
}

.filter-obra-bottom select {
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #fff;
  min-width: 200px;
}

/* Gráficos */
.chart-wrapper {
  position: relative;
  width: 100%;
  min-height: 340px;
}

#chartMov {
  width: 100% !important;
  height: 280px !important;
}

.chart-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #6b7280;
  background: rgba(255,255,255,.6);
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.chart-loading.show {
  opacity: 1;
  pointer-events: auto;
}

.chart-empty {
  text-align: center;
  color: #64748b;
  padding: 20px;
  margin-top: 8px;
  font-size: .9rem;
}

/* Galeria de Imagens Recentes */
#imagens-recentes.analytics-card,
#analitico.analytics-card {
  flex: 1 1 48% !important;
  min-width: 0;
  max-width: 48%;
}

/* Ajuste de Gap para Analytics */
#analytics-row.analytics-row {
  gap: 10px;
}

.gallery-card .gallery-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gallery-frame {
  position: relative;
  width: 100%;
  height: 360px;
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
}

/* Ajuste específico para imagens recentes */
#imagens-recentes .gallery-frame {
  max-height: 480px;
}

#imagens-recentes .gallery-frame img {
  object-fit: contain;
  background: #f8fafc;
}

.gallery-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .4s ease;
  position: absolute;
  inset: 0;
}

.gallery-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0));
  color: #fff;
  font-size: 0.9rem;
  z-index: 2;
}

.gallery-title {
  font-weight: 600;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 22px;
  line-height: 32px;
  transition: background .2s;
  z-index: 3;
}

.nav-btn:hover {
  background: rgba(0,0,0,0.6);
}

.nav-btn.prev { left: 8px; }
.nav-btn.next { right: 8px; }

.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: background .3s, transform .3s;
  cursor: pointer;
}

.dot.active {
  background: #0ea5e9;
  transform: scale(1.2);
}

/* =========================================
   5. PROGRESSO DE OBRAS (Versão Compacta)
   ========================================= */
.progresso-obras-card {
  width: 100%;
  margin-bottom: 40px;
}

#progresso-obras .analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progresso-obras-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.progress-item {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.06);
}

.progress-item h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-canvas-wrap {
  display: grid;
  place-items: center;
  padding: 2px 0 0;
}

.progress-meta {
  margin-top: 6px;
  font-size: 11px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
}

.progress-meta span { display: inline-flex; gap: 4px; align-items: center; }
.progress-meta .sep::before { content: "•"; margin: 0 6px; color: #94a3b8; }

.progress-badge {
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 10px;
  background: #eef2ff;
  color: #3730a3;
}

.progress-badge.badge-erro    { background: #fee2e2; color: #991b1b; }
.progress-badge.badge-done    { background: #dcfce7; color: #166534; }
.progress-badge.badge-pending { background: #fff7ed; color: #9a3412; }

/* Botão "Adicionar Nova Obra" (Card) */
.progress-item.add-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 240px; /* Base */
  height: 160px;
  border: 2px dashed #60a5fa;
  background: rgba(59,130,246,.05);
  color: #1e3a8a;
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.progress-item.add-new:hover {
  transform: translateY(-2px);
  background: rgba(59,130,246,.08);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.12);
}

.progress-item.add-new:active {
  transform: translateY(0);
  box-shadow: none;
}

.progress-item.add-new .plus {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.progress-item.add-new .txt {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2px;
}

/* Botão "Adicionar Obra" (Header Pequeno) */
.add-obra-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 10px;
  border-radius: 6px;
  border: 1.5px dashed #60a5fa;
  background: rgba(59,130,246, .04);
  color: #1e3a8a;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .2px;
  cursor: pointer;
  transition: all .15s ease;
  line-height: 1.2;
}

.add-obra-btn:hover {
  background: rgba(59,130,246, .10);
  border-color: #3b82f6;
  transform: translateY(-1px);
}

.add-obra-btn i {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

/* =========================================
   6. USER PROFILE & AUTH
   ========================================= */
.user-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  margin-bottom: 24px;
  border-radius: var(--border-radius);
  background-color: var(--gray-light);
  position: relative;
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}

.user-profile:hover {
  background-color: var(--gray-200);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.user-avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.user-profile:hover .user-avatar {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-color);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 13px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 4px;
}

.user-email::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--gray-500);
  margin-right: 4px;
}

.user-edit {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-color);
  border: 1px solid var(--gray-300);
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
}

.user-profile:hover .user-edit { opacity: 1; }
.user-edit:hover { background-color: var(--gray-300); }

.user-status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #28a745;
  border: 2px solid var(--bg-color);
  z-index: 1;
}

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gray-300), var(--gray-400));
  color: var(--bg-color);
  font-weight: 600;
  font-size: 20px;
  text-transform: uppercase;
}

/* Logout */
.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--border-radius-sm);
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
  color: var(--text-secondary);
  border-top: 1px solid var(--gray-200);
  padding-top: 16px;
}

.logout-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background-color: var(--gray-300);
  transition: var(--transition);
}

.logout-btn:hover {
  background-color: var(--gray-light);
  color: var(--text-color);
}

.logout-btn:hover::before { background-color: var(--gray-600); }
.logout-btn .icon { width: 18px; height: 18px; transition: var(--transition); }
.logout-btn .text { font-size: 14px; font-weight: 500; flex-grow: 1; text-align: left; }
.logout-btn:hover .icon { transform: translateX(2px); }

/* =========================================
   7. UTILS: WEATHER, CADASTRO, ACESSO RÁPIDO
   ========================================= */
.weather-wrapper { margin-top: 70px; }
.weather-card {
  background-color: var(--gray-100, #026fff);
  padding: 16px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  margin: 16px;
}
.weather-cidade { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: #fbfbfb; }
.weather-data { font-size: 10px; color: #e0e4ecfe; margin-bottom: 8px; }
.weather-clima { font-size: 12px; display: flex; align-items: center; gap: 6px; font-weight: 500; color: #f0f1f3; }

.acesso-rapido { margin: 20px 0; padding: 10px 0; }
.acesso-rapido h2 { font-size: 1rem; font-weight: 600; color: #444; margin-bottom: 12px; }
.acesso-rapido-links { display: flex; gap: 12px; flex-wrap: wrap; }

.cadastro-progresso { margin-top: 30px; padding-top: 15px; border-top: 1px solid #e0e0e0; text-align: center; }
.cadastro-progresso h3 { font-size: 1rem; font-weight: 600; color: #444; margin-bottom: 12px; }
.progress-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 6px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: 0.3s;
}
.progress-circle.complete { border-color: #28a745; color: #28a745; }
.progress-circle.incomplete { border-color: #dc3545; color: #dc3545; }
.progress-circle span { font-size: 1.2rem; }
.mensagem-cadastro { margin-top: 10px; font-size: 0.85rem; color: #d9534f; font-weight: 500; }
.foto-upload { display: flex; align-items: center; gap: 12px; }
.foto-upload img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 1px solid #ddd; }
.boas-vindas { font-size: 18px; color: #4b5563; margin-top: 8px; }

/* =========================================
   8. MODAIS E POPUPS
   ========================================= */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  background: #ffffff;
  padding: 24px 32px;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-content h2 { text-align: center; margin-bottom: 16px; font-size: 22px; color: #1f2937; }
.modal-content label { font-weight: 500; font-size: 14px; margin-top: 4px; }
.modal-content input { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #d1d5db; font-size: 14px; margin-top: 4px; }
.obra-alocado { background: #f3f4f6; padding: 10px; border-radius: 8px; font-size: 14px; color: #374151; }
.foto-preview-container { display: flex; justify-content: center; align-items: center; margin-top: 6px; margin-bottom: 8px; }
.foto-preview { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid #e5e7eb; }

.botoes-modal { display: flex; justify-content: space-between; margin-top: 16px; }
.botoes-modal button {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background-color: #2563eb;
  color: white;
  font-size: 14px;
  transition: background 0.2s;
  margin: 0 4px;
}
.botoes-modal button:hover { background-color: #1e40af; }

/* Modal Ajuda (Override) */
.modal-ajuda {
  width: min(1000px, 92vw) !important;
  max-width: 95vw !important;
  height: min(80vh, 640px);
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: fadeIn 0.3s ease;
  overflow: hidden;
  box-sizing: border-box !important;
}

.close-modal {
  position: absolute;
  top: 15px; right: 20px;
  background: none; border: none;
  font-size: 2rem; cursor: pointer;
}

#pesquisaAjuda {
  padding: 12px; margin: 15px 0 25px 0;
  border: 1px solid #b3b3b3;
  width: 100%; border-radius: 8px;
  font-size: 16px; outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#pesquisaAjuda:focus { border-color: #4a90e2; box-shadow: 0 0 6px rgba(74, 144, 226, 0.4); }

.videos-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.video-card {
  background: #f9f9f9;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover { transform: translateY(-5px); box-shadow: 0 5px 12px rgba(0,0,0,0.15); }
.video-card img { width: 100%; border-radius: 8px; }
.video-card h4 { margin-top: 10px; font-size: 15px; color: #333; }

.modal-player {
  width: 80%; max-width: 900px;
  background: #000; border-radius: 12px;
  padding: 10px; position: relative;
}
.modal-player iframe { width: 100%; height: 500px; border-radius: 8px; }

/* Popups */
.popup-boas-vindas {
  position: fixed;
  top: 80px; right: 20px;
  background: rgba(250, 206, 9, 0.799);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  z-index: 1000;
  opacity: 0;
  animation: fadeInOut 6s ease forwards;
}

.popup-novidades {
  position: fixed;
  top: 150px; right: 20px;
  background: rgba(37, 100, 235, 0.89);
  color: #e4e6ec;
  border: 1px solid #93c5fd;
  padding: 16px 20px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  animation: fadeInOutNovidades 47s ease forwards;
  max-width: 320px;
}
.popup-novidades ul { margin: 8px 0; padding-left: 20px; }
.popup-novidades li { margin-bottom: 6px; list-style: disc; }

.popup-estoque {
  position: fixed;
  top: 20px; right: 20px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ff4d4d;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 9999;
  width: 300px;
  padding: 15px; padding-top: 35px;
}

.popup-estoque-content { position: relative; font-size: 14px; }
.popup-estoque-content strong { color: #ff4d4d; }
.popup-estoque-content ul { margin: 10px 0; padding-left: 20px; font-size: 14px; }
.popup-estoque-content button {
  background: #ff4d4d; color: #fff;
  border: none; padding: 8px 12px;
  border-radius: 4px; cursor: pointer; width: 100%;
}
.popup-estoque-content .ver-mais {
  text-decoration: underline; color: #007bff;
  cursor: pointer; margin-top: 8px;
  display: inline-block; font-size: 14px;
}
.popup-estoque-content .ver-mais:hover { color: #0056b3; }

.popup-close {
  background: none; border: none;
  color: #fdfeff; font-weight: 600;
  cursor: pointer; margin-top: 8px;
  padding: 0; font-size: 14px; text-decoration: underline;
}
.popup-estoque .popup-close {
  position: absolute; top: 10px; right: 10px;
  color: #ff4d4d; font-size: 20px;
  font-weight: bold; line-height: 1; text-decoration: none;
}
.popup-estoque .popup-close:hover { color: #b30000; }

/* =========================================
   9. NOTIFICAÇÕES (MekaBim Theme)
   ========================================= */
.status-badge {
  position: fixed;
  top: 20px; right: 20px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  border-radius: 60px;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 10000;
  font-size: 1rem;
  font-weight: 600;
  color: #0a0a0a;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}
.status-badge:hover { background: rgba(255,255,255,1); transform: translateY(-1px); }
.status-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 14px 4px rgba(34,197,94,0.5);
  animation: pulse 1.4s infinite ease-in-out;
}
.alerta-piscante { animation: piscar 1s infinite; color: #ff4d4d !important; font-weight: bold; }

.modal-overlay.notificacoes {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: none; align-items: center; justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(2px);
}
.modal-content.notificacoes {
  width: min(760px, 94vw);
  max-height: 82vh;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
  color: #e5e7eb;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  border: 1px solid rgba(148,163,184,.12);
}
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(30,41,59,.92) 0%, rgba(15,23,42,.92) 100%);
  border-bottom: 1px solid rgba(148,163,184,.12);
}
.notif-title { display: flex; gap: 12px; align-items: center; }
.notif-title i { width: 22px; height: 22px; color: #60a5fa; }
.notif-header h3 {
  margin: 0; font-size: 17px; font-weight: 800;
  color: #f8fafc !important;
  letter-spacing: .2px;
}
.notif-sub { font-size: 12px; opacity: .8; display:block; margin-top:2px; color: #cbd5e1 !important; }
.notif-close {
  background: rgba(148,163,184,.08);
  border: 1px solid rgba(148,163,184,.16);
  color: #e5e7eb !important;
  font-size: 18px; line-height: 1;
  border-radius: 10px; cursor: pointer;
  padding: 6px 10px;
  transition: transform .08s ease, background .2s ease;
}
.notif-close:hover { background: rgba(148,163,184,.14); }
.notif-close:active { transform: scale(.96); }
.notif-content {
  max-height: 60vh; overflow: auto; padding: 6px 0;
  scrollbar-width: thin; scrollbar-color: #334155 transparent;
}
.notif-content::-webkit-scrollbar { width: 10px; }
.notif-content::-webkit-scrollbar-thumb {
  background: #334155; border-radius: 10px;
  border: 2px solid transparent; background-clip: content-box;
}
.notif-item {
  display: grid; grid-template-columns: 30px 1fr;
  gap: 12px; padding: 12px 18px;
  border-bottom: 1px dashed rgba(148,163,184,.18);
}
.notif-item:last-child { border-bottom: 0; }
.notif-icon {
  width: 30px; height: 30px; display:grid; place-items:center;
  background: rgba(239,68,68,.12); color:#f87171;
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 10px; font-size: 16px;
}
.notif-text { font-size: 14px; line-height: 1.5; color: #e5e7eb; }
.notif-text .item { font-weight: 700; color: #fafafa; }
.notif-text .obra { color: #93c5fd; }
.notif-text .estado-min { color: #fbbf24; }
.notif-text .estado-abaixo { color: #f87171; }
.notif-meta { display:block; margin-top:4px; font-size:12px; color:#cbd5e1; opacity:.9; }
.notif-footer {
  padding: 12px 18px; display: flex; justify-content: center;
  border-top: 1px solid rgba(148,163,184,.12);
  background: linear-gradient(180deg, rgba(15,23,42,.9), rgba(2,6,23,.9));
}
.notif-more {
  background: #111827;
  border: 1px solid rgba(148,163,184,.25);
  color: #e5e7eb; border-radius: 12px; padding: 10px 14px;
  cursor: pointer; font-weight: 600;
  transition: transform .08s ease, background .2s ease, border-color .2s ease;
}
.notif-more:hover { background:#0b1220; border-color: rgba(148,163,184,.35); }
.notif-more:active { transform: translateY(1px); }

/* Badge vermelho pulsando em "Notificações" */
.notif-badge {
  position: relative; margin-left: 8px;
  background: #ef4444; color: #fff; font-weight: 800;
  font-size: 12px; line-height: 1; padding: 5px 7px;
  border-radius: 999px; display: inline-block;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, .7);
  animation: pulseBadge 1.6s infinite;
}
.notif-empty { padding: 26px; text-align: center; color: #9ca3af; font-size: 14px; }

/* =========================================
   10. CHAT WIDGET (Estilo Canto Direito)
   ========================================= */

/* Botão Flutuante (FAB) */
.chat-fab-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background-color: #2563eb;
  color: white;
  border-radius: 50%;
  border: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background-color 0.2s;
}
.chat-fab-btn:hover {
  transform: scale(1.1);
  background-color: #1d4ed8;
}

/* Badge do Botão Principal */
.chat-notification-badge {
  position: absolute;
  top: -5px; right: -5px;
  background-color: #ef4444;
  color: white;
  border-radius: 50%;
  width: 24px; height: 24px;
  font-size: 0.75rem; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 10001;
  display: none;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-fab-btn.has-unread .chat-notification-badge {
  display: flex;
  animation: pulse-red 1.5s infinite;
}

/* Overlay Transparente (para detectar clique fora) */
.chat-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999;
  background: transparent;
}

/* Janela do Chat (Widget) */
.chat-modal-window {
  position: fixed;
  bottom: 100px; /* Acima do botão FAB */
  right: 24px;   /* Alinhado à direita */
  width: 380px;  /* Largura menor */
  height: 75vh;  /* 75% da altura da tela */
  max-height: 700px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  font-family: 'Inter', sans-serif;
  animation: slideUp 0.3s ease-out;
}

/* Botão de fechar */
.chat-close-modal {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(255,255,255,0.8);
  border: none;
  border-radius: 50%;
  width: 30px; height: 30px;
  font-size: 1.2rem;
  color: #64748b;
  cursor: pointer;
  z-index: 50;
  display: flex; align-items: center; justify-content: center;
}
.chat-close-modal:hover { background: #f1f5f9; color: #ef4444; }

/* Estrutura Deslizante (Slider) */
.chat-shell {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
}

.chat-sidebar, .chat-main {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #fff;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

/* Estados de Visualização */
.chat-sidebar { transform: translateX(0); z-index: 10; }
.chat-main    { transform: translateX(100%); z-index: 20; }

.chat-shell.view-conversation .chat-sidebar { transform: translateX(-30%); opacity: 0.5; }
.chat-shell.view-conversation .chat-main    { transform: translateX(0); }

/* Estilos Internos - Sidebar */
.sidebar-header { padding: 15px; border-bottom: 1px solid #f1f5f9; background: #f8fafc; }
.sidebar-header h2 { font-size: 1.1rem; margin: 0 0 5px 0; color: #0f172a; }
.me-info { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.me-info img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.sidebar-search { padding: 10px 15px; border-bottom: 1px solid #e2e8f0; display: flex; gap: 8px; align-items: center; background: #fff; }
.sidebar-search input { width: 100%; border: none; outline: none; padding: 5px; font-size: 0.95rem; }

.contact-list { overflow-y: auto; flex: 1; list-style: none; padding: 0; margin: 0; }
.contact-item { display: flex; align-items: center; padding: 12px 15px; cursor: pointer; border-bottom: 1px solid #f8fafc; transition: background 0.2s; position: relative; }
.contact-item:hover { background: #f1f5f9; }
.contact-item.active { background: #dbeafe; border-left: 4px solid #2563eb; }
.contact-item img { width: 40px; height: 40px; border-radius: 50%; margin-right: 12px; object-fit: cover; }
.contact-info { flex: 1; overflow: hidden; }
.contact-name { display: block; font-weight: 600; color: #334155; font-size: 0.95rem; }
.contact-preview { display: block; font-size: 0.8rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-meta { font-size: 0.75rem; color: #94a3b8; text-align: right; min-width: 40px; }

/* Indicador de contato não lido */
.contact-item.unread-contact::after {
  content: '';
  position: absolute; top: 15px; right: 15px;
  width: 12px; height: 12px;
  background-color: #2563eb;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
  animation: pulse-blue 1.5s infinite;
}
.contact-item.unread-contact .contact-preview { font-weight: 700; color: #1e293b; }

/* Estilos Internos - Conversa */
.chat-header {
  height: 60px; padding: 0 15px;
  background: #f8fafc; border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; gap: 10px;
}
.chat-header img { width: 40px; height: 40px; border-radius: 50%; }

.btn-back-arrow {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; color: #334155;
  transition: background 0.2s; border: none; background: transparent;
}
.btn-back-arrow:hover { background: #e2e8f0; }

.message-scroll { flex: 1; padding: 15px; overflow-y: auto; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.msg-row { display: flex; margin-bottom: 4px; }
.msg-row.me { justify-content: flex-end; }
.msg-row.peer { justify-content: flex-start; }
.msg-bubble {
  max-width: 85%; padding: 8px 12px;
  border-radius: 12px; font-size: 0.9rem;
  line-height: 1.4; position: relative; word-wrap: break-word;
}
.msg-row.me .msg-bubble { background: #2563eb; color: #fff; border-bottom-right-radius: 2px; }
.msg-row.peer .msg-bubble { background: #e2e8f0; color: #1e293b; border-bottom-left-radius: 2px; }
.msg-meta { font-size: 0.7rem; margin-top: 4px; text-align: right; opacity: 0.7; }
.msg-image { max-width: 100%; border-radius: 8px; margin-bottom: 5px; display: block; }

.chat-composer {
  padding: 10px; background: #fff;
  border-top: 1px solid #e2e8f0;
  display: flex; gap: 8px; align-items: flex-end;
}
.chat-composer textarea {
  flex: 1; border: 1px solid #cbd5e1;
  border-radius: 20px; padding: 8px 12px;
  font-family: inherit; font-size: 0.9rem;
  resize: none; outline: none; max-height: 100px;
}
.composer-actions button {
  background: none; border: none;
  color: #64748b; font-size: 1.2rem;
  padding: 5px 10px; cursor: pointer;
}
.btn-send {
  background: #2563eb; color: white;
  border: none; border-radius: 50%;
  width: 40px; height: 40px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.hidden { display: none; }

/* =========================================
   11. INTRO JS & TOUR
   ========================================= */
.introjs-overlay { background: rgba(0, 0, 0, 0.6) !important; backdrop-filter: blur(2px); }
.introjs-tooltip {
  background: #ffffff !important; color: #333 !important;
  border-radius: 10px !important; padding: 20px !important;
  max-width: 350px !important; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
  font-size: 15px !important; line-height: 1.5;
}
.introjs-tooltip-arrow { border: none !important; background: transparent !important; }
.introjs-bullets ul li a { background: #ccc !important; }
.introjs-bullets ul li a.active { background: #007bff !important; }
.introjs-tooltipbuttons { display: flex !important; justify-content: space-between !important; margin-top: 15px !important; }
.introjs-button {
  border: none !important; border-radius: 6px !important;
  padding: 8px 14px !important; font-size: 14px !important;
  cursor: pointer; transition: background 0.2s ease-in-out;
}
.introjs-button.introjs-prevbutton { background: #f1f1f1 !important; color: #333 !important; }
.introjs-button.introjs-prevbutton:hover { background: #e2e2e2 !important; }
.introjs-button.introjs-nextbutton { background: #007bff !important; color: #fff !important; }
.introjs-button.introjs-nextbutton:hover { background: #0056b3 !important; }
.introjs-button.introjs-skipbutton {
  background: transparent !important; color: #999 !important;
  font-size: 13px !important; position: absolute !important;
  top: 10px; right: 15px; padding: 4px 8px !important;
}
.introjs-button.introjs-skipbutton:hover { color: #333 !important; }
.introjs-progress {
  height: 5px !important; background: #e9ecef !important;
  border-radius: 3px !important; overflow: hidden; margin-top: 10px;
}
.introjs-progressbar { background: #007bff !important; }

/* =========================================
   12. ANIMAÇÕES (KEYFRAMES)
   ========================================= */
@keyframes fadeInOut {
  0%   { opacity: 0; transform: translateY(-10px); }
  10%  { opacity: 1; transform: translateY(0); }
  90%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes fadeInOutNovidades {
  0%   { opacity: 0; transform: translateY(-10px); }
  5%   { opacity: 1; transform: translateY(0); }
  95%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes piscar {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0.3; }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulseBadge {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .7); }
  70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes pulse-blue {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* =========================================
   13. RESPONSIVIDADE
   ========================================= */
@media (max-width: 1024px) {
  .analytics-row { flex-direction: column; }
  section#analytics-row.analytics-row { flex-direction: column !important; }
  
  #imagens-recentes.analytics-card,
  #analitico.analytics-card {
    flex: 1 1 100% !important;
    max-width: 100%;
  }
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    width: 380px;
  }
  
  .sidebar.active { transform: translateX(0); }
  
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 24px;
  }
  
  .menu-toggle {
    display: block;
    position: fixed;
    top: 20px; left: 20px;
    z-index: 20;
    background: var(--bg-color);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
  }
}

@media (max-width: 640px) {
  .progress-item.add-new { min-width: 200px; height: 140px; }
  #progresso-obras .analytics-header { align-items: flex-start; flex-direction: column; gap: 8px; }
  #progresso-obras .title-wrap { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 480px) {
  .chat-modal-window {
    width: 100%; height: 100%;
    bottom: 0; right: 0;
    border-radius: 0;
  }
  .chat-fab-btn { display: none; }
}
/* =========================================
   Ajuste Layout Progresso de Obras
   Move as datas para a linha abaixo do Badge
   ========================================= */

.progress-meta {
  display: flex !important;
  flex-wrap: wrap !important; /* Permite quebrar os itens para a próxima linha */
  align-items: center;
  row-gap: 6px; /* Espaço entre a linha do Status e a linha das Datas */
}

/* Faz o Badge ocupar a linha inteira "invisivelmente", forçando a quebra */
.progress-meta .progress-badge {
  flex: 0 0 100%;      /* Força largura total no flex container */
  width: fit-content;  /* O visual do botão mantém o tamanho do texto */
  margin-bottom: 2px;
}

/* Esconde o primeiro separador que ficava entre o Badge e a Data de Início */
.progress-meta .sep:first-of-type {
  display: none;
}

/* Opcional: Ajuste de cor/tamanho das datas para ficarem mais discretas na segunda linha */
.progress-meta span:not(.progress-badge) {
  font-size: 0.55rem;
  color: #64748b;
}
/* =========================================
   Animação Circular e Texto Centralizado
   ========================================= */

/* Animação de rotação suave */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.rotating-canvas {
  /* Gira o gráfico infinitamente */
  animation: spin 8s linear infinite; 
}

/* O container precisa ser relativo para posicionarmos o texto no meio */
.progress-canvas-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Texto de porcentagem flutuando sobre o gráfico (não gira) */
.progress-text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #0f172a;
  z-index: 10;
  pointer-events: none; /* Permite clicar através do texto se necessário */
}
/* ============================================================
     🎅 BANNER DE NATAL ANIMADO E BRILHANTE
     ============================================================ */
  .christmas-banner {
    position: relative;
    background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 50%, #166534 100%); /* Vermelho para Verde escuro */
    border: 2px solid #fbbf24; /* Borda Dourada */
    border-radius: 16px;
    padding: 25px 20px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(185, 28, 28, 0.4), inset 0 0 20px rgba(251, 191, 36, 0.2);
    overflow: hidden;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  /* Efeito de brilho passando */
  .christmas-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    transform: skewX(-25deg);
    animation: shineEffect 4s infinite ease-in-out;
    pointer-events: none;
  }

  @keyframes shineEffect {
    0% { left: -150%; }
    20% { left: 150%; } /* Passa rápido */
    100% { left: 150%; } /* Espera um pouco antes de passar de novo */
  }

  /* Título dourado */
  .christmas-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(to right, #fde68a, #fff, #fde68a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
  }

  .christmas-subtitle {
    font-size: 1.1rem;
    color: #fef3c7;
    margin: 0;
    font-weight: 500;
    position: relative;
    z-index: 2;
  }

  .christmas-icons {
    font-size: 1.5rem;
    margin-bottom: 10px;
    animation: bounceIcons 2s infinite;
  }

  @keyframes bounceIcons {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
  }
  /* Spinner Mini para elementos internos */
.spinner-mini {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin-mini 0.8s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -12px;
    margin-left: -12px;
    z-index: 5;
    display: none; /* Começa escondido */
}

@keyframes spin-mini {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Garantir que os containers sejam relativos para o spinner centralizar */
.avatar-container, .gallery-frame {
    position: relative;
}
.progresso-obras-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px 0;
}

.obra-circle-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 150px;
    text-align: center;
}

.canvas-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
}

.canvas-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

.pct-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1rem;
    font-weight: bold;
    color: #334155;
}

.obra-circle-card h4 {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.2;
}
/* Ajuste do Card para ter altura fixa ou flexível */
.gallery-card {
    display: flex;
    flex-direction: column;
    min-height: 450px; /* Defina a altura que você deseja para o card todo */
}

/* O corpo da galeria ocupa o restante do card */
.gallery-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* O frame ocupa 100% da altura do corpo */
.gallery-frame {
    position: relative;
    width: 100%;
    height: 100%; /* Garante que o container ocupe a altura toda */
    background-color: #f1f5f9; /* Cor de fundo enquanto carrega */
}

/* A MÁGICA: Preenchimento total da imagem */
#galeria-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Faz a imagem preencher o espaço sem distorcer */
    object-position: center; /* Mantém o centro da foto visível */
    display: block;
    transition: opacity 0.3s ease-in-out;
}

/* Ajuste do Overlay para ficar sempre no rodapé da imagem */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px 15px;
    z-index: 2;
}
/* 1. Garante que o corpo do card da galeria ocupe todo o espaço disponível e force a altura */
.gallery-card .gallery-body {
    flex: 1; /* Ocupa o espaço restante no card */
    display: flex;
    flex-direction: column;
    height: 100%; /* Garante que o corpo tenha altura */
    min-height: 300px; /* Define uma altura mínima para o card, ajuste conforme necessário */
    position: relative;
}

/* 2. O frame da galeria deve preencher 100% do corpo */
.gallery-frame {
    position: relative;
    flex: 1; /* Ocupa todo o espaço do gallery-body */
    width: 100%;
    height: 100% !important; /* Força a altura total */
    overflow: hidden; /* Corta o excesso da imagem */
    border-radius: 0 0 10px 10px; /* Mantém o arredondamento na parte inferior, se houver */
}

/* 3. A imagem deve preencher 100% do frame e usar 'cover' */
#galeria-img {
    width: 100%;
    height: 100% !important; /* Força a altura total */
    object-fit: cover; /* O PULO DO GATO: preenche o espaço sem distorcer, cortando as sobras */
    object-position: center; /* Centraliza a imagem */
    display: block;
    position: absolute; /* Garante que a imagem se posicione em relação ao frame */
    top: 0;
    left: 0;
}

/* Ajuste opcional para o overlay ficar sobre a imagem */
.gallery-overlay {
    z-index: 2; /* Garante que o texto fique sobre a imagem */
}

/* Ajuste opcional para os botões ficarem sobre a imagem */
.nav-btn {
    z-index: 3;
}
.progresso-obras-body, .chart-wrapper {
    position: relative;
    min-height: 200px; /* Garante espaço para o spinner aparecer */
}

/* O estilo do spinner-mini que já usamos antes */
.spinner-mini {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin-mini 0.8s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -12px;
    margin-left: -12px;
    z-index: 5;
    display: none;
}

@keyframes spin-mini {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.photo-preview-label {
    width: 120px;
    height: 120px;
    margin: 0 auto 10px;
    display: block;
    border: 2px dashed #bfdbfe; /* Azul suave */
    border-radius: 50%;
    padding: 5px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.photo-preview-label:hover {
    border-color: #2563eb; /* Azul MekaBim */
    background: #eff6ff;
}

#foto-preview {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.upload-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.photo-preview-label:hover .upload-overlay {
    opacity: 1;
}

.profile-modal .form-group {
    margin-bottom: 15px;
    text-align: left;
}

.profile-modal label {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 5px;
}
/* Container dos botões na parte inferior da modal */
.modal-footer {
    display: flex;
    justify-content: flex-end; /* Alinha os botões à direita */
    gap: 12px; /* Espaçamento entre eles */
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9; /* Linha sutil separando o formulário */
}

/* Estilo Base dos Botões */
.btn-cancelar, .btn-salvar {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Botão Cancelar (Neutro/Secundário) */
.btn-cancelar {
    background-color: #f1f5f9;
    color: #64748b;
}

.btn-cancelar:hover {
    background-color: #e2e8f0;
    color: #475569;
}

/* Botão Salvar (Azul/Primário) */
.btn-salvar {
    background-color: #2563eb; /* Azul MekaBim */
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
    position: relative;
    min-width: 140px; /* Garante que o botão não mude de tamanho ao ativar o spinner */
}

.btn-salvar:hover {
    background-color: #1d4ed8;
    box-shadow: 0 6px 10px -1px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-salvar:active {
    transform: translateY(0);
}

/* Estado desabilitado (quando está salvando) */
.btn-salvar:disabled {
    background-color: #93c5fd;
    cursor: not-allowed;
    transform: none;
}

/* Ajuste do Spinner dentro do botão */
.btn-salvar .spinner-mini {
    width: 16px;
    height: 16px;
    border-width: 2px;
    border-top-color: #ffffff;
    position: static; /* Remove o absolute para ficar ao lado do texto */
    margin: 0;
}
/* Estilo para Card Bloqueado */
.card-disabled {
    position: relative;
    pointer-events: none; /* Impede cliques no link */
    cursor: not-allowed;
    filter: grayscale(0.8) opacity(0.6); /* Desbota e tira a cor */
    transition: all 0.3s ease;
}

.card-disabled:hover {
    transform: none !important; /* Remove animações de hover */
}

/* O "Blur" no conteúdo interno */
.card-disabled h2, 
.card-disabled i {
    filter: blur(1.5px);
}

/* Ícone de Cadeado */
.lock-icon-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fee2e2; /* Vermelho bem claro */
    color: #ef4444; /* Vermelho vibrante */
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
    filter: none !important; /* Garante que o cadeado não fique borrado */
}
.memory-card {
    background: #111111; /* Preto elegante */
    border-radius: 12px;
    padding: 15px;
    margin: 0 15px 20px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255,255,255,0.05);
}

.memory-chart { width: 50px; height: 50px; }

.circular-chart { display: block; margin: 0 auto; max-width: 100%; max-height: 100%; }

.circle-bg { fill: none; stroke: #333; stroke-width: 3.8; }

.circle {
    fill: none;
    stroke: #2563eb; /* Azul Mekabim */
    stroke-width: 3.8;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease 0s;
}

.percentage {
    fill: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 700;
    text-anchor: middle;
}

.memory-info { display: flex; flex-direction: column; gap: 4px; }

.info-item { display: flex; flex-direction: column; }

.info-item span { font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }

.info-item strong { font-size: 12px; color: #fff; font-family: monospace; }

/* ==========================================
   💼 CSS DO CARD DE ANIVERSARIANTES (PROFISSIONAL)
   ========================================== */

.dashboard-header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px; /* Mais espaço abaixo do cabeçalho */
  padding-top: 16px;
}

.header-left {
  flex: 1;
  min-width: 250px;
}

/* O Card Profissional */
.birthday-card-pro {
  background: #ffffff;
  /* Sombra muito mais suave e difusa para um look moderno */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-radius: 8px; /* Bordas menos arredondadas */
  border: 1px solid #e2e8f0;
  width: 260px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Cabeçalho do Card */
.bday-header-pro {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background-color: #f8fafc; /* Fundo cinza muito claro para o título */
  border-bottom: 1px solid #e2e8f0;
}

.bday-icon-pro {
  width: 18px;
  height: 18px;
  color: #475569; /* Cor de ícone sóbria */
  stroke-width: 2px;
}

.bday-header-pro h3 {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase; /* Letras maiúsculas dão um ar mais técnico */
  letter-spacing: 0.5px;
  color: #475569;
  font-weight: 700;
}

/* Lista */
.bday-list-pro {
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  max-height: 160px;
  overflow-y: auto;
}

/* Itens da lista */
.bday-item-pro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.bday-item-pro:last-child {
  border-bottom: none;
}

.bday-item-pro:hover {
  background-color: #f9fafb; /* Leve destaque ao passar o mouse */
}

.bday-info-pro {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bday-name-pro {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b; /* Texto escuro forte */
}

.bday-role-pro {
  font-size: 11px;
  color: #94a3b8; /* Texto cinza claro para informação secundária */
  font-weight: 500;
}

/* A Data */
.bday-date-pro {
  font-size: 13px;
  font-weight: 600;
  color: #64748b; /* Cinza médio para a data padrão */
  white-space: nowrap;
}

/* (Opcional) Destaque para se o aniversário for HOJE */
.bday-date-pro.today {
  color: #2563eb; /* Azul institucional */
  font-weight: 700;
}

/* Responsividade */
@media (max-width: 768px) {
  .dashboard-header-wrapper {
    flex-direction: column;
    gap: 16px;
  }
  .birthday-card-pro {
    width: 100%;
  }
}
/* Adicione isso ao seu CSS para ajustar o card na sidebar */
.sidebar .birthday-card-pro {
    background: rgba(255, 255, 255, 0.05); /* Exemplo de fundo sutil se a sidebar for escura */
    border-radius: 8px;
    padding: 10px;
    margin: 15px 10px; /* Margem para não colar nas bordas */
}

.sidebar .bday-header-pro h3 {
    font-size: 14px; /* Fonte menor para caber */
    margin: 0;
}

.sidebar .bday-list-pro {
    max-height: 150px; /* Limita altura se tiver muitos aniversariantes */
    overflow-y: auto;  /* Adiciona rolagem se necessário */
}

