/* ============================================================
   GG Lima Imóveis — CSS Premium (v2.0)
   Font: Sora + Inter | Golden Luxury Theme
   ============================================================ */

/* ── GOOGLE FONTS (loaded via header) ─────────────────────── */

/* ── DESIGN TOKENS ────────────────────────────────────────── */
:root {
  /* Gold palette */
  --primary:           #c9a84c;
  --primary-hover:     #ddb94f;
  --primary-dark:      #a68932;
  --primary-glow:      rgba(201, 168, 76, 0.35);
  --accent:            #e8d48b;

  /* Semantic */
  --success:           #10b981;
  --success-bg:        #d1fae5;
  --success-text:      #065f46;
  --warning:           #f59e0b;
  --warning-bg:        #fef3c7;
  --warning-text:      #92400e;
  --danger:            #ef4444;
  --danger-bg:         #fee2e2;
  --danger-text:       #991b1b;
  --info:              #0ea5e9;
  --info-bg:           #dbeafe;
  --info-text:         #1e3a8a;
  --purple-bg:         #ede9fe;
  --purple-text:       #4c1d95;

  /* Surfaces */
  --body-bg:           #0c1016;
  --body-bg-subtle:    #111720;
  --card-bg:           #161d27;
  --card-bg-hover:     #1b2432;
  --text-main:         #f0f2f5;
  --text-muted:        #8896a7;
  --border-color:      rgba(255, 255, 255, 0.06);
  --border-color-hover: rgba(201, 168, 76, 0.25);

  /* Navigation */
  --nav-bg:            rgba(12, 16, 22, 0.72);
  --nav-border:        rgba(255, 255, 255, 0.04);

  /* Effects */
  --card-radius:       16px;
  --card-shadow:       0 2px 8px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.15);
  --card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(201, 168, 76, 0.08);
  --glass-blur:        blur(20px);
  --glass-saturate:    saturate(1.8);

  /* Transitions */
  --transition-fast:   0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:   0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   0.4s cubic-bezier(0.22, 1, 0.36, 1);

  /* Login */
  --login-bg:          linear-gradient(135deg, #0c1016 0%, #111518 100%);
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--body-bg);
  color: var(--text-main);
  font-size: 15px;
  display: flex;
  flex-direction: column;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand, .imovel-price, .stat-value,
.login-title, .page-title, .hero-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
}

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

::selection {
  background: var(--primary);
  color: #0c1016;
}

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--body-bg); }
::-webkit-scrollbar-thumb {
  background: rgba(201, 168, 76, 0.25);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(201, 168, 76, 0.4); }

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(201, 168, 76, 0); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes glow-text {
  0%, 100% { text-shadow: 0 0 20px rgba(201, 168, 76, 0.3), 0 0 40px rgba(201, 168, 76, 0.15); }
  50% { text-shadow: 0 0 30px rgba(201, 168, 76, 0.5), 0 0 60px rgba(201, 168, 76, 0.25); }
}

/* Scroll reveal utility */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--transition-slow), transform 0.6s var(--transition-slow);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── NAVBAR (Glassmorphism) ───────────────────────────────── */
.navbar {
  background: var(--nav-bg) !important;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--nav-border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}
.navbar.scrolled {
  background: rgba(12, 16, 22, 0.92) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  border-bottom-color: rgba(201, 168, 76, 0.08);
}
.navbar-brand {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-main) !important;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: opacity var(--transition-fast);
}
.navbar-brand:hover { opacity: 0.85; }
.navbar-brand img {
  border-radius: 8px;
  border: 1px solid rgba(201, 168, 76, 0.2);
}
.navbar-brand i { color: var(--primary); }
.nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
  border-radius: 8px;
  padding: 0.5rem 0.9rem !important;
  position: relative;
}
.nav-link:hover, .nav-link:focus {
  color: var(--text-main) !important;
  background: rgba(201, 168, 76, 0.08);
}
.nav-link.active {
  color: var(--primary) !important;
  background: rgba(201, 168, 76, 0.1) !important;
  font-weight: 600;
}

