/* style.css - Premium Vanilla CSS per AnnunciCasa */

/* 1. Reset & Global Variables */
:root {
  --font-sans: 'Inter', sans-serif;
  --font-title: 'Outfit', sans-serif;
  
  /* Color Palette (HSL Tailored) */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary-color: #0d9488; /* Teal */
  --primary-hover: #0f766e;
  --primary-light: #ccfbf1;
  --secondary-color: #6366f1; /* Indigo */
  --secondary-hover: #4f46e5;
  --danger-color: #ef4444;
  --danger-light: #fee2e2;
  --success-color: #10b981;
  --success-light: #d1fae5;
  --warning-color: #f59e0b;
  --warning-light: #fef3c7;
  
  --border-color: #e2e8f0;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --box-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* Helper Classes */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 24px;
}

.text-right { text-align: right; }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }
.font-bold { font-weight: 700; }
.hidden { display: none !important; }

/* 2. Buttons */
.btn-primary, .btn-secondary, .btn-search, .btn-filter, .btn-send-mail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: #e2e8f0;
  color: #334155;
}

.btn-secondary:hover {
  background-color: #cbd5e1;
  transform: translateY(-2px);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 12px;
}
.btn-back:hover {
  color: var(--primary-color);
}

/* 3. Navigation Header */
.main-header {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 70px;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
}

.logo-bold {
  color: var(--text-main);
}

.logo-icon {
  font-size: 1.7rem;
  color: var(--primary-color);
  animation: housePulse 3s infinite ease-in-out;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 500;
}

