/* ── Variables ─────────────────────────────────────── */
:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.3);
  --secondary: #0ea5e9;
  --secondary-hover: #0284c7;
  --success: #10b981;
  --success-hover: #059669;
  --accent: #f43f5e;
  --bg: #060c1a;
  --surface: rgba(15, 23, 42, 0.7);
  --card: rgba(20, 30, 50, 0.8);
  --border: rgba(255, 255, 255, 0.07);
  --border-active: rgba(99, 102, 241, 0.5);
  --text: #f1f5f9;
  --text-light: #94a3b8;
  --text-muted: #475569;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

/* ── Reset ─────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background blobs ──────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% -10%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 110%, rgba(14, 165, 233, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(244, 63, 94, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ────────────────────────────────────────── */
.page-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 12, 26, 0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.logo-text {
  font-weight: 800;
  font-size: 1.15rem;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--text);
}

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

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-location {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.73rem;
  font-weight: 700;
  color: #34d399;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(1.5);
  }
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: #fb7185;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-logout:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.35);
}

/* ── Main content ──────────────────────────────────── */
.main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 28px 72px;
  width: 100%;
}

/* ── Page header ───────────────────────────────────── */
.page-header {
  margin-bottom: 40px;
}

.page-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.22);
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #818cf8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  background: linear-gradient(to right, #f1f5f9, #94a3b8);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.page-subtitle {
  color: var(--text-light);
  font-size: 1rem;
  max-width: 540px;
}

/* ── Search card ───────────────────────────────────── */
.search-card {
  background: var(--card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.search-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.search-card-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Inner grid for address fields (rua + numero side by side) */
#fields-address {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

#unidade-group,
#address-opportunities-wrap {
  grid-column: 1 / -1;
}

#fields-building {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Actions row (clear btn + search btn) */
.search-form-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

@media (max-width: 640px) {
  #fields-address {
    grid-template-columns: 1fr;
  }
}

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

label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.45;
  pointer-events: none;
}

input {
  width: 100%;
  background: rgba(6, 12, 26, 0.5);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px 13px 40px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

input::placeholder {
  color: var(--text-muted);
}

input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(6, 12, 26, 0.7);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.btn-search {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border: none;
  padding: 13px 28px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--primary-glow);
  filter: brightness(1.1);
}

.btn-search:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-clear {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 13px 16px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-clear:hover {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fb7185;
}

/* ── Error message ─────────────────────────────────── */
.error-banner {
  background: rgba(244, 63, 94, 0.08);
  color: #fb7185;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(244, 63, 94, 0.2);
  margin-bottom: 22px;
  font-size: 0.88rem;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 10px;
}

/* ── Loading ───────────────────────────────────────── */
.loading-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 60px 20px;
}

.spinner-ring {
  width: 52px;
  height: 52px;
  border: 3px solid rgba(255, 255, 255, 0.06);
  border-top-color: var(--primary);
  border-right-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.loading-text {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ── Preview Card ──────────────────────────────────── */
.preview-card {
  display: none;
  background: var(--card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
  animation: fadeSlideIn 0.4s ease both;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.preview-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.preview-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}

.preview-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.preview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.preview-stat {
  background: rgba(6, 12, 26, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.preview-stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: #818cf8;
  line-height: 1;
  margin-bottom: 4px;
}

.preview-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.preview-names-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-names-toggle:hover {
  border-color: var(--border-active);
  color: var(--text);
}

.preview-names-list {
  display: none;
  background: rgba(6, 12, 26, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  max-height: 200px;
  overflow-y: auto;
}

.preview-names-list.open {
  display: block;
}

.preview-name-item {
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.preview-name-item:last-child {
  border-bottom: none;
}

.preview-warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.85rem;
  color: #fbbf24;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 12px 24px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-confirm {
  background: linear-gradient(135deg, var(--success), var(--success-hover));
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-confirm:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* ── Enrich Loading ────────────────────────────────── */
.enrich-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 60px 20px;
}

.enrich-spinner {
  position: relative;
  width: 64px;
  height: 64px;
}

.enrich-spinner::before,
.enrich-spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  animation: spin 1.2s linear infinite;
}

.enrich-spinner::before {
  border-top-color: var(--primary);
  border-right-color: var(--secondary);
}

.enrich-spinner::after {
  inset: 8px;
  border-top-color: rgba(16, 185, 129, 0.6);
  animation-duration: 0.9s;
  animation-direction: reverse;
}

.enrich-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.enrich-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 380px;
}

.pulse-bar {
  width: 240px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.pulse-bar-inner {
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  animation: pulseSlide 1.8s ease-in-out infinite;
}

@keyframes pulseSlide {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(350%);
  }
}

.enrich-dot {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ── Results Iframe ────────────────────────────────── */
.results-wrap {
  display: none;
  margin-top: 0;
}

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

.results-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.btn-expand {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-expand:hover {
  border-color: var(--border-active);
  color: var(--text);
}

.results-frame-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

#results-iframe {
  width: 100%;
  height: 78vh;
  border: none;
  display: block;
  background: #f8fafc;
  /* iframe bg while loading */
}

/* ── Empty state ───────────────────────────────────── */
.empty-state {
  text-align: center;
  padding-inline: 20px;
  padding-bottom: 80px;
  padding-top: 40px;
  color: var(--text-muted);
}

.empty-msg {
  margin-bottom: 85px;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

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

.empty-sub {
  font-size: 0.88rem;
}

/* ── Viewer banner ─────────────────────────────────── */
.viewer-banner {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 32px;
  display: none;
  align-items: center;
  gap: 20px;
}

.viewer-banner-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(14, 165, 233, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.viewer-banner-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 4px;
}

.viewer-banner-text span {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ── Quick links ───────────────────────────────────── */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

.quick-card {
  flex: 1 1 calc(33.333% - 14px);
  min-width: 240px;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.quick-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.quick-card.purple::before {
  background: radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.09) 0%, transparent 70%);
}

.quick-card.blue::before {
  background: radial-gradient(ellipse at top left, rgba(14, 165, 233, 0.09) 0%, transparent 70%);
}

.quick-card.green::before {
  background: radial-gradient(ellipse at top left, rgba(16, 185, 129, 0.09) 0%, transparent 70%);
}

.quick-card.orange::before {
  background: radial-gradient(ellipse at top left, rgba(245, 158, 11, 0.09) 0%, transparent 70%);
}

.quick-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

.quick-card:hover::before {
  opacity: 1;
}

.quick-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.quick-icon.purple {
  background: rgba(99, 102, 241, 0.15);
}

.quick-icon.blue {
  background: rgba(14, 165, 233, 0.15);
}

.quick-icon.green {
  background: rgba(16, 185, 129, 0.15);
}

.quick-info strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.quick-info span {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ── Login Overlay ─────────────────────────────────── */
#login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 15% 20%, rgba(99, 102, 241, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(14, 165, 233, 0.2) 0%, transparent 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

#login-overlay::before,
#login-overlay::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  animation: floatOrb 8s ease-in-out infinite;
}

#login-overlay::before {
  width: 300px;
  height: 300px;
  background: rgba(99, 102, 241, 0.16);
  top: -80px;
  left: -80px;
}

#login-overlay::after {
  width: 240px;
  height: 240px;
  background: rgba(14, 165, 233, 0.13);
  bottom: -60px;
  right: -60px;
  animation-delay: -4s;
}

@keyframes floatOrb {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(20px, -20px);
  }
}

.login-box {
  background: rgba(15, 22, 40, 0.9);
  backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 52px 44px;
  border-radius: 28px;
  width: 100%;
  max-width: 400px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 40px 60px -16px rgba(0, 0, 0, 0.75),
    0 0 80px rgba(99, 102, 241, 0.08);
  position: relative;
  z-index: 1;
  text-align: center;
}

.login-logo {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, #6366f1, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 22px;
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.4);
}

.login-box h2 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(to right, #c7d2fe, #7dd3fc);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 5px;
}

.login-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 30px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.login-form label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  opacity: 0.4;
  pointer-events: none;
}

