/* Importar estilos públicos */
@import url("public-styles.css");

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

/* Header Styles */
.header {
  background: linear-gradient(135deg, #00bcd4, #0097a7);
  color: white;
  padding: 0 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 60px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  gap: 10px;
}

.logo i {
  font-size: 28px;
}

.logo img {
  height: 60px;
}
.nav-menu {
  display: flex;
  gap: 30px;
}

.nav-item {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background-color 0.3s;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
}

.notifications {
  position: relative;
  cursor: pointer;
}

.notification-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff4444;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.3s;
}

.user-profile:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  display: none;
  z-index: 1001;
}

.user-dropdown.show {
  display: block;
}

.user-dropdown a {
  display: block;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  transition: background-color 0.3s;
}

.user-dropdown a:hover {
  background-color: #f8f9fa;
}

.user-dropdown a:last-child {
  border-bottom: none;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  left: 0;
  top: 60px;
  width: 250px;
  height: calc(100vh - 60px);
  background: white;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 999;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header h3 {
  color: #333;
  font-size: 18px;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #666;
}

.sidebar-nav {
  padding: 20px 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: #666;
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.sidebar-item:hover {
  background-color: #f8f9fa;
  color: #00bcd4;
}

.sidebar-item.active {
  background-color: #e0f7fa;
  color: #00bcd4;
  border-left-color: #00bcd4;
}

.sidebar-item i {
  width: 20px;
  text-align: center;
}

/* Mobile Toolbar */
.mobile-toolbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #eee;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 10px 0;
}

.mobile-toolbar-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.mobile-toolbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  color: #666;
  text-decoration: none;
  transition: color 0.3s;
  font-size: 12px;
  min-width: 60px;
}

.mobile-toolbar-item:hover,
.mobile-toolbar-item.active {
  color: #00bcd4;
}

.mobile-toolbar-item i {
  font-size: 18px;
}

/* Main Content Styles */
.main-content {
  margin-left: 250px;
  margin-top: 60px;
  padding: 30px;
  min-height: calc(100vh - 60px);
}

.content-section {
  display: none;
}

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

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #eee;
}

.section-header h2 {
  color: #333;
  font-size: 28px;
}

.header-actions {
  display: flex;
  gap: 10px;
}

/* Button Styles */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.btn-primary {
  background: linear-gradient(135deg, #00bcd4, #0097a7);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0097a7, #00838f);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-link {
  background: none;
  color: #00bcd4;
  text-decoration: underline;
}

.btn-whatsapp {
  border: 2px solid #25d366;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, #00bcd4, #0097a7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.stat-info h3 {
  font-size: 32px;
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

.stat-info p {
  color: #666;
  font-size: 14px;
}

/* Properties Grid */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.property-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s;
}

.property-card:hover {
  transform: translateY(-3px);
}

.property-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.property-info {
  padding: 20px;
}

.property-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.property-location {
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.property-price {
  font-size: 24px;
  font-weight: bold;
  color: #00bcd4;
  margin-bottom: 15px;
}

.property-features {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #666;
  font-size: 14px;
}

.property-actions {
  display: flex;
  gap: 8px;
}

/*Properties map*/

.properties-map {
  height: 500px;
}

/* Estilo para nuestro marcador personalizado */
.custom-marker {
  white-space: nowrap;
  background-color: #ffffff; /* Fondo blanco */
  padding: 8px 12px; /* Espaciado interno */
  border-radius: 8px; /* Bordes redondeados */
  border: 1px solid #17b3ca;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* Sombra para que resalte */
  font-family: Arial, sans-serif;
  font-size: 14px;
  position: absolute; /* Requerido para el posicionamiento */
  /* Centra el marcador sobre la coordenada exacta */
  transform: translate(-50%, -100%);
  cursor: pointer;
}

/* El pico del señalador (creado con un pseudo-elemento) */
.custom-marker::after {
  content: ""; /* Requerido para que se muestre el pseudo-elemento */
  position: absolute; /* Se posiciona relativo al .custom-marker */

  /* Centrado horizontalmente en la parte de abajo */
  left: 50%;
  bottom: -10px; /* Lo empuja hacia afuera, abajo del contenedor principal */
  transform: translateX(-50%);

  /* La magia para crear el triángulo con bordes */
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #17b3ca; /* Este crea el triángulo visible, del mismo color que el fondo */
}

/* Filters Panel */
.filters-panel {
  background: white;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  display: none;
}

.filters-panel.show {
  display: block;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  font-weight: 500;
  color: #333;
}

.filter-group input,
.filter-group select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.filters-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Table Styles */
.table-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  margin-top: 20px;
}

.properties-table,
.contacts-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  font-size: 12px;
}