/* Navbar toggler fix for dark theme */
.navbar-toggler {
  border-color: rgba(201, 168, 76, 0.3) !important;
  padding: 0.4rem 0.65rem;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(201, 168, 76, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Btn Corretor (outline gold) */
.btn-corretor {
  color: var(--primary) !important;
  border: 1.5px solid var(--primary) !important;
  background: transparent !important;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
  border-radius: 10px;
  transition: all var(--transition-base);
  letter-spacing: 0.3px;
}
.btn-corretor:hover {
  background: var(--primary) !important;
  color: #0c1016 !important;
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
  transform: translateY(-1px);
}

/* ── DROPDOWN ─────────────────────────────────────────────── */
.dropdown-menu {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border-radius: var(--card-radius);
  min-width: 210px;
  padding: 0.5rem 0;
  backdrop-filter: var(--glass-blur);
}
.dropdown-item {
  color: var(--text-main) !important;
  font-size: 0.9rem;
  padding: 0.55rem 1.2rem;
  transition: all var(--transition-fast);
  border-radius: 8px;
  margin: 0 0.4rem;
}
.dropdown-item:hover, .dropdown-item:focus {
  background-color: rgba(201, 168, 76, 0.08) !important;
  color: var(--primary) !important;
}
.dropdown-item-text {
  color: var(--text-main) !important;
  font-size: 0.9rem;
  padding: 0.35rem 1.2rem;
}
.dropdown-menu .dropdown-item-text.text-muted,
.dropdown-menu .text-muted,
.dropdown-menu span.text-muted {
  color: var(--text-muted) !important;
  opacity: 1 !important;
}
.dropdown-divider {
  border-top: 1px solid var(--border-color) !important;
  margin: 0.5rem 0;
  opacity: 1;
}

/* ── HERO BANNER ──────────────────────────────────────────── */
.hero-banner {
  background: linear-gradient(160deg, #0f1620 0%, #111a28 40%, #17202e 70%, #0c1016 100%);
  color: #f0f2f5;
  padding: 6rem 2rem 5.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 0 !important;
  margin: 0 -1.5rem 0 !important;
  border-bottom: none;
}

/* Decorative gold line at bottom */
.hero-banner::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* Radial glow */
.hero-banner::after {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(201, 168, 76, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* Decorative orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}
.hero-orb-1 {
  width: 350px;
  height: 350px;
  background: rgba(201, 168, 76, 0.06);
  top: -100px;
  right: -50px;
  animation: float 8s ease-in-out infinite;
}
.hero-orb-2 {
  width: 250px;
  height: 250px;
  background: rgba(14, 165, 233, 0.04);
  bottom: -80px;
  left: -30px;
  animation: float 10s ease-in-out infinite reverse;
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.2);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 1rem;
  line-height: 1.15;
}
.hero-title span {
  background: linear-gradient(135deg, #e8d48b 0%, #c9a84c 40%, #a68932 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glow-text 3s ease-in-out infinite, gradient-shift 4s ease infinite;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* Hero stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2.5rem;
}
.hero-stat {
  text-align: center;
}
.hero-stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── SEARCH SECTION ───────────────────────────────────────── */
.search-section {
  margin-top: -2.5rem;
  position: relative;
  z-index: 10;
  margin-bottom: 2.5rem;
}
.search-card {
  background: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--card-radius) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(201, 168, 76, 0.05);
  padding: 1.5rem;
  backdrop-filter: var(--glass-blur);
}
.search-card .form-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

/* ── SECTION TITLE ────────────────────────────────────────── */
.section-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-bottom: 0.3rem;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 2rem;
}

/* ── PAGE HEADER ──────────────────────────────────────────── */
.page-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

/* ── CARDS ─────────────────────────────────────────────────── */
.card {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--card-radius) !important;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: all var(--transition-base);
}
.card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--border-color-hover) !important;
}
.card-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--text-main);
}
.card-body {
  color: var(--text-main);
}