.main-nav a {
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a:hover {
  color: var(--primary-color);
  background-color: var(--bg-main);
}

.main-nav .nav-btn-login {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 600;
}

.main-nav .nav-btn-login:hover {
  background-color: var(--primary-color);
  color: white;
}

.main-nav .nav-btn-dashboard {
  background-color: #e0e7ff;
  color: var(--secondary-color);
  font-weight: 600;
}

.main-nav .nav-btn-dashboard:hover {
  background-color: var(--secondary-color);
  color: white;
}

.main-nav .nav-btn-logout {
  background-color: var(--danger-light);
  color: var(--danger-color);
  font-weight: 600;
}

.main-nav .nav-btn-logout:hover {
  background-color: var(--danger-color);
  color: white;
}

/* 4. Main content skeleton */
.main-content {
  flex: 1;
  padding: 40px 0;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* 5. Home Page: Hero & Search Panel */
.hero-section {
  position: relative;
  background-image: url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?auto=format&fit=crop&w=1200&q=80');
  background-size: cover;
  background-position: center;
  padding: 100px 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(13, 148, 136, 0.7) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  width: 100%;
  max-width: 800px;
  padding: 0 20px;
}

.hero-content h1 {
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero-content p {
  font-size: 1.2rem;
  font-weight: 300;
  margin-bottom: 40px;
  opacity: 0.9;
}

/* Glassmorphism Search Panel */
.search-panel {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.3);
  text-align: left;
}

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

.search-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-field label {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.95;
}

.search-field select, .search-field input[type="text"] {
  width: 100%;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.search-field select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.radio-group {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 16px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
}

.btn-search {
  background-color: var(--primary-color);
  color: white;
  width: 100%;
  max-width: 250px;
}

.btn-search:hover {
  background-color: var(--primary-hover);
}

.search-action {
  display: flex;
  justify-content: flex-end;
}

/* 6. Recent Announcements Section */
.recent-section h2 {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-icon {
  color: var(--primary-color);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 30px;
}

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

.property-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  color: inherit;
  text-decoration: none;
}

.property-card:hover {
  box-shadow: var(--box-shadow-hover);
  transform: translateY(-4px);
}

.property-img-container {
  height: 200px;
  position: relative;
  background-color: #cbd5e1;
  overflow: hidden;
}

.property-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.badge-causale {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: white;
  border-radius: 9999px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.5px;
}

.causale-0 { background-color: var(--primary-color); }
.causale-1 { background-color: var(--secondary-color); }
.causale-2 { background-color: var(--warning-color); }

.property-details {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.property-location {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.property-localita {
  font-weight: 600;
  color: var(--text-main);
}

.property-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.property-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 4.8em;
}

.property-features {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px dashed var(--border-color);
  border-bottom: 1px dashed var(--border-color);
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: #475569;
}

.property-features span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.property-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.property-price {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.btn-details {
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-details:hover {
  color: var(--primary-hover);
}

.btn-details i {
  transition: transform 0.2s ease;
}

.property-card:hover .btn-details i {
  transform: translateX(4px);
}

/* 8. Results Page Layout (Search/Filter results) */
.results-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
}

.sidebar-filters h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.filter-group select {
  width: 100%;
  padding: 10px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  outline: none;
  font-size: 0.9rem;
}

.static-filter-val {
  font-weight: 700;
  font-size: 1.05rem;
  padding: 8px 0;
  color: var(--primary-color);
}

.sidebar-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.sidebar-radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
}

.btn-filter {
  background-color: var(--text-main);
  color: white;
  width: 100%;
  margin-top: 10px;
}

.btn-filter:hover {
  background-color: #1e293b;
}

.results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}

.results-header h2 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
}

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

.no-results {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 60px;
  text-align: center;
}

.no-results i {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.no-results h3 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.no-results p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* 9. Listing Detail Page (Scheda) */
.property-detail-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

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

.header-left h1 {
  font-family: var(--font-title);
  font-size: 2.25rem;
  font-weight: 800;
  margin: 10px 0 6px 0;
  letter-spacing: -0.5px;
}

.location-text {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 1rem;
}

.header-right {
  text-align: right;
}

.detail-price {
  font-family: var(--font-title);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-color);
}

.detail-id {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 4px;
}

.property-detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
}

.detail-main {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Gallery / Carousel Style */
.gallery-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main-image-viewport {
  width: 100%;
  height: 450px;
  background-color: #cbd5e1;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--border-color);
}

.main-image-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnails-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.thumbnail-wrapper {
  width: 100px;
  height: 70px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: var(--transition);
}

.thumbnail-wrapper:hover, .thumbnail-wrapper.active {
  opacity: 1;
  border-color: var(--primary-color);
}

.thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-section h3 {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.features-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-item {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-main);
  border-radius: var(--border-radius-sm);
}

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

.feat-val {
  font-weight: 700;
}

.description-text {
  font-size: 1.05rem;
  line-height: 1.7;
  white-space: pre-line;
  color: #334155;
}

.attention-box {
  margin-top: 20px;
  padding: 12px 16px;
  background-color: var(--danger-light);
  color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Leaflet Map on Detail */
#map {
  width: 100%;
  height: 350px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  z-index: 1;
}

.map-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

/* Sidebar Details */
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: sticky;
  top: 90px;
  height: fit-content;
}

.agency-card {
  text-align: center;
}

.agency-logo-container {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--bg-main);
  box-shadow: var(--box-shadow);
}

.agency-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agency-name {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.agency-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.agency-card hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 16px 0;
}

.agency-contacts {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.95rem;
}

.agency-contacts li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agency-contacts i {
  color: var(--primary-color);
  width: 16px;
  text-align: center;
}

.agency-contacts a:hover {
  color: var(--primary-color);
}

/* Email Form Contact */
.contact-form-card h3 {
  font-family: var(--font-title);
  font-weight: 700;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  background: white;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary-color);
}

.btn-send-mail {
  background-color: var(--primary-color);
  color: white;
  width: 100%;
  margin-top: 12px;
}

.btn-send-mail:hover {
  background-color: var(--primary-hover);
}

.form-feedback {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
}

.form-feedback.success {
  background-color: var(--success-light);
  color: var(--success-color);
  border: 1px solid #a7f3d0;
}

.form-feedback.error {
  background-color: var(--danger-light);
  color: var(--danger-color);
  border: 1px solid #fecaca;
}