.properties-table td,
.contacts-table td,
.data-table td {
  padding: 8px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  white-space: nowrap;
}

.properties-table th,
.contacts-table th,
.data-table th {
  background: #f8f9fa;
  padding: 8px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #eee;
  font-size: 11px;
}

.property-thumb {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-active {
  background: #d4edda;
  color: #155724;
}

.status-inactive {
  background: #f8d7da;
  color: #721c24;
}

.status-sold {
  background: #fff3cd;
  color: #856404;
}

.status-rented {
  background: #cce5ff;
  color: #004085;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* CRM Styles */
.crm-stats {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
}

.crm-stat {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  flex: 1;
}

.crm-stat h4 {
  color: #666;
  font-size: 14px;
  margin-bottom: 10px;
}

.stat-number {
  font-size: 32px;
  font-weight: bold;
  color: #00bcd4;
}

/* Contact Management Styles */
.contact-unread {
  background-color: #f8f9fa;
  font-weight: 500;
}

.new-badge {
  background: #dc3545;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
}

.contact-email,
.contact-phone {
  color: #007bff;
  text-decoration: none;
}

.contact-email:hover,
.contact-phone:hover {
  text-decoration: underline;
}

.interest-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.interest-compra {
  background: #e3f2fd;
  color: #1976d2;
}
.interest-alquiler {
  background: #f3e5f5;
  color: #7b1fa2;
}
.interest-venta {
  background: #e8f5e8;
  color: #388e3c;
}

.status-new {
  background: #fff3cd;
  color: #856404;
}
.status-contacted {
  background: #d4edda;
  color: #155724;
}
.status-follow-up {
  background: #cce5ff;
  color: #004085;
}
.status-closed {
  background: #d1ecf1;
  color: #0c5460;
}
.status-lost {
  background: #f8d7da;
  color: #721c24;
}

.property-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.property-link:hover {
  text-decoration: underline;
}

.contact-date {
  font-size: 13px;
  color: #6c757d;
}

.large-modal .modal-content {
  max-width: 800px;
  width: 90%;
}

.contact-detail-info {
  padding: 20px 0;
}

.contact-basic-info h4,
.contact-property-info h4,
.contact-message h4,
.contact-notes h4,
.contact-actions h4 {
  margin-bottom: 15px;
  color: #333;
  border-bottom: 2px solid #eee;
  padding-bottom: 8px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-item label {
  font-weight: 600;
  color: #555;
  font-size: 14px;
}

.info-item span {
  color: #333;
}

.property-info-card {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.message-content,
.notes-content {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #007bff;
  white-space: pre-wrap;
}

.action-buttons-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-buttons-group .btn {
  flex: 1;
  min-width: 150px;
}

/* Ads Grid */
.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
}

.ad-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

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

.ad-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.ad-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.ad-content {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
}

.ad-stats {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #666;
}

.ad-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  box-sizing: border-box;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Large Modal */
.large-modal {
  max-width: 900px;
  width: 95%;
}

/* Modal más grande para detalles de propiedad */
.property-detail-modal .modal-content {
  max-width: 1400px;
  width: 98%;
  max-height: 95vh;
  height: 90vh;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  color: #333;
  font-size: 20px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}

.modal-body {
  padding: 20px;
  /*height: calc(100% - 80px);*/
  overflow-y: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 500;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.form-group textarea {
  resize: vertical;
}

.item-colspan {
  grid-column: 1 / -1;
}

.image-preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.preview-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #ddd;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 20px;
  border-top: 1px solid #eee;
}

/* Image Upload Styles */
.image-upload-container {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.3s;
}

.image-upload-container:hover {
  border-color: #00bcd4;
}

.image-upload-container.dragover {
  border-color: #00bcd4;
  background-color: #f0f9ff;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.image-preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.3s;
}

.image-preview-item.main-image {
  border-color: #00bcd4;
}

.image-preview-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.image-preview-controls {
  position: absolute;
  top: 5px;
  right: 5px;
  display: flex;
  gap: 5px;
}

.image-preview-controls button {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-controls button:hover {
  background: rgba(0, 0, 0, 0.9);
}

.main-image-badge {
  position: absolute;
  top: 10px;
  left: 5px;
  background: #00bcd4;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
}

/* Galería de imágenes mejorada */
.property-detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
  height: 60%;
  border: 1px solid #eeee;
  border-radius: 10px;
  padding: 5px;
}

.main-image-container {
  position: relative;
  width: 100%;
  height: 80%;
}

.main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  cursor: pointer;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.3s ease;
}

.gallery-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.gallery-prev {
  left: 10px;
}

.gallery-next {
  right: 10px;
}

.thumbnail-grid {
  display: flex;
  gap: 10px;
  height: 15%;
  overflow-x: auto;
  padding: 5px 0;
}

.thumbnail {
  min-width: 80px;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s;
  flex-shrink: 0;
}

.thumbnail:hover {
  border-color: #00bcd4;
  transform: scale(1.05);
}

.thumbnail.active {
  border-color: #00bcd4;
  box-shadow: 0 0 10px rgba(0, 188, 212, 0.3);
}

/* Ocultar controles de navegación si hay solo una imagen */
.single-image .gallery-nav {
  display: none;
}

/* Layout del detalle de propiedad */
.property-detail-info {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  height: 35%;
  overflow-y: auto;
}

.property-detail-main {
  padding-right: 20px;
  border: 1px solid #eeee;
  border-radius: 10px;
  padding: 5px;
}

.property-detail-main h2 {
  font-size: 28px;
  color: #333;
  margin-bottom: 10px;
}

.property-detail-location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 16px;
  margin-bottom: 15px;
}

.property-detail-price {
  font-size: 32px;
  font-weight: bold;
  color: #00bcd4;
  margin-bottom: 20px;
}

.property-detail-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  color: #666;
}