/* ── STAT CARDS ───────────────────────────────────────────── */
.stat-card {
  border-radius: var(--card-radius);
  padding: 1.4rem 1.5rem;
  border: none !important;
  position: relative;
  overflow: hidden;
  color: #fff;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}
.stat-card::before {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}
.stat-primary  { background: linear-gradient(135deg, #c9a84c, #8b6914); }
.stat-success  { background: linear-gradient(135deg, #10b981, #059669); }
.stat-warning  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-info     { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.stat-icon { font-size: 1.8rem; opacity: 0.85; margin-bottom: 0.4rem; }
.stat-value { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.8rem; opacity: 0.9; margin-top: 0.25rem; font-weight: 500; }

/* ── IMOVEL CARD ──────────────────────────────────────────── */
.imovel-card {
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius) !important;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  overflow: hidden;
  position: relative;
}
.imovel-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--card-radius);
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, rgba(201, 168, 76, 0.3) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  z-index: 1;
}
.imovel-card:hover::before {
  opacity: 1;
}
.imovel-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 30px rgba(201, 168, 76, 0.06) !important;
  border-color: rgba(201, 168, 76, 0.15) !important;
}

/* Image container */
.imovel-thumb {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--body-bg-subtle);
}
.imovel-thumb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(22, 29, 39, 0.6) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}
.imovel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.imovel-card:hover .imovel-thumb img {
  transform: scale(1.08);
}
.imovel-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 3.5rem;
  opacity: 0.25;
  background: linear-gradient(135deg, var(--body-bg-subtle) 0%, var(--card-bg) 100%);
}

/* Badges on image */
.badge-status {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.72rem;
  text-transform: capitalize;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  font-weight: 600;
  z-index: 2;
  backdrop-filter: blur(8px);
}
.badge-destaque {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  font-weight: 600;
  z-index: 2;
  background: linear-gradient(135deg, #c9a84c, #a68932) !important;
  color: #0c1016 !important;
  border: none;
  box-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
}

/* Card body */
.imovel-card .card-body {
  padding: 1.15rem 1.25rem 1.25rem;
}

/* Custom badge (type) */
.badge-custom {
  background-color: rgba(201, 168, 76, 0.08) !important;
  color: var(--primary) !important;
  border: 1px solid rgba(201, 168, 76, 0.15) !important;
  font-weight: 500;
  font-size: 0.72rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Specs row */
.imovel-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.imovel-specs span {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
}
.imovel-specs span i {
  color: var(--primary);
  font-size: 0.85rem;
}

/* Price */
.imovel-price {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #e8d48b, #c9a84c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── STATUS BADGES ────────────────────────────────────────── */
.badge.status-disponivel {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.badge.status-vendido {
  background: rgba(14, 165, 233, 0.15) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(14, 165, 233, 0.2);
}
.badge.status-alugado {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.badge.status-reservado {
  background: rgba(139, 92, 246, 0.15) !important;
  color: #a78bfa !important;
  border: 1px solid rgba(139, 92, 246, 0.2);
}
.badge.status-inativo {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border-color);
}

/* ── SPEC BOX (show page) ─────────────────────────────────── */
.spec-box {
  background: var(--body-bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  transition: all var(--transition-base);
}
.spec-box:hover {
  border-color: rgba(201, 168, 76, 0.2);
  background: rgba(201, 168, 76, 0.04);
  transform: translateY(-2px);
}
.spec-box i {
  display: block;
  font-size: 1.7rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  border: none !important;
  color: #0c1016 !important;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s;
}
.btn-primary:hover::before {
  left: 100%;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary)) !important;
  color: #0c1016 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
}
.btn-outline-primary {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
  background: transparent !important;
}
.btn-outline-primary:hover {
  background: var(--primary) !important;
  color: #0c1016 !important;
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.25);
}
.btn-outline-secondary {
  color: var(--text-muted) !important;
  border-color: var(--border-color) !important;
  background: transparent !important;
}
.btn-outline-secondary:hover {
  color: var(--text-main) !important;
  border-color: var(--text-muted) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}
.btn {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  transition: all var(--transition-base);
  font-size: 0.9rem;
}

/* ── FORMS ─────────────────────────────────────────────────── */
.form-control, .form-select, textarea {
  background-color: var(--body-bg-subtle) !important;
  color: var(--text-main) !important;
  border-radius: 10px;
  border: 1px solid var(--border-color) !important;
  font-size: 0.92rem;
  padding: 0.7rem 0.9rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-control:focus, .form-select:focus, textarea:focus {
  background-color: var(--body-bg-subtle) !important;
  color: var(--text-main) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12), 0 0 20px rgba(201, 168, 76, 0.06) !important;
  outline: none;
}
.form-control::placeholder, .form-select::placeholder, textarea::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.5 !important;
}
.form-select option {
  background-color: var(--card-bg) !important;
  color: var(--text-main) !important;
}
.input-group-text {
  background: var(--body-bg-subtle) !important;
  border-color: var(--border-color) !important;
  color: var(--text-muted) !important;
}
.form-label {
  color: var(--text-muted);
  font-weight: 600;
}

/* ── CONTACT BOX ──────────────────────────────────────────── */
.contact-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
}
.contact-avatar {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #8b6914);
  color: #0c1016;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  font-family: 'Sora', sans-serif;
}
.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e) !important;
  color: white !important;
  border: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  font-weight: 700;
  padding: 0.8rem;
  border-radius: 12px;
  transition: all var(--transition-base);
  font-size: 0.95rem;
}
.btn-whatsapp:hover {
  background: linear-gradient(135deg, #20ba5a, #0f7a6e) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.25);
}
.btn-whatsapp i {
  font-size: 1.1rem;
}

/* ── LOGIN PAGE ───────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--body-bg) 0%, #111518 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 70%, rgba(201, 168, 76, 0.04) 0%, transparent 50%);
  pointer-events: none;
}
.login-wrapper {
  width: 100%;
  max-width: 420px;
  animation: scaleIn 0.5s ease-out;
}
.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(201, 168, 76, 0.05);
  position: relative;
}
.login-header { text-align: center; margin-bottom: 2rem; }
.login-icon {
  font-size: 2.8rem;
  color: var(--primary);
  background: rgba(201, 168, 76, 0.08);
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  border: 1px solid rgba(201, 168, 76, 0.12);
}
.login-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}
.login-subtitle { color: var(--text-muted); font-size: 0.9rem; }
.btn-login {
  padding: 0.8rem;
  font-size: 1rem;
  border-radius: 12px;
}
.login-footer-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 1.5rem;
  margin-bottom: 0;
}

/* ── PAGINATION ───────────────────────────────────────────── */
.pagination {
  gap: 4px;
}
.pagination .page-link {
  border-radius: 10px !important;
  color: var(--text-muted);
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.85rem;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}
.pagination .page-link:hover {
  background-color: rgba(201, 168, 76, 0.08);
  border-color: rgba(201, 168, 76, 0.2);
  color: var(--primary);
}
.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary);
  color: #0c1016;
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.25);
}
.pagination .page-item.disabled .page-link {
  opacity: 0.3;
  pointer-events: none;
}

