:root {
  --bg-base: #09090b;
  --bg-elevated: #111113;
  --bg-surface: #18181b;
  --bg-hover: #27272a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --accent-border: rgba(16, 185, 129, 0.35);
  --purple: #8b5cf6;
  --purple-soft: rgba(139, 92, 246, 0.15);
  --sidebar-w: 260px;
  --header-h: 64px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.35);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }

/* ===== LOGIN ===== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(16, 185, 129, 0.15), transparent),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139, 92, 246, 0.12), transparent),
    var(--bg-base);
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.login-logo {
  display: none;
}

.login-card h1 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.lang-card { max-width: 420px; }
.lang-picker-head { text-align: center; margin-bottom: 1.25rem; }
.lang-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.lang-option {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  padding: 1rem 0.75rem; border: 2px solid var(--border); border-radius: 12px;
  background: var(--bg-elevated); color: var(--text); cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.lang-option:hover { border-color: var(--accent-border); }
.lang-option.active { border-color: var(--accent); background: var(--accent-soft); }
.lang-flag { font-size: 1.75rem; line-height: 1; }
.lang-option strong { font-size: 0.95rem; }
.lang-option span:last-child { font-size: 0.75rem; color: var(--text-muted); }
.lang-switcher {
  width: 100%; margin-bottom: 0.5rem; padding: 0.35rem 0.5rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-surface); color: var(--text); font-size: 0.8rem;
}
.lang-switch-wrap { text-align: center; margin-top: 0.75rem; }
.subtitle { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.15rem; }
.error-msg { color: #f87171; font-size: 0.85rem; margin-top: 0.8rem; text-align: center; }
.success-msg { color: var(--accent); font-size: 0.85rem; margin-top: 0.8rem; text-align: center; }

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input { padding-right: 44px; }

.btn-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  line-height: 0;
  color: var(--text-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.btn-eye:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.btn-eye svg {
  width: 18px;
  height: 18px;
  display: block;
}

.forgot-wrap { text-align: center; margin-top: 1rem; }

.forgot-link {
  color: var(--accent);
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover { text-decoration: underline; }

/* ===== APP SHELL ===== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.75rem 0.75rem 0.35rem;
}

.nav-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.65rem 0.75rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nav-section-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.nav-section-toggle[aria-expanded="true"] {
  color: var(--accent);
}

.nav-section-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  opacity: 0.7;
}

.nav-section-toggle[aria-expanded="true"] .nav-section-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-subgroup {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  overflow: hidden;
  max-height: 280px;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  opacity: 1;
}

.nav-subgroup.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.nav-sub-link {
  padding-left: 1.35rem;
  font-size: 0.84rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.sidebar-link:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.sidebar-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

.sidebar-link.active .nav-icon { opacity: 1; }

.nav-badge {
  margin-left: auto;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--purple-soft);
  color: #c4b5fd;
  letter-spacing: 0.03em;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  border-radius: 10px;
  background: var(--bg-surface);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

.user-meta { min-width: 0; }
.user-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role { font-size: 0.7rem; color: var(--text-muted); }

.sidebar-logout { width: 100%; justify-content: center; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 150;
  backdrop-filter: blur(2px);
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.sidebar-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.sidebar-toggle svg { width: 18px; height: 18px; }

.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.header-breadcrumb span:last-child {
  color: var(--text);
  font-weight: 600;
}

.bc-chevron { width: 14px; height: 14px; opacity: 0.5; }

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.header-notif-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
}

.header-notif-btn svg { width: 1.1rem; height: 1.1rem; }
.header-notif-btn:hover { color: var(--text); border-color: var(--accent-border); }

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.credits-alert-banner {
  margin: 0 1.5rem 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.credits-alert-banner.low {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.credits-alert-banner.warning {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fcd34d;
}

.credits-alert-banner.critical,
.credits-alert-banner.exhausted {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.credits-alert-banner strong { color: #fff; }

.billing-alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
}
.billing-alert-banner.overdue {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.billing-alert-banner.due-today {
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: #fdba74;
}
.billing-alert-banner.due-soon {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #fde047;
}
.billing-alert-banner.hidden { display: none; }
.billing-alert-banner strong { color: #fff; }

.owner-notif-panel {
  position: fixed;
  top: 4.25rem;
  right: 1rem;
  width: min(360px, calc(100vw - 2rem));
  max-height: 420px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.owner-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.owner-notifications-list {
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.owner-notif-item {
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.owner-notif-item.unread {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.06);
}

.owner-notif-item strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.owner-notif-item p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.owner-notif-meta {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.header-site-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.35rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.chip-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.header-site-chip strong {
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-chip {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.plan-chip.premium {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.plan-chip.remarketing {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.plan-chip.plan-plus {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.plan-chip.plan-master {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.remarketing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.remarketing-prospects-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.remarketing-prospect-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-bg, #1a1d27);
  border: 1px solid var(--border, #2d3148);
  border-radius: 12px;
  flex-wrap: wrap;
}

.remarketing-prospect-main { flex: 1; min-width: 220px; }

.remarketing-prospect-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.remarketing-prospect-meta,
.remarketing-prospect-dates {
  font-size: 0.82rem;
  color: var(--text-muted, #718096);
  margin-top: 0.25rem;
}

.remarketing-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.signal-pill {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.25);
  color: #5eead4;
}

.interest-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.interest-high { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.interest-medium { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
.interest-low { background: rgba(107, 114, 128, 0.2); color: #d1d5db; border: 1px solid rgba(107, 114, 128, 0.3); }

.remarketing-table { width: 100%; font-size: 0.85rem; }
.remarketing-table th { text-align: left; color: var(--text-muted, #718096); font-size: 0.75rem; }

.free-plan-banner {
  margin: 0 1.5rem 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  line-height: 1.45;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.header-account-wrap {
  position: relative;
}

.header-account-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.header-account-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--accent-border);
}

.header-account-btn.active,
.header-account-btn[aria-expanded="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.header-account-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.header-account-chevron {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.header-account-btn[aria-expanded="true"] .header-account-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.header-account-dropdown {
  position: fixed;
  top: calc(var(--header-h) + 0.35rem);
  right: 1.75rem;
  min-width: 210px;
  padding: 0.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.account-menu-overlay {
  display: none;
}

body.account-menu-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .account-menu-overlay:not(.hidden) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 240;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
}

.header-account-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.header-account-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.header-account-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.pulse-dot-sm {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: ca-pulse 2s infinite;
  flex-shrink: 0;
}

.content {
  flex: 1;
  padding: 1.75rem;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

/* Legacy compat — remove old fixed header spacing */
.fixed-header { display: none; }
#dashboard-screen .content { padding-top: 1.75rem; }