.login-form input {
  width: 100%;
  background: rgba(6, 12, 26, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 13px 16px 13px 42px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.25s;
}

.login-form input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(6, 12, 26, 0.8);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.login-form input::placeholder {
  color: #334155;
}

.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 15px;
  transition: color 0.2s;
}

.toggle-pass:hover {
  color: var(--text-light);
}

#login-error {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #fb7185;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: center;
  display: none;
}

.login-btn {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.35);
}

.login-btn:hover {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.5);
}

/* ── Históricos Modal ─────────────────────────────────── */
.h-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes slideUp {
  from {
    transform: translateY(24px);
    opacity: 0
  }

  to {
    transform: translateY(0);
    opacity: 1
  }
}

.h-modal-backdrop.open {
  display: flex;
}

.h-modal {
  background: rgba(12, 18, 36, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  animation: slideUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.h-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.h-modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 3px;
}

.h-modal-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.h-modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.h-modal-close:hover {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.25);
  color: #fb7185;
}

.h-modal-search {
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  flex-shrink: 0;
}

.h-search-icon {
  position: absolute;
  left: 38px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.4;
  pointer-events: none;
}

.h-modal-search input {
  width: 100%;
  background: rgba(6, 12, 26, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 14px 10px 38px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

.h-modal-search input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.h-modal-search input::placeholder {
  color: var(--text-muted);
}

.h-list {
  overflow-y: auto;
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.h-list::-webkit-scrollbar {
  width: 4px;
}

.h-list::-webkit-scrollbar-track {
  background: transparent;
}

.h-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.h-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(20, 30, 50, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px 16px;
  transition: all 0.2s;
}

.h-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.07);
}

.h-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.h-item-info {
  flex: 1;
  min-width: 0;
}

.h-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-item-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.h-item-badge {
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.h-btn-view {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.h-btn-view:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.h-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.h-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-10px);
  }

  75% {
    transform: translateX(10px);
  }
}

/* ── Owner Cards ───────────────────────────────────── */
.card-grid {
  display: grid;
  gap: 20px;
  margin-top: 16px;
  transition: grid-template-columns 0.25s ease;
}

/* Column variants */
.card-grid.cols-1 {
  grid-template-columns: 1fr;
}

.card-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Fallback for small screens */
@media (max-width: 960px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {

  .card-grid.cols-2,
  .card-grid.cols-3 {
    grid-template-columns: 1fr;
  }
}

/* ── Columns Toggle Buttons ──────────────────────── */
.cols-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(6, 12, 26, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}

.cols-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.cols-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-light);
}

.cols-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

@media (max-width: 640px) {
  #cols-toggle {
    display: none;
  }
}

.owner-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: fadeSlideInOwner 0.4s ease both;
}

@keyframes fadeSlideInOwner {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.owner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  border-color: rgba(99, 102, 241, 0.3);
}

.owner-card.contacted {
  opacity: 0.88;
  border-left: 4px solid var(--success);
  background: rgba(16, 185, 129, 0.04);
}

/* Card header */
.owner-card-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.owner-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.owner-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.owner-info {
  flex: 1;
  min-width: 0;
}

.owner-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-index-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.owner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.neighborhood-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(14, 165, 233, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.2);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.contacted-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: all 0.2s;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.contacted-toggle-wrap:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.contacted-toggle-wrap input {
  width: 14px;
  height: 14px;
  cursor: pointer;
  margin: 0;
  accent-color: var(--success);
}

/* Apartments */
.apartment-list {
  background: rgba(6, 12, 26, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 20px 4px;
}

.apartment-item {
  font-size: 0.85rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-light);
}

.apartment-item:last-child {
  border-bottom: none;
}

.apto-badge {
  font-weight: 800;
  color: var(--secondary);
}

/* Section title */
.section-title {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

/* Owner actions wrap */
.owner-actions-wrap {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

/* Phones section */
.phones-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phones-section.phones-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  text-align: center;
}

.phones-empty-icon {
  font-size: 1.5rem;
  opacity: 0.5;
}

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

.phones-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phone-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 12, 26, 0.55);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  gap: 12px;
  transition: border-color 0.2s;
}

.phone-entry:hover {
  border-color: rgba(99, 102, 241, 0.2);
}

/* ── Stacked layout: 3-col grid or mobile ─────────── */
.card-grid.cols-3 .phone-entry {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.card-grid.cols-3 .phone-entry .phone-entry-left {
  flex: unset;
}

.card-grid.cols-3 .phone-entry .phone-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.card-grid.cols-3 .phone-entry .btn-action {
  justify-content: center;
  padding: 8px 6px;
}

@media (max-width: 640px) {
  .phone-entry {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .phone-entry .phone-entry-left {
    flex: unset;
  }

  .phone-entry .phone-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .phone-entry .btn-action {
    justify-content: center;
    padding: 8px 6px;
  }
}

.phone-entry-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.phone-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  flex-shrink: 0;
}

.phone-number {
  font-weight: 800;
  color: var(--text);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.phone-actions {
  display: flex;
  gap: 7px;
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 9px;
  text-decoration: none;
  color: white;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-action:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-call {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-hover));
  box-shadow: 0 3px 10px rgba(14, 165, 233, 0.25);
}

.btn-wa {
  background: linear-gradient(135deg, #25D366, #128C7E);
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.25);
}

.btn-action.session-marked {
  opacity: 0.35;
  filter: brightness(0.5) grayscale(0.5);
  cursor: default;
  transform: none !important;
}

.btn-enrich {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: all 0.25s;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  font-family: inherit;
}

.btn-enrich:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
}

.btn-enrich:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-lead {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
  font-family: inherit;
  margin-top: 5px;
}

.btn-lead:hover {
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.1);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-lead svg {
  transition: transform 0.3s ease;
}

.btn-lead:hover svg {
  transform: scale(1.1) rotate(5deg);
}