/* ── ALERTS ───────────────────────────────────────────────── */
.alert {
  border-radius: 12px;
  border: none;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(8px);
}
.alert-success {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.alert-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ── EMPTY STATE ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 4.5rem;
  display: block;
  margin-bottom: 1.2rem;
  opacity: 0.2;
  color: var(--primary);
}
.empty-state h5 {
  color: var(--text-main);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.empty-state p {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
}
/* Legacy fallback */
.empty-state i {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.2;
}

/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
  margin-top: auto;
  background: var(--body-bg-subtle);
  border-top: 1px solid var(--border-color);
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.3), transparent);
}
.footer-brand {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
}
.footer-brand img {
  border-radius: 6px;
  border: 1px solid rgba(201, 168, 76, 0.15);
}
.footer-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-link:hover {
  color: var(--primary);
}
.footer-copy {
  color: var(--text-muted);
  font-size: 0.78rem;
  opacity: 0.7;
}

/* ── TEXT UTILITIES ────────────────────────────────────────── */
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }
.border-top { border-top-color: var(--border-color) !important; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-banner {
    padding: 4rem 1.25rem 3.5rem;
    margin: 0 -1rem 0 !important;
  }
  .hero-title {
    font-size: 2rem;
    letter-spacing: -1px;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .hero-stats {
    gap: 1.5rem;
  }
  .hero-stat-value {
    font-size: 1.4rem;
  }
  .search-section {
    margin-top: -1.5rem;
  }
  .section-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 576px) {
  .page-title { font-size: 1.4rem; }
  .login-card { padding: 1.75rem 1.25rem; }
  .hero-title { font-size: 1.75rem; }
  .hero-stats { flex-wrap: wrap; gap: 1rem; }
  .hero-stat { min-width: 80px; }
}

/* ── GALLERY (show page) ─────────────────────────────────── */
.gallery-main-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
  border-radius: var(--card-radius) var(--card-radius) 0 0;
}
.gallery-main-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}
.gallery-count-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
  background: var(--body-bg-subtle);
  scrollbar-width: thin;
}
.gallery-thumb {
  height: 68px;
  width: 90px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.5;
  transition: all var(--transition-base);
}
.gallery-thumb:hover {
  opacity: 0.85;
  transform: scale(1.04);
}
.gallery-thumb.active {
  border-color: var(--primary);
  opacity: 1;
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.2);
}
.gallery-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
  gap: 0.5rem;
}
.gallery-empty i { font-size: 3.5rem; opacity: 0.2; }
.gallery-empty p { margin: 0; font-size: 0.9rem; }