.property-detail-description h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 20px;
}

.property-detail-description p {
  color: #666;
  line-height: 1.6;
}

.property-detail-sidebar {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 12px;
  height: fit-content;
  border: 2px solid #17b3ca;
  padding: 5px;
}

.property-detail-sidebar h3 {
  color: #333;
  margin-bottom: 20px;
  font-size: 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.contact-form button {
  padding: 12px 20px;
  background: linear-gradient(135deg, #00bcd4, #0097a7);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.contact-form button:hover {
  background: linear-gradient(135deg, #0097a7, #00838f);
  transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 20px 15px;
    margin-bottom: 70px; /* Space for mobile toolbar */
  }

  .sidebar-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
  }

  .header-content {
    padding: 0 15px;
  }

  .logo {
    font-size: 16px;
    max-width: 50%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .logo i {
    font-size: 18px;
  }

  /* Show mobile toolbar */
  .mobile-toolbar {
    display: block;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .properties-grid {
    grid-template-columns: 1fr;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .crm-stats {
    flex-direction: column;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 40px;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
    gap: 15px;
  }

  .header-actions .btn {
    flex: 1;
    max-width: 150px;
    justify-content: center;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .properties-table,
  .contacts-table,
  .data-table {
    min-width: 800px;
    font-size: 12px;
  }

  .properties-table td,
  .contacts-table td,
  .data-table td {
    padding: 8px;
    white-space: nowrap;
  }

  .properties-table th,
  .contacts-table th,
  .data-table th {
    padding: 8px;
    font-size: 11px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons-group {
    flex-direction: column;
  }

  .action-buttons-group .btn {
    width: 100%;
  }

  /* Responsive para modal de detalle */
  .property-detail-modal .modal-content {
    width: 98%;
    height: 95vh;
    margin: 10px;
  }

  .main-image {
    height: 75%;
  }

  .thumbnail-grid {
    height: 20%;
  }

  .thumbnail {
    min-width: 80px;
  }

  .property-detail-info {
    grid-template-columns: 1fr;
    height: 45%;
  }

  .property-detail-main {
    padding-right: 0;
  }

  /* Property Actions Mobile Fix */
  .property-actions {
    flex-direction: column;
    gap: 8px;
  }

  .property-actions .btn {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 15px 10px;
  }

  .modal-content {
    width: 95%;
    margin: 20px;
  }

  .ads-grid {
    grid-template-columns: 1fr;
  }

  .property-actions .btn {
    font-size: 11px;
    padding: 6px 10px;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

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

.slide-in {
  animation: slideIn 0.3s ease-out;
}

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

/* Loading Spinner */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #00bcd4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.mb-10 {
  margin-bottom: 10px;
}
.mb-20 {
  margin-bottom: 20px;
}
.mt-10 {
  margin-top: 10px;
}
.mt-20 {
  margin-top: 20px;
}
.hidden {
  display: none !important;
}

.show {
  display: block !important;
}

/* Actualizar header styles para manejar público/privado */
.public-header .header-content {
  position: relative;
}

.private-header .header-content {
  /* Removido position: fixed que causaba problemas */
  position: relative;
}

/* Actualizar main content para vista privada */
.private-view .main-content {
  margin-left: 250px;
  margin-top: 60px;
  padding: 30px;
  min-height: calc(100vh - 60px);
}

/* Actualizar sidebar para vista privada */
.private-view .sidebar {
  position: fixed;
  left: 0;
  top: 60px;
  width: 250px;
  height: calc(100vh - 60px);
  background: white;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 999;
  transition: transform 0.3s ease;
}

/* Responsive updates */
@media (max-width: 768px) {
  .private-view .sidebar {
    transform: translateX(-100%);
  }

  .private-view .sidebar.show {
    transform: translateX(0);
  }

  .private-view .main-content {
    margin-left: 0;
    padding: 20px 15px;
    margin-bottom: 70px; /* Space for mobile toolbar */
  }
}

/* CRM Section Styles */
.crm-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.crm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.crm-stat {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.crm-stat h4 {
  color: #666;
  font-size: 14px;
  margin-bottom: 10px;
}

.stat-number {
  font-size: 32px;
  font-weight: bold;
  color: #00bcd4;
}

/* Ads Section Styles */
.ads-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
}

.ad-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

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

.ad-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.ad-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.ad-content {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
}

.ad-stats {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #666;
}

.ad-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

/* Reports Section */
.reports-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.report-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

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

.report-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.report-content {
  color: #666;
}

/* Client Dashboard Styles */
.featured-properties,
.my-consultations {
  margin-bottom: 40px;
}

.featured-properties h3,
.my-consultations h3 {
  color: #333;
  font-size: 22px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eee;
}

.consultations-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.client-contact-item {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  border-left: 4px solid #00bcd4;
}

.client-contact-item h4 {
  color: #333;
  font-size: 16px;
  margin-bottom: 10px;
}

.contact-message {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.contact-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.contact-date {
  color: #999;
}

/* Responsive para vista de cliente */
@media (max-width: 768px) {
  .consultations-container {
    gap: 10px;
  }

  .client-contact-item {
    padding: 15px;
  }

  .contact-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* OVERRIDE SELECT2 */
.select2-selection__choice__remove {
  height: 100%;
  color: white !important;
}

.select2-selection__choice {
  background: linear-gradient(135deg, #00bcd4, #0097a7) !important;
  border: none !important;
  color: white !important;
}

.select2-selection--multiple {
  border: none !important;
}

.select2-search--inline {
  vertical-align: middle;
}

/*////////////////////////////////////////////////////////*/

/*/////////////CHAT///////////////////////*/
.chat-fab {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #007bff; /* Color primario del botón 'Buscar' */
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: background-color 0.3s;
}

.chat-fab:hover {
  background-color: #0056b3; /* Un tono más oscuro para el hover */
}

.chat-window {
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 350px;
  max-width: 90%;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: none; /* Oculto por defecto */
  flex-direction: column;
}

.chat-header {
  background-color: #343a40; /* Color del header privado */
  color: white;
  padding: 15px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h4 {
  margin: 0;
  font-size: 16px;
}

.chat-header .close-chat {
  cursor: pointer;
  font-size: 20px;
}

.chat-body {
  padding: 15px;
  height: 300px;
  overflow-y: auto;
  border-bottom: 1px solid #ddd;
}

.chat-footer {
  padding: 10px;
  display: flex;
}

.chat-footer input {
  flex-grow: 1;
  border: 1px solid #ddd;
  padding: 8px;
  border-radius: 20px;
  margin-right: 10px;
}

.chat-footer button {
  background: none;
  border: none;
  color: #007bff;
  font-size: 20px;
  cursor: pointer;
}

/* AUTO COMPLETE DE GOOGLE */
.pac-container {
  z-index: 9999 !important;
}

/* Contenedor principal del desplegable */
.pac-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #ffffff;
  border-radius: 8px; /* Mismos bordes redondeados que tu input */
  border: 1px solid #e0e0e0; /* Borde sutil gris claro */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* Sombra suave para darle profundidad */
  margin-top: 6px; /* Pequeña separación del campo de búsqueda */
  -webkit-box-sizing: border-box; /* Soluciona problemas de anchos */
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

/* Cada una de las opciones/sugerencias */
.pac-item {
  padding: 12px 16px;
  cursor: pointer;
  color: #424242; /* Color de texto gris oscuro */
  border: none; /* Quitamos los bordes internos */
  transition: background-color 0.2s ease;
}

/* Efecto al pasar el mouse sobre una opción */
.pac-item:hover {
  background-color: #f5f5f5; /* Un gris muy claro, como el fondo de tu input */
}

/* El texto que coincide con la búsqueda del usuario */
.pac-item-query {
  font-size: 15px;
  color: #212121; /* El texto coincidente un poco más oscuro */
}

/* El ícono de marcador/pin a la izquierda de cada opción */
.pac-icon {
  margin-top: 6px;
  display: none; /* Ocultamos el ícono para un look más limpio */
}

/* El logo "Powered by Google" al pie del desplegable */
.pac-logo:after {
  padding: 10px;
  font-size: 0px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .chat-fab {
    bottom: 95px; /* Above mobile toolbar */
  }
}