.badge {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.view-panel { animation: fadeIn 0.25s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-title { margin-bottom: 1.75rem; }
.page-title h1 {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}
.page-title p { color: var(--text-muted); font-size: 0.9rem; }

.loading-text, .placeholder-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem;
}

@media (max-width: 1024px) {
  .header-site-chip { display: none; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay:not(.hidden) {
    display: block;
  }
  .app-main { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .status-pill span:not(.pulse-dot-sm) { display: none; }
}

/* Rastreamento Web */
.tracking-active-banner {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  background: #05966922;
  border: 1px solid #05966955;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  color: #34d399;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: #34d399;
  border-radius: 50%;
  animation: ca-pulse 2s infinite;
  flex-shrink: 0;
}

.tracking-bars { display: flex; flex-direction: column; gap: 0.6rem; }

.track-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 36px;
  align-items: center;
  gap: 0.6rem;
}

.track-bar-label { font-size: 0.8rem; color: #9ca3af; }
.track-bar-count { font-size: 0.85rem; font-weight: 700; color: #34d399; text-align: right; }

.track-bar {
  height: 8px;
  background: #1f2937;
  border-radius: 4px;
  overflow: hidden;
}

.track-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #059669, #34d399);
  border-radius: 4px;
}

.tracking-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tracking-city-chip {
  background: #0a0e1a;
  border: 1px solid #1f2937;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.tracking-city-chip span { color: var(--accent); font-weight: 600; }

.source-name-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.source-name-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.source-name-chip.portal {
  border-color: rgba(96, 165, 250, 0.35);
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
}

.source-name-chip.search_engine {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.1);
}

.source-engines { margin-bottom: 1rem; }

.top-portals-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.top-portal-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.top-portal-rank {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
  text-align: center;
}

.top-portal-info { min-width: 0; }

.top-portal-name {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.top-portal-bar {
  height: 6px;
  background: var(--bg-hover);
  border-radius: 999px;
  overflow: hidden;
}

.top-portal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #059669, var(--accent));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.top-portal-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  text-align: right;
}

.top-portal-count small {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

.tracking-recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 480px;
  overflow-y: auto;
}

.track-card {
  background: #0a0e1a;
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 0.9rem 1rem;
}

.track-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.track-source {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.track-source.portal { background: #3b82f633; color: #60a5fa; }
.track-source.search_engine { background: #f59e0b33; color: #fbbf24; }

.track-added {
  font-size: 0.7rem;
  color: #34d399;
  font-weight: 700;
}

.track-query {
  font-size: 0.9rem;
  color: #e2e8f0;
  font-style: italic;
  margin-bottom: 0.4rem;
}

.track-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.75rem;
  color: #6b7280;
}

@keyframes ca-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
}

/* ===== COMPONENTS (cards, stats, hero) ===== */
.counter-hero {
  text-align: center;
  padding: 2.5rem 2rem;
  background: linear-gradient(145deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.counter-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-border), transparent);
}

.counter-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.counter-value {
  font-size: 3.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #34d399, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  transition: transform 0.3s;
}

.counter-value.bump { transform: scale(1.04); }

.counter-max {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.progress-bar {
  height: 6px;
  background: var(--bg-hover);
  border-radius: 999px;
  margin: 1.25rem auto 0;
  max-width: 360px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #059669, var(--accent));
  border-radius: 999px;
  transition: width 0.8s ease;
  width: 0;
}

.progress-fill.warning {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.progress-fill.critical,
.progress-fill.exhausted {
  background: linear-gradient(90deg, #dc2626, #f87171);
}

.status-msg {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #fbbf24;
  font-weight: 500;
}

.dispatch-status {
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  font-size: 1.35rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-radius: 10px;
  flex-shrink: 0;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.25rem;
  letter-spacing: -0.02em;
}
.stat-value.small { font-size: 0.9rem; font-weight: 600; }

.section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
}

.section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}
.section-desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; line-height: 1.5; }

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .counter-value { font-size: 2.75rem; }
}

/* Chart */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding-top: 1rem;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chart-bar {
  width: 100%;
  max-width: 40px;
  background: linear-gradient(180deg, #34d399, #059669);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.5s;
}

.chart-bar-label {
  font-size: 0.65rem;
  color: #6b7280;
}

.chart-bar-value {
  font-size: 0.7rem;
  color: #9ca3af;
  font-weight: 600;
}

/* Embed */
.embed-box {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  background: #0a0e1a;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 1rem;
}

.embed-box code {
  flex: 1;
  font-size: 0.8rem;
  color: #34d399;
  word-break: break-all;
  line-height: 1.6;
}

/* Forms & Buttons */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input, .password-wrap input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.password-wrap input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  background: #0a0e1a;
  border: 1px solid #1f2937;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

/* SEO Premium */
.seo-load-error {
  display: block;
  text-align: left;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: var(--radius);
}

.seo-load-error.hidden { display: none !important; }

.seo-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.seo-premium-badge {
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.premium-tag {
  display: inline-block;
  background: rgba(167, 139, 250, 0.2);
  color: #c4b5fd;
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.3rem;
  vertical-align: middle;
  font-weight: 600;
}

.seo-top-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.seo-top-grid-premium { grid-template-columns: 240px 1fr; }

.seo-preview-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.seo-score-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

.seo-categories {
  margin-top: 1rem;
  text-align: left;
}

.seo-cat-row {
  display: grid;
  grid-template-columns: 80px 1fr 32px;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: #9ca3af;
  margin-bottom: 0.35rem;
}

.seo-cat-bar {
  height: 4px;
  background: #1f2937;
  border-radius: 2px;
  overflow: hidden;
}

.seo-cat-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #34d399);
  border-radius: 2px;
}

.seo-insights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.seo-insights li {
  padding: 0.65rem 1rem;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.12), transparent);
  border-left: 3px solid #7c3aed;
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.seo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #1f2937;
}

.seo-tab {
  padding: 0.5rem 1rem;
  background: #0a0e1a;
  border: 1px solid #1f2937;
  border-radius: 8px;
  color: #9ca3af;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.seo-tab:hover { border-color: #7c3aed; color: #e2e8f0; }

.seo-tab.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(167, 139, 250, 0.1));
  border-color: #7c3aed;
  color: #c4b5fd;
  font-weight: 600;
}