/* Results header count badge */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.results-count-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: #818cf8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* Empty msg */
.owners-empty-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 0.9rem;
  justify-content: center;
}

/* ── Owner Pagination (same style as oportunidades) ── */
#pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.owner-page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.owner-page-btn:hover:not(:disabled) {
  border-color: var(--border-active);
  color: var(--text);
  background: rgba(99, 102, 241, 0.06);
}

.owner-page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.owner-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.owner-page-gap {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0 4px;
}


/* ── Responsive — 768px ───────────────────────────────── */
@media (max-width: 768px) {
  .topbar {
    padding: 0 12px;
    gap: 6px;
  }

  .logo-text {
    display: none;
  }

  .badge-location {
    display: none;
  }

  .btn-logout {
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .nav-link {
    padding: 6px 8px;
    font-size: 0.75rem;
    gap: 4px;
  }

  .main {
    padding: 32px 16px 72px;
  }

  .page-header {
    margin-bottom: 28px;
  }

  .page-label {
    font-size: 0.68rem;
  }

  .search-card {
    padding: 22px 18px;
  }

  .search-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .btn-search {
    width: 100%;
    justify-content: center;
    padding: 14px;
  }

  .quick-links {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 24px;
  }

  .quick-card {
    padding: 16px;
    max-width: 100%;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #pagination-controls {
    gap: 6px;
  }

  .owner-page-btn {
    min-width: 36px;
    height: 36px;
    font-size: 0.82rem;
  }

  #results-iframe {
    height: 65vh;
  }

  /* Modal as bottom sheet */
  .h-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .h-modal {
    max-width: 100%;
    border-radius: 22px 22px 0 0;
    max-height: 88vh;
  }

  .plan-badge {
    padding: 6px 10px;
    font-size: 0.7rem;
  }
}

/* ── Responsive — 480px ───────────────────────────────── */
@media (max-width: 480px) {
  .nav-label {
    display: none;
  }

  .nav-link {
    padding: 6px;
  }

  .btn-logout {
    gap: 0;
    padding: 6px;
  }

  .logo-icon {
    width: 25px;
    height: 25px;
    font-size: 13px;
    border-radius: 8px;
  }

  .page-title {
    font-size: 1.7rem;
  }

  .page-subtitle {
    font-size: 0.88rem;
  }

  input {
    font-size: 1rem;
    padding: 14px 16px 14px 42px;
  }

  .btn-search {
    font-size: 1rem;
    padding: 15px;
  }

  .empty-state {
    padding: 48px 12px;
  }

  .h-modal {
    max-height: 92vh;
  }

  .h-modal-header {
    padding: 20px 18px 14px;
  }

  .h-modal-search {
    padding: 12px 18px;
  }

  .h-list {
    padding: 10px;
  }

  .h-item {
    padding: 12px;
    gap: 10px;
  }

  .h-item-icon {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .h-item-badge {
    display: none;
  }

  .credit-badge-skeleton {
    width: 50px;
    height: 22px;
  }

  .plan-badge {
    padding: 4px 6px;
    font-size: 0.6rem;
  }

  .credit-badge {
    padding: 4px 6px;
    font-size: 0.6rem;
  }

  .btn-add-credits-nav {
    width: 28px;
    height: auto;
  }

  .btn-add-credits-nav svg {
    width: 14px;
    height: 14px;
  }
}

/* ── Credit Badge ──────────────────────────────────── */
.credit-badge-group {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.credit-badge-group #credit-badge {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.btn-add-credits-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: auto;
  border-radius: 0 9999px 9999px 0;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-left: 1px solid rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  cursor: pointer;
  transition: all 0.2s ease;
  /* box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1); */
  padding: 0;
}

.btn-add-credits-nav:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
  border-left-color: rgba(245, 158, 11, 0.3);
  transform: none;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.btn-add-credits-nav svg {
  width: 14px;
  height: 14px;
}

.credit-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.28);
  padding: 6px 13px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.02em;
  transition: all 0.3s;
  white-space: nowrap;
}

.credit-badge.low {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fb7185;
  animation: pulse-low 1.8s ease-in-out infinite;
}

.credit-badge.admin-badge {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.28);
  color: #818cf8;
}

.plan-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.28);
  padding: 6px 13px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #818cf8;
  letter-spacing: 0.02em;
  transition: all 0.3s;
  white-space: nowrap;
}

.credit-badge-skeleton {
  width: 90px;
  height: 28px;
  border-radius: 9999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@keyframes pulse-low {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.15);
  }
}

/* ── Toast notification ────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(12, 18, 36, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  max-width: 360px;
  pointer-events: all;
  animation: toastIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--accent);
}

.toast.info {
  border-left: 4px solid var(--secondary);
}

.toast.warning {
  border-left: 4px solid #f59e0b;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

/* ── Support Modal ────────────────────────────────── */
.support-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  z-index: 9600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.support-modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.support-modal {
  background: rgba(12, 18, 38, 0.98);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  padding: 36px 32px 32px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  animation: slideUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.support-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.support-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.support-modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
}

.support-modal h3 {
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text);
}

.support-modal-sub {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.support-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.btn-buy-credits {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 8px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: none;
  transition: all 0.2s ease;
}

.btn-buy-credits:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.support-option {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(6, 12, 26, 0.5);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  color: var(--text);
}

.support-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.support-option.whatsapp:hover {
  border-color: rgba(37, 211, 102, 0.4);
  background: rgba(37, 211, 102, 0.06);
}

.support-option.email:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.06);
}

.support-option-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.support-option-icon.green {
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.2);
}

.support-option-icon.indigo {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.support-option-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.support-option-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.support-divider {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.6;
}

/* ── Buy Credits Button & Modal ────────────────────── */
.btn-buy-credits {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 10px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
  transition: all 0.3s;
}

.btn-buy-credits:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
  filter: brightness(1.1);
}

.buy-credits-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.buy-credits-modal-backdrop.open {
  display: flex;
}

.buy-credits-modal {
  background: rgba(12, 18, 36, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  animation: slideUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header */
.buy-credits-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.buy-credits-modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.buy-credits-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  flex-shrink: 0;
}

.buy-credits-modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 2px;
}

.buy-credits-modal-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Body */
.buy-credits-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.buy-credits-body::-webkit-scrollbar {
  width: 4px;
}

.buy-credits-body::-webkit-scrollbar-track {
  background: transparent;
}

.buy-credits-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.buy-credits-body::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.25);
}

.buy-credits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.buy-credit-card {
  background: rgba(20, 30, 50, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}

.buy-credit-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
  transform: translateY(-1px);
}