/* 10. Auth/Login Template */
.auth-container, .error-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.auth-card, .error-card {
  width: 100%;
  max-width: 450px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  padding: 40px;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.auth-header h2 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.alert-danger {
  background-color: var(--danger-light);
  color: var(--danger-color);
  border: 1px solid #fecaca;
}

.alert-success {
  background-color: var(--success-light);
  color: var(--success-color);
  border: 1px solid #a7f3d0;
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrapper i {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
}

.input-icon-wrapper input {
  padding-left: 40px;
}

.auth-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-color);
  font-weight: 600;
  margin-top: 8px;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Error Card style */
.error-card {
  text-align: center;
}

.error-icon {
  font-size: 3rem;
  color: var(--danger-color);
  margin-bottom: 16px;
}

.error-card h1 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.error-message {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* 11. Dashboard & Table styles */
.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-welcome {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dash-icon {
  font-size: 2rem;
  color: var(--primary-color);
}

.dash-welcome h2 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
}

.dash-welcome p {
  color: var(--text-muted);
}

.dash-actions {
  display: flex;
  gap: 12px;
}

.dash-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.summary-icon {
  width: 60px;
  height: 60px;
  background-color: var(--bg-main);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.summary-data h3 {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 800;
}

.summary-data p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
}

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

.listings-table th {
  background-color: var(--bg-main);
  padding: 16px;
  font-family: var(--font-title);
  font-weight: 700;
  color: #334155;
  border-bottom: 1px solid var(--border-color);
}

.listings-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.listings-table tr:hover {
  background-color: #f8fafc;
}

.table-img-cell {
  position: relative;
  width: 80px;
  height: 60px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.table-img-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rif-number {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.75);
  color: white;
  font-size: 0.65rem;
  padding: 2px 4px;
  font-weight: 700;
}

.table-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-sale { background-color: var(--primary-light); color: var(--primary-color); }
.badge-rent { background-color: #e0e7ff; color: var(--secondary-color); }
.badge-vacation { background-color: var(--warning-light); color: var(--warning-color); }

.table-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: var(--bg-main);
  color: #334155;
  transition: var(--transition);
}

.btn-icon:hover {
  transform: translateY(-1px);
}

.btn-view:hover { background-color: var(--primary-light); color: var(--primary-color); }
.btn-edit:hover { background-color: #e0e7ff; color: var(--secondary-color); }
.btn-delete:hover { background-color: var(--danger-light); color: var(--danger-color); }

.no-listings {
  text-align: center;
  padding: 40px;
}

.no-listings i {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.no-listings p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* 12. Profile Form Layout */
.profile-container, .form-container-card {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.profile-header, .form-header {
  background: var(--bg-card);
}

.profile-header h2, .form-header h2 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
}

.profile-header p, .form-header p {
  color: var(--text-muted);
}

.profile-layout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.col-span-2 {
  grid-column: span 2;
}

.profile-logo-display {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin: 20px auto;
  border: 4px solid var(--bg-main);
  box-shadow: var(--box-shadow);
}

.profile-logo-display img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-info-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.logo-upload-info {
  margin-top: 20px;
  padding: 12px;
  background-color: var(--bg-main);
  border-radius: var(--border-radius-sm);
  color: var(--text-muted);
}

/* 13. Create/Edit Annuncio Form Grid */
.form-sections-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.form-section {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-radio-group-horizontal {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
  padding: 10px 0;
}

.form-radio-group-horizontal label {
  font-weight: 500;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.input-info-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.image-upload-card {
  background-color: var(--bg-main);
  padding: 16px;
  border-radius: var(--border-radius-sm);
  border: 1px dashed var(--border-color);
}

.image-upload-card label {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 10px;
  display: block;
}

.current-uploaded-img {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  background: white;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.current-uploaded-img img {
  width: 50px;
  height: 40px;
  object-fit: cover;
  border-radius: 2px;
}

.img-filename {
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-all;
}

.form-actions-submit {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

/* 14. Footer Layout */
.main-footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 60px 0;
  border-top: 1px solid #1e293b;
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-col h4 {
  font-family: var(--font-title);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-desc-small {
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: white;
}

/* 15. Keyframes & Animations */
@keyframes housePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* 16. Responsive adjustments */
@media (max-width: 1024px) {
  .property-detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    height: auto;
    padding: 16px 20px;
    gap: 12px;
  }
  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .hero-content h1 {
    font-size: 2.25rem;
  }
  .results-layout {
    grid-template-columns: 1fr;
  }
  .profile-layout-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .col-span-2 {
    grid-column: span 1;
  }
  .footer-container {
    grid-template-columns: 1fr;
  }
}