/* Show page — image gallery thumbnails */
.show-gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.show-gallery-thumbs .img-thumbnail {
  border-radius: 10px;
  border: 2px solid var(--border-color);
  transition: all var(--transition-base);
  opacity: 0.6;
  background: var(--body-bg-subtle);
}
.show-gallery-thumbs .img-thumbnail:hover,
.show-gallery-thumbs .img-thumbnail.active {
  border-color: var(--primary);
  opacity: 1;
  box-shadow: 0 2px 10px rgba(201, 168, 76, 0.15);
}
.img-thumbnail {
  background-color: var(--body-bg-subtle) !important;
  border-color: var(--border-color) !important;
}

/* ── UPLOAD DROP-ZONE ─────────────────────────────────────── */
.upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color var(--transition-base), background var(--transition-base);
  overflow: hidden;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-dropzone:hover, .upload-dropzone.drag-over {
  border-color: var(--primary);
  background: rgba(201, 168, 76, 0.04);
}
.upload-dropzone-inner {
  text-align: center;
  padding: 1.75rem 1rem;
  pointer-events: none;
}
.upload-icon { font-size: 2.5rem; color: var(--primary); display: block; margin-bottom: 0.5rem; }
.upload-label { font-weight: 600; color: var(--text-main); margin: 0; font-size: 0.95rem; }
.upload-hint { color: var(--text-muted); font-size: 0.8rem; margin: 0.25rem 0 0; }
.upload-preview-img {
  width: 100%; max-height: 260px; object-fit: cover; display: block; border-radius: 12px;
}

/* ── IMAGE GRID ───────────────────────────────────────────── */
.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
}
.img-grid-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--body-bg-subtle);
  box-shadow: var(--card-shadow);
}
.img-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.img-grid-item:hover img { transform: scale(1.06); }
.img-grid-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 0.5rem 0.6rem;
  opacity: 0;
  transition: opacity var(--transition-base);
}
.img-grid-item:hover .img-grid-overlay { opacity: 1; }
.img-badge-principal {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--primary);
  color: #0c1016;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
}
.img-alt-text {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}
.img-delete-btn {
  background: rgba(239, 68, 68, 0.85);
  border: none;
  color: #fff;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.img-delete-btn:hover { background: #dc2626; transform: scale(1.1); }

/* ── TABLE (admin) ────────────────────────────────────────── */
.table {
  color: var(--text-main);
}
.table > thead > tr > th {
  background: rgba(255, 255, 255, 0.02);
  border-bottom-color: var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.table > tbody > tr > td {
  border-bottom-color: var(--border-color);
  vertical-align: middle;
}
.table > tbody > tr:hover {
  background: rgba(201, 168, 76, 0.03);
}
.table-responsive {
  border-radius: var(--card-radius);
}

/* ── BACK BUTTON STYLING ─────────────────────────────────── */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.88rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  transition: all var(--transition-base);
}
.btn-back:hover {
  color: var(--primary);
  border-color: rgba(201, 168, 76, 0.2);
  background: rgba(201, 168, 76, 0.04);
}

/* ── GALLERY NAVIGATION ARROWS ────────────────────────────── */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(12, 16, 22, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-base);
  backdrop-filter: blur(4px);
}
.gallery-nav:hover {
  background: var(--primary);
  color: #0c1016;
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}
.gallery-nav.prev { left: 16px; }
.gallery-nav.next { right: 16px; }