.buy-credit-card.selected {
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.b-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.b-card-icon {
  font-size: 24px;
}

.b-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.b-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.b-card-unit {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.b-card-price {
  font-weight: 800;
  font-size: 0.95rem;
  color: #f59e0b;
  white-space: nowrap;
}

/* Footer */
.buy-credits-modal-footer {
  display: flex;
  gap: 10px;
  padding: 18px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.buy-credits-modal-footer .btn-cancel {
  flex: 1;
}

.buy-credits-modal-footer .btn-confirm-credit {
  flex: 1.8;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

/* ── Credit Confirmation Modal ─────────────────────── */
.credit-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  z-index: 9500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.credit-modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.credit-modal {
  background: rgba(12, 18, 38, 0.98);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  padding: 32px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  animation: slideUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.credit-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 20px;
}

.credit-modal h3 {
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text);
}

.credit-modal-sub {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.6;
}

.credit-modal-info {
  background: rgba(6, 12, 26, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.credit-modal-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
}

.credit-modal-info-row:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.credit-modal-info-label {
  color: var(--text-muted);
  font-weight: 600;
}

.credit-modal-info-value {
  color: var(--text);
  font-weight: 700;
}

.credit-cost-chip {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #fb7185;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
}

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

.credit-modal-actions .btn-cancel {
  flex: 1;
}

.btn-confirm-credit {
  flex: 1.6;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  padding: 13px 20px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.btn-confirm-credit:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.btn-confirm-credit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Credit stepper (users modal) ───────────────────── */
.credit-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.credit-stepper-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.credit-stepper-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #818cf8;
}

.credit-stepper-input {
  width: 52px;
  text-align: center;
  background: rgba(6, 12, 26, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 5px 4px;
  -moz-appearance: textfield;
  appearance: textfield;
}

.credit-stepper-input::-webkit-inner-spin-button,
.credit-stepper-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.credit-stepper-input:focus {
  outline: none;
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.credit-save-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.credit-save-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.credit-save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.credit-save-btn.saved {
  background: linear-gradient(135deg, var(--success), var(--success-hover));
  color: white;
}

/* ── App Tutorial ───────────────────────────────────── */
.tut-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  /* Opcionalmente sem fundo aqui, usaremos o box-shadow gigantesco no destaque */
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  /* intercepts clicks outside */
  background: transparent;
}

/* Elevate the topbar completely over the overlay during tutorial */
.topbar.tutorial-mode {
  z-index: 10001 !important;
}

.tut-highlight {
  position: relative !important;
  z-index: 10002 !important;
  background: var(--bg) !important;
  border: 2px solid var(--primary) !important;
  border-radius: 10px !important;
  box-shadow: 0 0 0 9999px rgba(6, 12, 26, 0.85), 0 0 25px var(--primary-glow) !important;
  pointer-events: none !important;
  /* Prevents clicking nav during tutorial */
}

.tut-modal {
  background: var(--card);
  border: 1px solid var(--border-active);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  border-radius: var(--radius-lg);
  padding: 24px 30px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  animation: tut-fade-up 0.5s ease-out;
  position: absolute;
  /* positioned dynamically or centered */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10003;
}

.tut-progress {
  font-size: 0.8rem;
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 12px;
  font-weight: 700;
}

.tut-modal h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #fff;
}

.tut-modal p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.tut-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.tut-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Floating Arrow Pointing Up */
.tut-arrow {
  position: fixed;
  font-size: 2.5rem;
  color: var(--primary);
  z-index: 10003;
  text-shadow: 0 0 15px var(--primary-glow);
  animation: tut-bounce 1.5s infinite;
  pointer-events: none;
  display: none;
}

@keyframes tut-fade-up {
  from {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes tut-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* ── Theme Toggle Button (Flutuante) ───────────────────────── */
#theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#theme-toggle:hover {
  transform: translateY(-4px) scale(1.05);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.4);
}

/* ── Light Theme Overrides ──────────────────────────── */
[data-theme="light"] {
  --bg: #f0f4fb;
  --surface: rgba(240, 244, 251, 0.95);
  --card: rgba(255, 255, 255, 0.98);
  --border: rgba(0, 0, 0, 0.08);
  --border-active: rgba(99, 102, 241, 0.45);
  --border-hover: rgba(0, 0, 0, 0.18);
  --text: #0f172a;
  --text-light: #475569;
  --text-muted: #94a3b8;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.10);
}

/* Body & Background */
[data-theme="light"] body {
  background: #f0f4fb !important;
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 80% 60% at 10% -10%, rgba(99, 102, 241, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 110%, rgba(14, 165, 233, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(244, 63, 94, 0.02) 0%, transparent 70%) !important;
}

[data-theme="light"] body::after {
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.035) 1px, transparent 1px) !important;
}

/* Topbar */
[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom-color: rgba(0, 0, 0, 0.07) !important;
}

[data-theme="light"] .logo-text span:first-child {
  color: #1e293b !important;
}

[data-theme="light"] .logo-text span:last-child {
  color: #4f46e5 !important;
}

[data-theme="light"] .nav-link {
  color: #475569 !important;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
  background: rgba(99, 102, 241, 0.07) !important;
  color: #4f46e5 !important;
}

[data-theme="light"] .badge-location {
  background: rgba(99, 102, 241, 0.06) !important;
  border-color: rgba(99, 102, 241, 0.15) !important;
  color: #4f46e5 !important;
}

[data-theme="light"] .badge-dot {
  background: #10b981 !important;
}

[data-theme="light"] .btn-logout {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #475569 !important;
}

[data-theme="light"] .btn-logout:hover {
  background: rgba(244, 63, 94, 0.06) !important;
  border-color: rgba(244, 63, 94, 0.2) !important;
  color: #f43f5e !important;
}

[data-theme="light"] .credit-badge {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
}

[data-theme="light"] .btn-add-credits-nav {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .btn-add-credits-nav:hover {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Search Card */
[data-theme="light"] .search-card {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
}

/* Inputs */
[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #0f172a !important;
}

[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
  background: #fff !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: #94a3b8 !important;
}

[data-theme="light"] label {
  color: #475569 !important;
}

[data-theme="light"] .input-icon {
  opacity: 0.4 !important;
  filter: invert(1);
}

/* Buttons */
[data-theme="light"] .btn-clear {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #475569 !important;
}

[data-theme="light"] .btn-clear:hover {
  background: rgba(244, 63, 94, 0.07) !important;
  border-color: rgba(244, 63, 94, 0.2) !important;
  color: #f43f5e !important;
}

[data-theme="light"] .btn-cancel {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #475569 !important;
}

[data-theme="light"] .btn-cancel:hover {
  background: #e2e8f0 !important;
  border-color: rgba(0, 0, 0, 0.14) !important;
}

[data-theme="light"] .btn-buy-credits {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(14, 165, 233, 0.08)) !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
  color: #4f46e5 !important;
}

/* Preview Card */
[data-theme="light"] .preview-card {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .preview-stat {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
}

[data-theme="light"] .preview-names-list {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
}

[data-theme="light"] .preview-name-item {
  border-bottom-color: rgba(0, 0, 0, 0.05) !important;
  color: #475569 !important;
}

[data-theme="light"] .preview-names-toggle {
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #475569 !important;
}

[data-theme="light"] .preview-names-toggle:hover {
  border-color: rgba(99, 102, 241, 0.3) !important;
  color: #4f46e5 !important;
}

/* Loading & Spinner */
[data-theme="light"] .spinner-ring {
  border-color: rgba(0, 0, 0, 0.07) !important;
  border-top-color: var(--primary) !important;
  border-right-color: var(--secondary) !important;
}

[data-theme="light"] .pulse-bar {
  background: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .loading-text {
  color: #475569 !important;
}

[data-theme="light"] .enrich-title {
  color: #0f172a !important;
}

[data-theme="light"] .enrich-sub {
  color: #94a3b8 !important;
}

[data-theme="light"] .enrich-dot {
  color: #94a3b8 !important;
}

/* Results */
[data-theme="light"] .owner-card {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .owner-card:hover {
  background: #f1f5f9 !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}

[data-theme="light"] .owner-card.contacted {
  background: rgba(16, 185, 129, 0.04) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

[data-theme="light"] .owner-name {
  color: #0f172a !important;
}

[data-theme="light"] .owner-age,
[data-theme="light"] .owner-cpf {
  color: #475569 !important;
}

[data-theme="light"] .owner-card-top {
  border-bottom-color: rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .contacted-toggle-wrap {
  background: rgba(0, 0, 0, 0.03) !important;
  color: #475569 !important;
}

[data-theme="light"] .contacted-toggle-wrap:hover {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #0f172a !important;
}

[data-theme="light"] .neighborhood-tag {
  background: rgba(14, 165, 233, 0.08) !important;
  color: #0284c7 !important;
  border-color: rgba(14, 165, 233, 0.15) !important;
}

[data-theme="light"] .apartment-list {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .apartment-item {
  border-bottom-color: rgba(0, 0, 0, 0.05) !important;
  color: #475569 !important;
}

[data-theme="light"] .section-title {
  color: #64748b !important;
}

[data-theme="light"] .phone-entry {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
}

[data-theme="light"] .phone-number {
  color: #0f172a !important;
}

[data-theme="light"] .btn-expand {
  background: #fff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #475569 !important;
}

[data-theme="light"] .results-frame-wrap {
  border-color: rgba(0, 0, 0, 0.07) !important;
}

/* Page header */
[data-theme="light"] .page-label {
  color: #4f46e5 !important;
}

[data-theme="light"] .page-title {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  background: none !important;
}

[data-theme="light"] .page-subtitle {
  color: #64748b !important;
}

/* Quick cards */
[data-theme="light"] .quick-card {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
}

[data-theme="light"] .quick-card:hover {
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .quick-info strong {
  color: #0f172a !important;
}

[data-theme="light"] .quick-info span {
  color: #64748b !important;
}

/* Viewer banner */
[data-theme="light"] .viewer-banner {
  background: rgba(14, 165, 233, 0.05) !important;
  border-color: rgba(14, 165, 233, 0.15) !important;
}

/* Login Overlay (inside painel) */
[data-theme="light"] #login-overlay {
  background: #f0f4fb !important;
  background-image:
    radial-gradient(ellipse at 15% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(14, 165, 233, 0.06) 0%, transparent 55%) !important;
}

[data-theme="light"] .login-box {
  background: rgba(255, 255, 255, 0.99) !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
  box-shadow: 0 40px 60px -16px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.03) !important;
}

[data-theme="light"] .login-box h2 {
  background: linear-gradient(to right, #4f46e5, #0ea5e9) !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

[data-theme="light"] .login-sub {
  color: #64748b !important;
}

[data-theme="light"] .login-form label {
  color: #475569 !important;
}

[data-theme="light"] .login-form input {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #0f172a !important;
}

[data-theme="light"] .login-form input:focus {
  background: #fff !important;
}

[data-theme="light"] .login-form input::placeholder {
  color: #94a3b8 !important;
}

[data-theme="light"] #login-error {
  background: rgba(244, 63, 94, 0.06) !important;
}

[data-theme="light"] .toggle-pass {
  color: #94a3b8 !important;
}

/* History modal */
[data-theme="light"] .h-modal-backdrop {
  background: rgba(15, 23, 42, 0.25) !important;
  backdrop-filter: blur(6px) !important;
}

[data-theme="light"] .h-modal {
  background: #fff !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .h-modal-header {
  border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .h-modal-title {
  color: #0f172a !important;
}

[data-theme="light"] .h-modal-sub {
  color: #64748b !important;
}

[data-theme="light"] .h-modal-close {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
  color: #64748b !important;
}

[data-theme="light"] .h-modal-search {
  border-bottom-color: rgba(0, 0, 0, 0.05) !important;
  background: #f8fafc !important;
}

[data-theme="light"] .h-search-input {
  background: #fff !important;
  border-color: rgba(0, 0, 0, 0.09) !important;
  color: #0f172a !important;
}

[data-theme="light"] .h-list {
  background: transparent !important;
}

[data-theme="light"] .h-item {
  background: #fff !important;
  border-color: rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .h-item:hover {
  background: #f8fafc !important;
}

[data-theme="light"] .h-item-addr {
  color: #0f172a !important;
}

[data-theme="light"] .h-item-meta,
[data-theme="light"] .h-item-credits {
  color: #64748b !important;
}

[data-theme="light"] .h-item-badge {
  background: rgba(99, 102, 241, 0.08) !important;
  color: #4f46e5 !important;
}

[data-theme="light"] .h-item-icon {
  background: rgba(99, 102, 241, 0.08) !important;
}

[data-theme="light"] .h-loading,
[data-theme="light"] .h-empty {
  color: #94a3b8 !important;
}

/* Buy Credits modal */
[data-theme="light"] .modal-overlay,
[data-theme="light"] .modal-backdrop {
  background: rgba(15, 23, 42, 0.25) !important;
  backdrop-filter: blur(6px) !important;
}

[data-theme="light"] .modal,
[data-theme="light"] .modal-box {
  background: #fff !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .modal-header,
[data-theme="light"] .modal-title {
  color: #0f172a !important;
  border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .credit-pkg {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
}

[data-theme="light"] .credit-pkg:hover {
  background: #f1f5f9 !important;
}

[data-theme="light"] .pkg-name,
[data-theme="light"] .pkg-qty {
  color: #0f172a !important;
}

[data-theme="light"] .pkg-unit {
  color: #64748b !important;
}

/* Theme toggle */
[data-theme="light"] #theme-toggle {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] #theme-toggle:hover {
  background: #fff !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}

/* Buy Credits Modal — light theme */
[data-theme="light"] .buy-credits-modal {
  background: #fff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .buy-credits-modal-header {
  border-bottom-color: rgba(0, 0, 0, 0.07) !important;
}

[data-theme="light"] .buy-credits-modal-footer {
  border-top-color: rgba(0, 0, 0, 0.07) !important;
}

[data-theme="light"] .buy-credit-card {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .buy-credit-card:hover {
  background: #f1f5f9 !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
}

[data-theme="light"] .buy-credit-card.selected {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2) !important;
}

[data-theme="light"] .b-card-name {
  color: #0f172a !important;
}

[data-theme="light"] .b-card-unit {
  color: #64748b !important;
}

/* ── Shadow Overrides ── */
[data-theme="light"] .preview-card {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .modal-content {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .floating-actions {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .btn-unblur {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15) !important;
}

[data-theme="light"] .action-btn {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .stat-card {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .btn-buy-credits {
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .history-table-wrap {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .credit-pkg {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

/* ── Modals: Support & Tutorial ── */
[data-theme="light"] .support-modal,
[data-theme="light"] .tut-modal {
  background: #fff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .support-modal h3,
[data-theme="light"] .tut-modal h2 {
  color: #0f172a !important;
}

[data-theme="light"] .support-modal-sub,
[data-theme="light"] .tut-modal p {
  color: #64748b !important;
}

[data-theme="light"] .support-modal-close {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #64748b !important;
}

[data-theme="light"] .support-modal-close:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .support-option {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
}

[data-theme="light"] .support-option:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
  background: #f1f5f9 !important;
}

[data-theme="light"] .support-option-text strong {
  color: #0f172a !important;
}

[data-theme="light"] .support-option-text span {
  color: #64748b !important;
}

.logo-imob {
  color: #eee;
}



.mz-ad-overlay {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mz-ad-overlay.mz-ad-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.mz-ad-card {
  width: 340px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05) inset, 0 0 20px rgba(99, 102, 241, 0.2);
  position: relative;
  overflow: hidden;
  color: #f1f5f9;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.mz-ad-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.mz-ad-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
}

.mz-ad-close:hover {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
}

.mz-ad-header {
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.mz-ad-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(14, 165, 233, 0.2));
  color: #818cf8;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  margin-bottom: 12px;
}

.mz-ad-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.3;
  background: linear-gradient(to right, #ffffff, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mz-ad-body {
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.mz-ad-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.mz-ad-text strong {
  color: #fff;
  font-weight: 700;
}

.mz-ad-subtext {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.4;
}

.mz-ad-subtext strong {
  color: #bae6fd;
}

.mz-ad-footer {
  position: relative;
  z-index: 1;
}

.mz-ad-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  text-decoration: none;
  padding: 12px 0;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.mz-ad-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
  filter: brightness(1.1);
}

@media (max-width: 480px) {
  .mz-ad-overlay {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }

  .mz-ad-card {
    width: 100%;
  }
}

/* ── Mobile Hamburger & Sidebar ──────────────────────── */

/* Hamburger button — hidden on desktop */
.btn-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-light);
  flex-shrink: 0;
}

.btn-hamburger:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  color: #818cf8;
}

/* Mobile sidebar overlay */
.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9990;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.open {
  display: block;
  opacity: 1;
}

/* Mobile sidebar panel */
.mobile-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(300px, 88vw);
  height: 100dvh;
  background: rgba(10, 18, 35, 0.97);
  backdrop-filter: blur(24px);
  border-left: 1px solid rgba(99, 102, 241, 0.2);
  z-index: 9991;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-sidebar.open {
  transform: translateX(0);
}

/* Sidebar header */
.mobile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.mobile-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.mobile-sidebar-brand .logo-text {
  font-size: 1.1rem;
}

.btn-sidebar-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.2s;
  font-size: 1.1rem;
}

.btn-sidebar-close:hover {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fb7185;
}

/* Sidebar user info strip */
.mobile-sidebar-user {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(99, 102, 241, 0.05);
  border-bottom: 1px solid var(--border);
}

.mobile-sidebar-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

/* Nav section */
.mobile-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 8px 6px;
  margin-top: 8px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 12px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--text);
}

.mobile-nav-link.active {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.3);
  color: #818cf8;
}

.mobile-nav-link.danger {
  color: #fb7185;
  background: rgba(244, 63, 94, 0.06);
  border-color: rgba(244, 63, 94, 0.15);
}

.mobile-nav-link.danger:hover {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
}

.mobile-nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  transition: all 0.2s;
}

.mobile-nav-link.active .mobile-nav-icon {
  background: rgba(99, 102, 241, 0.2);
}

.mobile-nav-link.danger .mobile-nav-icon {
  background: rgba(244, 63, 94, 0.1);
}

/* Sidebar footer */
.mobile-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Responsive: activate on mobile ─────────────────── */
@media (max-width: 768px) {

  /* Show hamburger */
  .btn-hamburger {
    display: flex;
  }

  /* Hide desktop nav */
  .topbar-nav {
    display: none !important;
  }

  /* Hide logout text label in topbar (keep as icon-only in sidebar) */
  .btn-logout .nav-label {
    display: none;
  }

  /* Hide logout button from topbar on mobile — it lives in sidebar */
  .topbar .btn-logout {
    display: none;
  }

  /* Tighter topbar on mobile */
  .topbar {
    padding: 0 16px;
    height: 58px;
  }

  /* Shrink credit-badge-group gap */
  .topbar-right {
    gap: 8px;
  }
}

/* ══════════════════════════════════════════════════
   Owner Details Modal — Premium Design
   ══════════════════════════════════════════════════ */

/* Backdrop */
.od-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 26, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.od-backdrop[style*="flex"] {
  display: flex;
}

/* Modal container */
.od-modal {
  background: linear-gradient(160deg, rgba(15, 23, 50, 0.98) 0%, rgba(8, 13, 30, 0.99) 100%);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 24px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: od-slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes od-slideUp {
  from {
    transform: translateY(30px) scale(0.96);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes od-fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ── Header ── */
.od-header {
  position: relative;
  background: linear-gradient(135deg,
      rgba(99, 102, 241, 0.18) 0%,
      rgba(59, 130, 246, 0.12) 50%,
      rgba(16, 185, 129, 0.07) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  flex-shrink: 0;
}

.od-header-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

/* Close btn */
.od-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 999999 !important;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}

.od-close-btn:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fb7185;
}

/* Header content row */
.od-header-content {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 24px 14px;
}

/* Avatar */
.od-avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.32), 0 8px 24px rgba(99, 102, 241, 0.28);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.od-header-info {
  flex: 1;
  min-width: 0;
}

.od-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.2;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.od-sub-name {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-bottom: 8px;
}

/* Badges */
.od-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.od-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.od-badge-owner {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
}

.od-badge-phones {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.od-badge-cpf {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

/* Stats strip */
.od-stats-strip {
  display: flex;
  margin: 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.od-stat-item {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.od-stat-item:last-child {
  border-right: none;
}

.od-stat-value {
  font-size: 1.25rem;
  font-weight: 900;
  color: #f1f5f9;
  line-height: 1;
  margin-bottom: 2px;
}

.od-stat-label {
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
  font-weight: 600;
}

/* Tabs */
.od-tabs {
  display: flex;
  padding: 0 18px;
  margin-top: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.od-tabs::-webkit-scrollbar {
  display: none;
}

.od-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 15px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.od-tab:hover {
  color: #94a3b8;
}

.od-tab.active {
  color: #818cf8;
  border-bottom-color: #6366f1;
}

/* ── Body ── */
.od-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.od-body::-webkit-scrollbar {
  width: 4px;
}

.od-body::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 2px;
}

/* Tab pane */
.od-pane {
  display: none;
  animation: od-fadeIn 0.18s ease;
}

.od-pane.active {
  display: block;
}

/* Section header */
.od-section-label {
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #64748b;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.od-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
}

/* ── Phone card ── */
.od-phone-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 14px;
  padding: 13px 15px;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.od-phone-card:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.32);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1);
}

.od-phone-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.od-phone-info {
  flex: 1;
  min-width: 0;
}

.od-phone-number {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.02em;
}

.od-phone-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.63rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  margin-top: 3px;
}

.od-phone-tag.whatsapp {
  background: rgba(37, 211, 102, 0.14);
  color: #34d399;
  border: 1px solid rgba(37, 211, 102, 0.28);
}

.od-phone-tag.celular {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.22);
}

.od-phone-tag.fixo {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.od-phone-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.od-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
}

.od-action-btn.wa {
  color: #25D366;
  border-color: rgba(37, 211, 102, 0.22);
  background: rgba(37, 211, 102, 0.06);
}

.od-action-btn.wa:hover {
  background: rgba(37, 211, 102, 0.16);
  border-color: rgba(37, 211, 102, 0.45);
  transform: scale(1.09);
}

.od-action-btn.call {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.22);
  background: rgba(96, 165, 250, 0.06);
}

.od-action-btn.call:hover {
  background: rgba(96, 165, 250, 0.16);
  border-color: rgba(96, 165, 250, 0.45);
  transform: scale(1.09);
}

/* ── Email card ── */
.od-email-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.od-email-card:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.28);
}

.od-email-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.od-email-text {
  font-size: 0.88rem;
  color: #f1f5f9;
  font-weight: 500;
  word-break: break-all;
}

/* ── Data rows (personal info) ── */
.od-data-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 4px 16px;
  margin-bottom: 16px;
}

.od-data-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  gap: 12px;
}

.od-data-row:last-child {
  border-bottom: none;
}

.od-data-label {
  font-size: 0.77rem;
  color: #64748b;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 110px;
}

.od-data-value {
  font-size: 0.87rem;
  font-weight: 700;
  color: #f1f5f9;
  text-align: right;
  word-break: break-all;
}

/* ── Address card ── */
.od-address-card {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-left: 3px solid #3b82f6;
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  line-height: 1.6;
  transition: all 0.2s;
}

.od-address-card:hover {
  background: rgba(59, 130, 246, 0.1);
}

.od-address-line {
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 2px;
}

.od-address-sub {
  font-size: 0.77rem;
  color: #94a3b8;
}

/* ── Empty state ── */
.od-empty {
  text-align: center;
  padding: 36px 16px;
  color: #64748b;
}

.od-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.od-empty-text {
  font-size: 0.87rem;
  line-height: 1.55;
}

/* ── Light mode ── */
[data-theme="light"] .od-backdrop {
  background: rgba(15, 23, 42, 0.55);
}

[data-theme="light"] .od-modal {
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(99, 102, 241, 0.14);
}

[data-theme="light"] .od-header {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.07) 0%, rgba(59, 130, 246, 0.05) 100%);
}

[data-theme="light"] .od-name {
  color: #0f172a;
}

[data-theme="light"] .od-data-value {
  color: #0f172a;
}

[data-theme="light"] .od-phone-number {
  color: #0f172a;
}

[data-theme="light"] .od-data-card {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .od-phone-card {
  background: rgba(16, 185, 129, 0.04);
}

[data-theme="light"] .od-address-card {
  background: rgba(59, 130, 246, 0.03);
}

[data-theme="light"] .od-email-card {
  background: rgba(99, 102, 241, 0.03);
}

[data-theme="light"] .od-stat-value {
  color: #0f172a;
}

[data-theme="light"] .od-close-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #475569;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .od-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .od-modal {
    border-radius: 20px 20px 0 0;
    max-height: 93vh;
  }

  .od-avatar {
    width: 52px;
    height: 52px;
    font-size: 1.15rem;
  }

  .od-name {
    font-size: 1rem;
  }

  .od-header-content {
    padding: 18px 16px 12px;
    gap: 12px;
  }

  .od-stats-strip {
    margin: 0 16px;
  }

  .od-tabs {
    padding: 0 10px;
  }

  .od-tab {
    padding: 8px 11px;
    font-size: 0.73rem;
  }

  .od-body {
    padding: 16px;
  }

  .od-phone-number {
    font-size: 0.92rem;
  }
}

/* ── FAB: Meus Imóveis ──────────────────────────────── */
.fab-imoveis {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(99, 102, 241, .45), 0 0 0 0 rgba(99, 102, 241, .3);
  transition: all .3s cubic-bezier(.16, 1, .3, 1);
  animation: fabPulse 3s ease-in-out infinite;
}

.fab-imoveis:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 36px rgba(99, 102, 241, .55);
  animation: none;
}

@keyframes fabPulse {

  0%,
  100% {
    box-shadow: 0 8px 28px rgba(99, 102, 241, .45), 0 0 0 0 rgba(99, 102, 241, .3);
  }

  50% {
    box-shadow: 0 8px 28px rgba(99, 102, 241, .45), 0 0 0 8px rgba(99, 102, 241, 0);
  }
}

/* ── Property Manager Modal ──────────────────────────── */
.imoveis-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.imoveis-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  animation: fadeSlideIn .35s ease;
}

.imoveis-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.imoveis-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.imoveis-modal-body::-webkit-scrollbar {
  width: 6px;
}

.imoveis-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.imoveis-modal-body::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 6px;
}

.imoveis-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.6);
}