.seo-tab-panel { animation: seoFadeIn 0.25s ease; }

@keyframes seoFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.seo-faq-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1rem; }

.seo-faq-item {
  background: #0a0e1a;
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 1rem;
}

.integration-status-wrap {
  margin-bottom: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}

.integration-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.integration-level {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.integration-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.integration-badge.ready { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.integration-badge.pending { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }

.integration-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.integration-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
}

.integration-card.ok { border-color: rgba(52, 211, 153, 0.35); }
.integration-card.pending { border-color: rgba(251, 191, 36, 0.25); }

.integration-card-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
}

.integration-card-head strong { flex: 1; }

.integration-status {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.integration-id {
  font-size: 0.78rem;
  margin: 0 0 0.5rem;
  color: var(--text-muted);
}

.integration-id code { color: #68d391; font-size: 0.75rem; word-break: break-all; }

.integration-meta { font-size: 0.78rem; color: var(--text-muted); margin: 0 0 0.5rem; }

.integration-steps {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.integration-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.integration-checklist li {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.integration-checklist li.ok { color: #34d399; }
.integration-checklist li.pending { color: #9ca3af; }

.faq-rich-preview {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #0a0e1a;
  border: 1px solid #1f2937;
  border-radius: 10px;
}

.faq-rich-preview h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.faq-google-preview {
  border: 1px solid #2d3148;
  border-radius: 8px;
  overflow: hidden;
}

.faq-preview-item {
  border-bottom: 1px solid #2d3148;
}

.faq-preview-item:last-child { border-bottom: none; }

.faq-preview-item summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: #8ab4f8;
  list-style: none;
}

.faq-preview-item summary::-webkit-details-marker { display: none; }

.faq-preview-item p {
  padding: 0 1rem 0.85rem;
  font-size: 0.82rem;
  color: #bdc1c6;
  line-height: 1.55;
  margin: 0;
}

.faq-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.code-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  width: 100%;
  padding: 0.75rem;
  background: #0a0e1a;
  border: 1px solid #1f2937;
  border-radius: 8px;
  color: #93c5fd;
  resize: vertical;
}

.seo-form-actions {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #1f2937;
}

.embed-box-tall code {
  max-height: 400px;
  overflow-y: auto;
  display: block;
}

.social-preview {
  display: flex;
  background: #1a1a2e;
  border-radius: 8px;
  overflow: hidden;
  max-width: 480px;
  border: 1px solid #2d3748;
}

.sp-image {
  width: 120px;
  min-height: 100px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #64748b;
  text-align: center;
  padding: 0.5rem;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.sp-image.has-image { color: transparent; }

.sp-body { padding: 0.75rem 1rem; min-width: 0; }

.sp-site {
  font-size: 0.7rem;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.sp-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #f1f5f9;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.counter-ok { color: #34d399 !important; }
.counter-warn { color: #fbbf24 !important; }

.seo-score-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  margin: 0 auto 0.5rem;
  color: #34d399;
}

.seo-score-label { font-weight: 700; font-size: 1.1rem; }
.seo-score-desc { color: #6b7280; font-size: 0.8rem; margin-top: 0.3rem; }

.google-preview {
  background: #fff;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  max-width: 600px;
}

.gp-url { color: #202124; font-size: 0.8rem; margin-bottom: 2px; }
.gp-title { color: #1a0dab; font-size: 1.15rem; margin-bottom: 4px; line-height: 1.3; }
.gp-desc { color: #4d5156; font-size: 0.85rem; line-height: 1.5; }

.seo-checklist {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.seo-checklist li {
  font-size: 0.85rem;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  background: #0a0e1a;
}

.seo-checklist li.ok { color: #34d399; }
.seo-checklist li.fail { color: #9ca3af; }

.seo-form .section { margin-bottom: 1rem; }
.seo-form small { color: #6b7280; font-size: 0.75rem; }

@media (max-width: 768px) {
  .seo-top-grid, .seo-top-grid-premium { grid-template-columns: 1fr; }
  .seo-checklist { grid-template-columns: 1fr; }
  .seo-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .form-row { grid-template-columns: 1fr; }
}

.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: #0a0e1a;
  border: 1px solid #1f2937;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.95rem;
  outline: none;
}

.form-group select:focus { border-color: #34d399; }

/* Perfil */
.profile-grid { max-width: 600px; }

.profile-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.financial-layout { margin-top: 0.5rem; }

.profile-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.profile-card.section {
  padding: 0;
}

.profile-card.section > h3,
.profile-card-title {
  margin: 0;
  padding: 1rem 1.5rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.profile-card .placeholder-text {
  padding: 1rem 1.5rem 1.25rem;
  margin: 0;
}

.pay-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.pay-badge.paid { background: #05966933; color: #34d399; }
.pay-badge.pending { background: #6b728033; color: #9ca3af; }
.pay-badge.overdue { background: #dc262633; color: #f87171; }
.pay-badge.due-today { background: #d9770633; color: #fbbf24; }
.pay-badge.due-soon { background: #2563eb33; color: #60a5fa; }

.financial-charges-table { margin-top: 0.5rem; }
.financial-charges-table td,
.financial-charges-table th { white-space: nowrap; }
.financial-charges-table td:nth-child(2) { white-space: normal; min-width: 140px; }

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.profile-row:last-child { border-bottom: none; }

.profile-label { color: #6b7280; font-size: 0.85rem; flex-shrink: 0; }
.profile-value { font-weight: 600; text-align: right; word-break: break-word; }
.profile-value.highlight { color: #34d399; }
.profile-value.mono { font-family: monospace; font-size: 0.8rem; color: #9ca3af; }

.profile-tag {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-active { background: #05966933; color: #34d399; }
.tag-inactive { background: #dc262633; color: #f87171; }

/* Localidades */
.loc-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.loc-tab {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.loc-tab:hover { border-color: var(--border-strong); color: var(--text); }
.loc-tab.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
}

.loc-panel { animation: fadeIn 0.2s ease; }

.source-tag {
  background: #1f2937;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  color: #9ca3af;
}

.info-box {
  background: #0a0e1a;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.info-box strong { display: block; margin-bottom: 0.4rem; color: #fbbf24; }
.info-box p { color: #6b7280; font-size: 0.85rem; line-height: 1.5; }
.info-box code { color: #34d399; font-size: 0.8rem; }

.google-selected {
  margin-top: 1rem;
  padding: 1rem;
  background: #0a0e1a;
  border: 1px solid #1f2937;
  border-radius: 8px;
}

.google-place-name { font-weight: 700; margin-bottom: 0.3rem; }
.google-place-address { color: #6b7280; font-size: 0.85rem; margin-bottom: 1rem; }

/* IPs */
.ips-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ip-suggestions-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.ip-card {
  background: #0a0e1a;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 1rem;
  transition: border-color 0.2s;
}

.ip-card.ip-highlight {
  border-color: #34d39955;
  box-shadow: 0 0 0 1px #34d39922;
}

.ip-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.ip-address {
  font-family: monospace;
  font-weight: 700;
  font-size: 1rem;
  color: #e2e8f0;
}

.ip-badge {
  background: #05966933;
  color: #34d399;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.ip-match-badge {
  background: #fbbf2433;
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.ip-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ip-detail span {
  display: block;
  color: #6b7280;
  font-size: 0.7rem;
}

.ip-detail strong {
  font-size: 0.85rem;
  font-weight: 600;
}

.locality-visitors {
  color: #34d399;
  font-size: 0.9rem;
  font-weight: 700;
}

.distribution-list { display: flex; flex-direction: column; gap: 0.8rem; }

.ip-tag {
  display: inline-block;
  background: #1e293b;
  color: #93c5fd;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 0.1rem 0.2rem 0.1rem 0;
}

.dist-ips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.dist-ips-more {
  color: #64748b;
  font-size: 0.75rem;
  align-self: center;
}

.ips-cell {
  max-width: 220px;
}

.ips-cell-bairro {
  max-width: none;
  min-width: 280px;
}

.ips-cell-bairro .ip-tag {
  margin: 0.1rem 0.2rem 0.1rem 0;
}

.visitors-list {
  overflow-x: auto;
}

.visitors-table-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.visitors-table-wrap:not(.is-expanded) .visitors-rows-more {
  display: none;
}

.visitors-toggle-btn {
  align-self: flex-start;
  margin-top: 0.15rem;
}

.visitors-table code.ip-tag {
  white-space: nowrap;
}

.ad-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
}

.ad-channel-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ad-channel-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.ad-channel-body {
  flex: 1;
  min-width: 0;
}

.ad-channel-body strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.ad-channel-bar {
  height: 4px;
  background: var(--bg-hover);
  border-radius: 999px;
  overflow: hidden;
}

.ad-channel-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 999px;
}

.ad-channel-count {
  font-weight: 700;
  font-size: 1rem;
  color: #a78bfa;
  flex-shrink: 0;
}

.ad-channel-tag {
  display: inline-block;
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.profile-stats-col h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.profile-bars {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.profile-bar-row {
  display: grid;
  grid-template-columns: 1fr minmax(80px, 140px) auto;
  align-items: center;
  gap: 0.65rem;
}

.profile-bar-label {
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-bar {
  height: 6px;
  background: var(--bg-hover);
  border-radius: 999px;
  overflow: hidden;
}

.profile-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ec4899, #6366f1);
  border-radius: 999px;
}

.profile-bar-count {
  font-weight: 700;
  font-size: 0.85rem;
  color: #a78bfa;
  min-width: 1.5rem;
  text-align: right;
}

.profile-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.profile-tag-f {
  background: rgba(236, 72, 153, 0.15);
  color: #f9a8d4;
}

.profile-tag-m {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.profile-tag-age {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
}

.dist-item {
  background: #0a0e1a;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 0.8rem 1rem;
}

.dist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.dist-header strong { font-size: 0.9rem; }
.dist-count { color: #34d399; font-weight: 700; font-size: 0.95rem; }
.dist-count small { color: #6b7280; font-weight: 400; }

.dist-bar {
  height: 6px;
  background: #1f2937;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.dist-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #059669, #34d399);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.dist-meta { color: #6b7280; font-size: 0.75rem; }

.localities-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.cities-list {
  max-height: 320px;
  overflow-y: auto;
  margin-top: 0.5rem;
  border: 1px solid #1f2937;
  border-radius: 8px;
  background: #0a0e1a;
}

.city-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  border-bottom: 1px solid #1f2937;
  color: #e2e8f0;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.city-item:last-child { border-bottom: none; }
.city-item:hover { background: #05966922; color: #34d399; }

.localities-list { display: flex; flex-direction: column; gap: 0.65rem; }

.locality-search-wrap {
  margin-bottom: 0.85rem;
}

.locality-search-input {
  width: 100%;
  padding: 0.75rem 0.9rem 0.75rem 2.5rem;
  border: 1px solid #1f2937;
  border-radius: 10px;
  background: #0a0e1a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E") no-repeat 0.85rem center;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.locality-search-input:focus {
  outline: none;
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.locality-search-mark {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  border-radius: 3px;
  padding: 0 0.1rem;
}

.locality-state-group {
  border: 1px solid #1f2937;
  border-radius: 10px;
  background: #0a0e1a;
  overflow: hidden;
}

.locality-state-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.locality-state-toggle:hover,
.locality-state-group.is-open .locality-state-toggle {
  background: rgba(16, 185, 129, 0.08);
}

.locality-state-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.locality-state-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e2e8f0;
}

.locality-state-count {
  font-size: 0.78rem;
  color: #6b7280;
}

.locality-state-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #9ca3af;
  transition: transform 0.2s ease;
}

.locality-state-group.is-open .locality-state-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.locality-state-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 0.65rem 0.65rem;
  border-top: 1px solid #1f2937;
}

.locality-state-body.hidden {
  display: none;
}

.locality-quota-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  font-size: 0.88rem;
}

.locality-quota-banner strong { color: #fff; }

.locality-launch {
  color: #cbd5e1;
  font-size: 0.82rem;
}

.locality-launch a {
  color: #60a5fa;
  word-break: break-all;
}

.locality-audience-group {
  margin-top: 0.25rem;
}

.locality-audience-block {
  margin-top: 0.75rem;
}

.locality-audience-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.locality-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.45rem;
}

.locality-check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #1f2937;
  border-radius: 8px;
  background: #0a0e1a;
  font-size: 0.82rem;
  color: #cbd5e1;
  cursor: pointer;
  min-height: 44px;
}

.locality-check-item input {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.locality-check-item:has(input:checked) {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
  color: #e2e8f0;
}

.locality-audience {
  display: block;
  color: #93c5fd;
  font-size: 0.8rem;
  line-height: 1.45;
}

.locality-audience strong {
  color: #bfdbfe;
  font-weight: 600;
}

.locality-audience--empty {
  color: #6b7280;
  font-style: italic;
}

.form-hint {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.locality-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 8px;
}

.locality-info { display: flex; flex-direction: column; gap: 2px; }
.locality-info strong { font-size: 0.95rem; }
.locality-detail { color: #34d399; font-size: 0.85rem; }
.locality-meta { color: #6b7280; font-size: 0.75rem; }

.btn-danger {
  background: #dc262633;
  color: #f87171;
  border: 1px solid #dc262655;
  flex-shrink: 0;
}

.btn-danger:hover { background: #dc262655; }

/* Relatórios */
.reports-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.report-stat {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
}

.report-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #34d399;
}

.report-stat-label {
  color: #6b7280;
  font-size: 0.75rem;
  margin-top: 4px;
}

.reports-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.report-table th {
  text-align: left;
  padding: 0.65rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.report-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.report-table tbody tr:hover td {
  background: var(--bg-surface);
}

.report-table tr:last-child td { border-bottom: none; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1rem;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 1rem; font-weight: 600; }

.btn-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal form { padding: 1.5rem; }

.modal-city-info {
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.radio-group { display: flex; gap: 1.5rem; }

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1rem;
}

.btn {
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-primary {
  background: linear-gradient(135deg, #059669, var(--accent));
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* Distribuição do Anúncio */
.distribution-status { margin-bottom: 1rem; }

.distribution-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.flow-step {
  position: relative;
  flex: 1 1 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  min-width: 0;
}

.flow-step-icon {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.flow-step-num {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.flow-step-title {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.flow-step-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.flow-arrow {
  display: none;
}

.distribution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}

.distribution-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.distribution-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.distribution-card-icon { font-size: 1.4rem; line-height: 1; }

.distribution-card-count {
  display: block;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.15rem;
}

.distribution-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.distribution-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.distribution-tag {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.distribution-tag.portal { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }

.distribution-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 320px;
  overflow-y: auto;
}

.distribution-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-elevated);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.distribution-list-name { color: var(--text); font-weight: 500; }

.distribution-list-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.distribution-summary { display: flex; flex-direction: column; gap: 1rem; }

.distribution-schedule-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.distribution-schedule-box strong { color: var(--text); }

.visibility-wrap { display: flex; flex-direction: column; gap: 1.25rem; }

.visibility-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.visibility-score-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.visibility-score-card p {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.visibility-score-badge {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.visibility-score-badge.google { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.visibility-score-badge.social { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.visibility-score-badge.overall { background: rgba(5, 150, 105, 0.15); color: #34d399; border: 1px solid rgba(5, 150, 105, 0.3); }

.visibility-level {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.1rem;
}

.visibility-previews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.visibility-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.visibility-preview-card h4 {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.visibility-checklist {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.visibility-checklist.compact { margin-top: 0.5rem; }

.visibility-check {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.visibility-check.ok { color: #34d399; }
.visibility-check.pending { color: #9ca3af; }

.visibility-check-icon { flex-shrink: 0; width: 1rem; }

.visibility-platforms h4 {
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
}

.visibility-platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
}

.visibility-platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.visibility-platform-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.visibility-platform-head strong { flex: 1; font-size: 0.85rem; }

.visibility-pct { font-size: 0.8rem; font-weight: 700; }

.visibility-platform-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.visibility-tip {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  padding: 0.75rem 1rem;
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: 8px;
}

/* Motor de Visibilidade */
.visibility-engine-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.visibility-engine-score {
  text-align: center;
  min-width: 120px;
}

.visibility-engine-score-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.visibility-engine-score-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.visibility-engine-hero-text h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.visibility-engine-hero-text p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.visibility-engine-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.visibility-engine-stat {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
}

.visibility-engine-stat strong { color: var(--text); }

.visibility-engine-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.visibility-engine-step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  position: relative;
}

.visibility-engine-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 1.45rem;
  top: 3.2rem;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.visibility-engine-step-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  position: relative;
  z-index: 1;
}

.visibility-engine-step.status-active .visibility-engine-step-icon {
  border-color: #34d399;
  background: rgba(5, 150, 105, 0.15);
}

.visibility-engine-step.status-partial .visibility-engine-step-icon {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
}

.visibility-engine-step.status-pending .visibility-engine-step-icon {
  opacity: 0.7;
}

.visibility-engine-step-body {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}

.visibility-engine-step-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.visibility-engine-step-head h4 {
  margin: 0;
  font-size: 0.95rem;
}

.visibility-engine-step-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.visibility-engine-step-badge.active { background: rgba(5, 150, 105, 0.15); color: #34d399; }
.visibility-engine-step-badge.partial { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.visibility-engine-step-badge.pending { background: rgba(156, 163, 175, 0.15); color: #9ca3af; }

.visibility-engine-step-body p {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.visibility-engine-step-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

.visibility-engine-step-detail {
  color: var(--text);
  font-weight: 500;
}

.visibility-engine-step-action {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.visibility-engine-step-action:hover { opacity: 0.85; }

.visibility-integrations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.visibility-integration-col h3 {
  margin-bottom: 0.75rem;
}

.visibility-integration-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}

.visibility-integration-card p {
  margin: 0.35rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.visibility-integration-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.visibility-integration-status.ok { background: rgba(5, 150, 105, 0.15); color: #34d399; }
.visibility-integration-status.warn { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }

.social-preview .sp-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* Origem dos Leads */
.leads-locality-list,
.leads-channel-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lead-locality-card,
.lead-channel-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
}

.lead-locality-head,
.lead-channel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.lead-channel-head { align-items: center; }

.lead-locality-city {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.lead-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.lead-channel-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }

.lead-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.lead-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #059669, var(--accent));
  border-radius: 999px;
}

.lead-bar-fill.channel {
  background: linear-gradient(90deg, #7c3aed, #a855f7);
}

.lead-channels-row,
.lead-locs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.lead-channel-chip,
.lead-loc-chip {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.lead-channel-chip strong,
.lead-loc-chip strong {
  color: var(--text);
  margin-left: 0.2rem;
}

.lead-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

.leads-matrix-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.leads-matrix-summary-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
}

.leads-matrix-summary-item strong {
  color: var(--text);
  font-weight: 600;
}

.leads-matrix-summary-item span {
  color: var(--text-muted);
}

.leads-matrix-summary-item em {
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
}

.leads-matrix-toolbar {
  margin-bottom: 0.75rem;
}

.leads-matrix-search {
  width: 100%;
  max-width: 420px;
  padding: 0.55rem 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.88rem;
}

.leads-matrix-search:focus {
  outline: none;
  border-color: var(--accent);
}

.leads-matrix-table-wrap {
  max-height: 360px;
  overflow-y: auto;
}

.leads-recent-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.leads-recent-indicator {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.35rem;
}

.leads-recent-indicator.hidden { display: none; }

.leads-table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.leads-table th,
.leads-table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.leads-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.leads-table tr:last-child td { border-bottom: none; }

@media (min-width: 900px) {
  .distribution-flow { flex-wrap: nowrap; }
  .flow-step { flex: 1; }
  .flow-arrow {
    display: flex;
    align-items: center;
    position: absolute;
    right: -0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 1.1rem;
    z-index: 1;
  }
}

@media (max-width: 600px) {
  .localities-layout { grid-template-columns: 1fr; }
  .reports-grid { grid-template-columns: 1fr; }
  .profile-row { flex-direction: column; align-items: flex-start; }
  .profile-value { text-align: left; }
  .ip-suggestions-list { grid-template-columns: 1fr; }
  .loc-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .distribution-flow { flex-direction: column; }
  .visibility-scores { grid-template-columns: 1fr; }
  .visibility-previews { grid-template-columns: 1fr; }
  .visibility-engine-hero { grid-template-columns: 1fr; text-align: center; }
  .visibility-integrations-grid { grid-template-columns: 1fr; }
  .leads-table { font-size: 0.78rem; }
  .manual-layout { grid-template-columns: 1fr; }
  .manual-nav { position: static; flex-direction: row; flex-wrap: wrap; }
}

/* Manual do Gestor */
.manual-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
}

.manual-status-bar span {
  color: var(--text-muted);
}

.manual-status-bar strong { color: var(--text); }

.manual-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.manual-nav {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.manual-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.manual-nav a:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.manual-content { min-width: 0; }

.manual-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
}

.manual-section h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.manual-section p {
  margin: 0 0 0.65rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.manual-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.manual-step {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.manual-step-icon { font-size: 1.35rem; line-height: 1; }
.manual-step strong { display: block; font-size: 0.9rem; margin-bottom: 0.25rem; }
.manual-step p { margin: 0; font-size: 0.85rem; }

.manual-section ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.manual-section li { margin-bottom: 0.35rem; }

.manual-tips {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.manual-tips strong { color: var(--accent); display: block; margin-bottom: 0.35rem; }

.manual-faq dt {
  font-weight: 600;
  color: var(--text);
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.manual-faq dt:first-child { margin-top: 0; }

.manual-faq dd {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

/* ===== SUPORTE / TICKETS ===== */
.support-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 960px) {
  .support-layout { grid-template-columns: 1fr; }
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ticket-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}

.ticket-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.ticket-card-head h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

.ticket-id {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.ticket-message {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.ticket-reply {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 10px;
}

.ticket-reply strong {
  display: block;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.ticket-reply p {
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ticket-waiting {
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.ticket-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticket-status--open { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.ticket-status--in_progress { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.ticket-status--resolved { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.ticket-status--closed { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }

#dashboard-screen {
  -webkit-user-select: none;
  user-select: none;
}

.security-violation-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
}

.security-violation-overlay.hidden { display: none; }

.security-violation-card {
  max-width: 480px;
  width: 100%;
  text-align: center;
  padding: 2rem 1.75rem;
  background: linear-gradient(160deg, #1a0a0a 0%, #2d1515 100%);
  border: 2px solid #dc2626;
  border-radius: 16px;
  box-shadow: 0 0 60px rgba(220, 38, 38, 0.35);
  animation: securityPulse 0.6s ease;
}

@keyframes securityPulse {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.security-violation-icon { font-size: 3rem; margin-bottom: 0.75rem; }

.security-violation-card h2 {
  color: #fca5a5;
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

.security-violation-card p {
  color: #e5e7eb;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 0.75rem;
}

.security-violation-hint {
  color: #9ca3af !important;
  font-size: 0.8rem !important;
  font-style: italic;
}

body.security-locked { overflow: hidden; }

.security-warning-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

.security-warning-overlay.hidden { display: none; }

.security-warning-card {
  max-width: 460px;
  width: 100%;
  text-align: center;
  padding: 1.75rem 1.5rem;
  background: linear-gradient(160deg, #1a1508 0%, #2d2410 100%);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  box-shadow: 0 0 48px rgba(245, 158, 11, 0.25);
  animation: securityPulse 0.45s ease;
}

.security-warning-icon { font-size: 2.5rem; margin-bottom: 0.65rem; }

.security-warning-card h2 {
  color: #fcd34d;
  font-size: 1.2rem;
  margin: 0 0 0.85rem;
}

.security-warning-card p {
  color: #e5e7eb;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 1.25rem;
}

.security-warning-card .btn { min-width: 140px; }

@media print {
  body * { visibility: hidden !important; }
  body::before {
    content: 'VIOLAÇÃO DE SEGURANÇA — Impressão não autorizada. Seu acesso foi suspenso.';
    visibility: visible !important;
    display: block !important;
    position: fixed;
    inset: 0;
    padding: 3rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    background: #fff;
    text-align: center;
  }
}

/* Regras de uso */
.terms-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.terms-meta-bar strong { color: var(--text); }

.lgpd-meta-bar {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}

.lgpd-meta-badge {
  font-weight: 600;
  color: #4ade80;
}

.nav-btn--lgpd {
  border: 1px solid rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.06);
}

.nav-btn--lgpd:hover,
.nav-btn--lgpd.active {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
}

.terms-lgpd-link {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.terms-lgpd-link a {
  color: #4ade80;
  text-decoration: none;
  font-weight: 500;
}

.terms-lgpd-link a:hover { text-decoration: underline; }

.lgpd-contact-hint { margin-top: 1.25rem; }

.terms-intro {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.terms-note {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(220, 38, 38, 0.1);
  border-left: 3px solid #dc2626;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #fca5a5;
}

.terms-accept-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
}

.terms-accept-overlay.hidden { display: none; }

.terms-accept-card {
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.terms-accept-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.terms-accept-intro {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.terms-accept-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.5;
  max-height: 50vh;
}

.terms-accept-section {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.terms-accept-section:last-child { border-bottom: none; }

.terms-accept-section h3 {
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.terms-accept-section p { margin: 0 0 0.5rem; color: var(--text-secondary); }
.terms-accept-section ul { margin: 0.25rem 0 0.5rem 1.1rem; padding: 0; }
.terms-accept-section li { margin-bottom: 0.25rem; color: var(--text-secondary); }

.terms-accept-version {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem !important;
}

.terms-accept-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.terms-accept-check input { margin-top: 0.2rem; flex-shrink: 0; }

.terms-accept-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.profile-contract-card { margin-top: 1.5rem; }
.profile-contract-card--pending { border-color: rgba(251, 191, 36, 0.35); }
.profile-contract-card--accepted { border-color: rgba(34, 197, 94, 0.35); }

.contract-pending-intro {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.contract-status {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.contract-status--ok {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.contract-status-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.contract-status p {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.premium-contract-scroll {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
}

.premium-contract-scroll--readonly {
  max-height: 240px;
  margin-bottom: 0;
}

.premium-contract-accept-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.presentation-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.presentation-link-row input {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text);
  font-size: 0.85rem;
}

.presentation-iframe {
  width: 100%;
  min-height: 720px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #070b14;
  margin-top: 0.75rem;
}

/* Planos — gestor */
.plans-current-wrap { margin-bottom: 1.5rem; }
.plans-current-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.plans-current-label { font-size: 0.8rem; color: var(--text-muted); width: 100%; }
.plans-current-name { font-size: 1.1rem; }
.plans-current-price { color: var(--accent); font-weight: 600; }
.plans-current-limit { font-size: 0.85rem; color: var(--text-secondary); }
.plans-catalog-title { margin: 0 0 1rem; font-size: 1rem; }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.plan-card {
  position: relative;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.plan-card--recommended { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25); }
.plan-card--plus { border-color: rgba(16, 185, 129, 0.45); }
.plan-card--master { border-color: rgba(239, 68, 68, 0.45); }
.plan-card-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
}
.plan-card h4 { margin: 0; font-size: 1.05rem; padding-right: 4rem; }
.plan-card-price { font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.plan-card-visits { margin: 0; font-size: 0.85rem; color: var(--text-secondary); }
.plan-card-features { margin: 0.5rem 0 1rem; padding-left: 1.1rem; flex: 1; font-size: 0.85rem; color: var(--text-secondary); }
.plan-card-features li { margin-bottom: 0.35rem; }
.plans-pending-wrap { margin-bottom: 1.5rem; }
.plans-pending-card {
  padding: 1rem 1.25rem;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius);
}
.plans-pending-card strong { display: block; margin-bottom: 0.35rem; }
.plans-pending-status { margin: 0.5rem 0; font-size: 0.9rem; color: var(--text-secondary); }
.free-plan-blocked-overlay {
  position: fixed;
  inset: 0;
  z-index: 999997;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
}
.free-plan-blocked-overlay.hidden { display: none; }
.free-plan-blocked-card {
  width: 100%;
  max-width: 440px;
  padding: 2rem 1.75rem;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.free-plan-blocked-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.free-plan-blocked-card h2 { margin: 0 0 0.75rem; font-size: 1.25rem; }
.free-plan-blocked-card p { margin: 0 0 1.5rem; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.5; }
.plan-pix-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}
.plan-pix-overlay.hidden { display: none; }
.plan-pix-card {
  width: 100%;
  max-width: 480px;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.plan-pix-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.plan-pix-head h2 { margin: 0; font-size: 1.15rem; }
.plan-pix-summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--bg-surface);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.plan-pix-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; }
.plan-pix-row span { color: var(--text-secondary); }
.plan-pix-key-box label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.plan-pix-key-row { display: flex; gap: 0.5rem; align-items: center; }
.plan-pix-key-row code {
  flex: 1;
  padding: 0.65rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  word-break: break-all;
}
.plan-pix-instructions { margin: 1rem 0; font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.plan-pix-actions { margin-top: 0.5rem; }

.leads-capture-banner {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.45;
}

.leads-capture-banner.active {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

.leads-capture-banner.expired {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

/* ===== MOBILE / TOUCH UX ===== */
:root {
  --bottom-nav-h: 4.25rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

.mobile-bottom-nav {
  display: none;
}

body.sidebar-open {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 768px) {
  .login-screen {
    padding: max(1rem, var(--safe-top)) max(1rem, var(--safe-right)) max(1rem, var(--safe-bottom)) max(1rem, var(--safe-left));
    min-height: 100dvh;
  }

  .login-card {
    padding: 1.75rem 1.25rem;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .lang-options {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: min(88vw, 300px);
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.45);
  }

  .sidebar-overlay {
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.55);
  }

  .sidebar-link,
  .header-account-item {
    min-height: 44px;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .app-header {
    height: auto;
    min-height: var(--header-h);
    padding: 0.65rem max(0.85rem, var(--safe-right)) 0.65rem max(0.85rem, var(--safe-left));
    padding-top: max(0.65rem, var(--safe-top));
  }

  .header-breadcrumb > span:first-child,
  .bc-chevron {
    display: none;
  }

  .header-breadcrumb {
    font-size: 0.95rem;
    min-width: 0;
  }

  .header-breadcrumb span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 42vw;
  }

  .header-right {
    gap: 0.4rem;
  }

  .header-account-btn span,
  .header-account-chevron {
    display: none;
  }

  .header-account-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .header-notif-btn {
    width: 44px;
    height: 44px;
  }

  .sidebar-toggle {
    width: 44px;
    height: 44px;
  }

  .plan-chip {
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.65rem;
    padding: 0.25rem 0.45rem;
  }

  .status-pill {
    padding: 0.35rem 0.5rem;
  }

  .header-account-dropdown {
    left: max(0.75rem, var(--safe-left));
    right: max(0.75rem, var(--safe-right));
    top: auto;
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 0.5rem);
    width: auto;
    max-height: 50vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45);
    z-index: 250;
  }

  .owner-notif-panel {
    position: fixed;
    left: max(0.75rem, var(--safe-left));
    right: max(0.75rem, var(--safe-right));
    top: calc(var(--header-h) + var(--safe-top) + 0.5rem);
    max-height: min(60vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    z-index: 150;
  }

  .content {
    padding: 1rem max(1rem, var(--safe-right)) calc(var(--bottom-nav-h) + var(--safe-bottom) + 1rem) max(1rem, var(--safe-left));
  }

  .page-title h1 {
    font-size: 1.35rem;
  }

  .page-title p {
    font-size: 0.85rem;
  }

  .counter-hero {
    padding: 1.25rem 1rem;
  }

  .section {
    padding: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-group input,
  .form-group textarea,
  .form-group select,
  .password-wrap input,
  .locality-search-input {
    font-size: 16px;
    min-height: 48px;
    padding: 0.75rem 0.85rem;
  }

  .locality-search-input {
    padding-left: 2.5rem;
  }

  .btn {
    min-height: 44px;
    padding: 0.65rem 1rem;
  }

  .btn-sm {
    min-height: 40px;
  }

  .loc-tab {
    min-height: 44px;
    flex-shrink: 0;
  }

  .loc-tabs {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 0.25rem;
  }

  .loc-tab {
    scroll-snap-align: start;
  }

  .data-table,
  .financial-table,
  .leads-table,
  .financial-charges-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .leads-table-wrap,
  .leads-matrix-table-wrap,
  .backup-list-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.25rem;
    padding: 0 0.25rem;
  }

  .plans-grid {
    grid-template-columns: 1fr;
  }

  .plan-card,
  .stat-card,
  .lead-locality-card,
  .lead-channel-card {
    touch-action: manipulation;
  }

  .modal-overlay .modal,
  .plan-pix-card,
  .free-plan-blocked-card,
  .terms-accept-card {
    width: calc(100% - 1.5rem);
    max-height: calc(100dvh - 2rem - var(--safe-top) - var(--safe-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin: max(0.75rem, var(--safe-top)) auto max(0.75rem, var(--safe-bottom));
  }

  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-overlay .modal {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
    max-height: 92dvh;
  }

  .embed-box {
    flex-direction: column;
  }

  .embed-box .btn {
    width: 100%;
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 180;
    height: calc(var(--bottom-nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    background: rgba(17, 17, 19, 0.92);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  }

  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: var(--bottom-nav-h);
    padding: 0.35rem 0.25rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.62rem;
    font-weight: 500;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s, background 0.15s;
  }

  .mobile-nav-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .mobile-nav-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.1;
  }

  .mobile-nav-item.active {
    color: var(--accent);
  }

  .mobile-nav-item:active {
    background: rgba(255, 255, 255, 0.04);
  }

  .mobile-nav-item.active svg {
    stroke: var(--accent);
  }

  .credits-alert-banner,
  .billing-alert-banner,
  .free-plan-banner,
  .leads-capture-banner {
    margin-left: max(0, var(--safe-left));
    margin-right: max(0, var(--safe-right));
    font-size: 0.85rem;
  }

  .profile-layout,
  .financial-layout {
    grid-template-columns: 1fr;
  }

  .seo-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .seo-tab {
    flex-shrink: 0;
    min-height: 44px;
  }

  .track-bar-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .track-bar-count {
    text-align: left;
  }

  .client-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 380px) {
  .mobile-nav-item span {
    font-size: 0.58rem;
  }

  .plan-chip {
    display: none;
  }
}

@media (hover: none) and (pointer: coarse) {
  .sidebar-link:active,
  .nav-btn:active,
  .btn:active,
  .mobile-nav-item:active {
    transform: scale(0.98);
  }
}
