/* =========================================================
   SIMO — Special Imóveis · Tema de marca
   Sobre Material Dashboard 3 + Bootstrap 5.
   Paleta: vermelho/vinho da Special + acento ciano de IA.
   ========================================================= */

:root {
  --simo-red: #C82026;
  --simo-red-600: #b01b21;
  --simo-wine: #650B12;
  --simo-graphite: #1F1F1F;
  --simo-gray: #6B7280;
  --simo-bg: #FAFAFA;
  --simo-ai: #32D3FF;
  --simo-ai-700: #0bb6e6;

  --simo-gradient: linear-gradient(135deg, #C82026 0%, #650B12 100%);
  --simo-gradient-soft: linear-gradient(135deg, #e0353b 0%, #C82026 100%);
  --simo-ai-gradient: linear-gradient(135deg, #32D3FF 0%, #0bb6e6 100%);

  --simo-shadow: 0 8px 26px rgba(31, 31, 31, 0.10);
  --simo-shadow-red: 0 10px 24px rgba(200, 32, 38, 0.32);
}

body.g-sidenav-show {
  background-color: var(--simo-bg) !important;
}

/* ---------- Tipografia ---------- */
body,
.text-dark,
h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', 'Manrope', 'Inter', sans-serif;
}

/* ---------- Override das utilitárias do Material usadas no projeto ---------- */
.bg-gradient-primary {
  background-image: var(--simo-gradient) !important;
}
.bg-gradient-dark {
  background-image: linear-gradient(135deg, #2a2a2a 0%, var(--simo-graphite) 100%) !important;
}
.bg-gradient-info {
  background-image: var(--simo-ai-gradient) !important;
}
.bg-gradient-success {
  background-image: linear-gradient(135deg, #2dce89 0%, #1f9d6b 100%) !important;
}
.shadow-primary { box-shadow: var(--simo-shadow-red) !important; }
.text-primary { color: var(--simo-red) !important; }
.bg-primary { background-color: var(--simo-red) !important; }

.btn-primary,
.btn-simo {
  background: var(--simo-gradient);
  border: none;
  color: #fff;
  box-shadow: var(--simo-shadow-red);
}
.btn-primary:hover,
.btn-simo:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(200, 32, 38, 0.40);
}
.btn-outline-simo {
  border: 1px solid var(--simo-red);
  color: var(--simo-red);
  background: transparent;
}
.btn-outline-simo:hover { background: var(--simo-red); color: #fff; }

/* ---------- Acento de IA ---------- */
.text-ai { color: var(--simo-ai-700) !important; }
.bg-ai { background: var(--simo-ai-gradient) !important; color: #053947 !important; }
.badge-ai {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(50, 211, 255, 0.14);
  color: var(--simo-ai-700);
  border: 1px solid rgba(50, 211, 255, 0.35);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: .72rem;
  font-weight: 600;
}
.card-ai {
  border: 1px solid rgba(50, 211, 255, 0.30);
  background: linear-gradient(180deg, rgba(50, 211, 255, 0.06), rgba(50, 211, 255, 0.0));
}

/* ---------- Cards ---------- */
.card {
  border-radius: 16px;
  box-shadow: var(--simo-shadow);
}

/* ---------- Sidebar ---------- */
.sidenav .navbar-brand img { max-height: 38px; width: auto; }
.sidenav .nav-link {
  border-radius: 12px;
  font-weight: 500;
  transition: background .2s ease, color .2s ease;
}
.sidenav .nav-link.active {
  background-image: var(--simo-gradient) !important;
  color: #fff !important;
  box-shadow: var(--simo-shadow-red);
}
.sidenav .nav-link.active .material-symbols-rounded { opacity: 1 !important; color: #fff; }
.sidenav .nav-link:not(.active):hover { background-color: rgba(200, 32, 38, 0.07); }
.sidenav-footer .simo-by { font-size: .72rem; color: var(--simo-gray); letter-spacing: .04em; }
.sidenav-footer .simo-by strong { color: var(--simo-red); }

/* ---------- Badges de status de imóvel ---------- */
.badge-status {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge-status.disponivel { background: rgba(45, 206, 137, 0.16); color: #1f9d6b; }
.badge-status.reservado  { background: rgba(251, 188, 5, 0.18);  color: #9a6b00; }
.badge-status.vendido    { background: rgba(200, 32, 38, 0.14);  color: var(--simo-red); }
.badge-status.locado     { background: rgba(50, 211, 255, 0.16); color: var(--simo-ai-700); }

/* ---------- AI score chip ---------- */
.ai-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: .8rem;
  color: var(--simo-graphite);
}
.ai-score .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--simo-ai-gradient);
  box-shadow: 0 0 0 3px rgba(50, 211, 255, 0.18);
}

/* ---------- Card de imóvel ---------- */
.property-card { overflow: hidden; }
.property-card .property-photo {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.property-card .property-photo .badge-status { position: absolute; top: 12px; left: 12px; }
.property-card .property-price { color: var(--simo-red); font-weight: 700; }

/* ---------- CRM pipeline ---------- */
.pipeline { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.pipeline-col { min-width: 260px; flex: 1 0 260px; }
.pipeline-col .pipeline-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; padding: 10px 14px; border-radius: 12px 12px 0 0;
  color: #fff; background: var(--simo-gradient);
}
.pipeline-col .pipeline-head .count {
  background: rgba(255,255,255,.25); border-radius: 999px; padding: 0 8px; font-size: .75rem;
}
.pipeline-col .pipeline-body {
  background: #fff; border: 1px solid #eee; border-top: none;
  border-radius: 0 0 12px 12px; padding: 12px; min-height: 120px;
}
.lead-card {
  background: var(--simo-bg); border: 1px solid #eee; border-radius: 12px;
  padding: 12px; margin-bottom: 10px;
}
.lead-card .followup { font-size: .72rem; color: var(--simo-gray); }

/* ---------- Onboarding / checklist ---------- */
.checklist .check-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid #eee; border-radius: 12px; margin-bottom: 10px;
}
.checklist .check-item .state { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.checklist .check-item .state.done { background: #2dce89; }
.checklist .check-item .state.todo { background: #d9d9d9; color: #fff; }
.upload-drop {
  border: 2px dashed rgba(200, 32, 38, 0.35);
  border-radius: 16px; padding: 32px; text-align: center; color: var(--simo-gray);
  background: rgba(200, 32, 38, 0.03);
}

/* ---------- Galeria do detalhe ---------- */
.gallery-main {
  height: 320px; border-radius: 16px; background-size: cover; background-position: center;
}
.gallery-thumb { height: 72px; border-radius: 10px; background-size: cover; background-position: center; cursor: pointer; }

/* =========================================================
   Assistente flutuante SIMO
   ========================================================= */
.simo-assistant-btn {
  position: fixed; right: 24px; bottom: 24px; z-index: 1050;
  width: 64px; height: 64px; border-radius: 50%;
  border: none; padding: 0; cursor: pointer;
  background: #fff; box-shadow: var(--simo-shadow-red);
  display: grid; place-items: center; overflow: hidden;
}
.simo-assistant-btn img { width: 100%; height: 100%; object-fit: cover; }
.simo-assistant-btn::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--simo-ai); opacity: .55;
  animation: simo-pulse 2.2s ease-out infinite;
}
@keyframes simo-pulse {
  0% { transform: scale(.85); opacity: .55; }
  100% { transform: scale(1.25); opacity: 0; }
}

.simo-assistant-panel {
  position: fixed; right: 24px; bottom: 100px; z-index: 1050;
  width: 360px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 140px);
  background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(31,31,31,.28);
  display: none; flex-direction: column; overflow: hidden;
}
.simo-assistant-panel.open { display: flex; }

.simo-assistant-header {
  background: var(--simo-gradient); color: #fff; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.simo-assistant-header img { width: 40px; height: 40px; border-radius: 50%; background: #fff; object-fit: cover; }
.simo-assistant-header .title { font-weight: 700; line-height: 1.1; }
.simo-assistant-header .subtitle { font-size: .72rem; opacity: .85; display: flex; align-items: center; gap: 5px; }
.simo-assistant-header .subtitle .live { width: 7px; height: 7px; border-radius: 50%; background: var(--simo-ai); box-shadow: 0 0 0 3px rgba(50,211,255,.3); }
.simo-assistant-header .close-btn { margin-left: auto; background: transparent; border: none; color: #fff; cursor: pointer; font-size: 1.2rem; line-height: 1; }

.simo-assistant-quick { padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid #f1f1f1; }
.simo-chip {
  border: 1px solid rgba(200,32,38,.25); color: var(--simo-red); background: #fff;
  border-radius: 999px; padding: 6px 12px; font-size: .74rem; font-weight: 600; cursor: pointer;
}
.simo-chip:hover { background: rgba(200,32,38,.07); }

.simo-assistant-messages { flex: 1; overflow-y: auto; padding: 14px; background: var(--simo-bg); }
.simo-msg { max-width: 84%; padding: 10px 12px; border-radius: 14px; margin-bottom: 10px; font-size: .85rem; line-height: 1.35; }
.simo-msg.bot { background: #fff; border: 1px solid #eee; border-bottom-left-radius: 4px; }
.simo-msg.user { background: var(--simo-gradient); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }

.simo-assistant-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #f1f1f1; }
.simo-assistant-input input { flex: 1; border: 1px solid #e3e3e3; border-radius: 12px; padding: 10px 12px; font-size: .85rem; outline: none; }
.simo-assistant-input input:focus { border-color: var(--simo-ai); box-shadow: 0 0 0 3px rgba(50,211,255,.18); }
.simo-assistant-input button { border: none; border-radius: 12px; padding: 0 14px; background: var(--simo-gradient); color: #fff; cursor: pointer; }

@media (max-width: 575.98px) {
  .simo-assistant-panel { right: 16px; left: 16px; width: auto; bottom: 92px; }
}