/* Profile Section */
.imoveis-profile-section {
  background: rgba(99, 102, 241, .04);
  border: 1px solid rgba(99, 102, 241, .15);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
}

/* Fields */
.im-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.im-field label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.im-field input,
.im-field select,
.im-field textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(6, 12, 26, .6);
  border: 1.5px solid rgba(255, 255, 255, .07);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color .2s;
}

.im-field input:focus,
.im-field select:focus,
.im-field textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, .5);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}

.im-field-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Buttons */
.im-btn-save {
  padding: 10px 20px;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(99, 102, 241, .3);
}

.im-btn-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, .4);
}

.im-btn-save:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.im-btn-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(16, 185, 129, .3);
}

.im-btn-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, .4);
}

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

.im-prop-card {
  background: rgba(6, 12, 26, .5);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all .25s ease;
  position: relative;
}

.im-prop-card:hover {
  border-color: rgba(99, 102, 241, .3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

.im-prop-thumb {
  height: 140px;
  overflow: hidden;
  background: rgba(255, 255, 255, .03);
  position: relative;
}

.im-prop-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.im-prop-card:hover .im-prop-thumb img {
  transform: scale(1.05);
}

.im-prop-thumb .im-no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
}

.im-prop-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  backdrop-filter: blur(6px);
}