/* ══════════════════════════════════════════════════════════════════════
   ANÁLISE DE INVESTIMENTO — Estilos Premium
══════════════════════════════════════════════════════════════════════ */

/* ── KPI Cards ──────────────────────────────────────────────────────── */
.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 1.25rem 1.25rem 1rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  animation: kpiIn 0.5s ease both;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--card-radius) var(--card-radius) 0 0;
}
.kpi-card:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}
.kpi-card.kpi-green { border-color: rgba(16,185,129,0.35); }
.kpi-card.kpi-green::before { background: linear-gradient(90deg, #10b981, #34d399); }
.kpi-card.kpi-red   { border-color: rgba(239,68,68,0.35); }
.kpi-card.kpi-red::before   { background: linear-gradient(90deg, #ef4444, #f87171); }
.kpi-card.kpi-amber { border-color: rgba(245,158,11,0.35); }
.kpi-card.kpi-amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.kpi-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

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

/* ── Métricas Avançadas ─────────────────────────────────────────────── */
.metric-adv {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  height: 100%;
  transition: border-color var(--transition-base);
}
.metric-adv:hover { border-color: rgba(201,168,76,0.3); }

.metric-adv-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.metric-adv-val {
  font-family: 'Sora', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  line-height: 1;
}
.metric-adv-bench { margin-bottom: 0.5rem; min-height: 28px; }
.metric-adv-formula {
  font-size: 0.68rem;
  color: rgba(136,150,167,0.7);
  font-style: italic;
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

/* tooltip ⓘ */
.metric-tooltip {
  cursor: help;
  color: var(--text-muted);
  font-size: 0.85em;
  transition: color var(--transition-fast);
}
.metric-tooltip:hover { color: var(--primary); }

/* ── Badges de Fase ─────────────────────────────────────────────────── */
.desp-fase-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.desp-fase-aquisicao { background: rgba(201,168,76,0.15); color: #c9a84c; border: 1px solid rgba(201,168,76,0.25); }
.desp-fase-reforma   { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
.desp-fase-operacao  { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.25); }
.desp-fase-venda     { background: rgba(168,85,247,0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.25); }
.desp-fase-pos_venda { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.25);  }

/* ── Bloco IGC ──────────────────────────────────────────────────────── */
.igc-card {
  border-color: rgba(245,158,11,0.25) !important;
}
.igc-card .card-header {
  border-bottom-color: rgba(245,158,11,0.15);
}
.igc-table { border-radius: 10px; overflow: hidden; }
.igc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  align-items: center;
}
.igc-row:last-child { border-bottom: none; }
.igc-header-row {
  background: rgba(255,255,255,0.04);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.igc-sub {
  background: rgba(239,68,68,0.04);
  padding-left: 2.5rem !important;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.igc-total-row {
  background: rgba(255,255,255,0.03);
  font-size: 1rem;
  padding: 0.85rem 1rem !important;
}
.igc-aviso {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Modal Premium ──────────────────────────────────────────────────── */
.modal-dark-premium {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.modal-dark-premium .modal-header {
  border-bottom-color: var(--border-color);
  background: rgba(201,168,76,0.06);
}
.modal-dark-premium .modal-footer {
  border-top-color: var(--border-color);
}
.modal-dark-premium .form-control,
.modal-dark-premium .form-select,
.modal-dark-premium .input-group-text {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-color);
  color: var(--text-main);
}
.modal-dark-premium .form-control:focus,
.modal-dark-premium .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(201,168,76,0.05);
}

/* ── Cabeçalhos de cards para a análise ────────────────────────────── */
.card-header { background: rgba(255,255,255,0.02) !important; }

/* ── Print / PDF ────────────────────────────────────────────────────── */
@media print {
  nav, .btn, #painelProjeto, #filtroFase, #filtroPago, [onclick] { display: none !important; }
  .card { border: 1px solid #ddd !important; page-break-inside: avoid; }
  body { background: #fff !important; color: #111 !important; }
  .kpi-value, .metric-adv-val { color: #111 !important; }
}
