/* ==========================================
   1. RESET GLOBAL E ESTILOS BASE
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f9fafb;
  color: #111827;
}

/* ==========================================
   2. CONTAINERS PRINCIPAIS (ESPAÇAMENTO IGUAL)
   ========================================== */
.header-container {
  width: 100%;
  padding: 24px 32px 12px 32px; /* 24px de afaste do topo, 32px nas laterais */
}

.main-container {
  width: 100%;
  padding: 12px 32px 32px 32px; /* Mesmos 32px nas laterais para alinhar perfeitamente */
}

/* ==========================================
   3. BARRA DE NAVEGAÇÃO (HEADER / NAVBAR)
   ========================================== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background-color: transparent;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
}

.nav-right {
  gap: 12px;
}

/* Logo */
.logo-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  height: 44px;
  border-radius: 30px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  color: #111827;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.logo-card:hover {
  background-color: #f3f4f6;
}

/* Container de Ícones do Menu */
.segmented-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 3px;
  height: 44px;
  border-radius: 30px;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-item svg {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0;
}

.nav-item:hover {
  color: #111827;
}

.nav-item.active {
  background-color: #ffffff;
  color: #111827;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Notificação */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  color: #374151;
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s ease;
}

.icon-btn:hover {
  background-color: #f3f4f6;
}

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Perfil */
.profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 4px;
  height: 44px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 30px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.profile-card:hover {
  background-color: #f3f4f6;
}

.profile-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-name {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

/* ==========================================
   4. CARD PRINCIPAL (TAREFAS E PRODUTOS)
   ========================================== */
.task-card,
.content-card {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.page-title, .task-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

/* Botão Principal */
.btn-primary {
  background-color: #111827;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-primary:hover {
  background-color: #374151;
}

/* Barra de Filtros */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid #f3f4f6;
  overflow-x: auto;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.filter-btn.active {
  background-color: #111827;
  color: #ffffff;
  border-color: #111827;
}

.filter-count {
  background-color: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
}

.filter-btn.active .filter-count {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* ==========================================
   5. TABELA DE DADOS
   ========================================== */
.table-container {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.data-table th {
  padding: 12px 16px;
  color: #6b7280;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}

.data-table td {
  padding: 14px 16px;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
}

.data-table tr:hover td {
  background-color: #f9fafb;
}

.font-medium {
  font-weight: 600;
  color: #111827;
}

/* Badges de Status */
.status-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-active {
  background-color: #ecfdf5;
  color: #047857;
}

.status-future {
  background-color: #eff6ff;
  color: #1d4ed8;
}

.status-budget {
  background-color: #fffbeb;
  color: #b45309;
}

.btn-action {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-weight: 500;
}

.btn-action:hover {
  color: #111827;
}

/* ==========================================
   6. DETALHES DO PRODUTO (FOTO MAIOR E QUADRADA)
   ========================================== */

/* Barra de Ações Superior */
.page-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.btn-back {
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.btn-back:hover {
  color: #111827;
}

/* Card Principal (Aumentado a coluna da foto para 340px) */
.product-main-card {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 28px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .product-main-card {
    grid-template-columns: 1fr;
  }
}

/* Foto Principal da Esquerda - Quadrada (1:1) */
.main-photo-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.main-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Coluna da Direita */
.main-info-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.product-name-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.product-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
}

/* Galeria de Fotos abaixo do Nome */
.gallery-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gallery-title {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gallery-grid {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gallery-item {
  width: 250px;  
  height: 250px; 
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  background-color: #f9fafb;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Cards Separados em Baixo */
.info-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  margin-bottom: 12px;
}

.info-card-label {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.info-card-value {
  font-size: 15px;
  font-weight: 600;
  color: #4b5563;
}

/* Selects de Status */
.status-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 6px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23374151%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.status-select-active {
  background-color: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.status-select-inactive {
  background-color: #f3f4f6 !important;
  color: #4b5563 !important;
  border-color: #d1d5db !important;
}

.status-select-danger {
  background-color: #fef2f2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}

.category-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 6px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #d1d5db;
  background-color: #f9fafb;
  color: #374151;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23374151%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.category-select:hover {
  background-color: #f3f4f6;
  border-color: #9ca3af;
}

.provider-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 16px 24px;
}

.info-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.provider-detail-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
  animation: fadeIn 0.2s ease-in-out;
}

.sub-info-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.input-search-field {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  font-size: 13px;
  color: #111827;
  outline: none;
  width: 260px;
  transition: all 0.2s ease;
}

.input-search-field:focus {
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.05);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   7. ESTILOS DA CRONOLOGIA E ABAS
   ========================================== */
.tabs-navigation {
  display: flex;
  gap: 12px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #1e293b;
}

.tab-btn.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.table-wrapper {
  overflow-x: auto;
}

.col-data {
  white-space: nowrap;
  font-weight: 600;
  color: #2563eb;
}

.timeline-horizontal-wrapper {
  width: 100%;
  overflow-x: auto;
  padding: 40px 10px;
  background-color: #f8fafc;
  border-radius: 8px;
}

.timeline-horizontal {
  display: flex;
  align-items: flex-start;
  min-width: max-content;
  position: relative;
  padding: 0 20px;
}

.timeline-horizontal::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 4px;
  background-color: #cbd5e1;
  z-index: 1;
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 240px;
  padding: 0 15px;
}

.timeline-point {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #2563eb;
  border: 4px solid #ffffff;
  box-shadow: 0 0 0 2px #2563eb;
  z-index: 2;
  margin-bottom: 16px;
}

.timeline-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  text-align: center;
}

.timeline-date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2563eb;
  background-color: #eff6ff;
  padding: 2px 8px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.timeline-title {
  font-size: 0.95rem;
  margin: 0 0 6px 0;
  color: #1e293b;
}

.timeline-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* ==========================================
   8. ESTILOS DA PÁGINA DE PATRIMÓNIO (CORRIGIDOS)
   ========================================== */
.patrimonio-hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
}

/* Garante o alinhamento horizontal: Título à esquerda, Valor à direita */
.patrimonio-hero-card .patrimonio-header {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.patrimonio-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.patrimonio-total-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: #2563eb;
}

.patrimonio-chart-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 240px;
}

.patrimonio-categories-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

/* Garante o alinhamento horizontal dos cards da lista */
.category-card {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  padding: 16px 20px !important;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.category-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.icon-dinheiro    { background-color: #d1fae5; }
.icon-imoveis     { background-color: #dbeafe; }
.icon-veiculos    { background-color: #fef3c7; }
.icon-equipamentos{ background-color: #cff4fc; }
.icon-produtos    { background-color: #ede9fe; }

.category-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: #1e293b;
}

/* Empurra e alinha as estatísticas para a extrema direita */
.category-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.category-perc {
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  min-width: 45px;
  text-align: right;
}

.category-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  min-width: 110px;
  text-align: right;
}