.im-badge-sale {
  background: rgba(99, 102, 241, .85);
  color: #fff;
}

.im-badge-rent {
  background: rgba(245, 158, 11, .85);
  color: #fff;
}

.im-prop-status {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.im-status-public {
  background: rgba(16, 185, 129, .2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, .3);
}

.im-status-private {
  background: rgba(244, 63, 94, .1);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, .2);
}

.im-prop-info {
  padding: 14px;
}

.im-prop-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: -webkit-box;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.im-prop-price {
  font-size: .95rem;
  font-weight: 800;
  color: #818cf8;
  margin-bottom: 10px;
}

.im-prop-actions {
  display: flex;
  gap: 6px;
}

.im-prop-actions button {
  flex: 1;
  padding: 7px;
  border-radius: 8px;
  font-size: .72rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-light);
  transition: all .2s;
}

.im-prop-actions button:hover {
  border-color: rgba(99, 102, 241, .4);
  color: var(--text);
  background: rgba(99, 102, 241, .08);
}

.im-prop-actions button.im-btn-delete:hover {
  border-color: rgba(244, 63, 94, .4);
  color: #fb7185;
  background: rgba(244, 63, 94, .08);
}

/* Form Layout */
.im-form-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}

.im-form-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.im-form-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.im-card {
  background: rgba(6, 12, 26, .4);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.im-card-title {
  font-size: .78rem;
  font-weight: 800;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 14px;
}

/* Tags */
.im-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1.5px solid rgba(255, 255, 255, .07);
  border-radius: 10px;
  min-height: 40px;
  cursor: text;
  background: rgba(6, 12, 26, .6);
  transition: border-color .2s;
}

