/* ==========================================================================
   AGENTE IMÓVEIS CAIXA - MODERN DARK DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg-dark: #0b0f19;
  --bg-surface: #151c2c;
  --bg-surface-elevated: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(56, 189, 248, 0.4);

  --accent-primary: #38bdf8;   /* Cyan */
  --accent-secondary: #818cf8; /* Indigo */
  --accent-success: #10b981;   /* Emerald Green */
  --accent-warning: #f59e0b;   /* Amber */
  --accent-danger: #ef4444;    /* Rose Red */
  --accent-purple: #c084fc;   /* Purple */

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.25);
}

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

body.dark-theme {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   HEADER
   -------------------------------------------------------------------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-pill {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  transition: all 0.2s ease;
}

.stat-pill:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.stat-label {
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value {
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-heading);
}

.stat-pill.success .stat-value { color: var(--accent-success); }
.stat-pill.info .stat-value { color: var(--accent-primary); }
.stat-pill.warning .stat-value { color: var(--accent-warning); }

/* --------------------------------------------------------------------------
   MAIN & VIEWS
   -------------------------------------------------------------------------- */
.main-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem;
}

.view-section {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.view-section.active {
  display: block;
}

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

/* --------------------------------------------------------------------------
   CATALOG HERO & QUICK UF BAR
   -------------------------------------------------------------------------- */
.catalog-hero {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-search-wrapper {
  width: 100%;
}

.search-input-box {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-box input {
  width: 100%;
  padding: 0.95rem 3rem 0.95rem 3.1rem;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.98rem;
  font-family: var(--font-body);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.search-input-box input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
  background: var(--bg-surface-elevated);
}

.clear-search-btn {
  position: absolute;
  right: 1.1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem;
}

.clear-search-btn:hover {
  color: var(--text-main);
}

.quick-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
}

.quick-filter-bar::-webkit-scrollbar {
  height: 4px;
}

.quick-filter-bar::-webkit-scrollbar-thumb {
  background: var(--bg-surface-elevated);
  border-radius: 4px;
}

.filter-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

.filter-chip:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.filter-chip.active {
  background: linear-gradient(135deg, var(--accent-primary), #0284c7);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}

.filter-chip.chip-fav.active {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
}

.filter-chip.chip-disputa.active {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

/* --------------------------------------------------------------------------
   CATALOG LAYOUT (SIDEBAR + GRID)
   -------------------------------------------------------------------------- */
.catalog-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.filters-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 6.5rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-surface-elevated) transparent;
}

.filters-sidebar::-webkit-scrollbar {
  width: 6px;
}

.filters-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.filters-sidebar::-webkit-scrollbar-thumb {
  background: var(--bg-surface-elevated);
  border-radius: 4px;
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.btn-reset-filters {
  background: transparent;
  border: none;
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-reset-filters:hover {
  text-decoration: underline;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.filter-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-group select,
.filter-group input[type="number"] {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: var(--font-body);
  transition: border-color 0.2s ease;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.range-inputs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.range-inputs span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.83rem;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--accent-primary);
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   RESULTS & CARDS GRID
   -------------------------------------------------------------------------- */
.catalog-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-counter {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.results-counter strong {
  color: var(--text-main);
  font-family: var(--font-heading);
}

.results-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-box label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.sort-box select {
  padding: 0.5rem 0.9rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-box select:focus,
.sort-box select:hover {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-surface-elevated);
}

.mobile-filter-toggle {
  display: none;
}

.btn-toggle-filters {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 1280px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* PROPERTY CARD STYLES (MEGA LEILÕES ESTILO PROPOSTA) */
.property-card {
  background: #0b1329;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
}

.property-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.2);
}

.card-media-wrapper {
  position: relative;
  width: 100%;
  height: 185px;
  background-color: #0f172a;
  overflow: hidden;
}

.card-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.property-card:hover .card-media-img {
  transform: scale(1.04);
}

.card-media-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   FAIXA TRANSVERSAL (RIBBON) DE IMÓVEL INDISPONÍVEL / REMOVIDO DA CAIXA
   -------------------------------------------------------------------------- */
.ribbon-indisponivel-card {
  position: absolute;
  top: 22px;
  left: -48px;
  width: 180px;
  padding: 6px 0;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff;
  font-family: var(--font-heading, system-ui, sans-serif);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1.2px;
  transform: rotate(-45deg);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.6), 0 2px 6px rgba(0, 0, 0, 0.5);
  z-index: 30;
  pointer-events: none;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

.ribbon-indisponivel-detail {
  position: absolute;
  top: 36px;
  left: -62px;
  width: 250px;
  padding: 10px 0;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff;
  font-family: var(--font-heading, system-ui, sans-serif);
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1.8px;
  transform: rotate(-45deg);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.7), 0 4px 10px rgba(0, 0, 0, 0.5);
  z-index: 50;
  pointer-events: none;
  border-top: 1.5px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1.5px solid rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------------------------
   FAVORITES SYSTEM (CORAÇÃO / CARD FAVORITO) & LEAFLET MAP INTEGRATION
   -------------------------------------------------------------------------- */
.btn-card-favorite {
  position: absolute;
  bottom: 0.65rem;
  right: 0.65rem;
  z-index: 25;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  font-size: 1.05rem;
  line-height: 1;
  padding: 0;
  user-select: none;
  pointer-events: auto;
}

.btn-card-favorite:hover {
  transform: scale(1.15);
  border-color: rgba(244, 63, 94, 0.6);
  background: rgba(15, 23, 42, 0.95);
}

.btn-card-favorite.active {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.6);
}

.btn-favorite-detail {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #f43f5e;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-favorite-detail:hover {
  background: rgba(244, 63, 94, 0.25);
  transform: translateY(-1px);
}

.btn-favorite-detail.active {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.4);
}

.card-map-view {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: #0f172a;
}

.provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent-primary);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.btn-reverificar-floating {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 500;
  background: rgba(11, 19, 41, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--accent-primary);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-reverificar-floating:hover {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.4);
}

/* Leaflet Custom Marker Pin */
.custom-leaflet-marker {
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-pin {
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  position: absolute;
  transform: rotate(-45deg);
  left: 50%;
  top: 50%;
  margin: -18px 0 0 -14px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-pin::after {
  content: '🏠';
  transform: rotate(45deg);
  font-size: 13px;
}

.custom-leaflet-marker-large .marker-pin-large {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  position: absolute;
  transform: rotate(-45deg);
  left: 50%;
  top: 50%;
  margin: -24px 0 0 -18px;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-leaflet-marker-large .marker-pin-large::after {
  content: '🏠';
  transform: rotate(45deg);
  font-size: 17px;
}

.card-top-badges {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  right: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  pointer-events: none;
}

.badge-status {
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
}

.badge-status.disponivel {
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.badge-status.indisponivel {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

.badge-discount {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #000000;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-weight: 900;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.4);
}

.badge-tipo-imovel {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(99, 102, 241, 0.18));
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  width: fit-content;
}

/* ==========================================================================
   MODALIDADE DE VENDA BADGES (HIGH VISIBILITY)
   ========================================================================== */
.badge-modalidade {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.badge-modalidade.large {
  font-size: 0.88rem;
  padding: 0.45rem 0.95rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* 1. Leilão (Amber / Orange Solid) */
.badge-mod-leilao {
  background: #d97706;
  color: #ffffff;
  border: 1px solid #f59e0b;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

/* 2. Venda Direta (Emerald / Green Solid) */
.badge-mod-direta {
  background: #059669;
  color: #ffffff;
  border: 1px solid #10b981;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

/* 3. Venda Online (Cyan / Sky Blue Solid) */
.badge-mod-online {
  background: #0284c7;
  color: #ffffff;
  border: 1px solid #38bdf8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

/* 4. Licitação / Proposta Fechada (Indigo / Purple Solid) */
.badge-mod-licitacao {
  background: #7c3aed;
  color: #ffffff;
  border: 1px solid #a855f7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

/* 5. Default Solid */
.badge-mod-default {
  background: #334155;
  color: #ffffff;
  border: 1px solid #64748b;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

/* Highlight box for detail view modalidade row */
.highlight-modalidade-row {
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.8rem !important;
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
}

.card-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: -0.1rem;
}

.card-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.55rem;
}

.card-compact-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
  font-size: 0.78rem;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin: 0.35rem 0;
}

.strip-item {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #cbd5e1;
}

.strip-item svg {
  color: #94a3b8;
  flex-shrink: 0;
}

.card-date-strip svg {
  flex-shrink: 0;
}

.strip-dot {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.7rem;
}

.card-date-strip {
  font-size: 0.78rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-date-strip.leilao-date {
  color: #fef08a;
  background: #271c08;
  border: 1px solid #b45309;
}

.card-date-strip.direta-date {
  color: #7dd3fc;
  background: #032b45;
  border: 1px solid #0284c7;
}

.card-date-strip.disputa-date {
  color: #fca5a5;
  background: #450a0a;
  border: 1px solid #dc2626;
}

.card-location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: center;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-description-sub {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.75em;
}

/* BLOCO DE PREÇO UNIFICADO DENTRO DO CARD (ESTILO PROPOSTA) */
.card-price-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  text-align: center;
  margin: 0.35rem 0;
}

.price-amount {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 900;
  color: #34d399;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.price-savings {
  font-size: 0.82rem;
  color: #34d399;
  font-weight: 700;
  background: rgba(52, 211, 153, 0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.price-evaluation-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 0.1rem;
}

.price-strikethrough {
  text-decoration: line-through;
  color: #94a3b8;
  font-weight: 600;
  opacity: 0.85;
}

.card-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.meta-tag {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* FOOTER E BOTÃO DE AÇÃO VERDE VIBRANTE (IGUAL PROPOSTA) */
.card-footer {
  padding: 0 1rem 1rem 1rem;
  display: flex;
  gap: 0.5rem;
}

.btn-card-detail {
  flex: 1;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-card-detail:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-icon-link {
  width: 38px;
  height: 38px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-icon-link:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: var(--bg-surface-elevated);
}

/* PAGINATION */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem;
}

.btn-page {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-page:hover:not(:disabled) {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-indicator {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   DETAIL VIEW STYLES
   -------------------------------------------------------------------------- */
.detail-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.btn-back {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-back:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.detail-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.detail-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* DETAIL HEADER BANNER */
.detail-header-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-md);
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.detail-title-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.detail-code-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: monospace;
  width: fit-content;
}

.detail-code-badge button {
  background: transparent;
  border: none;
  color: var(--accent-primary);
  cursor: pointer;
  padding: 0;
  margin-left: 0.2rem;
}

.detail-main-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
}

.detail-code-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-refresh-header {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-refresh-header:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.btn-refresh-header.disabled,
.btn-refresh-header:disabled {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-dim);
  border-color: rgba(148, 163, 184, 0.18);
  cursor: not-allowed;
  opacity: 0.8;
}

.detail-address-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.detail-header-badges {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.detail-header-badges > span {
  font-size: 0.82rem !important;
  padding: 0.4rem 0.85rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  border-radius: var(--radius-pill) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

/* GRID LAYOUT FOR DETAILS */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.75rem;
  align-items: start;
}

/* MEDIA & GALLERY SECTION */
.detail-gallery-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gallery-main-view {
  width: 100%;
  height: 380px;
  background-color: #090d16;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.gallery-main-view:hover .gallery-main-img {
  transform: scale(1.02);
}

.gallery-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  padding: 2rem;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem;
  overflow-x: auto;
  background: var(--bg-dark);
}

.gallery-thumb-item {
  width: 70px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.gallery-thumb-item.active,
.gallery-thumb-item:hover {
  opacity: 1;
  border-color: var(--accent-primary);
}

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

/* DESCRIPTION CARD */
.detail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-section-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-color);
}

.description-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* RIGHT COLUMN FINANCIAL SUMMARY CARD */
.financial-summary-card {
  background: linear-gradient(145deg, var(--bg-surface-elevated), var(--bg-surface));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-md);
}

.financial-highlight {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
}

.highlight-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-success);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.highlight-price {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--accent-success);
}

.highlight-discount-pill {
  background: var(--accent-success);
  color: #fff;
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.85rem;
  font-family: var(--font-heading);
}

.financial-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.financial-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border-color);
}

.financial-row .row-label {
  color: var(--text-muted);
}

.financial-row .row-value {
  font-weight: 700;
  color: var(--text-main);
}

.action-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.btn-action-primary {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  border: none;
  color: #fff;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.btn-action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

.btn-action-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-action-secondary:hover:not(.disabled) {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--bg-surface-elevated);
}

.btn-action-secondary.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   TIMELINE & HISTORY TABLE
   -------------------------------------------------------------------------- */
.timeline-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.timeline-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.timeline-table th {
  background: var(--bg-dark);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.timeline-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

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

.timeline-table tr:hover td {
  background: var(--bg-surface-elevated);
}

.badge-reason {
  background: rgba(129, 140, 248, 0.15);
  color: var(--accent-secondary);
  border: 1px solid rgba(129, 140, 248, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

/* LIGHTBOX MODAL */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-modal.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  object-fit: contain;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

.lightbox-caption {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.loading-spinner {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1rem;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  .filters-sidebar {
    display: none;
    position: static;
  }
  .filters-sidebar.mobile-open {
    display: flex;
  }
  .mobile-filter-toggle {
    display: block;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-stats {
    display: none;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .detail-main-title {
    font-size: 1.25rem;
  }
  .highlight-price {
    font-size: 1.6rem;
  }
}

.btn-action-secondary.active-correto {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: var(--accent-success) !important;
  color: var(--accent-success) !important;
  font-weight: 700 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3) !important;
}

.btn-action-secondary.active-incorreto {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: var(--accent-danger) !important;
  color: var(--accent-danger) !important;
  font-weight: 700 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3) !important;
}

/* ==========================================================================
   BUTTON & MODAL: SKILL ANALISADORA DE IMÓVEIS (NBR 14.653)
   ========================================================================== */
.btn-analise-header {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm, 6px);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-analise-header:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.4);
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
}

/* ANALYSIS MODAL CONTAINER */
.analysis-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.analysis-modal.active {
  display: flex;
  opacity: 1;
}

.analysis-modal-content {
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.analysis-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.5);
}

.analysis-title-box h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
}

.analysis-subtitle {
  font-size: 0.8rem;
  color: #38bdf8;
  font-weight: 600;
}

.analysis-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-print-report {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-print-report:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.analysis-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
}

.analysis-close:hover {
  color: #fff;
}

.analysis-body {
  padding: 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* HERO CARD & SCORE BADGE */
.analysis-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.score-badge-box {
  border-radius: 12px;
  padding: 1rem 1.25rem;
  text-align: center;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-badge-box.score-gold {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.3) 100%);
  border: 1px solid #10b981;
  color: #34d399;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.score-badge-box.score-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.3) 100%);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

.score-badge-box.score-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(185, 28, 28, 0.3) 100%);
  border: 1px solid #ef4444;
  color: #f87171;
}

.score-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
}

.score-max {
  font-size: 1rem;
  opacity: 0.6;
}

.score-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 0.3rem;
  letter-spacing: 0.04em;
}

.analysis-hero-text {
  flex: 1;
}

.analysis-property-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.analysis-summary-text {
  font-size: 0.92rem;
  color: #e2e8f0;
  line-height: 1.5;
  margin: 0 0 0.4rem 0;
}

.analysis-meta-info {
  font-size: 0.78rem;
  color: #94a3b8;
}

/* SECTION TITLES */
.analysis-section-title h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* FINANCIAL METRICS GRID */
.analysis-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.metric-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metric-card.highlight-price {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}

.metric-card.highlight-profit {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.25);
}

.metric-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #f8fafc;
}

.metric-sub {
  font-size: 0.75rem;
  color: #64748b;
}

.text-emerald { color: #34d399 !important; }
.text-rose { color: #f43f5e !important; }
.text-amber { color: #fbbf24 !important; }
.text-cyan { color: #38bdf8 !important; }

/* M² COMPARATIVE CARD */
.m2-comparative-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.25rem;
}

.m2-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  flex-wrap: wrap;
}

.m2-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.m2-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.m2-val {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #f8fafc;
  margin-top: 0.2rem;
}

.m2-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.m2-vs-divider {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.9rem;
  color: #475569;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.4rem 0.7rem;
  border-radius: 50%;
}

.badge-m2-good {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-m2-high {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* RISK MATRIX */
.risk-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.risk-item {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.risk-icon {
  font-size: 1.4rem;
}

.risk-info {
  display: flex;
  flex-direction: column;
}

.risk-label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}

.risk-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f8fafc;
  margin-top: 0.1rem;
}

/* RECOMMENDATIONS */
.recommendations-card {
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.25rem;
}

.recs-list {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recs-list li {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.analysis-footer-note {
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* PRINT RULES */
@media print {
  body * {
    visibility: hidden;
  }
  .analysis-modal, .analysis-modal * {
    visibility: visible;
  }
  .analysis-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    background: #fff !important;
    color: #000 !important;
    padding: 0;
  }
  .analysis-modal-content {
    border: none;
    box-shadow: none;
    background: #fff !important;
    color: #000 !important;
    max-height: none;
  }
  .analysis-header-actions {
    display: none;
  }
  .metric-card, .m2-comparative-card, .risk-item, .recommendations-card, .analysis-hero-card {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
  }
  .metric-value, .score-number, .m2-val, .risk-val, .analysis-title-box h2, .analysis-section-title h3 {
    color: #0f172a !important;
  }
  .analysis-summary-text, .recs-list li {
    color: #334155 !important;
  }
}

