/* ==========================================================================
   CAMPINA IMÓVEIS — DESIGN SYSTEM & TOKENS DE IDENTIDADE VISUAL OFICIAL
   Conceito: Luxo Contemporâneo, Arquitetura & Curadoria de Alto Padrão
   ========================================================================== */

:root {
  /* Cores Oficiais da Marca */
  --ci-orange: #FF7900;
  --ci-orange-rgb: 255, 121, 0;
  --ci-orange-hover: #D44200;
  --ci-orange-deep: #B85A00;
  
  --ci-yellow: #FFFF00;
  --ci-yellow-accent: #FCE301;
  --ci-yellow-rgb: 252, 227, 1;

  /* Superfícies & Tons Arquitetônicos */
  --ci-graphite: #17191D;
  --ci-graphite-secondary: #272A30;
  --ci-graphite-surface: #1E2126;
  --ci-graphite-dark: #0F1013;
  
  --ci-sand: #F7F4EF;
  --ci-cream: #FFFCF8;
  --ci-white: #FFFFFF;
  
  /* Textos & Contrastes */
  --ci-text-heading: #17191D;
  --ci-text-body: #3D424D;
  --ci-text-muted: #6B7280;
  --ci-text-light: #9CA3AF;
  --ci-text-on-dark: #F9FAFB;
  --ci-text-muted-dark: #9CA3AF;
  
  /* Linhas & Bordas Sutis */
  --ci-border: #E7E3DE;
  --ci-border-light: #F0ECE6;
  --ci-border-dark: #2A2E36;

  /* Tipografia */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Sombras Sutis Arquitetônicas */
  --shadow-sm: 0 1px 3px rgba(23, 25, 29, 0.05);
  --shadow-md: 0 4px 16px rgba(23, 25, 29, 0.06);
  --shadow-lg: 0 12px 32px rgba(23, 25, 29, 0.08);
  --shadow-xl: 0 20px 48px rgba(23, 25, 29, 0.12);
  --shadow-orange: 0 10px 25px rgba(255, 121, 0, 0.25);
  --shadow-card: 0 8px 24px rgba(23, 25, 29, 0.04);
}

/* Base Tipográfica Global */
body {
  font-family: var(--font-body);
  color: var(--ci-text-body);
  background-color: #FFFFFF;
  letter-spacing: -0.011em;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}

/* Cor padrão de cabeçalhos em superfícies claras */
h1:not([class*="text-"]),
h2:not([class*="text-"]),
h3:not([class*="text-"]),
h4:not([class*="text-"]),
h5:not([class*="text-"]),
h6:not([class*="text-"]) {
  color: var(--ci-text-heading);
}

/* Superfícies escuras: Forçar 100% legibilidade em títulos diretos */
h1.text-white, h2.text-white, h3.text-white, h4.text-white, h5.text-white, h6.text-white,
.text-white > h1, .text-white > h2, .text-white > h3, .text-white > h4,
[class*="bg-[#17191D]"] > div > h1, [class*="bg-[#17191D]"] > div > h2, [class*="bg-[#17191D]"] > div > h3,
[class*="bg-[#272A30]"] > div > h1, [class*="bg-[#272A30]"] > div > h2, [class*="bg-[#272A30]"] > div > h3 {
  color: #FFFFFF !important;
}

/* ==========================================================================
   CARD DE BUSCA HERO & ABAS DE FINALIDADE
   ========================================================================== */