.im-tags-wrap:focus-within {
  border-color: rgba(99, 102, 241, .5);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}

.im-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99, 102, 241, .15);
  color: #818cf8;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
}

.im-tag button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  font-family: inherit;
}

.im-tag-input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: .8rem !important;
  flex: 1;
  min-width: 100px;
  padding: 4px 0 !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

/* Upload Zone */
.im-upload-zone {
  border: 2px dashed rgba(255, 255, 255, .1);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}

.im-upload-zone:hover,
.im-upload-zone.drag {
  border-color: rgba(99, 102, 241, .5);
  background: rgba(99, 102, 241, .05);
}

/* Photo Grid */
.im-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.im-photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: grab;
}

.im-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.im-photo-thumb .im-remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  opacity: 0;
  transition: opacity .2s;
}

.im-photo-thumb:hover .im-remove-photo {
  opacity: 1;
}

.im-photo-thumb .im-cover-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(99, 102, 241, .9);
  color: #fff;
  font-size: 8px;
  text-align: center;
  padding: 2px;
  font-weight: 800;
  letter-spacing: .04em;
}

.sortable-ghost {
  opacity: .4;
}

@media (max-width: 768px) {
  .fab-imoveis {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .imoveis-modal-backdrop {
    padding: 0;
  }

  .imoveis-modal {
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

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

  .imoveis-profile-section>div:first-of-type[style] {
    grid-template-columns: 1fr !important;
  }
}

/* ══════════════════════════════════════════════════
   Data Stone Search Modal — Responsive Design
   ══════════════════════════════════════════════════ */

/* Trigger button inside search-card-title */
.ds-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.79rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.28);
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.ds-trigger-btn:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.ds-trigger-btn svg {
  flex-shrink: 0;
}

/* Modal header content */
.ds-modal-header-inner {
  padding: 20px 22px 16px;
  position: relative;
  z-index: 10;
}

.ds-modal-title {
  margin: 0 0 4px 0;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ds-modal-subtitle {
  margin: 0 0 16px 0;
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.4;
}

/* PF / PJ tabs inside Data Stone modal */
.ds-tabs-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.ds-tab-btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
}

/* Search row */
.ds-search-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.ds-search-row .input-wrap {
  flex: 1;
  min-width: 0;
}

.ds-search-row .btn-search {
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Results list */
.ds-results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Individual result card */
.ds-result-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}

.ds-result-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
}

