/* ── Meus Imóveis Page – estilos específicos da página ── */
/* (topbar, nav, sidebar, badges, etc. vêm do painel.css) */

/* Adjust main area to sit below topbar */
.mi-main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ── Page Header ── */
.mi-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.mi-page-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #818cf8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 4px 12px;
  border-radius: 99px;
}

.mi-page-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #f1f5f9 0%, #818cf8 100%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mi-page-subtitle {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
}

.mi-page-header-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.mi-btn-view-page {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}

.mi-btn-view-page:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

/* ── Sections ── */
.mi-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.3s;
}

.mi-section:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.mi-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.mi-section-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.mi-icon-indigo {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.mi-icon-green {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.mi-section-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

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

/* ── Profile Grid ── */
.mi-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.mi-profile-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Loading State ── */
.mi-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 48px;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.mi-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid rgba(99, 102, 241, 0.2);
  border-top-color: #6366f1;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Empty State ── */
.mi-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.mi-empty-icon {
  margin-bottom: 16px;
  opacity: 0.3;
  display: flex;
  justify-content: center;
}

.mi-empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 6px;
}

.mi-empty-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Form (add/edit property) ── */
.mi-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.mi-breadcrumb-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #818cf8;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 0;
  transition: color 0.2s;
}

.mi-breadcrumb-back:hover {
  color: #6366f1;
}

.mi-breadcrumb-current {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
}

/* Form Footer */
.mi-form-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.mi-btn-cancel {
  padding: 10px 20px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.mi-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Active nav link override for this page */
.nav-link.active {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #818cf8 !important;
  border: 1px solid rgba(99, 102, 241, 0.25) !important;
}

.mobile-nav-link.active {
  background: rgba(99, 102, 241, 0.12) !important;
  color: #818cf8 !important;
}

/* Mobile sidebar badges strip */
.mobile-sidebar-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0 4px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .mi-main-content {
    padding: 20px 16px 60px;
  }

  .mi-section {
    padding: 18px 16px;
  }

  .mi-profile-grid {
    grid-template-columns: 1fr;
  }

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

  .mi-page-header {
    flex-direction: column;
    gap: 12px;
  }

  .mi-page-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .mi-page-title {
    font-size: 1.3rem;
  }

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