.hero-search-card {
  background-color: #FFFFFF !important;
  color: var(--ci-graphite) !important;
}
.hero-search-card label {
  color: #5B616B !important;
}
.hero-search-card input,
.hero-search-card select {
  color: var(--ci-graphite) !important;
  background-color: #F7F4EF !important;
}
.search-tab-pill {
  background-color: #F7F4EF !important;
  color: #17191D !important;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}
.search-tab-pill:hover {
  background-color: var(--ci-orange) !important;
  color: #FFFFFF !important;
}
.search-tab-radio:checked + .search-tab-pill {
  background-color: #17191D !important;
  color: #FFFFFF !important;
  border-color: #17191D !important;
  box-shadow: 0 4px 12px rgba(23, 25, 29, 0.2);
}

/* ==========================================================================
   CLASSES UTILITÁRIAS DA MARCA (CAMPINA IMÓVEIS)
   ========================================================================== */
.bg-ci-orange { background-color: var(--ci-orange) !important; }
.bg-ci-orange-deep { background-color: var(--ci-orange-deep) !important; }
.bg-ci-yellow { background-color: var(--ci-yellow-accent) !important; }
.bg-ci-graphite { background-color: var(--ci-graphite) !important; }
.bg-ci-graphite-secondary { background-color: var(--ci-graphite-secondary) !important; }
.bg-ci-sand { background-color: var(--ci-sand) !important; }
.bg-ci-cream { background-color: var(--ci-cream) !important; }

.text-ci-orange { color: var(--ci-orange) !important; }
.text-ci-yellow { color: var(--ci-yellow-accent) !important; }
.text-ci-graphite { color: var(--ci-graphite) !important; }
.text-ci-muted { color: var(--ci-text-muted) !important; }

.border-ci-orange { border-color: var(--ci-orange) !important; }
.border-ci-yellow { border-color: var(--ci-yellow-accent) !important; }
.border-ci-graphite { border-color: var(--ci-graphite-secondary) !important; }
.border-ci-sand { border-color: var(--ci-border) !important; }

/* Compatibilidade com tokens anteriores reaproveitados */
.bg-navy-950, .bg-elton-navy { background-color: var(--ci-graphite) !important; }
.bg-navy-900, .bg-elton-sidebar { background-color: var(--ci-graphite-secondary) !important; }
.bg-navy-800, .bg-elton-card { background-color: var(--ci-graphite-surface) !important; }
.text-navy-950, .text-navy-900 { color: var(--ci-text-heading) !important; }
.text-navy-400, .text-navy-300 { color: #A5ABB5 !important; }
.text-navy-200 { color: #E5E7EB !important; }
.border-navy-900, .border-navy-800 { border-color: var(--ci-graphite-secondary) !important; }
.border-navy-700 { border-color: var(--ci-border-dark) !important; }

/* Destaques amarelos e dourados agora vinculados ao Brand Yellow oficial */
.text-yellow-400, .text-yellow-500 { color: var(--ci-yellow-accent) !important; }
.bg-yellow-400, .bg-yellow-500 { background-color: var(--ci-yellow-accent) !important; }
.border-yellow-400, .border-yellow-500 { border-color: var(--ci-yellow-accent) !important; }

/* ==========================================================================
   SISTEMA DE BOTÕES PREMIUM
   ========================================================================== */
.btn-campina-primary {
  background-color: var(--ci-orange);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.8125rem 1.625rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(255, 121, 0, 0.28);
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-campina-primary:hover {
  background-color: var(--ci-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 121, 0, 0.36);
  color: #FFFFFF;
}

.btn-campina-dark {
  background-color: var(--ci-graphite);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.8125rem 1.625rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--ci-graphite-secondary);
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
}
.btn-campina-dark:hover {
  background-color: var(--ci-graphite-secondary);
  color: var(--ci-yellow-accent);
  transform: translateY(-2px);
}

.btn-campina-outline {
  background-color: transparent;
  color: var(--ci-graphite);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: 1.5px solid var(--ci-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-campina-outline:hover {
  border-color: var(--ci-orange);
  color: var(--ci-orange);
  background-color: rgba(255, 121, 0, 0.04);
}

.btn-admin-primary {
  background: linear-gradient(135deg, var(--ci-orange) 0%, #FA4E00 100%);
  color: #FFFFFF !important;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(255, 121, 0, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-admin-primary:hover {
  background: linear-gradient(135deg, #FA4E00 0%, #B85A00 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 121, 0, 0.4);
}

/* ==========================================================================
   CARDS IMOBILIÁRIOS DE LUXO (CAMPINA LUXURY CARDS)
   ========================================================================== */
.luxury-card {
  background-color: #FFFFFF;
  border: 1px solid var(--ci-border);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.luxury-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(23, 25, 29, 0.08);
  border-color: rgba(255, 121, 0, 0.4);
}
.luxury-card .property-image-container {
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 10;
  background-color: #F3F4F6;
}
.luxury-card .property-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.luxury-card:hover .property-image-container img {
  transform: scale(1.05);
}

/* Badges sobrepostas nos cards */
.badge-campina-feature {
  background: var(--ci-orange);
  color: #FFFFFF;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3125rem 0.6875rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.badge-campina-purpose {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: var(--ci-graphite);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3125rem 0.75rem;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* ==========================================================================
   FORMULÁRIOS & CAMPOS REFINADOS
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="tel"],
select,
textarea {
  background-color: #FFFFFF;
  color: var(--ci-text-heading);
  border: 1.5px solid var(--ci-border);
  border-radius: 0.75rem;
  padding: 0.8125rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.35;
  width: 100%;
  transition: all 0.2s ease;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--ci-orange);
  box-shadow: 0 0 0 3px rgba(255, 121, 0, 0.15);
}

/* Range sliders de financiamento */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: var(--ci-border);
  outline: none;
  cursor: pointer;
  accent-color: var(--ci-orange);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ci-orange);
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* ==========================================================================
   LAYOUT DO PAINEL ADMINISTRATIVO (CAMPINA GESTÃO 3.0)
   ========================================================================== */
.admin-layout-root {
  display: flex;
  min-height: 100vh;
  background-color: #F8FAFC;
  font-family: var(--font-body);
  color: var(--ci-text-heading);
}

.admin-sidebar-nav {
  width: 270px;
  background-color: var(--ci-graphite);
  border-right: 1px solid var(--ci-graphite-secondary);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-main-container {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background-color: #F8FAFC;
}

.admin-header-bar {
  height: 68px;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--ci-border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: var(--shadow-sm);
}

.admin-body-content {
  flex: 1;
  padding: 32px 28px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #9CA3AF;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}
.admin-nav-link:hover {
  background-color: var(--ci-graphite-secondary);
  color: #FFFFFF;
}
.admin-nav-link.active {
  background-color: var(--ci-orange);
  color: #FFFFFF;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(255, 121, 0, 0.35);
}

.admin-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(23, 25, 29, 0.75);
  backdrop-filter: blur(4px);
  z-index: 35;
}

@media (max-width: 1023px) {
  .admin-sidebar-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  }
  .admin-sidebar-nav.active {
    transform: translateX(0);
  }
  .admin-mobile-overlay.active {
    display: block;
  }
  .admin-body-content {
    padding: 20px 16px;
  }
}

/* ==========================================================================
   CATÁLOGO & BARRA DE FILTROS GARANTIDA
   ========================================================================== */
.catalog-filter-aside {
  width: 100%;
}
@media (min-width: 1024px) {
  .catalog-filter-aside {
    display: block !important;
    width: 320px !important;
    flex-shrink: 0 !important;
  }
  .lg\:block { display: block !important; }
  .lg\:flex { display: flex !important; }
  .lg\:hidden { display: none !important; }
}
@media (max-width: 1023px) {
  .catalog-filter-aside.is-hidden {
    display: none !important;
  }
}

/* Acessibilidade & Redução de Movimento */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