.ds-result-info {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.ds-result-name {
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
}

.ds-result-doc {
  font-size: 0.8rem;
  color: var(--text-light);
  font-family: monospace;
  letter-spacing: 0.03em;
}

.ds-details-btn {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transition: all 0.2s;
  font-family: inherit;
}

.ds-details-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
}

/* Detail view — action buttons row */
.ds-action-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.ds-action-row button {
  flex: 1;
  min-width: 130px;
  justify-content: center;
}

/* ── Mobile overrides ── */
@media (max-width: 600px) {
  /* Trigger button: full width on small screens */
  .search-card-title-wrap {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
  }

  .ds-trigger-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
    padding: 10px 14px;
    border-radius: 10px;
  }

  /* Data Stone modal: full screen slide-up */
  #datastone-modal.od-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  #datastone-modal .od-modal {
    border-radius: 20px 20px 0 0;
    max-height: 96dvh;
    max-width: 100%;
  }

  /* Compact header */
  .ds-modal-header-inner {
    padding: 16px 16px 12px;
  }

  .ds-modal-title {
    font-size: 1rem;
    padding-right: 36px; /* room for close button */
  }

  .ds-modal-subtitle {
    font-size: 0.78rem;
    margin-bottom: 12px;
  }

  /* Tabs: equal, compact */
  .ds-tabs-row {
    gap: 6px;
    margin-bottom: 10px;
  }

  .ds-tab-btn {
    padding: 9px 8px;
    font-size: 0.8rem;
    border-radius: 8px;
  }

  /* Search: stack on very small */
  .ds-search-row {
    flex-wrap: wrap;
  }

  .ds-search-row .input-wrap {
    flex: 1 1 100%;
  }

  .ds-search-row .btn-search {
    flex: 1 1 100%;
    padding: 12px;
    border-radius: 10px;
    justify-content: center;
  }

  /* Results body padding */
  #ds-results-container.od-body {
    padding: 14px 12px;
  }

  /* Result card: stack on very small */
  .ds-result-card {
    flex-wrap: wrap;
    gap: 10px;
  }

  .ds-result-info {
    flex: 1 1 100%;
  }

  .ds-details-btn {
    width: 100%;
    padding: 10px;
    font-size: 0.85rem;
    text-align: center;
  }

  /* Detail action buttons: stack */
  .ds-action-row {
    flex-direction: column;
    gap: 8px;
  }

  .ds-action-row button {
    min-width: 0;
    width: 100%;
  }

  /* General info grid in detail: single col */
  .ds-detail-grid-2col {
    grid-template-columns: 1fr !important;
  }

  /* Phone WhatsApp link: bigger tap target */
  .ds-wa-link {
    padding: 8px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
  }
}