/* ============================================
   ID GESTÃO LOCAÇÃO — DESIGN SYSTEM
   ============================================ */

:root {
  /* ══════════════════════════════════════════════════════════
     PALETA ID GESTÃO 2025
     Light Grey    #EAEBEB   Light Grey 2  #E4E4E4
     Grey Azure    #8E99A2   Dark Grey Az  #2D4D5B
     Dark Grey Bl  #1B2538   Dark Azure    #102A43
     Vivid Red     #f14b4e   Red Light     #cc2a2e
     ══════════════════════════════════════════════════════════ */

  /* ── TEMA 1 — LIGHT (padrão: menu claro) ────────────────── */
  --bg: #F5F7F8;
  --surface: #FFFFFF;
  --surface-2: #EAEBEB;
  --surface-3: #E4E4E4;
  --text: #102A43;
  --text-2: #2D4D5B;
  --muted: #8E99A2;
  --muted-2: #b0bac2;
  --border: #E4E4E4;
  --border-2: #EAEBEB;

  /* ── SIDEBAR LIGHT (fundo cinza claro, texto escuro) ─────── */
  --sidebar-bg: #EAEBEB;
  --sidebar-border-color: #D8DADB;
  --sidebar-heading: #102A43;
  --sidebar-sub: #8E99A2;
  --sidebar-badge-bg: #102A43;
  --sidebar-badge-text: #FFFFFF;
  --sidebar-tab-text: #2D4D5B;
  --sidebar-tab-icon-opacity: 0.60;
  --sidebar-tab-hover-bg: #E4E4E4;
  --sidebar-tab-hover-text: #102A43;
  --sidebar-tab-active-bg: rgba(16,42,67,0.10);
  --sidebar-tab-active-text: #102A43;
  --sidebar-footer-border: #D8DADB;
  --sidebar-version-color: #8E99A2;
  --sidebar-logout-bg: transparent;
  --sidebar-logout-border: #D8DADB;
  --sidebar-logout-text: #8E99A2;
  /* legacy */
  --sidebar: #102A43;
  --sidebar-2: #1B2538;
  --sidebar-accent: #2D4D5B;
  --sidebar-text: rgba(255,255,255,0.92);
  --sidebar-muted: rgba(255,255,255,0.55);

  /* ── COR PRINCIPAL DO SISTEMA ───────────────────────────── */
  --primary: #102A43;
  --primary-mid: #1B2538;
  --primary-dark: #0a1e30;
  --primary-active: #071626;
  --primary-light: #eef1f4;
  --primary-glow: rgba(16,42,67,0.12);

  /* ── STATUS (global) ────────────────────────────────────── */
  --success: #065F46;
  --success-bg: #D1FAE5;
  --success-border: #A7F3D0;
  --warning: #92400E;
  --warning-bg: #FEF3C7;
  --warning-border: #FDE68A;
  --danger: #cc2a2e;
  --danger-dark: #f14b4e;
  --danger-bg: #fde8e8;
  --danger-border: #f9c3c3;
  --info: #1E3A8A;
  --info-bg: #DBEAFE;
  --info-border: #BFDBFE;
  --purple: #6d28d9;
  --purple-bg: #f5f3ff;
  --purple-border: #ddd6fe;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.03);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
  --shadow: 0 6px 20px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-md: 0 12px 32px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.10), 0 6px 16px rgba(0,0,0,0.06);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 26px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);

  /* ── Plan tier color tokens ─────────────────────────────── */
  --plan-free-color:  #6b7280;
  --plan-free-bg:     rgba(107,114,128,0.11);
  --plan-free-border: rgba(107,114,128,0.30);
  --plan-pro-color:   #1d4ed8;
  --plan-pro-bg:      rgba(29,78,216,0.09);
  --plan-pro-border:  rgba(29,78,216,0.28);
  --plan-ultra-color: #b45309;
  --plan-ultra-bg:    rgba(180,83,9,0.09);
  --plan-ultra-border:rgba(180,83,9,0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; font-weight: 500; transition: color 0.15s var(--ease); }
a:hover { color: var(--primary-dark); text-decoration: underline; }
button, input, select, textarea { font: inherit; }

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
  font-size: 14px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-mid);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
textarea { min-height: 88px; resize: vertical; }

/* ============ BUTTONS ============ */
button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }

.primary {
  background: linear-gradient(135deg, var(--primary-mid), var(--primary-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px var(--primary-glow);
}
.primary:hover {
  box-shadow: 0 6px 18px rgba(30,60,89,0.28);
  filter: brightness(1.08);
}
.ghost {
  background: var(--surface);
  color: var(--text-2);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.ghost:hover { background: var(--surface-2); border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.danger:hover { background: #fee2e2; }
.small { padding: 6px 12px; border-radius: var(--r-sm); font-size: 12.5px; }
.icon-btn { width: 40px; height: 40px; padding: 0; justify-content: center; font-size: 18px; border-radius: 50%; }

/* ============ LAYOUT ============ */
.app-shell { display: flex; min-height: 100vh; }

/* ============ SIDEBAR ============ */
.sidebar {
  width: 240px; flex: none;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border-color);
  color: var(--sidebar-heading);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow: hidden;
}
.sidebar::after { display: none; }
.sidebar-brand {
  display: flex; gap: 12px; align-items: center;
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--sidebar-border-color);
}
.brand-badge {
  width: 36px; height: 36px; border-radius: var(--r-md);
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px;
  color: var(--sidebar-badge-text);
  background: var(--sidebar-badge-bg);
  flex: none;
}
.brand-text h1 { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--sidebar-heading); }
.brand-text p { margin: 2px 0 0; font-size: 11px; color: var(--sidebar-sub); }
.sidebar-nav { display: flex; flex-direction: column; gap: 1px; padding: 12px 10px; flex: 1; overflow-y: auto; }
.sidebar .tab {
  width: 100%; text-align: left;
  color: var(--sidebar-tab-text);
  background: transparent; border-color: transparent;
  padding: 9px 12px;
  font-weight: 500; font-size: 13px;
  border-radius: var(--r-md);
  display: flex; align-items: center; gap: 9px;
  transition: all 0.15s var(--ease);
}
.tab-icon { font-size: 14px; width: 18px; text-align: center; flex: none; opacity: var(--sidebar-tab-icon-opacity, 0.55); }
.sidebar .tab:hover { background: var(--sidebar-tab-hover-bg); color: var(--sidebar-tab-hover-text); transform: none; }
.sidebar .tab:hover .tab-icon { opacity: 0.85; }
.sidebar .tab.active {
  background: var(--sidebar-tab-active-bg);
  color: var(--sidebar-tab-active-text);
  border-color: transparent;
  font-weight: 600;
}
.sidebar .tab.active .tab-icon { opacity: 1; }
.sidebar-footer {
  padding: 10px 18px 14px;
  border-top: 1px solid var(--sidebar-footer-border);
  display: flex; flex-direction: column; gap: 8px;
}
.sidebar-version { font-size: 10.5px; color: var(--sidebar-version-color); font-family: 'DM Mono', monospace; }
.sidebar-logout {
  display: flex; align-items: center; gap: 7px;
  width: 100%; padding: 7px 10px;
  background: var(--sidebar-logout-bg);
  border: 1px solid var(--sidebar-logout-border);
  border-radius: 8px;
  color: var(--sidebar-logout-text);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  font-family: inherit;
}
.sidebar-logout:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }

/* Configurações tab movido para o footer */
.tab.tab--footer {
  border-top: 1px solid var(--sidebar-footer-border);
  margin-bottom: 4px;
  padding-top: 12px;
}

/* Badge de plano — sidebar footer */
.sidebar-plan-badge {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px;
  background: linear-gradient(135deg, #f0a500 0%, #d4880a 100%);
  color: #fff; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; box-shadow: 0 1px 6px rgba(212,136,10,.4);
  width: 100%; user-select: none; transition: all .2s;
  overflow: hidden; box-sizing: border-box;
}
.sidebar-plan-badge__crown-img {
  width: 16px; height: 16px; object-fit: contain; flex: none;
}
.spb-text {
  white-space: nowrap; overflow: hidden;
}
/* ── Collapsed: só a coroa, sem texto ───────────────────────────── */
.sidebar--collapsed .sidebar-plan-badge {
  padding: 7px; border-radius: 50%;
  width: 34px; height: 34px; min-width: 34px;
  justify-content: center; align-self: center;
  gap: 0;
}
.sidebar--collapsed .spb-text { display: none !important; }
/* Oculta badge dinâmico de role (duplicado) */
.sidebar-role-badge { display: none !important; }

/* ============ MAIN CONTENT ============ */
.main-content { flex: 1; min-width: 0; padding: 28px 32px 80px; display: flex; flex-direction: column; gap: 0; }
.main-view-area { display: flex; flex: 1; gap: 20px; align-items: flex-start; min-width: 0; }
.main-sections { flex: 1; min-width: 0; }

/* ============ TOPBAR ============ */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1.5px solid var(--border); flex-wrap: wrap; }
.topbar-title h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.topbar-title span { color: var(--muted); font-size: 13px; font-weight: 400; }
.topbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ============ VIEWS ============ */
.view { display: none; }
.view.active { display: block; }

/* ============ SECTION HEADER ============ */
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.section-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.section-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.section-actions input { min-width: 300px; }

/* ============ SHARED ============ */
.hidden { display: none !important; }
.empty { background: var(--surface-2); border: 1.5px dashed var(--border); border-radius: var(--r-md); padding: 20px; color: var(--muted); font-size: 13.5px; }
.biz-meta, .muted { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; word-break: break-word; }
strong { overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.biz-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.biz-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.tag, .badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text-2);
  white-space: nowrap;
}
.badge.ganho { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge.perdido { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.badge.recebido { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge.pendente { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge.atrasado { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.badge.repassado { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }

/* ============ DASHBOARD ============ */

/* Alertas refinados */
.dash-alerts { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.dash-alert {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  background: var(--surface);
  flex: 1 1 300px; min-width: 0;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s;
}
.dash-alert:hover { box-shadow: var(--shadow-sm); }
.dash-alert--danger { background: var(--danger-bg); border-color: var(--danger-border); border-left-color: var(--danger); }
.dash-alert--warning { background: var(--warning-bg); border-color: var(--warning-border); border-left-color: #f59e0b; }
.dash-alert--info { background: var(--info-bg); border-color: var(--info-border); border-left-color: var(--info); }
.dash-alert--ok { background: var(--success-bg); border-color: var(--success-border); border-left-color: var(--success); }
.dash-alert__icon {
  font-size: 15px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  font-weight: 700;
}
.dash-alert--danger .dash-alert__icon { background: rgba(185,28,28,0.10); color: var(--danger); }
.dash-alert--warning .dash-alert__icon { background: rgba(245,158,11,0.12); color: #92400e; }
.dash-alert--info .dash-alert__icon { background: rgba(29,78,216,0.10); color: var(--info); }
.dash-alert--ok .dash-alert__icon { background: rgba(21,128,61,0.10); color: var(--success); }
.dash-alert__body { flex: 1; min-width: 0; }
.dash-alert__body strong { display: block; font-size: 13px; font-weight: 700; margin-bottom: 2px; color: var(--text); letter-spacing: -0.01em; }
.dash-alert__body span { font-size: 12px; color: var(--muted); }
.dash-alert__btn {
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--r-sm);
  padding: 6px 13px;
  font-size: 12px; font-weight: 700;
  white-space: nowrap; flex: none; cursor: pointer;
  transition: background 0.15s;
}
.dash-alert__btn:hover { background: rgba(0,0,0,0.11); transform: none; }

/* KPIs */
.dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.dash-kpis--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.dash-kpis--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 22px 20px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 1px 3px rgba(16,42,67,0.08),
    0 4px 14px rgba(16,42,67,0.05),
    0 8px 24px rgba(16,42,67,0.03);
  transition: box-shadow 0.22s var(--ease), transform 0.22s var(--ease);
  min-width: 0;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.kpi-card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 4px 16px rgba(16,42,67,0.10),
    0 10px 32px rgba(16,42,67,0.07);
  transform: translateY(-4px);
}
.kpi-card--danger {
  background: linear-gradient(145deg, #c41c1c 0%, #991b1b 100%);
  border-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    0 4px 14px rgba(185,28,28,0.28),
    0 1px 4px rgba(0,0,0,0.18);
}
.kpi-card--danger .kpi-label { color: rgba(255,255,255,0.75); }
.kpi-card--danger .kpi-value { color: #fff; }
.kpi-card--danger .kpi-sub   { color: rgba(255,255,255,0.6); }
.kpi-card--danger:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    0 8px 26px rgba(185,28,28,0.40),
    0 2px 8px rgba(0,0,0,0.22);
}
.kpi-card--info {
  background: linear-gradient(145deg, #0369a1 0%, #075985 100%);
  border-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 4px 14px rgba(3,105,161,0.24),
    0 1px 4px rgba(0,0,0,0.16);
}
.kpi-card--info .kpi-label { color: rgba(255,255,255,0.75); }
.kpi-card--info .kpi-value { color: #fff; }
.kpi-card--info .kpi-sub   { color: rgba(255,255,255,0.6); }
.kpi-card--info:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 8px 26px rgba(3,105,161,0.36),
    0 2px 8px rgba(0,0,0,0.20);
}
.kpi-card--destaque {
  background: linear-gradient(145deg, var(--primary-mid) 0%, var(--primary-dark) 100%);
  border-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 4px 16px var(--primary-glow),
    0 8px 24px rgba(16,42,67,0.12);
  color: #fff;
}
.kpi-card--destaque:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 8px 28px rgba(16,42,67,0.22),
    0 2px 10px rgba(0,0,0,0.20);
}
.kpi-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kpi-card--destaque .kpi-label { color: rgba(255,255,255,0.7); }
.kpi-value { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin-bottom: 6px; }
.kpi-value--lg { font-size: 22px; letter-spacing: -0.03em; }
.kpi-value--md { font-size: 26px; }
.kpi-card--destaque .kpi-value { color: #fff; }
.kpi-sub { font-size: 12px; color: var(--muted); font-weight: 400; line-height: 1.45; word-wrap: break-word; }
.kpi-card--destaque .kpi-sub { color: rgba(255,255,255,0.65); }

/* Dashboard body */
.dash-body { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dash-col { display: flex; flex-direction: column; gap: 18px; }

/* ── Cards de venda no dashboard ─────────────────────────────────────── */
.dash-venda-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 0; }
.dash-venda-strip { display: flex; flex-direction: column; }
.dash-venda-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #d97706; color: #fff; font-size: 11px; font-weight: 700; margin-left: 6px; }
.imovel-venda-list { display: flex; flex-direction: column; }
.imovel-venda-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.imovel-venda-row:last-of-type { border-bottom: none; }
.imovel-venda-row__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.imovel-venda-row__info strong { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imovel-venda-row__info span { font-size: 12px; color: var(--muted); }
.imovel-venda-prop { color: var(--muted); font-size: 11.5px; }
.imovel-venda-row__valor { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.imovel-venda-row__valor strong { font-size: 13px; font-weight: 700; color: var(--text); }
.imovel-venda-row__valor span { font-size: 11px; color: var(--muted); }
.imovel-venda-more { padding: 8px 0 2px; font-size: 12px; color: var(--muted); }
@media (max-width: 900px) { .dash-venda-row { grid-template-columns: 1fr; } }

/* Dash card — 3D elevado */
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 22px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 2px 8px rgba(16,42,67,0.05),
    0 4px 16px rgba(16,42,67,0.04);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
  min-width: 0;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.dash-card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 6px 22px rgba(16,42,67,0.09),
    0 2px 8px rgba(16,42,67,0.06);
  transform: translateY(-2px);
}
.dash-card__head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.dash-card__head h3 {
  margin: 0; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 11.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}
.dash-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.dash-badge--warn { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.dash-link {
  background: none; border: none; padding: 0;
  font-size: 12px; font-weight: 600; color: var(--primary);
  cursor: pointer; white-space: nowrap; box-shadow: none;
  opacity: 0.8; transition: opacity 0.15s;
}
.dash-link:hover { transform: none; text-decoration: none; opacity: 1; }

/* Donut (legacy CRM block) */
.dash-crm { display: flex; gap: 20px; align-items: center; }
.donut-wrap { flex: none; }
.donut-svg { display: block; }
.donut-empty { width: 120px; height: 120px; display: grid; place-items: center; border: 14px solid var(--border); border-radius: 50%; font-size: 12px; color: var(--muted); text-align: center; }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 4px 0; border-bottom: 1px solid var(--surface-3); }
.legend-item:last-child { border-bottom: none; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.legend-label { flex: 1; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }

/* Chart containers — donut + legend */
.chart-donut-block { display: flex; gap: 18px; align-items: center; }
.chart-donut-wrap { flex: none; }
.chart-donut-legend { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chart-donut-legend .legend-item { font-size: 12px; }
.chart-donut-legend .legend-item strong { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Chart containers — horizontal bars */
.chart-bars-block { overflow: visible; padding: 4px 0; }

/* Chart containers — gauge */
.chart-gauge-block { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.chart-gauge-wrap { flex: none; }
.chart-gauge-info { display: flex; flex-direction: column; gap: 10px; }
.gauge-kpi { display: flex; flex-direction: column; gap: 2px; }
.gauge-kpi span { font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
.gauge-kpi strong { font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.gauge-kpi--warn strong { color: #f14b4e; }

/* Chart section sub-label */
.chart-section-label { font-size: 11px; font-weight: 600; color: var(--muted); margin: 14px 0 8px; text-transform: uppercase; letter-spacing: .03em; }

/* Fin rows dashboard — visão carteira */
.fin-rows { display: flex; flex-direction: column; gap: 4px; }
.fin-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: 13px; margin-bottom: 2px;
  transition: filter 0.15s;
  min-width: 0;
}
.fin-row:hover { filter: brightness(0.97); }
.fin-row span { color: var(--text-2); font-weight: 400; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-row strong { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; flex: none; white-space: nowrap; }
.fin-row--green { background: #f0fdf4; border-left: 3px solid var(--success); }
.fin-row--green strong { color: var(--success); }
.fin-row--yellow { background: #fefce8; border-left: 3px solid #f59e0b; }
.fin-row--yellow strong { color: #92400e; }
.fin-row--red { background: #fff5f5; border-left: 3px solid var(--danger); }
.fin-row--red strong { color: var(--danger); }
.fin-row--blue { background: #eff6ff; border-left: 3px solid var(--info); }
.fin-row--blue strong { color: var(--info); }
.fin-row--orange { background: #fff7ed; border-left: 3px solid #f97316; }
.fin-row--orange strong { color: #c2410c; }
.fin-row--purple { background: #f5f3ff; border-left: 3px solid var(--purple); }
.fin-row--purple strong { color: var(--purple); }
.fin-row--neutral { background: var(--surface-2); border-left: 3px solid var(--border-2); }
.fin-row--neutral strong { color: var(--text); }

/* Task rows — lista mais leve */
.task-rows { display: flex; flex-direction: column; gap: 0; }
.task-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--surface-3);
  border-radius: 0;
  transition: background 0.15s;
}
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: var(--surface-2); border-radius: var(--r-sm); }
.task-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-mid), var(--primary-dark));
  color: #fff; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; flex: none;
}
.task-avatar--blue  { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.task-avatar--amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.task-row__body { flex: 1; min-width: 0; }
.task-row__body strong { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.task-row__sub { font-size: 11.5px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-row__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.task-date { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.task-date--hoje { background: var(--warning-bg); color: #92400e; border: 1px solid var(--warning-border); }
.task-date--vencida { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.task-date--amanha { background: var(--info-bg); color: var(--info); border: 1px solid var(--info-border); }
.dash-btn-sm {
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border-radius: var(--r-sm); background: var(--surface);
  border: 1.5px solid var(--border); color: var(--muted);
  cursor: pointer; transition: all 0.18s;
}
.dash-btn-sm:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary-mid); transform: none; }

/* Pipeline rows */
.pipeline-rows { display: flex; flex-direction: column; gap: 0; }
.pipeline-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 4px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--surface-3);
  border-radius: 0;
  transition: background 0.15s;
}
.pipeline-row:last-child { border-bottom: none; }
.pipeline-row:hover { background: var(--surface-2); border-radius: var(--r-sm); }
.pipeline-stage { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.pipeline-stage--captacao { background:#f0fdf4; color:#15803d; border-color:#bbf7d0; }
.pipeline-stage--qualificacao { background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }
.pipeline-stage--visita { background:#fefce8; color:#a16207; border-color:#fde68a; }
.pipeline-stage--documentacao { background:#fdf4ff; color:#9333ea; border-color:#e9d5ff; }
.pipeline-stage--negociacao { background:#fff7ed; color:#c2410c; border-color:#fed7aa; }
.pipeline-stage--fechamento { background:#f0fdf4; color:#166534; border-color:#bbf7d0; }
.pipeline-stage--ganho { background:#ecfdf5; color:#065f46; border-color:#6ee7b7; }
.pipeline-stage--perdido { background:#fef2f2; color:#991b1b; border-color:#fca5a5; }
.pipeline-value { font-size: 12px; font-weight: 700; color: var(--success); font-variant-numeric: tabular-nums; }

/* Tabela comparativa de imóveis (owner_ultra) */
.dash-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 4px; }
.dash-table thead tr { border-bottom: 2px solid var(--border); }
.dash-table th { text-align: left; padding: 7px 10px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.dash-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.dash-table tbody tr:last-child td { border-bottom: none; }
.dash-table tbody tr:hover { background: var(--surface-2); }
.pipeline-warn { font-size: 12px; color: var(--warning); padding: 8px 12px; background: var(--warning-bg); border: 1px solid var(--warning-border); border-radius: var(--r-md); font-weight: 500; margin-top: 8px; }

/* Valuation section */
.valuation-section { margin-top: 14px; }
.valuation-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-bottom: 10px; }
.val-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  text-align: center;
  transition: box-shadow 0.18s, transform 0.18s;
}
.val-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.val-card--destaque {
  background: linear-gradient(135deg, #eaf6f5, #d4eeec);
  border-color: var(--primary-mid);
  box-shadow: 0 2px 8px var(--primary-glow);
}
.val-card span { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 8px; }
.val-card strong { font-size: 17px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.val-card--destaque strong { color: var(--primary); font-size: 20px; }

/* ============ KANBAN ============ */
.kanban { display: grid; grid-template-columns: repeat(8, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 12px; min-height: 320px; }
.kanban-col-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.kanban-title { font-weight: 700; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.kanban-count { min-width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--border); font-size: 11px; font-weight: 700; color: var(--muted); padding: 0 7px; }
.dropzone { min-height: 260px; display: flex; flex-direction: column; gap: 10px; }
.biz-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow-xs); cursor: grab; transition: box-shadow 0.18s, transform 0.18s; }
.biz-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.biz-card h4 { margin: 0 0 6px; font-size: 13.5px; font-weight: 700; color: var(--text); }
.journey-block { margin-top: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }
.journey-block strong { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 6px; }

/* ============ CARDS ============ */
.card-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); padding: 20px; }
.card-block.full { grid-column: 1 / -1; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.block-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.card, .support-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); padding: 22px; }
.card h3, .support-block h3 { margin: 0 0 16px; font-size: 15px; font-weight: 700; }

/* ============ REGISTRY ============ */
.registry-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 16px; transition: box-shadow 0.18s; }
.registry-item:hover { box-shadow: var(--shadow); }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.kv > div { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.kv > div strong { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }

/* ============ CADASTROS — LISTA ÚNICA ============ */
/* Cabeçalho */
.cad-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.cad-header__left h2 { margin: 0 0 3px; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.cad-header__left p  { margin: 0; color: var(--muted); font-size: 13.5px; }
.cad-header__right   { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Buscador centralizado */
.cad-search-wrap { display: flex; justify-content: center; margin-bottom: 14px; }
.cad-search { width: 100%; max-width: 520px; padding: 10px 16px; border: 1.5px solid var(--border); border-radius: 999px; font-size: 14px; background: var(--surface); color: var(--text); transition: border-color 0.18s, box-shadow 0.18s; }
.cad-search:focus { outline: none; border-color: var(--primary-mid); box-shadow: 0 0 0 3px var(--primary-glow); }

/* Chips de filtro */
.cad-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.cad-chip { padding: 6px 18px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.16s; }
.cad-chip:hover { border-color: var(--primary-mid); color: var(--primary-dark); }
.cad-chip.active { background: var(--primary-mid); border-color: var(--primary-mid); color: #fff; box-shadow: 0 2px 8px var(--primary-glow); }

/* Toolbar de adição */
.cad-toolbar { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 14px; flex-wrap: wrap; }

/* Botões de cadastro — cor diferenciada por tipo */
.cad-add-btn { font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 8px; border: 1.5px solid; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.cad-add-btn--owner    { background: #059669; color: #fff; border-color: #047857; }
.cad-add-btn--owner:hover    { background: #047857; border-color: #065f46; }
.cad-add-btn--tenant   { background: #1d4ed8; color: #fff; border-color: #1e40af; }
.cad-add-btn--tenant:hover   { background: #1e40af; border-color: #1e3a8a; }
.cad-add-btn--property { background: #374151; color: #fff; border-color: #1f2937; }
.cad-add-btn--property:hover { background: #1f2937; border-color: #111827; }
.cad-add-btn--lead     { background: #d97706; color: #fff; border-color: #b45309; }
.cad-add-btn--lead:hover     { background: #b45309; border-color: #92400e; }

/* Imóvel — negócios vinculados (dentro do modal de imóvel) */
.imovel-neg-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.imovel-neg-row:last-of-type { border-bottom: none; }
.imovel-neg-status { flex: 1; color: var(--muted); font-size: 12px; }

/* Lista única */
.cad-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.cad-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--border); transition: background 0.14s; }
.cad-row:last-child { border-bottom: none; }
.cad-row:hover { background: var(--surface-2); }

/* Badge de tipo */
.cad-badge { flex-shrink: 0; display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; white-space: nowrap; }
.badge-owner    { background: #d1fae5; color: #065f46; }
.badge-tenant   { background: #dbeafe; color: #1e40af; }
.badge-property { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.badge-lead     { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* Info do item */
.cad-row__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cad-row__name   { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cad-row__meta   { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cad-row__detail { font-size: 11.5px; color: var(--muted); opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Ações por item */
.cad-row__actions { display: flex; gap: 6px; flex-shrink: 0; opacity: 0; transition: opacity 0.14s; }
.cad-row:hover .cad-row__actions { opacity: 1; }

/* Estado vazio */
.cad-empty { padding: 48px 24px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.6; }
.attachments-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.attachment { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; font-size: 13px; }
.journey-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.journey-stage { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); padding: 22px; }
.journey-stage h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.journey-meta { color: var(--muted); margin-bottom: 14px; font-size: 13.5px; line-height: 1.55; }

/* ============ BASE DE APOIO — MÓDULOS ============ */
/* Tabs de módulo */
.ba-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 22px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.ba-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--r-lg);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
  box-shadow: none;
}
.ba-tab:hover { background: var(--surface-3); color: var(--text); transform: none; }
.ba-tab--active { background: var(--primary); color: #fff; border-color: var(--primary); }
.ba-tab--active:hover { background: var(--primary-dark,var(--primary)); }
.ba-tab-icon { font-size: 14px; }
.ba-tab-label { font-size: 12.5px; }

/* Intro do módulo */
.ba-module-intro {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.ba-module-intro-icon { font-size: 28px; line-height: 1; }
.ba-module-intro h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }

/* Badge de nível de acesso */
.ba-nivel-badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
}
.ba-nivel-badge--basic { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.ba-nivel-badge--pro   { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.ba-nivel-badge--ultra { background: #fdf4ff; color: #7e22ce; border: 1px solid #e9d5ff; }

/* Grid de itens */
.ba-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

/* Card de item */
.ba-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow 0.18s;
}
.ba-item:hover { box-shadow: var(--shadow); }
.ba-item__head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
}
.ba-item__head h4 {
  margin: 0; font-size: 14px; font-weight: 700; color: var(--text);
  line-height: 1.35; flex: 1;
}

/* Badge nível no card */
.ba-nivel {
  display: inline-block; padding: 2px 9px;
  border-radius: 999px; font-size: 10.5px; font-weight: 700;
  white-space: nowrap; flex: none;
}
.ba-nivel--basic { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.ba-nivel--pro   { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.ba-nivel--ultra { background: #fdf4ff; color: #7e22ce; border: 1px solid #e9d5ff; }

/* Descrição */
.ba-item__desc {
  margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.6;
}

/* Checklist */
.ba-item__checklist {
  display: flex; flex-direction: column; gap: 5px;
  background: var(--surface-2); border-radius: var(--r-md);
  padding: 12px; border: 1px solid var(--border);
}
.ba-check {
  font-size: 12.5px; color: var(--text-2); line-height: 1.45;
  padding: 2px 0;
}

/* Mensagem pronta */
.ba-item__msg {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.ba-msg-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted);
}
.ba-msg-text {
  margin: 0; padding: 0 0 0 10px;
  border-left: 3px solid var(--primary);
  font-size: 13px; color: var(--text-2); line-height: 1.55;
  font-style: italic;
}

/* Seção de módulo (modo busca) */
.ba-module-section { margin-bottom: 28px; }
/* Base de Apoio — vitrine bloqueada (owner_free) */
.ba-upgrade-gate { padding: 4px 0 20px; }
.ba-upgrade-gate__header { margin-bottom: 18px; }
.ba-upgrade-gate__header h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.ba-upgrade-gate__header p { margin: 0; color: var(--muted); font-size: 13px; }
.ba-upgrade-gate__modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 9px; margin-bottom: 22px; }
.ba-upgrade-gate__module { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); opacity: 0.5; pointer-events: none; user-select: none; }
.ba-upgrade-gate__module-icon { font-size: 17px; flex: none; }
.ba-upgrade-gate__module-label { font-size: 12.5px; font-weight: 500; flex: 1; }
.ba-upgrade-gate__module-lock { font-size: 12px; flex: none; opacity: 0.7; }
.ba-upgrade-gate__cta { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.ba-upgrade-gate__cta p { margin: 0; font-size: 13px; color: var(--muted); }
.ba-upgrade-gate__hint { font-size: 11.5px; color: var(--muted); }
.ba-module-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.ba-module-icon { font-size: 20px; }
.ba-module-header h3 { margin: 0; font-size: 15px; font-weight: 700; flex: 1; }
.ba-module-count {
  font-size: 11px; font-weight: 700; padding: 3px 9px;
  background: var(--surface-3); border-radius: 999px; color: var(--muted);
}

/* Responsivo */
@media(max-width:720px){
  .ba-tabs { flex-direction: column; }
  .ba-tab { width: 100%; justify-content: flex-start; }
  .ba-items-grid { grid-template-columns: 1fr; }
}
/* ============ TABLE ============ */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 13px 16px; border-bottom: 2px solid var(--border); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); text-align: left; background: var(--surface-2); white-space: nowrap; }
td { padding: 14px 16px; border-bottom: 1px solid var(--surface-3); vertical-align: top; font-size: 13.5px; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-2); }

/* Referência mês/ano — dois campos lado a lado */
.fin-mes-wrap { display: flex; gap: 8px; }
.fin-mes-sel  { flex: 1; }
.fin-ano-inp  { width: 90px; flex-shrink: 0; }

/* ============ MODAL ============ */
.modal-overlay { position: fixed; inset: 0; background: rgba(8,16,20,0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; padding: 24px; z-index: 999; }
.modal-box { width: min(1080px, 100%); max-height: min(90vh, 960px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2xl); box-shadow: var(--shadow-lg); scrollbar-width: thin; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.modal-form { padding: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field.col3 { grid-column: span 3; }
.field label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 12.5px; color: var(--text-2); letter-spacing: 0.01em; }
.modal-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 8px; }

/* Expense rows */
.expense-list { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; }
.expense-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 10px; align-items: end; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; }
.expense-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0; grid-column: 1 / -1; font-weight: 700; font-size: 13.5px; }

/* ============ FINANCEIRO ============ */
.fin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fin-topbar__left { flex: 1; min-width: 0; }
.fin-topbar__left input { max-width: 380px; }
.fin-topbar__right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.fin-filter-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px 16px; margin-bottom: 14px; box-shadow: var(--shadow-xs); }
.finf2-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.finf2-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); white-space: nowrap; }
.finf2-sel { width: auto; padding: 6px 10px; font-size: 13px; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); font-weight: 500; cursor: pointer; }
.finf2-group input[type="date"] { width: auto; min-width: 128px; padding: 6px 10px; font-size: 13px; border: 1.5px solid var(--border); border-radius: var(--r-sm); }
.finf2-mes { min-width: 68px; }
.finf2-ano { width: 68px; padding: 6px 8px; font-size: 13px; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); font-weight: 500; -moz-appearance: textfield; }
.finf2-ano::-webkit-inner-spin-button,
.finf2-ano::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.finf2-sep { font-size: 12px; color: var(--muted); }
.finf2-clear { font-size: 12px; padding: 5px 10px; border-radius: var(--r-sm); border: 1.5px solid var(--border); background: var(--surface-2); color: var(--muted); cursor: pointer; box-shadow: none; }
.finf2-clear:hover { color: var(--danger); border-color: var(--danger-border); transform: none; }

/* Status badges financeiro */
.fin-status-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; border: 1.5px solid var(--border); background: var(--surface-2); color: var(--muted); }
.fin-s--recebido     { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.fin-s--no-prazo     { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.fin-s--atrasado     { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.fin-s--pendente     { background: #f3f4f6; color: #6b7280; border-color: #d1d5db; }
.fin-s--rep-atrasado { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.fin-s--repassado    { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.fin-s--nao-recebido { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.fin-s--enviada      { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.fin-s--nao-enviada  { background: #fef9c3; color: #92400e; border-color: #fde68a; }

/* ── Status panel (novo modelo) ────────────────────────────────────────────── */
.fin-status-panel { background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 12px; }
.fin-status-panel__head { font-size: 11.5px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.fin-status-panel__head::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.fin-status-panel__body { display: flex; flex-direction: column; gap: 12px; }

.fin-status-group { display: flex; flex-direction: column; gap: 6px; }
.fin-status-group__label { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.fin-status-group__btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* Buttons: fin-sbt */
.fin-sbt { font-size: 12.5px; font-weight: 500; padding: 6px 13px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; transition: all 0.14s; white-space: nowrap; line-height: 1.3; }
.fin-sbt:hover:not(.fin-sbt--active) { background: var(--primary-light); border-color: var(--primary-mid); color: var(--primary); }
.fin-sbt--active { background: var(--primary); border-color: var(--primary-dark); color: #fff; font-weight: 700; }
.fin-sbt--recebido { border-color: #a7f3d0; color: #047857; font-weight: 600; }
.fin-sbt--recebido:hover:not(.fin-sbt--active) { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.fin-sbt--recebido.fin-sbt--active { background: #059669; border-color: #047857; color: #fff; }
.fin-sbt--atrasado.fin-sbt--active { background: #ef4444; border-color: #dc2626; color: #fff; }
.fin-sbt--desfazer { font-size: 11.5px; color: var(--muted); border-color: transparent; background: transparent; padding: 6px 8px; }
.fin-sbt--desfazer:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }
.fin-sbt--enviar { border-color: #bfdbfe; color: #2563eb; font-weight: 600; }
.fin-sbt--enviar:hover { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }

/* Action panel rows (novo modelo linear) */
.fin-action-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fin-action-row__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fin-action-row__sc { font-size: 13px; color: var(--text); }
.fin-action-row__hint { font-size: 11.5px; color: var(--muted); }

.fin-action-done { display: flex; align-items: center; gap: 12px; }
.fin-action-done__check { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: #ecfdf5; border: 1.5px solid #a7f3d0; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #059669; }
.fin-action-done__info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.fin-action-done__label { font-size: 13px; font-weight: 600; color: #059669; }
.fin-action-datapag { font-size: 11.5px; color: var(--muted); }

/* Legacy: quick status buttons (kept for backward compat) */
.fin-status-section  { margin-bottom: 8px; }
.fin-status-label    { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.fin-status-actions  { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 4px; }
.fin-status-btn { font-size: 11.5px; font-weight: 500; padding: 5px 10px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text-2); cursor: pointer; box-shadow: none; transition: all 0.14s; white-space: nowrap; }
.fin-status-btn:hover { background: var(--primary-light); border-color: var(--primary-mid); color: var(--primary); transform: none; }
.fin-status-btn.active { background: var(--primary); border-color: var(--primary-dark); color: #fff; font-weight: 700; }
.fin-status-btn--recebido.active { background: #059669; border-color: #047857; }
.fin-status-btn--recebido:not(.active) { border-color: #a7f3d0; color: #059669; }

/* Fin list */
.fin-list { display: flex; flex-direction: column; gap: 6px; }

/* Expandable row */
.finrow { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); overflow: hidden; transition: box-shadow 0.18s; }
.finrow:hover { box-shadow: var(--shadow-sm); }
.finrow--open { border-color: var(--primary-mid); box-shadow: 0 0 0 3px var(--primary-glow); }

.finrow__summary { display: grid; grid-template-columns: 2fr 1.4fr 1.2fr 1.2fr 32px; gap: 10px; align-items: center; padding: 15px 18px; cursor: pointer; user-select: none; transition: background 0.14s; }
.finrow__summary:hover { background: var(--surface-2); }
.finrow__col { min-width: 0; }
.finrow__pessoa { display: block; font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finrow__imovel { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.finrow__tipo { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); }
.finrow__comp { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.finrow__valor { display: block; font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.finrow__repasse { display: block; font-size: 11.5px; color: var(--success); font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.finrow__receita { display: block; font-size: 11.5px; color: var(--purple); font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.finrow__chevron { font-size: 20px; color: var(--muted); transition: transform 0.2s; display: flex; align-items: center; justify-content: center; }
.finrow--open .finrow__chevron { transform: rotate(90deg); }

.finrow__detail { border-top: 1px solid var(--border); padding: 18px; background: var(--surface-2); }

.findet-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.findet-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; min-width: 0; }
.findet-item span { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }
.findet-item strong { font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.findet-item--total { border-color: var(--primary-mid); background: var(--primary-light); }
.findet-item--total strong { color: var(--primary); font-size: 15px; }
.findet-item--taxa { border-color: var(--warning-border); background: var(--warning-bg); }
.findet-item--taxa strong { color: var(--warning); }
.findet-item--repasse { border-color: var(--success-border); background: var(--success-bg); }
.findet-item--repasse strong { color: var(--success); font-size: 15px; }
.findet-item--receita { border-color: var(--purple-border); background: var(--purple-bg); }
.findet-item--receita strong { color: var(--purple); }
.findet-item--bruto { border-color: var(--border-2); background: var(--surface-3); }
.findet-item--recebido { border-color: #a7f3d0; background: #ecfdf5; }
.findet-item--recebido span { color: #059669; }
.findet-item--recebido strong { color: #047857; }

.findet-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 14px; margin-bottom: 10px; font-size: 13px; }
.findet-section strong { display: block; font-size: 10.5px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.06em; margin-bottom: 4px; font-weight: 700; }
.findet-section p { margin: 0; color: var(--text-2); line-height: 1.5; }

.receipt-note { color: var(--success); font-weight: 700; font-size: 13px; }

/* ============ AGENDA ============ */
.agenda-topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1.5px solid var(--border); }
.agenda-title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.agenda-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.agenda-topbar__right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.agenda-topbar__right input { min-width: 240px; }
.agenda-kpis { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.ag-kpi { flex: 1 1 120px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-xs); transition: box-shadow 0.18s, transform 0.18s; }
.ag-kpi:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.ag-kpi span { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.ag-kpi label { font-size: 12px; font-weight: 600; color: var(--muted); }
.ag-kpi--atrasado { border-color: var(--danger-border); background: var(--danger-bg); border-left: 3px solid var(--danger); }
.ag-kpi--atrasado span { color: var(--danger); }
.ag-kpi--prazo { border-color: var(--success-border); background: var(--success-bg); border-left: 3px solid var(--success); }
.ag-kpi--prazo span { color: var(--success); }
.ag-kpi--concluida { border-color: var(--border); background: var(--surface-2); }
.ag-kpi--concluida span { color: var(--muted); }

/* ── Agenda action bar (substituiu agenda-topbar) ─────────────── */
.agenda-actionbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.agenda-actionbar input {
  flex: 1;
  max-width: 420px;
}

.agenda-layout { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.agenda-cal-col { position: sticky; top: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 18px; box-shadow: var(--shadow-sm); }
.agcal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.agcal-nav-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1.5px solid var(--border); font-size: 18px; cursor: pointer; display: grid; place-items: center; padding: 0; color: var(--text-2); box-shadow: none; }
.agcal-nav-btn:hover { background: var(--primary-light); color: var(--primary); transform: none; }
.agcal-month-label { font-size: 13.5px; font-weight: 700; color: var(--text); }
.agcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 12px; }
.agcal-dow { text-align: center; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 0; }
.agcal-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 34px; border-radius: var(--r-sm); cursor: pointer; transition: background 0.12s; user-select: none; }
.agcal-cell:hover { background: var(--surface-2); }
.agcal-cell--today .agcal-day-num { background: var(--primary); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; font-weight: 700; }
.agcal-cell--selected { background: var(--primary-light); border: 1.5px solid var(--primary-mid); }
.agcal-cell--selected .agcal-day-num { color: var(--primary); font-weight: 700; }
.agcal-day-num { font-size: 12px; font-weight: 500; color: var(--text-2); }
.agcal-dot { width: 5px; height: 5px; border-radius: 50%; position: absolute; bottom: 3px; }
.agcal-dot--atrasado { background: var(--danger); }
.agcal-dot--prazo { background: var(--primary-mid); }
.agcal-dot--concluida { background: var(--muted-2); }
.agcal-legend { display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 10px; }
.agcal-leg { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.agcal-leg::before { content: ''; width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.agcal-leg--atrasado::before { background: var(--danger); }
.agcal-leg--pendente::before { background: var(--primary-mid); }
.agcal-leg--concluida::before { background: var(--muted-2); }

.agenda-list-col { min-width: 0; }
.agenda-items { display: flex; flex-direction: column; gap: 0; }
/* ── Filtros da Agenda redesenhados ──────────────────────────── */
.agenda-filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Linha principal: status (segmentado) + período (pills) */
.agf-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.agf-row--main { justify-content: space-between; }
.agf-row--tipos { border-top: 1px solid var(--border); padding-top: 10px; }

/* Status: controle segmentado */
.agf-seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.agf-seg-btn {
  border: none;
  border-radius: 7px;
  padding: 5px 13px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  cursor: pointer;
  transition: background .12s, color .12s, box-shadow .12s;
  white-space: nowrap;
  box-shadow: none;
}
.agf-seg-btn:hover { background: var(--surface); color: var(--text); transform: none; }
.agf-seg-btn--active {
  background: var(--surface);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
}

/* Período: pills compactas */
.agf-period { display: flex; gap: 4px; align-items: center; }
.agf-period-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  cursor: pointer;
  transition: all .12s;
  box-shadow: none;
}
.agf-period-btn:hover { background: var(--surface-2); border-color: var(--border); transform: none; }
.agf-period-btn--active {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: #fff;
  font-weight: 700;
}

/* Tipo: scroll horizontal com mini badge de código */
.agf-tipos-scroll {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.agf-tipos-scroll::-webkit-scrollbar { display: none; }
.agf-tipo-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface-2);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .12s;
  box-shadow: none;
}
.agf-tipo-btn:hover { background: var(--primary-light); border-color: var(--primary-mid); color: var(--primary); transform: none; }
.agf-tipo-btn--active {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: #fff;
  font-weight: 700;
}
.agf-tipo-btn--active .agf-tipo-code { background: rgba(255,255,255,.2); color: #fff; }
.agf-tipo-code {
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  background: var(--surface);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--primary);
  letter-spacing: .02em;
}

.agday { margin-bottom: 4px; }
.agday__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); padding: 10px 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.agitem { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 6px; box-shadow: var(--shadow-xs); transition: box-shadow 0.18s, transform 0.18s; position: relative; }
.agitem:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.agitem--done { opacity: 0.55; }
.agitem--atrasado { border-left: 3px solid var(--danger); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.agitem__time { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 52px; padding-top: 2px; }
.agitem__hour { font-size: 16px; font-weight: 800; font-family: 'DM Mono', monospace; color: var(--text); letter-spacing: -0.02em; line-height: 1; }
.agitem__date { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.3; }
.agitem__bucket-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 4px; }
.agitem__bucket-dot--atrasado { background: var(--danger); }
.agitem__bucket-dot--prazo { background: var(--success); }
.agitem__bucket-dot--concluida { background: var(--muted-2); }
.agitem__body { flex: 1; min-width: 0; }
.agitem__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.agitem__tipo { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.agitem__titulo { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.agitem__badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.agitem__badge--done { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.agitem__badge--atrasado { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.agitem__notif { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.agitem__meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.agitem__obs { font-size: 12.5px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.agitem__actions { display: flex; flex-direction: column; gap: 5px; flex: none; }
.agitem-btn { font-size: 11px; font-weight: 600; padding: 5px 11px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); cursor: pointer; white-space: nowrap; box-shadow: none; transition: all 0.14s; text-align: center; }
.agitem-btn:hover { background: var(--surface-3); transform: none; }
.agitem-btn--concluir { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.agitem-btn--reopen { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.agitem-btn--reagendar { background: var(--warning-bg); color: #92400e; border-color: var(--warning-border); }
.agitem-btn--del { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.ag-empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px; background: var(--surface-2); border: 1.5px dashed var(--border); border-radius: var(--r-lg); }
.ag-free-notice { display: flex; align-items: center; gap: 7px; padding: 7px 12px; margin-bottom: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--muted); font-size: 11.5px; font-weight: 500; }
.ag-free-notice::before { content: '◎'; font-size: 11px; flex: none; color: var(--primary); }

/* Agenda modal */
.agmodal { display: contents; }
.agmodal-row3 { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.agmodal-row2 { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.agmodal-extra { grid-column: 1/-1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 14px; font-size: 13px; }
.agmodal-extra summary { cursor: pointer; font-weight: 600; color: var(--muted); font-size: 12.5px; user-select: none; }

/* ============ THEMES ============ */

/* ══ Sidebar escura — vars compartilhadas por Dark e Mesclaro ═══════════════ */
.sidebar-dark-vars {
  --sidebar-bg: #102A43;
  --sidebar-border-color: rgba(255,255,255,0.07);
  --sidebar-heading: #EAEBEB;
  --sidebar-sub: rgba(234,235,235,0.50);
  --sidebar-badge-bg: rgba(255,255,255,0.12);
  --sidebar-badge-text: #EAEBEB;
  --sidebar-tab-text: rgba(234,235,235,0.60);
  --sidebar-tab-icon-opacity: 0.60;
  --sidebar-tab-hover-bg: rgba(255,255,255,0.08);
  --sidebar-tab-hover-text: #EAEBEB;
  --sidebar-tab-active-bg: rgba(255,255,255,0.14);
  --sidebar-tab-active-text: #EAEBEB;
  --sidebar-footer-border: rgba(255,255,255,0.07);
  --sidebar-version-color: rgba(234,235,235,0.35);
  --sidebar-logout-bg: rgba(255,255,255,0.05);
  --sidebar-logout-border: rgba(255,255,255,0.10);
  --sidebar-logout-text: rgba(234,235,235,0.45);
}

/* ══ TEMA MESCLARO — menu Dark Azure + conteúdo claro ═══════════════════════ */
body.theme-mesclaro {
  --bg: #F5F7F8;
  --surface: #FFFFFF;
  --surface-2: #EAEBEB;
  --surface-3: #E4E4E4;
  --text: #102A43;
  --text-2: #2D4D5B;
  --muted: #8E99A2;
  --muted-2: #b0bac2;
  --border: #E4E4E4;
  --border-2: #EAEBEB;
  --primary: #102A43;
  --primary-mid: #1B2538;
  --primary-dark: #0a1e30;
  --primary-active: #071626;
  --primary-light: #eef1f4;
  --primary-glow: rgba(16,42,67,0.12);
  /* sidebar escura */
  --sidebar-bg: #102A43;
  --sidebar-border-color: rgba(255,255,255,0.07);
  --sidebar-heading: #EAEBEB;
  --sidebar-sub: rgba(234,235,235,0.50);
  --sidebar-badge-bg: rgba(255,255,255,0.12);
  --sidebar-badge-text: #EAEBEB;
  --sidebar-tab-text: rgba(234,235,235,0.60);
  --sidebar-tab-icon-opacity: 0.60;
  --sidebar-tab-hover-bg: rgba(255,255,255,0.08);
  --sidebar-tab-hover-text: #EAEBEB;
  --sidebar-tab-active-bg: rgba(255,255,255,0.14);
  --sidebar-tab-active-text: #EAEBEB;
  --sidebar-footer-border: rgba(255,255,255,0.07);
  --sidebar-version-color: rgba(234,235,235,0.35);
  --sidebar-logout-bg: rgba(255,255,255,0.05);
  --sidebar-logout-border: rgba(255,255,255,0.10);
  --sidebar-logout-text: rgba(234,235,235,0.45);
}
body.theme-mesclaro .sidebar-logout:hover { background: rgba(241,75,78,0.20); color: #f9c3c3; border-color: rgba(241,75,78,0.30); }

/* ══ TEMA DARK — menu Dark Azure + conteúdo escuro médio ════════════════════ */
body.theme-dark {
  /* conteúdo escuro (não tão escuro: Dark Grey Blue) */
  --bg: #1B2538;
  --surface: #243148;
  --surface-2: #2D4D5B;
  --surface-3: #375d6e;
  --text: #EAEBEB;
  --text-2: #8E99A2;
  --muted: #8E99A2;
  --muted-2: #6a7880;
  --border: rgba(255,255,255,0.10);
  --border-2: rgba(255,255,255,0.06);
  --primary: #8E99A2;
  --primary-mid: #EAEBEB;
  --primary-dark: #a8b5bf;
  --primary-active: #EAEBEB;
  --primary-light: rgba(142,153,162,0.14);
  --primary-glow: rgba(142,153,162,0.18);
  /* sidebar Dark Azure — mais escura que o bg */
  --sidebar-bg: #102A43;
  --sidebar-border-color: rgba(255,255,255,0.07);
  --sidebar-heading: #EAEBEB;
  --sidebar-sub: rgba(234,235,235,0.50);
  --sidebar-badge-bg: rgba(255,255,255,0.12);
  --sidebar-badge-text: #EAEBEB;
  --sidebar-tab-text: rgba(234,235,235,0.60);
  --sidebar-tab-icon-opacity: 0.60;
  --sidebar-tab-hover-bg: rgba(255,255,255,0.08);
  --sidebar-tab-hover-text: #EAEBEB;
  --sidebar-tab-active-bg: rgba(255,255,255,0.14);
  --sidebar-tab-active-text: #EAEBEB;
  --sidebar-footer-border: rgba(255,255,255,0.07);
  --sidebar-version-color: rgba(234,235,235,0.35);
  --sidebar-logout-bg: rgba(255,255,255,0.05);
  --sidebar-logout-border: rgba(255,255,255,0.10);
  --sidebar-logout-text: rgba(234,235,235,0.45);
}
body.theme-dark .sidebar-logout:hover { background: rgba(241,75,78,0.20); color: #f9c3c3; border-color: rgba(241,75,78,0.30); }
body.theme-dark .badge-owner    { background: rgba(6,79,59,0.50); color: #6ee7b7; }
body.theme-dark .badge-tenant   { background: rgba(27,37,56,0.70); color: #EAEBEB; }
body.theme-dark .badge-property { background: rgba(45,77,91,0.60); color: #8E99A2; border-color: rgba(255,255,255,0.10); }
body.theme-dark .badge-lead     { background: rgba(120,80,20,0.40); color: #fcd34d; border-color: rgba(252,211,77,0.25); }
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea { background: var(--surface-2); color: var(--text); border-color: var(--border); }
body.theme-dark .ghost { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
body.theme-dark .ghost:hover { background: var(--surface-3); }
body.theme-dark .modal-box { background: var(--surface); border-color: var(--border); }
body.theme-dark .tag, body.theme-dark .badge { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.tag--lead { background: #fef3c7; color: #92400e; border-color: #fde68a; }
body.theme-dark .tag--lead { background: rgba(120,80,20,.35); color: #fcd34d; border-color: rgba(252,211,77,.25); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1280px) { .dash-kpis { grid-template-columns: repeat(2,1fr); } .dash-kpis--3 { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 900px)  { .dash-kpis--3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 1100px) {
  .dash-body, .journey-grid { grid-template-columns: 1fr; }
  .cad-row { flex-wrap: wrap; gap: 10px; }
  .cad-row__actions { opacity: 1; }
  .kv { grid-template-columns: 1fr 1fr; }
  .agenda-layout { grid-template-columns: 1fr; }
  .agenda-cal-col { position: static; }
  .valuation-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 12px 16px; gap: 12px; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; padding: 0; }
  .sidebar .tab { width: auto; }
  .sidebar-footer { display: none; }
  .main-content { padding: 16px; }
  .modal-form, .expense-row { grid-template-columns: 1fr; }
  .section-actions input { min-width: 0; width: 100%; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .finrow__summary { grid-template-columns: 1fr 1fr 28px; }
  .finrow__col--tipo, .finrow__col--status { display: none; }
  .findet-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .dash-kpis { grid-template-columns: 1fr; }
  .finrow__summary { grid-template-columns: 1fr 28px; }
  .findet-grid { grid-template-columns: 1fr; }
  .valuation-grid { grid-template-columns: 1fr; }
  .agmodal-row3 { grid-template-columns: 1fr 1fr; }
  .agitem { flex-direction: column; }
  .agitem__actions { flex-direction: row; flex-wrap: wrap; }
}

/* ============ CONFIGURAÇÕES ============ */
/* ─── CONFIGURAÇÕES — sistema de abas ──────────────────────────────────────── */
.cfg-tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cfg-tabs-nav::-webkit-scrollbar { display: none; }

.cfg-tab-btn {
  padding: 9px 18px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  font-family: inherit;
  letter-spacing: -.01em;
}
.cfg-tab-btn:hover { color: var(--text); }
.cfg-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.cfg-tab-pane { display: none; }
.cfg-tab-pane.active { display: block; }

/* Beta badge */
.cfg-beta {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 20px;
  background: var(--surface-2, #EAEBEB);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 5px;
  flex-shrink: 0;
}

.cfg-page { max-width: 960px; }
.cfg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.cfg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 26px 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease);
  min-width: 0;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.cfg-card:hover { box-shadow: var(--shadow); }
.cfg-card__head {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.cfg-card__head h3 {
  margin: 0 0 5px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cfg-card__head p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}
.cfg-card__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cfg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cfg-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.cfg-field input[type="number"],
.cfg-field select {
  max-width: 320px;
}
.cfg-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Pipeline de Venda — editor de etapas ─────────────────────────────────── */
.pv-stage-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
}
.pv-stage-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.pv-stage-row:last-child { border-bottom: none; }
.pv-stage-row:hover { background: var(--surface-2); }
.pv-stage-handle {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pv-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 1px 4px;
  font-size: 9px;
  color: var(--muted);
  border-radius: 3px;
  line-height: 1;
  font-family: inherit;
  transition: background .12s, color .12s;
}
.pv-btn:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.pv-btn:disabled { opacity: .25; cursor: default; }
.pv-stage-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.pv-stage-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.cfg-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
}
.cfg-toggle-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: none;
  cursor: pointer;
  accent-color: var(--primary);
}
.cfg-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
@media (max-width: 860px) {
  .cfg-grid { grid-template-columns: 1fr; }
}

/* ─── ONBOARDING OVERLAY ──────────────────────────────────────────────────── */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 20, 30, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.onboarding-box {
  background: var(--surface, #fff);
  border-radius: 22px;
  padding: 44px 40px 36px;
  max-width: 620px;
  width: 100%;
  box-shadow: 0 28px 72px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.08);
  text-align: center;
  animation: onboardingIn 0.32s cubic-bezier(0.22,1,0.36,1);
}
@keyframes onboardingIn {
  from { transform: translateY(28px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}
.onboarding-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.onboarding-brand-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text, #15212c);
}
.onboarding-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text, #15212c);
  margin: 0 0 10px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.onboarding-sub {
  font-size: 14px;
  color: var(--muted, #667085);
  margin: 0 0 30px;
  line-height: 1.65;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.onboarding-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.onboarding-card {
  background: var(--bg, #f5f7fa);
  border: 2px solid var(--border, #dde3ea);
  border-radius: 16px;
  padding: 22px 16px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s, background 0.18s;
  font-family: inherit;
  min-width: 0;
  overflow: hidden;
}
.onboarding-card:hover {
  border-color: var(--primary, #2a7c79);
  background: rgba(42,124,121,0.04);
  box-shadow: 0 4px 16px rgba(42,124,121,0.16);
  transform: translateY(-3px);
}
.onboarding-card-icon {
  font-size: 30px;
  line-height: 1;
  margin-bottom: 6px;
}
.onboarding-card strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #15212c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.onboarding-card span {
  font-size: 12.5px;
  color: var(--muted, #667085);
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
  min-width: 0;
  width: 100%;
}
.onboarding-note {
  font-size: 12px;
  color: var(--muted, #667085);
  margin: 4px 0 0;
  line-height: 1.5;
}
@media (max-width: 580px) {
  .onboarding-cards { grid-template-columns: 1fr; gap: 10px; }
  .onboarding-card { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 10px; padding: 16px; }
  .onboarding-card-icon { font-size: 26px; margin-bottom: 0; flex: none; }
  .onboarding-box { padding: 32px 22px 28px; }
}

/* ─── UPGRADE MODAL ───────────────────────────────────────────────────────── */
.upgrade-modal-body {
  text-align: center;
  padding: 12px 0 4px;
}
.upgrade-icon {
  font-size: 36px;
  margin-bottom: 12px;
  color: var(--primary, #2a7c79);
}
.upgrade-plan-progression {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.upgrade-plan-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 10px;
  border-radius: 10px;
  opacity: 0.55;
  transition: opacity 0.2s, background 0.2s;
}
.upgrade-plan-step span { line-height: 1; }
.upgrade-plan-step--current { opacity: 1; }
.upgrade-plan-step--free  { color: var(--plan-free-color);  background: var(--plan-free-bg);  }
.upgrade-plan-step--pro   { color: var(--plan-pro-color);   background: var(--plan-pro-bg);   }
.upgrade-plan-step--ultra { color: var(--plan-ultra-color); background: var(--plan-ultra-bg); }
.upgrade-plan-step--current.upgrade-plan-step--free  { background: var(--plan-free-bg);  box-shadow: 0 0 0 1.5px var(--plan-free-border);  }
.upgrade-plan-step--current.upgrade-plan-step--pro   { background: var(--plan-pro-bg);   box-shadow: 0 0 0 1.5px var(--plan-pro-border);   }
.upgrade-plan-step--current.upgrade-plan-step--ultra { background: var(--plan-ultra-bg); box-shadow: 0 0 0 1.5px var(--plan-ultra-border); }
.upgrade-plan-arrow {
  font-size: 14px;
  color: var(--muted-2);
  font-weight: 400;
  opacity: 0.6;
}
.upgrade-msg {
  font-size: 14px;
  color: var(--text, #15212c);
  line-height: 1.6;
  margin: 0 0 14px;
}
.upgrade-detalhe {
  font-size: 13px;
  color: var(--muted, #667085);
  margin-bottom: 6px;
}
.upgrade-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ─── JOURNEY PERFIL ─────────────────────────────────────────────────────── */
.journey-stage--highlight {
  border-left: 3px solid var(--primary, #2a7c79);
  background: linear-gradient(to right, rgba(42,124,121,0.04), transparent);
}
.journey-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary, #2a7c79);
  background: rgba(42,124,121,0.12);
  border-radius: 4px;
  padding: 2px 6px;
  vertical-align: middle;
}

/* ─── PERFIL DO USUÁRIO ─────────────────────────────────────────────────── */
.cfg-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cfg-avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.cfg-avatar-circle { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.cfg-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.cfg-avatar-inicial { font-size: 24px; font-weight: 700; color: var(--primary); line-height: 1; }
.cfg-avatar-actions { display: flex; flex-direction: column; gap: 6px; }
.cfg-perfil-info-row { display: flex; gap: 20px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.cfg-perfil-info-item { display: flex; flex-direction: column; gap: 3px; }
.cfg-perfil-info-item strong { font-size: 13px; font-weight: 700; }
/* Topbar avatar */
.topbar-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: default; flex: none; transition: border-color .15s; }
.topbar-avatar:hover { border-color: var(--primary); }
.topbar-avatar__img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.topbar-avatar__inicial { font-size: 13px; font-weight: 700; color: var(--primary); line-height: 1; }

/* ── Topbar avatar com role badge ── */
.topbar-avatar { position: relative; cursor: pointer; flex-direction: column; gap: 0; }
.topbar-avatar__role {
  font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); line-height: 1; margin-top: 1px;
}

/* ── Menu do usuário logado ── */
.fb-user-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.12));
  min-width: 220px;
  overflow: hidden;
  animation: fadeInUp .15s ease;
}
.fb-user-menu__info {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.fb-user-menu__info strong { font-size: 13px; color: var(--text); }
.fb-user-menu__info span   { font-size: 11.5px; color: var(--muted); }
.fb-user-menu__reid        { font-size: 10px; color: var(--muted); opacity: .6; }
.fb-user-menu__role {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  width: fit-content; margin-top: 2px;
}
.fb-role--admin      { background: #102A43; color: #fff; }
.fb-role--diretoria  { background: #2D4D5B; color: #fff; }
.fb-role--gerente    { background: #375d6e; color: #fff; }
.fb-role--corretor   { background: var(--surface-3); color: var(--text-2); }
.fb-role--none       { background: var(--surface-3); color: var(--muted); }
.fb-user-menu__logout {
  display: block;
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  font-size: 13px;
  color: var(--danger);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.fb-user-menu__logout:hover { background: var(--danger-bg, #fef2f2); }

/* ═══════════════════════════════════════════════════════════════════
   EQUIPE — painel de gestão de usuários
════════════════════════════════════════════════════════════════════ */
.eq-root { padding: 24px; max-width: 900px; }
.eq-loading, .eq-error { color: var(--muted); font-size: 13px; padding: 40px 0; text-align: center; }
.eq-error { color: var(--danger); }

.eq-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.eq-header h2 { font-size: 18px; font-weight: 700; color: var(--text); }
.eq-header-actions { display: flex; align-items: center; gap: 8px; }
.eq-btn-novo { padding: 8px 18px; font-size: 13px; }
.eq-btn-audit { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.eq-btn-audit:hover { color: var(--primary); }

/* ── Painel de Auditoria ─────────────────────────────────────────────────── */
.audit-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100vw;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
  display: flex; flex-direction: column; z-index: 1200;
  animation: slideInRight .2s ease;
}
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: none; } }
.audit-panel__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.audit-panel__title { font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.audit-panel__close { background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 6px; display: flex; align-items: center; }
.audit-panel__close:hover { background: var(--border); color: var(--text); }
.audit-panel__body { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.audit-loading, .audit-empty, .audit-error { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.audit-error { color: var(--danger, #e53e3e); }
.audit-entry {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg);
  transition: background .15s;
}
.audit-entry:hover { background: var(--surface); }
.audit-entry__icon { color: var(--primary); margin-top: 2px; flex-shrink: 0; }
.audit-entry__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.audit-entry__action { font-size: 12.5px; font-weight: 600; color: var(--text); }
.audit-entry__detail { font-size: 11.5px; color: var(--text); opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-entry__actor  { font-size: 11px; color: var(--muted); }
.audit-entry__ts { font-size: 11px; color: var(--muted); white-space: nowrap; flex-shrink: 0; margin-top: 2px; }

/* Grid de cards */
.eq-grid { display: flex; flex-direction: column; gap: 10px; }
.eq-empty { padding: 40px; text-align: center; color: var(--muted); }

.eq-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg, 12px); padding: 14px 16px;
  transition: box-shadow .15s;
}
.eq-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.eq-card--inativo { opacity: .55; }

.eq-card__avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff;
}
.eq-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eq-card__nome  { font-size: 13.5px; font-weight: 600; color: var(--text); }
.eq-card__email { font-size: 12px; color: var(--muted); }
.eq-card__mgr   { font-size: 11px; color: var(--text-2); }

.eq-card__meta  { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.eq-card__actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }

/* Role badges na lista */
.eq-role-badge {
  display: inline-flex; padding: 2px 9px; border-radius: 20px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.eq-role--admin     { background: #102A43; color: #fff; }
.eq-role--diretoria { background: #2D4D5B; color: #fff; }
.eq-role--gerente   { background: #375d6e; color: #fff; }
.eq-role--corretor  { background: var(--surface-3); color: var(--text-2); }
.eq-role--none      { background: var(--surface-3); color: var(--muted); }

/* Status badges */
.eq-status-badge { font-size: 10px; font-weight: 600; }
.eq-status--ativo   { color: var(--success, #16a34a); }
.eq-status--inativo { color: var(--muted); }

/* Resumo de permissões no card */
.eq-card__perms { font-size: 11px; margin-top: 2px; }
.eq-perm-ok         { color: var(--success, #16a34a); font-weight: 600; }
.eq-perm-restricted { color: #d97706; font-weight: 600; }

/* Modal interno — abas Dados / Permissões */
.eq-modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.eq-modal-tab {
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
  font-family: inherit;
}
.eq-modal-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Matriz de permissões */
.eq-perm-matrix {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 12.5px;
}
.eq-perm-matrix__head,
.eq-perm-matrix__row {
  display: grid;
  grid-template-columns: 140px repeat(4, 1fr);
  align-items: center;
}
.eq-perm-matrix__head {
  background: var(--surface-2);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.eq-perm-matrix__row {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}
.eq-perm-matrix__row:hover { background: var(--surface-2); }
.eq-perm-col { text-align: center; }
.eq-perm-col--mod { text-align: left; font-weight: 600; color: var(--text-2); }
.eq-perm-cb { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }
.eq-perm-na { color: var(--muted); font-size: 12px; }

/* ── Negócios — barra de tipo Locação / Venda ────────────────────────────── */
.neg-tipo-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 14px;
  flex-wrap: wrap;
}
.neg-tipo-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  font-family: inherit;
}
.neg-tipo-chip:hover { border-color: var(--primary); color: var(--primary); }
.neg-tipo-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
/* Chip de Venda: ativo em âmbar */
.neg-tipo-chip[data-neg-tipo="venda"].active { background: #d97706; border-color: #b45309; }
.neg-tipo-count { font-size: 11.5px; color: var(--muted); margin-left: 4px; }
/* Kanban no modo Venda: colunas exclusivas com destaque âmbar */
.kanban--venda .kanban-col { border-top: 3px solid #d97706; }
.kanban--venda .kanban-title { color: #92400e; }
body.theme-dark .kanban--venda .kanban-title { color: #fcd34d; }

/* ─── KANBAN "TODOS" — dois swim-lanes empilhados ─────────────────────────── */
.kanban--todos {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-x: hidden;
  overflow-y: auto;
  grid-template-columns: unset; /* cancela o grid do .kanban */
}
.kanban-section {
  display: flex;
  flex-direction: column;
  border-bottom: 2px solid var(--border);
}
.kanban-section:last-child { border-bottom: none; }

/* Header da seção */
.kanban-section__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 7px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex: none;
  position: sticky;
  left: 0;
}
.kanban-section__icon {
  display: flex;
  align-items: center;
  opacity: .7;
}
.kanban-section__label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.kanban-section__count {
  font-size: 11px;
  color: var(--muted);
  margin-left: 2px;
}
/* Accent por tipo */
.kanban-section--locacao .kanban-section__header { border-left: 3px solid var(--primary); }
.kanban-section--locacao .kanban-section__label  { color: var(--primary); }
.kanban-section--locacao .kanban-section__icon   { color: var(--primary); }
.kanban-section--venda .kanban-section__header   { border-left: 3px solid #d97706; }
.kanban-section--venda .kanban-section__label    { color: #92400e; }
.kanban-section--venda .kanban-section__icon     { color: #d97706; }
body.theme-dark .kanban-section--venda .kanban-section__label { color: #fcd34d; }
body.theme-dark .kanban-section--venda .kanban-section__icon  { color: #fcd34d; }

/* Track horizontal de colunas dentro de cada seção */
.kanban-section__track {
  display: flex;
  gap: 10px;
  padding: 10px 14px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 200px;
  scroll-snap-type: x proximity;
}
.kanban-section__track .kanban-col {
  min-width: 220px;
  max-width: 220px;
  scroll-snap-align: start;
}
/* Accent de topo nas colunas */
.kanban-section--locacao .kanban-col { border-top: 2px solid var(--primary-light, var(--primary)); }
.kanban-section--venda   .kanban-col { border-top: 2px solid #d97706; }
.kanban-section--venda   .kanban-title { color: #92400e; }
body.theme-dark .kanban-section--venda .kanban-title { color: #fcd34d; }

/* Badge de tipo nos cards do kanban */
.biz-card__tipo { margin: 2px 0 4px; }
.biz-tipo-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
}
.biz-tipo-badge--locacao { background: #e0f2fe; color: #0369a1; }
.biz-tipo-badge--venda   { background: #fef3c7; color: #92400e; }
body.theme-dark .biz-tipo-badge--locacao { background: rgba(3,105,161,.25); color: #7dd3fc; }
body.theme-dark .biz-tipo-badge--venda   { background: rgba(146,64,14,.25); color: #fcd34d; }

/* Toggle Locação / Venda no modal de negócio */
.biz-tipo-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
  margin-top: 4px;
}
.biz-tipo-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.biz-tipo-btn + .biz-tipo-btn { border-left: 1px solid var(--border); }
.biz-tipo-btn.active { background: var(--primary); color: #fff; }

/* ── Radar ID — badge Beta no sidebar ───────────────────────────────────── */
.tab-beta-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 20px;
  background: rgba(212,136,10,.18);
  color: #d4880a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 4px;
}

/* Tab admin highlight */
.tab.tab--admin { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; }
/* Dashboard welcome */
.dash-welcome { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.dash-welcome strong { color: var(--text); font-weight: 600; }

/* ── Dashboard Hero — dark gradient banner ──────────────── */
.dash-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 22px 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 55%, var(--primary-dark) 100%);
  border-radius: var(--r-xl);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 8px 32px rgba(16,42,67,0.22),
    0 2px 8px rgba(0,0,0,0.16);
  overflow: hidden;
}
.dash-hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -30px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.dash-hero::after {
  content: '';
  position: absolute;
  bottom: -70px; right: 110px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.dash-hero__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 4px 12px rgba(0,0,0,0.22);
}
.dash-hero__avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.dash-hero__avatar-inicial {
  font-size: 20px;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
  line-height: 1;
  font-family: 'DM Sans', sans-serif;
}
.dash-hero__body { flex: 1; position: relative; z-index: 1; }
.dash-hero__greeting {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -0.02em;
}
.dash-hero__dot { color: rgba(255,255,255,0.4); }
.dash-hero__sub { font-size: 13px; color: rgba(255,255,255,0.55); margin-top: 3px; }
.dash-hero__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  position: relative;
  z-index: 1;
}
.dash-hero__edit-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: var(--r-sm);
  padding: 7px 13px;
  color: rgba(255,255,255,0.82);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s;
  white-space: nowrap;
}
.dash-hero__edit-btn:hover { background: rgba(255,255,255,0.22); transform: none; box-shadow: none; }

/* ─── CONFIGURAÇÕES — PERFIL ─────────────────────────────────────────────── */
.cfg-card--perfil {
  border: 1.5px solid var(--primary, #2a7c79);
}
.cfg-perfil-display {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cfg-perfil-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary, #2a7c79);
  background: rgba(42,124,121,0.1);
  border: 1.5px solid rgba(42,124,121,0.25);
  border-radius: 8px;
  padding: 5px 14px;
}

/* ─── PROFILE CHANGE CARDS ───────────────────────────────────────────────── */
.profile-change-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 4px;
}
.profile-opt-card--active {
  border-color: var(--primary, #2a7c79) !important;
  background: rgba(42,124,121,0.06) !important;
}
.profile-opt-current {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary, #2a7c79);
  margin-top: 4px;
  letter-spacing: 0.05em;
}
@media (max-width: 520px) {
  .profile-change-cards { grid-template-columns: 1fr; }
}

/* ─── BUREAU DE CRÉDITO — Configurações ─────────────────────────────────── */
.cfg-badge-bureau {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 20px;
  padding: 1px 8px;
  vertical-align: middle;
  margin-left: 6px;
}
.cfg-bureau-providers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cfg-bureau-opt {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color .15s, background .15s;
}
.cfg-bureau-opt:hover { border-color: var(--primary); background: var(--surface-2); }
.cfg-bureau-opt--active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.cfg-bureau-opt__name { font-size: 12.5px; font-weight: 700; color: var(--text); }
.cfg-bureau-opt__hint { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.cfg-bureau-opt--active .cfg-bureau-opt__name { color: var(--primary); }

.cfg-bureau-security {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 11px 13px;
  background: #fffbeb;
  border: 1px solid var(--warning-border);
  border-radius: 9px;
  font-size: 11.5px;
  color: var(--text);
  line-height: 1.5;
}
.cfg-bureau-security__icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.cfg-bureau-security strong { display: block; font-size: 12px; margin-bottom: 2px; color: var(--warning); }
.cfg-bureau-security p { margin: 0; color: var(--text-muted); }

.cfg-bureau-model {
  margin-top: 10px;
  padding: 10px 13px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cfg-bureau-model__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}
.cfg-bureau-model__desc {
  font-size: 11.5px;
  color: var(--text);
  line-height: 1.5;
}

/* ─── OWNER PLAN SWITCHER (modo teste) ──────────────────────────────────── */
.cfg-badge-teste {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--primary, #2a7c79);
  border-radius: 6px;
  padding: 2px 8px;
  vertical-align: middle;
  margin-left: 6px;
  opacity: 0.85;
}
.cfg-plano-owner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}
.cfg-plano-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 14px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg, 12px);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  font-size: 13px;
  color: var(--text);
}
.cfg-plano-btn:hover {
  border-color: var(--primary, #2a7c79);
  box-shadow: 0 2px 10px rgba(42,124,121,0.12);
}
.cfg-plano-btn--active {
  border-color: var(--primary, #2a7c79) !important;
  background: rgba(42,124,121,0.07) !important;
  box-shadow: 0 2px 12px rgba(42,124,121,0.18) !important;
}
/* Per-tier icon colors */
.cfg-plano-btn--free  .cfg-plano-icon { color: var(--plan-free-color);  }
.cfg-plano-btn--pro   .cfg-plano-icon { color: var(--plan-pro-color);   }
.cfg-plano-btn--ultra .cfg-plano-icon { color: var(--plan-ultra-color); }
/* Per-tier active state */
.cfg-plano-btn--free.cfg-plano-btn--active  { border-color: var(--plan-free-border)  !important; background: var(--plan-free-bg)  !important; box-shadow: 0 2px 12px rgba(107,114,128,0.20) !important; }
.cfg-plano-btn--pro.cfg-plano-btn--active   { border-color: var(--plan-pro-border)   !important; background: var(--plan-pro-bg)   !important; box-shadow: 0 2px 12px rgba(29,78,216,0.20)   !important; }
.cfg-plano-btn--ultra.cfg-plano-btn--active { border-color: var(--plan-ultra-border) !important; background: var(--plan-ultra-bg) !important; box-shadow: 0 2px 12px rgba(180,83,9,0.22)    !important; }
/* Per-tier hover */
.cfg-plano-btn--free:hover  { border-color: var(--plan-free-color);  }
.cfg-plano-btn--pro:hover   { border-color: var(--plan-pro-color);   }
.cfg-plano-btn--ultra:hover { border-color: var(--plan-ultra-color); }
.cfg-plano-icon {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}
.cfg-plano-icon svg { display: block; }
.cfg-plano-btn strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.cfg-plano-btn span:not(.cfg-plano-icon):not(.cfg-plano-current) {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}
.cfg-plano-current {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary, #2a7c79);
  letter-spacing: 0.05em;
  margin-top: 4px;
}
@media (max-width: 640px) {
  .cfg-plano-owner-grid { grid-template-columns: 1fr; }
}

/* ─── UPGRADE MODAL extras ───────────────────────────────────────────────── */
.upgrade-license-wrap { padding: 0 4px; }
.upgrade-feedback {
  font-size: 13px;
  color: var(--primary, #2a7c79);
  font-weight: 600;
  margin: 10px 0 0;
  text-align: center;
}
.input-error { border-color: #ef4444 !important; }

/* ─── GUIA DE USO ────────────────────────────────────────────────────────── */
.guia-bloco {
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: var(--r-xl, 16px);
  padding: 20px 24px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.guia-bloco--destaque {
  background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
  border-color: #6ee7b7;
  box-shadow: 0 2px 12px 0 rgba(42,124,121,0.10);
}
.guia-bloco__titulo {
  font-size: 14px;
  font-weight: 800;
  color: var(--text, #15212c);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.guia-bloco__titulo-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary, #1E3C59);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.guia-bloco__titulo-icon svg { display: block; }
.guia-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 600px) {
  .guia-steps { grid-template-columns: 1fr; }
}
.guia-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: var(--r-lg, 12px);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.guia-step:hover { border-color: var(--primary, #2a7c79); box-shadow: 0 2px 8px rgba(42,124,121,0.10); }
.guia-step__header { display: flex; align-items: center; gap: 8px; }
.guia-step__num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary, #2a7c79);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.guia-step__titulo {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #15212c);
}
.guia-step__desc {
  font-size: 12px;
  color: var(--muted, #667085);
  line-height: 1.5;
  padding-left: 30px;
}
.guia-step__arrow {
  margin-left: auto;
  font-size: 14px;
  color: var(--primary, #2a7c79);
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s;
}
.guia-step:hover .guia-step__arrow { opacity: 1; }
.guia-bloco__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.guia-bloco__step-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary, #2a7c79);
  margin-bottom: 6px;
}
.guia-bloco__step-text {
  font-size: 13.5px;
  color: var(--text-2, #374151);
  line-height: 1.6;
  margin: 0 0 2px;
}
.guia-bloco__dismiss {
  font-size: 12px;
  color: var(--muted, #667085);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.guia-bloco__dismiss:hover { color: var(--text-2, #374151); }

/* Bloco guia inline (cadastros / locações / financeiro) */
.guia-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface-2, #f9fafb);
  border: 1.5px solid var(--border, #e5e7eb);
  border-left: 3.5px solid var(--primary, #2a7c79);
  border-radius: var(--r-md, 10px);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-2, #374151);
  line-height: 1.6;
}
.guia-info__icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.guia-info__body { flex: 1; }
.guia-info__titulo { font-weight: 700; color: var(--text, #15212c); margin-bottom: 4px; font-size: 13px; }
.guia-info__lista { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.guia-info__lista li::before { content: "•  "; color: var(--primary, #2a7c79); font-weight: 700; }

/* ─── IMPORT ANALYSIS MODAL ──────────────────────────────────────────────── */
.imp-analysis { padding: 4px 0 8px; }
.imp-analysis__counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.imp-analysis__count-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  background: var(--surface-2, #f9fafb);
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: var(--r-lg, 12px);
}
.imp-analysis__count-num {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text, #15212c);
  line-height: 1;
}
.imp-analysis__count-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #667085);
}
.imp-analysis__count-sub {
  font-size: 11px;
  color: var(--muted, #667085);
}
.imp-analysis__status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md, 10px);
  margin-bottom: 18px;
  font-size: 13.5px;
  font-weight: 500;
}
.imp-analysis__status--ok {
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  color: #065f46;
}
.imp-analysis__status--err {
  background: #fff7ed;
  border: 1.5px solid #fcd34d;
  color: #92400e;
  flex-direction: column;
  gap: 8px;
}
.imp-analysis__err-title {
  font-weight: 700;
  font-size: 13.5px;
}
.imp-analysis__err-items { display: flex; flex-direction: column; gap: 5px; }
.imp-analysis__err-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.imp-analysis__err-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f97316;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  padding: 1px 7px;
  white-space: nowrap;
}
.imp-analysis__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.imp-analysis__actions .primary { margin-left: auto; }

/* ─── PLAN CHIP ───────────────────────────────────────────────────────────── */
.plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  white-space: nowrap;
  line-height: 1;
  vertical-align: middle;
}
.plan-chip__icon {
  display: flex;
  align-items: center;
  flex: none;
}
.plan-chip__label { display: inline; }

/* Sizes */
.plan-chip--sm  { font-size: 10px;   padding: 2px 7px 2px 5px;   gap: 3px; }
.plan-chip--md  { font-size: 11.5px; padding: 4px 10px 4px 7px;  gap: 4px; }
.plan-chip--lg  { font-size: 13px;   padding: 5px 13px 5px 9px;  gap: 5px; }

/* Tier colors */
.plan-chip--free  { color: var(--plan-free-color);  background: var(--plan-free-bg);  }
.plan-chip--pro   { color: var(--plan-pro-color);   background: var(--plan-pro-bg);   }
.plan-chip--ultra { color: var(--plan-ultra-color); background: var(--plan-ultra-bg); }

/* ─── SIDEBAR ROLE BADGE ──────────────────────────────────────────────────── */
.sidebar-role-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  text-align: center;
}
.sidebar-role-badge svg { flex: none; opacity: 0.75; }
.sidebar-role-badge--free  { color: #6b7280; background: #f3f4f6; border-color: #e5e7eb; }
.sidebar-role-badge--pro   { color: #1e3a8a; background: #eff6ff; border-color: #bfdbfe; }
.sidebar-role-badge--ultra { color: #92400e; background: #fffbeb; border-color: #fde68a; }
/* dark e mesclaro sidebar — badges no fundo Dark Azure */
body.theme-dark .sidebar-role-badge,
body.theme-mesclaro .sidebar-role-badge { color: rgba(234,235,235,0.50); background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.12); }
body.theme-dark .sidebar-role-badge--free,
body.theme-mesclaro .sidebar-role-badge--free  { color: #8E99A2; background: rgba(142,153,162,0.18); border-color: rgba(142,153,162,0.28); }
body.theme-dark .sidebar-role-badge--pro,
body.theme-mesclaro .sidebar-role-badge--pro   { color: #EAEBEB; background: rgba(234,235,235,0.12); border-color: rgba(234,235,235,0.22); }
body.theme-dark .sidebar-role-badge--ultra,
body.theme-mesclaro .sidebar-role-badge--ultra { color: #f14b4e; background: rgba(241,75,78,0.15); border-color: rgba(241,75,78,0.28); }

/* ─── PAINEL LATERAL DIREITO (RIGHT SIDEBAR) ─────────────────────────────── */
.ob-panel {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  z-index: 500;
  background: var(--surface);
  border-left: 1.5px solid var(--border);
  border-radius: 0;
  box-shadow: -4px 0 24px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Estados aberto / colapsado ──────────────────────────────────────────── */
.ob-panel.instructions-open     { width: 360px; }
.ob-panel.instructions-collapsed { width: 68px;  }

/* ── Compensação no conteúdo principal ───────────────────────────────────── */
.main-content.ip-has-open   { padding-right: 360px; }
.main-content.ip-has-closed { padding-right: 68px;  }

/* ── Header ─────────────────────────────────────────────────────────────── */
.ob-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 16px 14px;
  gap: 8px;
  flex: none;
}
.ob-panel__header-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ob-panel__eyebrow {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary);
  line-height: 1;
}
.ob-panel__title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.ob-panel__close {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.13s, color 0.13s;
  flex: none;
  opacity: 0.45;
  margin-top: 2px;
}
.ob-panel__close:hover { opacity: 1; background: var(--surface-3); color: var(--text); }

/* ── Body ───────────────────────────────────────────────────────────────── */
.ob-panel__body {
  padding: 4px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Step icon (small, top of body) */
.ob-panel__step-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-light, rgba(16,111,102,0.08));
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-bottom: 14px;
}
.ob-panel__step-icon svg { display: block; }

/* Progress dots */
.ob-panel__progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.ob-panel__dots { display: flex; gap: 4px; align-items: center; }
.ob-panel__dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--border-2);
  display: inline-block;
  transition: all 0.28s var(--ease);
}
.ob-panel__dot--active { background: var(--primary); width: 18px; }
.ob-panel__step-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

/* Step text */
.ob-panel__step-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}
.ob-panel__step-text {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 16px;
}

/* CTA */
.ob-panel__goto {
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 0;
}

/* ── Accordion: "Ver todos os passos" ───────────────────────────────────── */
.ob-panel__accordion {
  margin-top: 12px;
  border-top: 1px solid var(--border);
}
.ob-panel__accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  padding: 10px 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.13s;
  outline: none;
}
.ob-panel__accordion-toggle:hover { color: var(--text); }
.ob-panel__accordion-arrow {
  font-size: 12px;
  display: inline-block;
  transition: transform 0.22s var(--ease);
  line-height: 1;
}
.ob-panel__accordion--open .ob-panel__accordion-arrow { transform: rotate(90deg); }
.ob-panel__accordion-body {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 4px;
}
.ob-panel__accordion--open .ob-panel__accordion-body { display: flex; }

/* Step items in accordion */
.ob-panel__step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.13s, color 0.13s;
  text-align: left;
  outline: none;
}
.ob-panel__step-item:hover { background: var(--surface-2); color: var(--text); }
.ob-panel__step-item:disabled { cursor: default; opacity: 0.55; }
.ob-panel__step-item:disabled:hover { background: transparent; }

.ob-panel__step-item--active {
  background: var(--primary-light, rgba(16,111,102,0.07));
  color: var(--primary);
  font-weight: 700;
}
.ob-panel__step-item--active:hover { background: var(--primary-light); color: var(--primary); }
.ob-panel__step-item--done { color: var(--success); }
.ob-panel__step-item--pending { color: var(--muted); opacity: 0.7; }

.ob-panel__step-item-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 10px;
}
.ob-panel__step-item--done   .ob-panel__step-item-icon { background: var(--success-bg); color: var(--success); }
.ob-panel__step-item--active .ob-panel__step-item-icon { background: var(--primary-light); color: var(--primary); }
.ob-panel__step-item--pending .ob-panel__step-item-icon { background: var(--surface-3); color: var(--muted); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.ob-panel__footer {
  flex: none;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}
.ob-panel__finish-btn {
  width: 100%;
  padding: 9px 14px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
  letter-spacing: 0;
  outline: none;
}
.ob-panel__finish-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border-2);
}

/* ── Estado concluído ────────────────────────────────────────────────────── */
.ob-panel__done {
  padding: 24px 16px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}
.ob-panel__done-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--success-bg);
  color: var(--success);
  border: 1.5px solid var(--success-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 20px;
}
.ob-panel__done-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: -0.03em;
}
.ob-panel__done-text {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.6;
}
.ob-panel__done .ob-panel__finish-btn { width: 100%; }

/* ── Guia button (topbar) ────────────────────────────────────────────────── */
.ob-guide-btn {
  font-size: 13px;
  gap: 4px;
  opacity: 0.75;
}
.ob-guide-btn:hover { opacity: 1; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .ob-panel.instructions-open     { width: 320px; }
  .main-content.ip-has-open       { padding-right: 320px; }
}
@media (max-width: 1120px) {
  .ob-panel.instructions-open     { width: 280px; }
  .main-content.ip-has-open       { padding-right: 280px; }
}
@media (max-width: 920px) {
  .ob-panel.instructions-open      { width: 240px; }
  .ob-panel.instructions-collapsed { width: 64px; }
  .main-content.ip-has-open        { padding-right: 240px; }
  .main-content.ip-has-closed      { padding-right: 64px; }
}

/* ─── MODAL SECTIONS (locação / estruturado) ─────────────────────────────── */
.modal-section {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md, 10px);
  padding: 16px 18px 12px;
  margin-bottom: 16px;
  display: contents; /* por padrão continua no grid; o __head força a seção */
}
/* Quando modal-section contém grid fields, forçar full-width */
.modal-form .modal-section,
#modalForm .modal-section {
  display: block;
  grid-column: 1 / -1;
}
#modalForm .modal-section .field,
#modalForm .modal-section .field.full {
  /* campos dentro da seção não precisam de full-width explícito */
}
.modal-section + .modal-section { margin-top: 0; }

.modal-section__head {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--border);
}
.modal-section__hint {
  font-size: 12px;
  color: var(--muted);
  margin: -6px 0 12px;
  line-height: 1.5;
}

/* ─── LEASE QUICK LINKS (lista de locações) ─────────────────────────────── */
.lease-quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}
.lease-quicklink {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light, #EEF2F6);
  border: 1px solid rgba(30,60,89,0.18);
  border-radius: 6px;
  padding: 2px 8px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.lease-quicklink:hover {
  background: var(--primary);
  color: #fff;
}

/* ─── ASSINATURA: badges de status (locações + pipeline) ────────────────── */
.lease-assin-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.lease-assin--pending { background: #fef3c7; color: #92400e; }
.lease-assin--signed  { background: #d1fae5; color: #065f46; }

/* ─── ASSINATURA: card de configurações ─────────────────────────────────── */
.cfg-card--assinatura { }
.cfg-assin-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cfg-assin-fields .field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 5px;
}
.cfg-assin-fields .cfg-input,
.cfg-assin-fields .cfg-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

/* ─── ABATIMENTO rows ────────────────────────────────────────────────────── */
.abat-row {
  border-left: 3px solid #ef4444;
}
.abat-valor-field {
  color: #b91c1c;
  font-weight: 600;
}
.modal-section--abatimento .modal-section__head {
  color: #b91c1c;
  border-bottom-color: #fecaca;
}
.modal-section--abatimento {
  border-color: #fecaca;
  background: #fff8f8;
}

/* ─── FLOATING LAUNCHER ──────────────────────────────────────────────────── */
.fl-launcher {
  position: fixed;
  /* Dock horizontal centralizado — fora de qualquer coluna do sistema */
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9100;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 8px 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.08);
  /* Ghost mode: semi-transparente por padrão, visível ao hover */
  opacity: 0.22;
  transition: opacity 0.22s ease, box-shadow 0.22s ease;
}
.fl-launcher:hover {
  opacity: 1;
  box-shadow: 0 10px 36px rgba(0,0,0,0.20), 0 3px 10px rgba(0,0,0,0.10);
}

.fl-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  color: var(--muted);
  box-shadow: none;
  transition: background 0.13s var(--ease), color 0.13s var(--ease), transform 0.12s var(--ease);
  position: relative;
  outline: none;
  flex: none;
}
.fl-btn:hover  { background: var(--surface-2); color: var(--text); transform: scale(1.06); }
.fl-btn:active { transform: scale(0.92); }

.fl-btn--add {
  color: var(--primary);
  font-size: 21px;
  line-height: 1;
}
.fl-btn--add:hover { background: var(--primary-light, rgba(16,111,102,0.08)); color: var(--primary); }

.fl-btn--notif { font-size: 13px; }
.fl-btn--notif-alert { color: var(--danger); }

.fl-count {
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.fl-btn--id {
  color: var(--sidebar);
  font-size: 10px;
  letter-spacing: -0.04em;
  font-family: 'DM Mono', monospace;
  font-weight: 700;
}
.fl-btn--id:hover { background: rgba(22,49,47,0.07); color: var(--sidebar); }

/* ── Popover ─────────────────────────────────────────────────────────────── */
.fl-popover {
  position: fixed;
  /* Abre acima do dock horizontal */
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  top: auto;
  width: 340px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  z-index: 9001;
  overflow: hidden;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}
.fl-popover.fl-popover--hidden { display: none; }

.fl-popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  flex: none;
}
.fl-popover__title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.fl-popover__close {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.fl-popover__close:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }

.fl-popover__body {
  padding: 12px 14px 16px;
  overflow-y: auto;
  flex: 1;
}

/* Notification list */
.fl-notif-list { display: flex; flex-direction: column; gap: 8px; }
.fl-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.fl-notif-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.fl-notif-icon--danger  { background: var(--danger-bg);  color: var(--danger);  }
.fl-notif-icon--warning { background: var(--warning-bg); color: var(--warning); }
.fl-notif-icon--info    { background: var(--info-bg);    color: var(--info);    }
.fl-notif-icon--ok      { background: var(--success-bg); color: var(--success); }

.fl-notif-body { flex: 1; min-width: 0; }
.fl-notif-body strong { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.3; }
.fl-notif-body span   { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.fl-notif-goto {
  flex: none;
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  font-family: inherit;
}

.fl-empty {
  text-align: center;
  padding: 16px 0;
  color: var(--muted);
  font-size: 13px;
}

/* Task mini form */
.fl-task-form { display: flex; flex-direction: column; gap: 10px; }
.fl-task-form input,
.fl-task-form select,
.fl-task-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px;
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.fl-task-form input:focus,
.fl-task-form select:focus,
.fl-task-form textarea:focus { border-color: var(--primary); outline: none; }
.fl-task-form textarea { min-height: 52px; resize: vertical; }
.fl-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── Cadastro Rápido popover ─────────────────────────────────────────────── */
.fl-cad-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}
.fl-cad-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: left;
}
.fl-cad-btn:hover {
  background: var(--primary-light, rgba(16,111,102,0.08));
  border-color: var(--primary);
  color: var(--primary);
}
.fl-cad-btn svg:first-child { flex: none; opacity: 0.75; }
.fl-cad-btn:hover svg:first-child { opacity: 1; }
.fl-cad-btn span { flex: 1; }
.fl-cad-arrow { flex: none; opacity: 0.35; }
.fl-cad-btn:hover .fl-cad-arrow { opacity: 0.7; }

/* ── fl-btn--cad ─────────────────────────────────────────────────────────── */
.fl-btn--cad { color: var(--text-2); }
.fl-btn--cad:hover { background: var(--primary-light, rgba(16,111,102,0.08)); color: var(--primary); }

/* ── Mini Agenda popover ─────────────────────────────────────────────────── */
.fl-ag-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0;
}
.fl-ag-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.fl-ag-item:last-child { border-bottom: none; }
.fl-ag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.fl-ag-dot--pend { background: var(--warning, #f59e0b); }
.fl-ag-dot--ok   { background: var(--success, #16a34a); }
.fl-ag-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.fl-ag-body strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fl-ag-body span {
  font-size: 11px;
  color: var(--muted);
}
.fl-ag-tipo {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  flex: none;
}
.fl-ag-alert {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 600;
  margin-bottom: 10px;
}
.fl-ag-footer {
  padding-top: 10px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* Responsive */
@media (max-width: 600px) {
  .fl-launcher { bottom: 12px; padding: 6px 8px; gap: 4px; }
  .fl-btn { width: 36px; height: 36px; }
  .fl-popover { bottom: 72px; left: 8px; right: 8px; transform: none; width: auto; max-width: 360px; }
}

/* ─── GUIA CONSULTIVO — PAINEL DE INSTRUÇÕES ──────────────────────────────── */

/* ── Base: painel aberto ─────────────────────────────────────────────────── */
.ob-panel.instructions-open {
  display: flex;
  flex-direction: column;
  background: var(--surface);
}
/* Linha de acento colorida no topo */
.ob-panel.instructions-open::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-mid));
  flex: none;
}
/* Rail também tem acento no topo */
.ob-panel.instructions-collapsed::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-mid));
  flex: none;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.ip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
  flex: none;
  gap: 10px;
}
.ip-header-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ip-eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary);
  line-height: 1;
}
.ip-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.ip-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
  flex: none;
  outline: none;
}
.ip-close-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border-2);
}

/* ── Lista de etapas ─────────────────────────────────────────────────────── */
.ip-steps-list {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: none;
  border-bottom: 1px solid var(--border);
  overflow-y: auto;
  max-height: 195px;
}
.ip-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  transition: background 0.12s, color 0.12s;
  width: 100%;
  outline: none;
  line-height: 1.4;
}
.ip-step-item:hover { background: var(--surface-2); color: var(--text-2); }
.ip-step-item--active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 650;
}
.ip-step-item--active:hover { background: var(--primary-light); }
.ip-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-2);
  flex: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.ip-step-dot--active {
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.ip-step-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Área de conteúdo da etapa ───────────────────────────────────────────── */
.ip-content {
  padding: 20px 18px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}
.ip-content-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-bottom: 16px;
}
.ip-content-title {
  font-size: 15px;
  font-weight: 750;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.03em;
  line-height: 1.3;
}
.ip-content-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 20px;
  flex: 1;
}
.ip-cta-btn {
  width: 100%;
  padding: 11px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--r-md);
  flex: none;
}

/* ── Navegação ───────────────────────────────────────────────────────────── */
.ip-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  flex: none;
  gap: 6px;
}
.ip-nav-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.13s, color 0.13s, border-color 0.13s, box-shadow 0.13s;
  outline: none;
  white-space: nowrap;
}
.ip-nav-btn:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border-2);
  box-shadow: var(--shadow-xs);
}
.ip-nav-btn:disabled { opacity: 0.3; cursor: default; }
.ip-nav-btn--right { flex-direction: row-reverse; }
.ip-nav-counter {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  text-align: center;
  flex: 1;
}

/* ── ob-* interior do painel (layout estrutural) ─────────────────────────── */
.ob-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex: none;
  gap: 12px;
}
.ob-header-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ob-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
}
.ob-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.3;
}
.ob-close {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 2px solid var(--primary-dark);
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  outline: none;
  transition: background 0.13s, border-color 0.13s, box-shadow 0.13s;
}
.ob-close:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.15);
}

.ob-steps {
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: none;
  border-bottom: 1px solid var(--border);
  overflow-y: auto;
  max-height: 200px;
}
.ob-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  width: 100%;
  outline: none;
  transition: background 0.12s, color 0.12s;
  line-height: 1.4;
}
.ob-step:hover { background: var(--surface-2); color: var(--text-2); }
.ob-step.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 650;
}
.ob-step-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  opacity: 0.5;
  color: currentColor;
  transition: opacity 0.15s;
}
.ob-step.active .ob-step-icon { opacity: 1; }
.ob-step-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ob-content {
  padding: 22px 24px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}
.ob-content-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-bottom: 18px;
}
.ob-content-title {
  font-size: 15.5px;
  font-weight: 750;
  color: var(--text);
  margin: 0 0 10px;
  letter-spacing: -0.03em;
  line-height: 1.3;
}
.ob-content-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.68;
  margin: 0 0 14px;
}

/* Lista de etapas / checklist da instrução */
.ob-detail-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  counter-reset: ob-step-counter;
}
.ob-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
  padding: 7px 10px 7px 8px;
  background: var(--surface-2);
  border-radius: 8px;
  border-left: 3px solid var(--primary-light);
  counter-increment: ob-step-counter;
}
.ob-detail-item::before {
  content: counter(ob-step-counter);
  font-size: 10px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-light);
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 1px;
}

/* Nota de atenção / dica */
.ob-tip {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 9px;
  padding: 10px 12px;
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--warning);
  line-height: 1.55;
  flex: 0 0 auto;
}

.ob-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  flex: none;
  gap: 8px;
}
.ob-footer-counter {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.ob-footer-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
/* Buttons inside footer use system .ghost and .primary — just size them */
.ob-footer-nav .ghost,
.ob-footer-nav .primary {
  padding: 6px 13px;
  font-size: 12px;
  border-radius: var(--r-sm);
}
.ob-footer-nav button:disabled { opacity: 0.3; cursor: default; pointer-events: none; }

/* ── Rail colapsado ──────────────────────────────────────────────────────── */
.ob-panel.instructions-collapsed {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ip-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px;
  width: 100%;
  height: 100%;
}

/* Botão principal de abrir o guia — fundo sólido, óbvio e clicável */
.ip-rail-open-btn {
  width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 11px 6px;
  border-radius: 14px;
  border: 2px solid var(--primary-dark);
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px var(--primary-glow), var(--shadow-sm);
  transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
  outline: none;
  flex: none;
}
.ip-rail-open-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px var(--primary-glow), var(--shadow);
  transform: scale(1.05);
}
.ip-rail-open-btn:active { transform: scale(0.96); }
.ip-rail-open-label {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
  color: #ffffff;
  pointer-events: none;
}

/* Botões secundários do rail — idêntico ao GUIA (coluna: ícone + label) */
.ip-rail-btn {
  width: 50px;
  height: auto;
  min-height: 52px;
  padding: 9px 6px 8px;
  border-radius: 14px;
  border: 2px solid var(--primary-dark);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow), var(--shadow-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: inherit;
  transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
  outline: none;
  flex: none;
  position: relative;
}
.ip-rail-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px var(--primary-glow), var(--shadow);
  transform: scale(1.05);
}
.ip-rail-btn:active { transform: scale(0.94); }

/* Label abaixo do ícone — igual ao "GUIA" */
.ip-rail-btn-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
  color: #ffffff;
  pointer-events: none;
}

/* "+" grande para o botão Novo */
.ip-rail-plus {
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  color: #ffffff;
  pointer-events: none;
  margin-top: -2px;
}
.ip-rail-btn--novo { gap: 2px; }

/* Badge flutuante FORA do botão */
.ip-rail-badge-float {
  position: absolute;
  top: -7px;
  right: -7px;
  background: #ffffff;
  color: var(--danger);
  font-size: 9.5px;
  font-weight: 900;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--primary);
  line-height: 1;
  pointer-events: none;
}
.ip-rail-btn--alert .ip-rail-badge-float { border-color: var(--danger); }

/* Estado alerta (sino) */
.ip-rail-btn--alert { background: var(--danger); border-color: var(--danger); box-shadow: 0 4px 14px rgba(220,38,38,0.28); }
.ip-rail-btn--alert:hover { background: #b91c1c; border-color: #b91c1c; }

/* Painel (dashboard) */
.ip-rail-btn--id { font-weight: 800; }

/* legado — mantido por segurança */
.ip-rail-badge {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.ip-rail-id-text {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.ip-rail-sep {
  width: 32px;
  height: 1px;
  background: var(--border);
  margin: 2px 0;
  flex: none;
}

/* ── Tooltip instantâneo nos botões do rail ─────────────────────────────── */
.ip-rail-btn[data-tip],
.ip-rail-open-btn[data-tip] {
  position: relative;
}
.ip-rail-btn[data-tip]::after,
.ip-rail-open-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--text);
  color: var(--surface);
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s 0.08s;
  box-shadow: var(--shadow-sm);
  z-index: 9999;
}
.ip-rail-btn[data-tip]:hover::after,
.ip-rail-open-btn[data-tip]:hover::after {
  opacity: 1;
}

/* ─── ASAAS ──────────────────────────────────────────────────────────────────── */
.asaas-btn-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
}
.asaas-btn-row:hover { background: #fff7ed; border-color: #f97316; color: #c2410c; }
.asaas-btn-row--active { border-color: #f97316; color: #c2410c; background: #fff7ed; }
.asaas-btn-row__status {
  width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block;
}
.asaas-btn-row__status--ok      { background: var(--success); }
.asaas-btn-row__status--pending { background: #f59e0b; }
.asaas-btn-row__status--danger  { background: var(--danger); }

/* Modal Asaas */
.asaas-modal { max-width: 480px; width: 100%; }
.asaas-modal__body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.asaas-warn {
  background: #fef3c7; border: 1px solid #fbbf24; border-radius: 10px;
  padding: 12px 14px; font-size: 13px; color: #92400e; line-height: 1.5;
}
.asaas-intro { font-size: 13.5px; color: var(--text-2); margin: 0; }
.asaas-billing-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.asaas-billing-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 12px; border-radius: 14px;
  border: 2px solid var(--border); background: var(--surface-2);
  color: var(--text); font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: border-color 0.13s, background 0.13s, transform 0.1s;
}
.asaas-billing-btn:hover { border-color: #f97316; background: #fff7ed; transform: translateY(-2px); }
.asaas-billing-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.asaas-billing-icon { font-size: 26px; line-height: 1; }
.asaas-gen-status {
  font-size: 13px; font-weight: 600; padding: 10px 14px;
  border-radius: 10px; text-align: center; display: none;
}
.asaas-gen-status:not(:empty) { display: block; }
.asaas-gen-status--loading { background: var(--surface-2); color: var(--text-2); }
.asaas-gen-status--ok      { background: var(--success-bg); color: var(--success); }
.asaas-gen-status--error   { background: var(--danger-bg); color: var(--danger); }

.asaas-charge-info { display: flex; flex-direction: column; gap: 8px; }
.asaas-charge-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.asaas-charge-row:last-child { border-bottom: none; }
.asaas-charge-row > span:first-child { color: var(--muted); flex: none; }
.asaas-charge-row code { font-size: 11px; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }
.asaas-link { color: #f97316; font-weight: 600; text-decoration: none; }
.asaas-link:hover { text-decoration: underline; }
.asaas-pix-payload { font-size: 10px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asaas-status {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
.asaas-status--ok      { background: var(--success-bg); color: var(--success); }
.asaas-status--pending { background: #fef3c7; color: #92400e; }
.asaas-status--danger  { background: var(--danger-bg); color: var(--danger); }
.asaas-status--muted   { background: var(--surface-2); color: var(--muted); }
.asaas-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── CPF / CNPJ ─────────────────────────────────────────────────────────────── */
.input--error  { border-color: var(--danger) !important; background: var(--danger-bg) !important; }
.input--valid  { border-color: var(--success) !important; }
.cpf-cnpj-err {
  display: block;
  font-size: 11.5px;
  color: var(--danger);
  font-weight: 600;
  margin-top: 4px;
  line-height: 1.3;
}

/* ─── CNPJ lookup (BrasilAPI / Receita Federal) ────────────────────────── */
.cnpj-lookup-result {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.5;
  animation: fadeInUp .2s ease;
}
.cnpj-lookup--loading { color: var(--text-muted); font-style: italic; }
.cnpj-lookup--ok      { color: var(--success); }
.cnpj-lookup--ok strong { display: block; font-size: 12px; }
.cnpj-lookup--warn    { color: var(--warning, #c17d0a); }
.cnpj-lookup--warn strong { display: block; font-size: 12px; }
.cnpj-lookup--unavail { color: var(--text-muted); font-style: italic; font-size: 11px; }

/* ═══════════════════════════════════════════════════════════════════════════
   ID SCORE — análise de crédito do locatário
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Título de seção no modal ─────────────────────────────────────────── */
.ids-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 8px;
  margin-bottom: 4px;
  grid-column: 1 / -1;
}
.ids-field-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  font-style: italic;
}

/* ─── Wrapper live ──────────────────────────────────────────────────────── */
.ids-live-wrap {
  grid-column: 1 / -1;
  margin-top: 4px;
}

/* ─── Painel principal ──────────────────────────────────────────────────── */
.ids-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeInUp .2s ease;
}

/* ─── Header (gauge + verdict) ─────────────────────────────────────────── */
.ids-header {
  display: flex;
  align-items: center;
  gap: 18px;
}
.ids-gauge { flex-shrink: 0; }
.ids-gauge svg { display: block; }

.ids-verdict {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ids-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  width: fit-content;
}
.ids-badge--aprovado  { background: var(--success-bg);  color: var(--success);  border: 1px solid var(--success-border); }
.ids-badge--garantia  { background: var(--warning-bg);  color: var(--warning);  border: 1px solid var(--warning-border); }
.ids-badge--risco     { background: var(--danger-bg);   color: var(--danger);   border: 1px solid var(--danger-border); }
.ids-badge--reprovar  { background: #f3f4f6;             color: #6b7280;         border: 1px solid #d1d5db; }

.ids-verdict__desc {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.ids-verdict__garantia {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0;
}

/* ─── Blocos de pontuação ───────────────────────────────────────────────── */
.ids-blocks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ids-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ids-block__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.ids-block__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.ids-block__label em { font-style: normal; font-weight: 400; color: var(--text-muted); font-size: 11px; }
.ids-block__pts {
  font-size: 13px;
  font-weight: 700;
}
.ids-block__bar {
  height: 5px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.ids-block__fill {
  height: 100%;
  border-radius: 10px;
  transition: width .4s ease;
}
.ids-block__msg {
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── Score de comportamento (locatário ativo) ──────────────────────────── */
.ids-comp {
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ids-comp--ok  { background: var(--success-bg); border: 1px solid var(--success-border); }
.ids-comp--bad { background: var(--danger-bg);  border: 1px solid var(--danger-border); }
.ids-comp__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}
.ids-comp--ok  .ids-comp__label { color: var(--success); }
.ids-comp--bad .ids-comp__label { color: var(--danger); }
.ids-comp__val {
  font-size: 12px;
  color: var(--text);
}

/* ─── Estados sem dados / bloqueado ─────────────────────────────────────── */
.ids-gate-fail,
.ids-no-data {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--surface-3);
  border: 1px solid var(--border);
}
.ids-gate-fail { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }
.ids-no-data__icon { font-size: 18px; }

/* ─── Badge mini no cad-row ────────────────────────────────────────────── */
.ids-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  margin-left: 7px;
  vertical-align: middle;
  letter-spacing: .02em;
  border: 1px solid transparent;
}
.ids-mini--ok   { background: var(--success-bg);  color: var(--success); border-color: var(--success-border); }
.ids-mini--warn { background: var(--warning-bg);  color: var(--warning); border-color: var(--warning-border); }
.ids-mini--risk { background: var(--danger-bg);   color: var(--danger);  border-color: var(--danger-border); }
.ids-mini--bad  { background: #f3f4f6;             color: #6b7280;        border-color: #d1d5db; }

/* ─── Disclaimer (guia, não decisor) ───────────────────────────────────── */
.ids-disclaimer {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.ids-disclaimer__icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--primary);
}
.ids-disclaimer strong { color: var(--text); }

/* ─── Bloco bureau de crédito ───────────────────────────────────────────── */
.ids-bureau-block {
  border: 1px dashed var(--border-2);
  border-radius: 10px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--surface-3);
}
.ids-bureau-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ids-bureau-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.ids-bureau-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
  letter-spacing: .04em;
}
.ids-bureau-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.ids-bureau-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ids-bureau-opt {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.ids-bureau-cta {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}
.ids-bureau-cta strong { color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════════════
   FIREBASE — TELA DE LOGIN
   ═══════════════════════════════════════════════════════════════════════════ */
.fb-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg, #edf0f4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-login-box {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8ed);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.10);
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  animation: fadeInUp .25s ease;
}
.fb-login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.fb-login-logo-img {
  height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}
/* fallback: classe antiga não usada mas mantida para compatibilidade */
.fb-login-logo {
  display: none;
}
.fb-login-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text, #0f1923);
  margin: 0;
  line-height: 1.2;
}
.fb-login-sub {
  font-size: 12px;
  color: var(--text-muted, #6b7280);
  margin: 2px 0 0;
}
.fb-login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fb-login-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fb-login-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2, #374151);
}
.fb-login-field input {
  padding: 9px 12px;
  border: 1.5px solid var(--border, #e2e8ed);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface-2, #f8fafc);
  color: var(--text, #0f1923);
  transition: border-color .15s;
  outline: none;
}
.fb-login-field input:focus { border-color: var(--primary, #2a7c79); background: #fff; }
.fb-login-error {
  font-size: 12px;
  color: var(--danger, #991b1b);
  background: var(--danger-bg, #fff5f5);
  border: 1px solid var(--danger-border, #fecaca);
  border-radius: 7px;
  padding: 8px 11px;
}
.fb-login-btn {
  padding: 11px;
  background: var(--primary, #2a7c79);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
  font-family: inherit;
  margin-top: 2px;
}
.fb-login-btn:hover  { opacity: .9; }
.fb-login-btn:disabled { opacity: .6; cursor: not-allowed; }
.fb-login-footer {
  font-size: 11px;
  color: var(--text-muted, #9ca3af);
  text-align: center;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   RESCISÃO / RENOVAÇÃO
   ═══════════════════════════════════════════════════════════════ */

/* ── Badges de status da locação ─────────────────────────────── */
.badge-encerrada {
  background: var(--muted, #6b7280);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  display: inline-block;
}
.badge-em-rescisao {
  background: #dc2626;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  display: inline-block;
  animation: resc-pulse 2s ease-in-out infinite;
}
.badge-renovada {
  background: #2563eb;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  display: inline-block;
}
@keyframes resc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .75; }
}

/* ── Botões de ação na tabela ────────────────────────────────── */
.lease-acoes { white-space: nowrap; }
.lease-btn-resc {
  color: #dc2626 !important;
  border-color: rgba(220,38,38,.25) !important;
}
.lease-btn-resc:hover {
  background: rgba(220,38,38,.08) !important;
}
.lease-btn-renovar {
  color: #2563eb !important;
  border-color: rgba(37,99,235,.25) !important;
}
.lease-btn-renovar:hover {
  background: rgba(37,99,235,.08) !important;
}

/* ── Layout geral do modal de rescisão/renovação ─────────────── */
.resc-modal,
.renov-modal {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.resc-section-head {
  font-size: 13px;
  color: var(--text-muted, #6b7280);
  background: var(--surface2, #f7f9fb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.resc-block {
  border-top: 1px solid var(--border, #e5e7eb);
  padding: 16px 0 4px;
  margin-bottom: 4px;
}
.resc-block:first-of-type { border-top: none; }
.resc-block-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted, #6b7280);
  margin-bottom: 12px;
}
.resc-calc-hint {
  font-size: 13px;
  color: var(--text-muted, #6b7280);
  background: var(--surface2, #f7f9fb);
  border-radius: 8px;
  padding: 7px 12px;
  margin-bottom: 12px;
  border-left: 3px solid var(--primary, #1f4f4d);
}

/* ── Demonstrativo financeiro ────────────────────────────────── */
.resc-demonstrativo {
  background: var(--surface2, #f7f9fb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 8px 0 12px;
}
.resc-demo-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted, #6b7280);
  margin-bottom: 10px;
}
.resc-demo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
  color: var(--text, #111827);
}
.resc-demo-row:last-child { border-bottom: none; }
.resc-demo-row--credit { color: var(--text-muted, #6b7280); }
.resc-demo-row--total {
  font-size: 14px;
  font-weight: 700;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 2px solid var(--border, #e5e7eb);
  border-bottom: none;
}
.resc-demo-positivo { color: #dc2626; }
.resc-demo-negativo { color: #16a34a; }

/* ── Botão salvar com tom de perigo (rescisão) ───────────────── */
.danger-submit {
  background: #dc2626 !important;
}
.danger-submit:hover { background: #b91c1c !important; }

/* ── Renovação: cabeçalho strip ──────────────────────────────── */
.renov-header-strip {
  background: var(--surface2, #f7f9fb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.renov-header-main {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text, #111827);
  margin-bottom: 2px;
}
.renov-header-sep { color: var(--text-muted, #6b7280); margin: 0 5px; }
.renov-header-sub { font-size: 12px; color: var(--text-muted, #6b7280); }
.renov-header-sub strong { color: var(--text, #111827); font-weight: 600; }

/* ── Renovação: seletor de tipo (cards horizontais) ──────────── */
.renov-tipo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.renov-tipo-card {
  display: flex;
  padding: 11px 14px;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  user-select: none;
}
.renov-tipo-card:hover {
  border-color: rgba(31, 79, 77, .4);
  background: rgba(31, 79, 77, .02);
}
.renov-tipo-card--active {
  border-color: var(--primary, #1f4f4d);
  background: rgba(31, 79, 77, .05);
  box-shadow: 0 0 0 1px rgba(31,79,77,.1);
}
.renov-tipo-card-body { display: flex; flex-direction: column; gap: 3px; }
.renov-tipo-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted, #6b7280);
  letter-spacing: .01em;
}
.renov-tipo-card--active .renov-tipo-card-title { color: var(--primary, #1f4f4d); }
.renov-tipo-card-desc {
  font-size: 11px;
  color: var(--text-muted, #6b7280);
  line-height: 1.45;
}

/* ── Renovação: layout 2 colunas ─────────────────────────────── */
.renov-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 4px;
  align-items: start;
}
.renov-col-inputs { display: flex; flex-direction: column; }
.renov-col-calc   { display: flex; flex-direction: column; }

/* ── Renovação: painel cálculo (coluna direita) ──────────────── */
.renov-calc-panel {
  background: var(--surface2, #f7f9fb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.renov-calc-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted, #6b7280);
  padding: 5px 0;
}
.renov-calc-line strong { font-weight: 600; color: var(--text, #111827); }
.renov-variacao-val { font-weight: 600; font-size: 13px; }
.renov-calc-divider { height: 1px; background: var(--border, #e5e7eb); margin: 4px 0; }
.renov-calc-line--novo { padding-top: 10px; }
.renov-novo-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary, #1f4f4d);
  letter-spacing: -.03em;
}

/* ── Renovação: aviso de deflação ────────────────────────────── */
.renov-deflacao-warn {
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: rgba(239, 68, 68, .06);
  border: 1px solid rgba(239, 68, 68, .22);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 12px;
  color: var(--text, #111827);
  line-height: 1.5;
  margin-bottom: 8px;
}
.renov-deflacao-icon { flex-shrink: 0; color: #ef4444; margin-top: 1px; }
.renov-deflacao-warn strong { color: #dc2626; }

/* ── Renovação: botão BCB ────────────────────────────────────── */
.renov-bcb-wrap { margin: 4px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.renov-bcb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 14px;
  background: rgba(31, 79, 77, .07);
  color: var(--primary, #1f4f4d);
  border: 1.5px solid rgba(31, 79, 77, .18);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.renov-bcb-btn:hover { background: rgba(31, 79, 77, .13); border-color: rgba(31, 79, 77, .32); }
.renov-bcb-btn:disabled { opacity: .55; cursor: not-allowed; }
.renov-bcb-result {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1.5;
}
.renov-bcb-result--ok {
  background: rgba(22, 163, 74, .07);
  border: 1px solid rgba(22, 163, 74, .25);
  color: var(--text, #111827);
}
.renov-bcb-result--erro {
  background: rgba(220, 38, 38, .06);
  border: 1px solid rgba(220, 38, 38, .2);
  color: #dc2626;
}
.renov-bcb-valor {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary, #1f4f4d);
}
.renov-bcb-result small {
  color: var(--text-muted, #6b7280);
  font-size: 11px;
  margin-left: 3px;
}

/* ═══════════════════════════════════════════════════════════════
   RADAR ID — Módulo de inteligência de mercado
   ═══════════════════════════════════════════════════════════════ */

.radar-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 0 40px;
}

/* ── Barra de ação ─────────────────────────────────────────────── */
.radar-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.radar-search {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--text, #111827);
  font-size: 13px;
}
.radar-search:focus { outline: none; border-color: var(--primary, #1f4f4d); }

/* ── Grid de cards ─────────────────────────────────────────────── */
.radar-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

/* ── Card de busca ─────────────────────────────────────────────── */
.radar-card {
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 14px;
  padding: 14px 14px 10px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.radar-card:hover {
  border-color: rgba(31,79,77,.35);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.radar-card--active {
  border-color: var(--primary, #1f4f4d);
  box-shadow: 0 0 0 2px rgba(31,79,77,.1);
}
.radar-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.radar-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text, #111827);
  letter-spacing: -.01em;
  line-height: 1.3;
}
.radar-card-acts {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s;
}
.radar-card:hover .radar-card-acts { opacity: 1; }
.radar-card-meta {
  font-size: 11.5px;
  color: var(--text-muted, #6b7280);
  line-height: 1.4;
}
.radar-card-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.radar-card-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.radar-card-stat span {
  font-size: 10.5px;
  color: var(--text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.radar-card-stat strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text, #111827);
  letter-spacing: -.01em;
}
.radar-card-nodata {
  font-size: 11.5px;
  color: var(--text-muted, #6b7280);
  font-style: italic;
}
.radar-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.radar-card-date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted, #6b7280);
}
.radar-card-portais { display: flex; gap: 4px; }

/* Portal badges no card */
.rdr-pbadge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 5px;
  border-radius: 4px;
  color: #fff;
}
.rdr-pbadge--zap      { background: #ef4444; }
.rdr-pbadge--vivareal { background: #f97316; }
.rdr-pbadge--olx      { background: #8b5cf6; }
.rdr-pbadge--imovelweb{ background: #3b82f6; }
.rdr-pbadge--62imoveis{ background: #10b981; }

/* Botão Buscar agora */
.radar-card-run {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 7px 0;
  background: rgba(31,79,77,.07);
  color: var(--primary, #1f4f4d);
  border: 1.5px solid rgba(31,79,77,.18);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  margin-top: 2px;
}
.radar-card-run:hover { background: rgba(31,79,77,.13); border-color: rgba(31,79,77,.32); }
.radar-card-run:disabled { opacity: .55; cursor: not-allowed; }

/* ── Estado vazio ──────────────────────────────────────────────── */
.radar-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted, #6b7280);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.radar-empty-icon { opacity: .25; margin-bottom: 4px; }
.radar-empty-title { font-size: 16px; font-weight: 700; color: var(--text, #111827); }
.radar-empty p { font-size: 13px; max-width: 360px; line-height: 1.6; }

/* ── Painel de resultados ──────────────────────────────────────── */
.radar-results {
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 16px;
  overflow: hidden;
}
.radar-res-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  background: var(--surface2, #f7f9fb);
}
.radar-res-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #111827);
}
.radar-tabs-row {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
  padding: 0 18px;
  background: var(--surface2, #f7f9fb);
}
.radar-rtab {
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.radar-rtab:hover { color: var(--text, #111827); }
.radar-rtab--active { color: var(--primary, #1f4f4d); border-bottom-color: var(--primary, #1f4f4d); }

/* Conteúdo das abas */
.radar-tab-pane { padding: 20px 18px; }

/* ── Métricas ──────────────────────────────────────────────────── */
.radar-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.radar-metric {
  background: var(--surface2, #f7f9fb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 110px;
}
.radar-metric span {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted, #6b7280);
}
.radar-metric strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--text, #111827);
  letter-spacing: -.02em;
}
.radar-metric--hl {
  border-color: rgba(31,79,77,.2);
  background: rgba(31,79,77,.04);
}
.radar-metric--hl strong { color: var(--primary, #1f4f4d); font-size: 17px; }

/* ── Comparativo imóvel vs mercado ─────────────────────────────── */
.radar-comp {
  background: var(--surface2, #f7f9fb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.radar-comp-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted, #6b7280);
  margin-bottom: 12px;
}
.radar-comp-bar-wrap { display: flex; flex-direction: column; gap: 6px; }
.radar-comp-bar {
  position: relative;
  height: 8px;
  background: var(--border, #e5e7eb);
  border-radius: 99px;
  overflow: visible;
}
.radar-comp-band {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(31,79,77,.2);
  border-radius: 99px;
}
.radar-comp-marker {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  background: var(--primary, #1f4f4d);
  border: 2.5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transform: translateX(-50%);
}
.radar-comp-scale {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-muted, #6b7280);
}
.radar-comp-status {
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 10px;
}

/* ── Tabela de anúncios ────────────────────────────────────────── */
.radar-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  margin: 4px 0 10px;
}
.radar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.radar-table th {
  background: var(--surface2, #f7f9fb);
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted, #6b7280);
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.radar-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  color: var(--text, #111827);
}
.radar-table tbody tr:last-child td { border-bottom: none; }
.radar-table tbody tr:hover td { background: var(--surface2, #f7f9fb); }

/* ── Links e rodapé ────────────────────────────────────────────── */
.radar-link {
  color: var(--primary, #1f4f4d);
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
}
.radar-link:hover { text-decoration: underline; }
.radar-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 7px 14px;
  background: rgba(31,79,77,.07);
  color: var(--primary, #1f4f4d);
  border: 1.5px solid rgba(31,79,77,.2);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.radar-link-btn:hover { background: rgba(31,79,77,.13); }
.radar-pfooter {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border, #e5e7eb);
  font-size: 12px;
}
.radar-cap-info {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-muted, #6b7280);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border, #e5e7eb);
}
.radar-portais-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.radar-portal-link {
  padding: 6px 12px;
  background: var(--surface2, #f7f9fb);
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #111827);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.radar-portal-link:hover { border-color: var(--primary, #1f4f4d); color: var(--primary, #1f4f4d); }

/* ── Mensagens vazias / erro ───────────────────────────────────── */
.radar-pna {
  font-size: 13px;
  color: var(--text-muted, #6b7280);
  padding: 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.radar-perr {
  font-size: 12.5px;
  color: var(--text, #111827);
  padding: 14px 16px;
  background: rgba(239,68,68,.05);
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 10px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ── Gráfico de tendência ──────────────────────────────────────── */
.rdr-svg {
  width: 100%;
  max-width: 520px;
  overflow: visible;
}
.rdr-grid { stroke: var(--border, #e5e7eb); stroke-width: 1; }
.rdr-band { fill: rgba(31,79,77,.08); }
.rdr-line { stroke: var(--primary, #1f4f4d); stroke-width: 2; fill: none; stroke-linejoin: round; }
.rdr-dot  { fill: var(--primary, #1f4f4d); }
.rdr-lbl  { font-size: 10px; fill: var(--text-muted, #6b7280); font-family: inherit; }
.radar-tend-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted, #6b7280);
  padding: 20px 0;
}

/* ── Form de nova busca ────────────────────────────────────────── */
.radar-form { display: flex; flex-direction: column; gap: 0; }

/* ══ SEARCH-SELECT WIDGET ══════════════════════════════════════════════════ */
.ss-wrap { position: relative; }
.ss-input-wrap { position: relative; display: flex; align-items: center; }
.ss-input {
  width: 100%; padding: 8px 32px 8px 10px; border-radius: var(--r-md);
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 13.5px; font-family: inherit;
  transition: border-color .15s;
}
.ss-input:focus { outline: none; border-color: var(--primary); }
.ss-clear {
  position: absolute; right: 8px; background: none; border: none;
  color: var(--muted); font-size: 16px; cursor: pointer; line-height: 1;
  padding: 0 2px; border-radius: 3px; font-family: inherit;
}
.ss-clear:hover { color: var(--text); }
.ss-dropdown {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); box-shadow: 0 8px 24px rgba(0,0,0,.14);
  z-index: 9999; max-height: 260px; overflow-y: auto;
}
.ss-option {
  padding: 9px 12px; cursor: pointer; font-size: 13px;
  color: var(--text); display: flex; flex-direction: column; gap: 2px;
  transition: background .1s;
}
.ss-option:hover { background: var(--surface-2); }
.ss-sub { font-size: 11.5px; color: var(--muted); }
.ss-footer {
  padding: 7px 10px; border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.ss-quickadd-btn { font-size: 12px; }

/* ── Quick-form inline ──────────────────────────────────────────────── */
.ss-quickform { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ss-qf-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ss-qf-actions { display: flex; gap: 8px; padding-top: 4px; }

/* ── Kanban — coluna de etapas removidas ────────────────────────────── */
.kanban-col--orphan { border: 1.5px dashed var(--muted); opacity: .85; }
.kanban-col--orphan .kanban-title { color: #f59e0b; }
.biz-card__orphan-tag {
  font-size: 10.5px; font-weight: 700; color: #92400e;
  background: #fef3c7; border-radius: 4px; padding: 2px 7px;
  display: inline-block; margin-bottom: 4px;
}

/* ════════════════════════════════════════════════════════════════════════
   MINHA CONTA — cfg-account-stack layout (painéis horizontais numerados)
   ════════════════════════════════════════════════════════════════════════ */

/* Stack principal */
.cfg-account-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px 0;
}

/* Painel individual */
.cfg-panel {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}

/* Stripe colorida no topo do painel */
.cfg-panel__stripe {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px 10px;
  background: linear-gradient(90deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 70%, transparent) 100%);
  border-bottom: 1px solid var(--border);
}

.cfg-panel__stripe-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}

.cfg-panel__stripe-label h3 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0;
}

.cfg-panel__stripe-label p {
  font-size: 11.5px;
  color: rgba(255,255,255,.78);
  margin: 0;
  flex-basis: 100%;
  padding-left: 32px;
}

.cfg-panel__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Corpo do painel */
.cfg-panel__body {
  padding: 20px 22px;
}

/* Corpo em duas colunas */
.cfg-panel__body--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 20px 22px;
}

@media (max-width: 680px) {
  .cfg-panel__body--split { grid-template-columns: 1fr; }
}

/* Coluna dentro do painel split */
.cfg-panel__col {}

.cfg-panel__col-head {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* Grade de campos dentro do painel */
.cfg-panel__fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}

.cfg-panel__field--full {
  grid-column: 1 / -1;
}

@media (max-width: 680px) {
  .cfg-panel__fields-grid { grid-template-columns: 1fr; }
  .cfg-panel__field--full { grid-column: 1; }
}

/* Grade de planos para agência (free / pro) */
.cfg-plano-agency-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 4px;
}

@media (max-width: 560px) {
  .cfg-plano-agency-grid { grid-template-columns: 1fr; }
}

/* Botões de plano agency */
.cfg-plano-agency-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  text-align: left;
}

.cfg-plano-agency-btn:hover {
  border-color: var(--primary);
}

.cfg-plano-agency-btn.active,
.cfg-plano-agency-btn--active {
  border-color: var(--primary) !important;
  background: color-mix(in srgb, var(--primary) 8%, var(--bg)) !important;
  box-shadow: 0 2px 12px rgba(29,78,216,.18) !important;
}

.cfg-plano-agency-btn strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.cfg-plano-agency-btn span {
  font-size: 12px;
  color: var(--muted);
}

.cfg-plano-agency-btn .cfg-plano-current {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-radius: 20px;
  padding: 2px 9px;
  margin-top: 4px;
}

/* Grid de perfil da conta (Bloco 03) */
.cfg-perfil-conta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.cfg-perfil-conta-item {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cfg-perfil-conta-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cfg-perfil-conta-val {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.cfg-perfil-conta-val--ok {
  color: #16a34a;
}

/* Hint de beta dentro de painel */
.cfg-panel__beta-hint {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  padding: 8px 0 2px;
}

/* ════════════════════════════════════════════════════════════════════════
   MINHA CONTA — Accordion behavior
   ════════════════════════════════════════════════════════════════════════ */

/* Stripe vira botão */
.cfg-panel__stripe {
  width: 100%;
  border: none;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px 12px;
  background: linear-gradient(90deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 70%, transparent) 100%);
  border-bottom: 1px solid transparent;
  transition: opacity .15s;
}
.cfg-panel__stripe:hover { opacity: .93; }

/* Chevron — rotaciona quando aberto */
.cfg-panel__chevron {
  flex-shrink: 0;
  margin-left: auto;
  color: rgba(255,255,255,.8);
  transition: transform .25s ease;
}
.cfg-panel--open .cfg-panel__chevron {
  transform: rotate(180deg);
}

/* Body: fechado por padrão */
.cfg-panel__body {
  display: none;
  animation: panelSlideIn .2s ease;
}
.cfg-panel--open .cfg-panel__body {
  display: block;
}
.cfg-panel--open .cfg-panel__body.cfg-panel__body--split {
  display: grid;
}

@keyframes panelSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Save row (só visível quando aberto) */
.cfg-panel__save-row {
  display: none;
  padding: 10px 20px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  border-radius: 0 0 14px 14px;
}
.cfg-panel--open .cfg-panel__save-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Grid inline compacto (2 cols para campos curtos) */
.cfg-panel__inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  align-items: start;
}

.cfg-panel__inline-grid .cfg-panel__field--full {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .cfg-panel__inline-grid { grid-template-columns: 1fr; }
  .cfg-panel__inline-grid .cfg-panel__field--full { grid-column: 1; }
}

/* Separador visual entre stripe e body quando aberto */
.cfg-panel--open .cfg-panel__stripe {
  border-bottom-color: rgba(255,255,255,.2);
}

/* ════════════════════════════════════════════════════════════════════════
   DASHBOARD SPLIT — Mode Switcher + Radar Cards
   ════════════════════════════════════════════════════════════════════════ */

/* Mode bar (Locação / Venda) */
.dash-mode-bar {
  display: flex;
  gap: 6px;
  margin: 0 0 20px;
  padding: 5px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  width: fit-content;
}

.dash-mode-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.dash-mode-btn:hover:not(.dash-mode-btn--active):not(.dash-mode-btn--locked) {
  background: var(--bg);
  color: var(--text);
}
.dash-mode-btn--active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--primary) 30%, transparent);
}
.dash-mode-btn--locked {
  opacity: .6;
  cursor: default;
}
.dash-mode-lock-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,.2);
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 2px;
}

/* Sub-mode switcher (Captação / Lançamentos) */
.dash-sub-switcher {
  display: flex;
  gap: 0;
  margin: 0 0 18px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
}
.dash-sub-btn {
  padding: 7px 18px;
  background: var(--surface);
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  border-right: 1px solid var(--border);
}
.dash-sub-btn:last-child { border-right: none; }
.dash-sub-btn:hover:not(.dash-sub-btn--active) { background: var(--bg); color: var(--text); }
.dash-sub-btn--active {
  background: var(--primary);
  color: #fff;
}

/* Mode body accent strip */
.dash-mode-body--locacao {
  --mode-accent: #2a7c79;
  --mode-accent-light: color-mix(in srgb, #2a7c79 10%, transparent);
}
.dash-mode-body--venda {
  --mode-accent: #4f46e5;
  --mode-accent-light: color-mix(in srgb, #4f46e5 10%, transparent);
}

/* Radar grid */
.dash-radar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 900px) { .dash-radar-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .dash-radar-grid { grid-template-columns: 1fr; } }

/* Radar card */
.dash-radar-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.dash-radar-card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.dash-radar-card--alert { border-left: 3px solid #ef4444; background: color-mix(in srgb,#ef4444 5%,var(--surface)); }
.dash-radar-card--warn  { border-left: 3px solid #f59e0b; background: color-mix(in srgb,#f59e0b 5%,var(--surface)); }
.dash-radar-card--info  { border-left: 3px solid #3b82f6; background: color-mix(in srgb,#3b82f6 5%,var(--surface)); }
.dash-radar-card--highlight { border-left: 3px solid var(--primary); background: color-mix(in srgb,var(--primary) 6%,var(--surface)); }

.dash-radar-card__icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-radius: 8px;
}
.dash-radar-card--alert .dash-radar-card__icon { color: #ef4444; background: color-mix(in srgb,#ef4444 12%,transparent); }
.dash-radar-card--warn .dash-radar-card__icon  { color: #f59e0b; background: color-mix(in srgb,#f59e0b 12%,transparent); }
.dash-radar-card--info .dash-radar-card__icon  { color: #3b82f6; background: color-mix(in srgb,#3b82f6 12%,transparent); }

.dash-radar-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.dash-radar-card__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.dash-radar-card__val {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.dash-radar-card__val--danger { color: #ef4444; }
.dash-radar-card__val--warn   { color: #f59e0b; }
.dash-radar-card__val--money  { color: var(--primary); }
.dash-radar-card__sub {
  font-size: 11.5px;
  color: var(--muted);
}
.dash-radar-card__action {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  opacity: .7;
  transition: opacity .12s;
}
.dash-radar-card__action:hover { opacity: 1; }

/* Quick actions */
.dash-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.dash-qa-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.dash-qa-btn:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  color: var(--primary);
}
.dash-qa-btn--danger:hover { border-color: #ef4444; color: #ef4444; background: color-mix(in srgb,#ef4444 6%,var(--surface)); }
.dash-qa-btn--primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.dash-qa-btn--primary:hover { opacity: .88; color: #fff; }

/* Financial summary rows */
.dash-fin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.dash-fin-row:last-child { border-bottom: none; }
.dash-fin-row strong { color: var(--text); font-weight: 600; }

/* ─── PAINEL DOCUMENTOS GOOGLE DRIVE ─────────────────────────────────────── */
.docs-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.docs-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.docs-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.docs-panel__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
}
.docs-panel__sub {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  max-width: 400px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.docs-panel__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg);
}
.docs-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border: none;
  transition: opacity .15s;
}
.docs-upload-label:hover { opacity: .88; }
.docs-upload-status {
  font-size: 12px;
  color: var(--muted);
}
.docs-panel__body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}
.docs-file-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  transition: flex .2s;
}
.docs-empty {
  padding: 24px 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.docs-empty--warn { color: #f59e0b; }
.docs-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.docs-file-item:last-child { border-bottom: none; }
.docs-file-item:hover { background: var(--bg); }
.docs-file-icon { font-size: 22px; flex-shrink: 0; width: 28px; text-align: center; }
.docs-file-info {
  flex: 1;
  min-width: 0;
}
.docs-file-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.docs-file-meta {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.docs-file-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
/* Preview pane */
.docs-preview-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  overflow: hidden;
}
.docs-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg);
}
.docs-preview-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.docs-preview-frame {
  flex: 1;
  border: none;
  background: #fff;
}
/* Docs trigger button in modal forms */
.modal-docs-row {
  padding: 10px 0 2px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ─── DRIVE — CHIPS DE SUBPASTAS ──────────────────────────────────────────── */
.docs-panel__toolbar {
  flex-wrap: wrap;
  gap: 8px;
}
.docs-subfolder-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.docs-subfolder-chip {
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s;
  font-family: inherit;
}
.docs-subfolder-chip:hover {
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  color: var(--primary);
  border-color: var(--primary);
}
.docs-subfolder-chip--active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Drive code + pessoa no header do painel */
.docs-drive-code {
  font-family: var(--font-mono, 'DM Mono', monospace);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .03em;
}
.docs-drive-pessoa {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* ─── PERMISSÕES — body.no-perm-{modulo}-{acao} ──────────────────────────── */

/* ── Negócios ── */
body.no-perm-negocios-criar  #btnOpenBusinessModal          { display: none !important; }
body.no-perm-negocios-editar [data-edit-business]           { display: none !important; }
body.no-perm-negocios-excluir [data-delete-business]        { display: none !important; }

/* ── Locações ── */
body.no-perm-locacoes-criar  #btnOpenLeaseModal             { display: none !important; }
body.no-perm-locacoes-editar [data-edit-lease]              { display: none !important; }
body.no-perm-locacoes-excluir [data-delete-lease]           { display: none !important; }

/* ── Financeiro ── */
body.no-perm-financeiro-criar  #btnOpenFinanceModal         { display: none !important; }
body.no-perm-financeiro-editar [data-edit-fin]              { display: none !important; }
body.no-perm-financeiro-excluir [data-delete-fin]           { display: none !important; }

/* ── Agenda ── */
body.no-perm-tarefas-criar #btnOpenTaskModal,
body.no-perm-tarefas-criar #btnOpenTaskModal2               { display: none !important; }
body.no-perm-tarefas-editar [data-edit-task],
body.no-perm-tarefas-editar [data-reagendar-task]           { display: none !important; }
body.no-perm-tarefas-excluir [data-delete-task]             { display: none !important; }

/* ── Cadastros ── */
body.no-perm-cadastros-criar  .cad-add-btn                  { display: none !important; }
body.no-perm-cadastros-editar .cad-row__actions [data-edit] { display: none !important; }
body.no-perm-cadastros-excluir .cad-row__actions [data-delete] { display: none !important; }

/* ── Base de Apoio ── */
body.no-perm-journey-ver [data-tab="journey"]               { display: none !important; }

/* ════════════════════════════════════════════════════════════════════════════
   RADAR ID — card de resultado + classificação + fallback + cache + dashboard
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Resultado de análise (card proeminente) ────────────────────────────── */
.radar-result-card {
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, #E2E8F0);
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 12px;
}

.radar-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.radar-result-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #8E99A2);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Badge de classificação */
.radar-class-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
}
.radar-class-badge--alto  { background: #fee2e2; color: #dc2626; }
.radar-class-badge--medio { background: #d1fae5; color: #065f46; }
.radar-class-badge--baixo { background: #dbeafe; color: #1d4ed8; }

/* Linhas de resultado */
.radar-result-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.radar-result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--text-2, #2D4D5B);
  padding: 4px 0;
  border-bottom: 1px solid var(--border, #E2E8F0);
}
.radar-result-row:last-child { border-bottom: none; }
.radar-result-row strong { font-weight: 700; color: var(--text, #102A43); }
.radar-result-row--diff strong { font-size: 14px; }

/* Diferença por cor */
.radar-diff--alto  { color: #dc2626; }
.radar-diff--medio { color: #065f46; }
.radar-diff--baixo { color: #1d4ed8; }

.radar-result-sub {
  font-size: 11.5px;
  color: var(--muted, #8E99A2);
  margin-top: 10px;
  text-align: right;
}

/* Tip quando não há valor pedido */
.radar-noprice-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-2, #F7F8FA);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-2, #2D4D5B);
  margin-top: 12px;
}

/* ── Fallback global (todos os portais falharam) ────────────────────────── */
.radar-fallback-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.radar-fallback-icon { color: #d97706; flex-shrink: 0; margin-top: 2px; }

.radar-fallback-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  color: var(--text, #102A43);
}
.radar-fallback-body strong { font-weight: 700; }
.radar-fallback-body span   { font-size: 12px; color: var(--muted, #8E99A2); }

.radar-fallback-acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 4px;
}

.radar-fallback-btn {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--primary, #0d9488);
  background: var(--primary, #0d9488);
  color: #fff;
  transition: opacity .15s;
}
.radar-fallback-btn:hover { opacity: .85; }
.radar-fallback-btn--sec {
  background: transparent;
  color: var(--primary, #0d9488);
}
.radar-fallback-btn--sec:hover { background: var(--surface-2, #F7F8FA); }

/* ── Botão "Analisar com Radar" na locação ──────────────────────────────── */
.radar-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary, #0d9488);
  border-color: var(--primary, #0d9488);
  font-weight: 600;
}
.radar-trigger-btn:hover { background: #f0fdfa; }

.modal-section--radar {
  border: 1.5px dashed var(--primary, #0d9488);
  border-radius: 10px;
  padding: 12px 14px;
  background: #f0fdfa;
}

/* ── Dashboard Radar summary ────────────────────────────────────────────── */
.radar-dash-summary {
  margin: 12px 16px 0;
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, #E2E8F0);
  border-radius: 12px;
  padding: 12px 16px;
}

.radar-dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.radar-dash-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #8E99A2);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.radar-dash-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radar-dash-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
}
.radar-dash-pill--alto  { background: #fee2e2; color: #dc2626; }
.radar-dash-pill--medio { background: #d1fae5; color: #065f46; }
.radar-dash-pill--baixo { background: #dbeafe; color: #1d4ed8; }

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD WIDGET SYSTEM — editável com drag-and-drop
   ═══════════════════════════════════════════════════════════════════════════ */

/* Widget container */
.dash-widgets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}
.dash-widget {
  position: relative;
  flex: 1 1 340px;
  min-width: 0;
}
.dash-widget--wide { flex: 1 1 100%; }
.dash-widget--hidden { display: none; }
.dash-edit-mode .dash-widget--hidden {
  display: block;
  opacity: 0.28;
  pointer-events: none;
}
.dash-widget--dragging { opacity: 0.38; }
.dash-widget--drag-over::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2.5px dashed var(--primary);
  border-radius: var(--r-xl);
  pointer-events: none;
  z-index: 10;
}

/* Widget control overlay (drag handle + toggle) */
.dash-widget__ctrl {
  display: none;
  position: absolute;
  top: 8px; right: 8px;
  z-index: 30;
  background: rgba(10,30,48,0.88);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  padding: 4px 8px;
  gap: 6px;
  align-items: center;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.dash-edit-mode .dash-widget__ctrl { display: flex; }
.dash-widget__handle {
  cursor: grab;
  color: rgba(255,255,255,0.60);
  font-size: 15px;
  padding: 2px 2px;
  line-height: 1;
  user-select: none;
}
.dash-widget__handle:active { cursor: grabbing; }
.dash-widget__handle:hover  { color: rgba(255,255,255,0.95); }
.dash-widget__wlabel {
  font-size: 10px;
  color: rgba(255,255,255,0.40);
  font-weight: 500;
  letter-spacing: 0.04em;
  user-select: none;
}
.dash-widget__toggle {
  cursor: pointer;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.65);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.dash-widget__toggle:hover { background: rgba(255,255,255,0.12); color: #fff; transform: none; box-shadow: none; }
.dash-edit-mode .dash-widget--hidden .dash-widget__toggle { color: #f87171; }

/* Edit bar below hero */
.dash-edit-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 18px;
  background: rgba(16,42,67,0.05);
  border: 1.5px dashed rgba(16,42,67,0.18);
  border-radius: var(--r-md);
}
.dash-edit-mode .dash-edit-bar { display: flex; }
.dash-edit-bar__hint {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dash-edit-bar__done {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 2px 6px rgba(16,42,67,0.18);
  flex-shrink: 0;
}
.dash-edit-bar__done:hover { background: var(--primary-mid); transform: none; }

/* ── Widget: Contratos Vencendo ─────────────────────────── */
.venc-summary { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.venc-pill {
  flex: 1 1 70px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 10px 12px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 1px 3px rgba(0,0,0,0.05);
}
.venc-pill--urgente { background: var(--danger-bg);  border: 1px solid var(--danger-border); }
.venc-pill--moderado{ background: var(--warning-bg); border: 1px solid var(--warning-border); }
.venc-pill--normal  { background: var(--info-bg);    border: 1px solid var(--info-border); }
.venc-pill__val { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1; }
.venc-pill--urgente  .venc-pill__val { color: var(--danger); }
.venc-pill--moderado .venc-pill__val { color: var(--warning); }
.venc-pill--normal   .venc-pill__val { color: var(--info); }
.venc-pill__lbl {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted); margin-top: 4px;
}
.venc-list { display: flex; flex-direction: column; }
.venc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.venc-row:last-of-type { border-bottom: none; }
.venc-row__dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--muted);
}
.venc-row__dot--urgente  { background: var(--danger); }
.venc-row__dot--moderado { background: #d97706; }
.venc-row__body { flex: 1; min-width: 0; }
.venc-row__body strong { font-size: 13px; font-weight: 600; color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.venc-row__body span   { font-size: 11.5px; color: var(--muted); }
.venc-row__right       { font-size: 12px; color: var(--muted); flex-shrink: 0; }

/* ── Widget: Desempenho ─────────────────────────────────── */
.desemp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.desemp-stat {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 14px 14px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 1px 3px rgba(0,0,0,0.04);
}
.desemp-stat__val { font-size: 28px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--text); }
.desemp-stat__val--ok   { color: #065F46; }
.desemp-stat__val--warn { color: var(--warning); }
.desemp-stat__val--bad  { color: var(--danger); }
.desemp-stat__lbl { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-top: 4px; }
.desemp-stat__sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.desemp-trend { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding-top: 10px; border-top: 1px solid var(--border); }
.desemp-trend__badge {
  padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
}
.desemp-trend__badge--up   { background: #D1FAE5; color: #065F46; }
.desemp-trend__badge--down { background: #FEE2E2; color: #991B1B; }
.desemp-trend__badge--flat { background: var(--surface-2); color: var(--muted); }

/* ── Widget: Top Imóveis ────────────────────────────────── */
.top-imoveis-list { display: flex; flex-direction: column; }
.top-imovel-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.top-imovel-row:last-of-type { border-bottom: none; }
.top-imovel-rank {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.top-imovel-rank--1 {
  background: linear-gradient(145deg, var(--primary-mid), var(--primary-dark));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 2px 6px rgba(16,42,67,0.2);
}
.top-imovel-info { flex: 1; min-width: 0; }
.top-imovel-info strong { font-size: 13px; font-weight: 600; color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-imovel-info span   { font-size: 11.5px; color: var(--muted); }
.top-imovel-valor { text-align: right; flex-shrink: 0; }
.top-imovel-valor strong { font-size: 13px; font-weight: 700; color: var(--text); }
.top-imovel-valor span   { font-size: 11px; color: var(--muted); display: block; }

/* ── Widget: Reajustes ──────────────────────────────────── */
.reaj-list { display: flex; flex-direction: column; }
.reaj-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.reaj-row:last-of-type { border-bottom: none; }
.reaj-row__body { flex: 1; min-width: 0; }
.reaj-row__body strong { font-size: 13px; font-weight: 600; color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reaj-row__body span   { font-size: 11.5px; color: var(--muted); }
.reaj-badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; flex-shrink: 0; }
.reaj-badge--urgente { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.reaj-badge--normal  { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }

/* ── Google Connection Card ─────────────────────────────── */
.cfg-card--google .cfg-card__head h3 {
  display: flex; align-items: center; gap: 6px;
}
.gcfg-status {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text);
}
.gcfg-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  transition: background 0.2s;
}
.gcfg-dot--loading {
  background: var(--muted);
  animation: gcfgPulse 1.1s ease-in-out infinite;
}
.gcfg-dot--ok  { background: #22c55e; }
.gcfg-dot--off { background: var(--muted); }
@keyframes gcfgPulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
.gcfg-btn-danger {
  color: var(--danger) !important;
  border-color: var(--danger-border) !important;
}
.gcfg-btn-danger:hover {
  background: var(--danger-bg) !important;
}

/* ══════════════════════════════════════════════════════════
   PÁGINA IMÓVEIS
   ══════════════════════════════════════════════════════════ */
.imov-page { display: flex; flex-direction: column; gap: 0; }

/* Header: abas + busca + botão */
.imov-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 0 0 16px; flex-wrap: wrap;
}
.imov-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.imov-tab-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.18s var(--ease);
  white-space: nowrap;
}
.imov-tab-btn:hover { background: var(--hover); color: var(--text); border-color: var(--primary-light); }
.imov-tab-btn--active {
  background: var(--primary); color: #fff; border-color: transparent;
  box-shadow: 0 2px 8px rgba(16,42,67,0.18);
}
.imov-tab-count {
  background: rgba(255,255,255,0.22); color: inherit;
  font-size: 11px; font-weight: 700; padding: 1px 7px;
  border-radius: 999px; min-width: 20px; text-align: center;
}
.imov-tab-btn:not(.imov-tab-btn--active) .imov-tab-count {
  background: var(--bg); color: var(--muted);
}
.imov-header-right {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; flex-wrap: nowrap;
}

/* ── Botão Novo Imóvel ───────────────────────────────────────── */
.imov-btn-add {
  display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap; flex-shrink: 0;
}

/* ── Botão Ações (dropdown trigger) ─────────────────────────── */
.imov-act-wrap { position: relative; flex-shrink: 0; }

.imov-act-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: var(--r-sm); font-size: 12.5px;
  font-weight: 500; cursor: pointer; white-space: nowrap;
  background: var(--surface); border: 1.5px solid var(--border);
  color: var(--text-muted); transition: border-color .15s, color .15s, background .15s;
}
.imov-act-btn:hover,
.imov-act-btn--active {
  border-color: var(--primary);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 7%, transparent);
}
.imov-act-chev { transition: transform .2s; }
.imov-act-menu--open ~ * .imov-act-chev,
.imov-act-btn--active .imov-act-chev { transform: rotate(180deg); }

.imov-sel-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 700;
}

/* ── Dropdown menu ───────────────────────────────────────────── */
.imov-act-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 210px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 5px; z-index: 300; overflow: hidden;
}
.imov-act-menu--open { display: block; }

.imov-act-section {
  padding: 4px 10px 2px; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); pointer-events: none;
}
.imov-act-sep { height: 1px; background: var(--border); margin: 4px 0; }
.imov-act-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 10px; border-radius: 7px; border: none; cursor: pointer;
  background: transparent; font-size: .84rem; color: var(--text);
  text-align: left; transition: background .12s;
}
.imov-act-item:hover:not(:disabled) { background: var(--surface-2); }
.imov-act-item:disabled { opacity: .38; cursor: not-allowed; }
.imov-act-item--danger { color: var(--danger, #ef4444); }
.imov-act-item--danger:hover:not(:disabled) { background: var(--danger-bg, #fee2e2); }
.imov-act-dim { color: var(--text-muted); font-size: .78rem; }

/* ── Chips de filtro de status ───────────────────────────────── */
.imov-filter-row {
  display: flex; align-items: center; gap: 6px;
  padding: 0 0 12px; flex-wrap: wrap;
}
.imov-filter-label { font-size: .75rem; color: var(--text-muted); font-weight: 500; }
.imov-filter-chip {
  padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 500;
  border: 1.5px solid var(--border); background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all .15s;
}
.imov-filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.imov-filter-chip--active {
  background: var(--primary); border-color: var(--primary);
  color: #fff;
}

/* ── Tipo "Outros" no card ───────────────────────────────────── */
.imov-card__tipo--outros {
  color: var(--text-muted); font-style: italic; font-weight: 400;
}

/* ── Separador na filter row ────────────────────────────────── */
.imov-filter-sep { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }

/* ── Filtro de cidade (autocomplete) ────────────────────────── */
.imov-city-wrap {
  position: relative; display: inline-flex; align-items: center;
}
.imov-city-input {
  padding: 4px 26px 4px 9px; border-radius: 99px; font-size: .8rem;
  border: 1.5px solid var(--border); background: var(--bg); color: var(--text);
  width: 170px; transition: border-color .15s, width .2s;
  outline: none;
}
.imov-city-input:focus { border-color: var(--primary); width: 210px; }
.imov-city-clear {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1rem;
  color: var(--text-muted); line-height: 1; padding: 0;
}
.imov-city-clear:hover { color: var(--danger,#ef4444); }
.imov-city-list {
  display: none; position: absolute; top: calc(100% + 5px); left: 0;
  min-width: 220px; max-height: 260px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 4px; z-index: 400; list-style: none; margin: 0;
}
.imov-city-list.open { display: block; }
.imov-city-item {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 7px; cursor: pointer;
  font-size: .84rem; color: var(--text); transition: background .1s;
}
.imov-city-item:hover { background: var(--surface-2); }
.imov-city-uf {
  font-size: .72rem; font-weight: 700; color: var(--text-muted);
  background: var(--bg); padding: 1px 5px; border-radius: 4px;
}
.imov-city-badge {
  margin-left: auto; font-size: .68rem; color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  padding: 1px 6px; border-radius: 99px; white-space: nowrap;
}
.imov-city-item--local { font-weight: 500; }

/* ── Checkbox nos cards ──────────────────────────────────────── */
.imov-card { position: relative; }
.imov-card__sel {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  cursor: pointer; line-height: 0;
}
.imov-card__sel input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; }
.imov-chk-box {
  display: block; width: 16px; height: 16px; border-radius: 4px;
  border: 2px solid var(--border); background: var(--bg);
  transition: border-color .12s, background .12s;
}
.imov-card__sel:hover .imov-chk-box { border-color: var(--primary); }
.imov-card__sel input:checked ~ .imov-chk-box {
  background: var(--primary); border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 10px;
}
.imov-card--checked {
  outline: 2px solid var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}
.imov-card__body { padding-left: 28px; }

/* Lista de cards */
.imov-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

/* Card individual */
.imov-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 2px 8px rgba(16,42,67,0.05),
    0 4px 16px rgba(16,42,67,0.04);
  display: flex; flex-direction: column;
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.imov-card:hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 6px 22px rgba(16,42,67,0.09);
  transform: translateY(-2px);
}
.imov-card__body { padding: 16px 18px; flex: 1; }
.imov-card__head-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.imov-card__tipo { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.imov-card__addr { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.35; margin-bottom: 2px; }
.imov-card__sub  { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.imov-card__val  { display: inline-block; font-size: 15px; font-weight: 700; color: var(--primary); margin-top: 6px; }
.imov-card__val small { font-size: 11px; font-weight: 500; opacity: .75; margin-left: 2px; }
.imov-card__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.imov-card__tag {
  font-size: 11px; padding: 2px 9px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text-2);
}
.imov-card__tag--emp  { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.imov-card__tag--fase { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.imov-card__tag--entrega { background: #fefce8; border-color: #fde68a; color: #92400e; }
.imov-card__actions {
  display: flex; gap: 6px; padding: 10px 18px;
  border-top: 1px solid var(--border);
}

/* Status badges */
.imov-status-badge { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.imov-status-badge--locado    { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.imov-status-badge--disponivel { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }

/* Modal imóvel expandido */
.imovel-modal-grid { display: flex; flex-direction: column; gap: 0; }
.field-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) {
  .field-row2, .field-row3 { grid-template-columns: 1fr; }
}
.imov-field--hidden { display: none !important; }

/* ─── Imóveis — cabeçalho com toggle lista/mapa ──────────────────────────── */
/* Sobrescreve só o que muda — display/align/justify ficam no bloco original */
.imov-header { justify-content: flex-start; gap: 10px; }
.imov-header-left { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; flex: 1; }
.imov-view-toggle { display: flex; gap: 3px; background: var(--surface); border-radius: 8px; padding: 3px; }
.imov-view-btn {
  display: flex; align-items: center; gap: .3rem;
  padding: .28rem .6rem; border-radius: 6px;
  border: none; background: transparent;
  color: var(--muted); cursor: pointer;
  font-size: .72rem; font-weight: 600;
  transition: background .15s, color .15s;
}
.imov-view-btn:hover { color: var(--text); }
.imov-view-btn--active { background: var(--primary); color: #fff !important; }
.imov-view-btn svg { flex-shrink: 0; }

/* ─── Imóveis — container do mapa ───────────────────────────────────────── */
.imov-map-container {
  width: 100%; height: calc(100vh - 210px); min-height: 380px;
  border-radius: 12px; overflow: hidden;
  border: 1.5px solid var(--border);
  position: relative;
  background: #e8e0d8;
}

/* ─── MiniMap engine ─────────────────────────────────────────────────────── */
.imap-tiles img { display: block; image-rendering: auto; }

/* Pin marcador */
.imap-pin {
  position: absolute;
  cursor: pointer;
  z-index: 10;
  transform: translate(-50%, -100%);
  transition: filter .15s;
}
.imap-pin:hover { filter: brightness(1.2); z-index: 20; }
.imap-pin-head {
  width: 16px; height: 16px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  transition: transform .15s;
}
.imap-pin:hover .imap-pin-head { transform: rotate(-45deg) scale(1.2); }
.imap-pin-tail {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 9px solid currentColor;
  margin: -1px auto 0;
  opacity: .7;
}

/* Popup do marcador */
.imap-popup {
  position: absolute; z-index: 50;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  min-width: 190px; max-width: 250px;
  display: flex; overflow: hidden;
  pointer-events: all;
}
.imap-popup-accent { width: 5px; flex-shrink: 0; }
.imap-popup-body { padding: .55rem .7rem; flex: 1; }
.imap-popup-cat { font-size: .63rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .15rem; }
.imap-popup-title { font-size: .78rem; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: .2rem; }
.imap-popup-sub { font-size: .68rem; color: var(--muted); margin-bottom: .2rem; }
.imap-popup-val { font-size: .8rem; font-weight: 700; color: var(--primary); margin-bottom: .4rem; }
.imap-popup-edit { font-size: .7rem; padding: .2rem .45rem; }

/* Controles de zoom */
.imap-ctrl {
  position: absolute; right: 12px; top: 12px;
  z-index: 30; display: flex; flex-direction: column; gap: 3px;
}
.imap-zoom-btn {
  width: 32px; height: 32px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer; font-size: 1.1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  transition: background .15s;
}
.imap-zoom-btn:hover { background: var(--surface); }

/* Loading */
.imap-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; color: var(--muted);
  background: var(--bg-card);
  z-index: 5;
}
.imap-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: .4rem;
  text-align: center; padding: 2rem;
}

/* Legenda */
.imap-legend {
  position: absolute; left: 12px; bottom: 24px;
  z-index: 30;
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: 8px; padding: .4rem .65rem;
  display: flex; flex-wrap: wrap; gap: .3rem .7rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
}
.imap-legend-item { display: flex; align-items: center; gap: .3rem; font-size: .7rem; color: var(--muted); }
.imap-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.imap-badge-count {
  font-size: .62rem; font-weight: 700;
  background: var(--surface); color: var(--muted);
  border-radius: 10px; padding: .05rem .3rem;
}

/* Atribuição OSM */
.imap-attr {
  position: absolute; right: 6px; bottom: 6px;
  z-index: 30; font-size: .6rem; color: var(--muted);
  background: rgba(255,255,255,.75); border-radius: 4px; padding: 1px 4px;
}
.imap-attr a { color: inherit; }

/* ══════════════════════════════════════════════════════════
   PÁGINA PESSOAS (ex-Cadastros)
   ══════════════════════════════════════════════════════════ */
.pessoas-totals {
  display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.pessoas-total-chip {
  display: flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 7px 16px;
  font-size: 12px; color: var(--muted);
}
.pessoas-total-num { font-size: 20px; font-weight: 800; color: var(--primary); line-height: 1; }

.pessoas-list { display: flex; flex-direction: column; gap: 8px; }

.pessoa-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 1px 4px rgba(16,42,67,0.05);
  transition: box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.pessoa-card:hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 4px 16px rgba(16,42,67,0.08);
  transform: translateY(-1px);
}
.pessoa-card__avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; flex-shrink: 0; color: #fff;
}
.pessoa-card__avatar--owner  { background: linear-gradient(135deg,#1f4f4d,#2e6f6d); }
.pessoa-card__avatar--tenant { background: linear-gradient(135deg,#1e40af,#3b82f6); }
.pessoa-card__avatar--lead   { background: linear-gradient(135deg,#7c3aed,#a855f7); }

.pessoa-card__body { flex: 1; min-width: 0; }
.pessoa-card__name { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.pessoa-card__meta { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; gap: 12px; flex-wrap: wrap; }
.pessoa-card__doc  { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.pessoa-card__right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.pessoa-card__actions { display: flex; gap: 6px; }

/* ══ WordPress / EPL Integration ══════════════════════════════════════════ */
.cfg-card--wp .cfg-card__head h3 { display: flex; align-items: center; }

/* Status badge no header da aba Imóveis */
.wp-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: default;
  user-select: none;
  transition: background .2s, color .2s;
}
.wp-badge--ok      { background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); }
.wp-badge--syncing { background: color-mix(in srgb, #f59e0b 12%, var(--surface)); color: #b45309; border: 1px solid color-mix(in srgb, #f59e0b 30%, transparent); animation: wp-spin-pulse 1.4s ease-in-out infinite; }
.wp-badge--error   { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); }
.wp-badge--off     { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }

@keyframes wp-spin-pulse { 0%,100%{ opacity:1; } 50%{ opacity:.55; } }

.imov-wp-sync-btn {
  padding: 3px 7px;
  height: 26px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 8px;
}

/* Status dot no card de Configurações */
.wp-sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 12.5px;
}
.wp-sync-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.wp-sync-dot--ok      { background: var(--primary); }
.wp-sync-dot--off     { background: var(--muted); }
.wp-sync-dot--loading { background: #f59e0b; animation: wp-blink .8s ease-in-out infinite alternate; }
.wp-sync-dot--error   { background: var(--danger); }
@keyframes wp-blink { from{opacity:1} to{opacity:.3} }

.wp-sync-label { font-weight: 600; color: var(--text); }
.wp-sync-last  { color: var(--muted); font-size: 11.5px; margin-left: auto; }

/* Opções e tipos CPT */
.wp-sync-options, .wp-card-types {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wp-sync-options .cfg-toggle-label,
.wp-card-types   .cfg-toggle-label {
  font-size: 13px;
}

/* Badge "WP" no card de imóvel */
.imov-card__wp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 600;
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  vertical-align: middle;
}

/* ── Toast ─────────────────────────────────────────────────────────────────── */
.app-toast{
  position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(80px);
  background:var(--surface); border:1px solid var(--border); border-radius:10px;
  padding:10px 18px; font-size:.85rem; box-shadow:0 4px 20px rgba(0,0,0,.15);
  z-index:9999; opacity:0; transition:opacity .2s, transform .25s; pointer-events:none;
  max-width:480px; text-align:center;
}
.app-toast--show{ opacity:1; transform:translateX(-50%) translateY(0); pointer-events:auto; }
.app-toast--success{ border-color:var(--green,#22c55e); color:var(--green,#22c55e); }
.app-toast--error  { border-color:var(--danger,#ef4444); color:var(--danger,#ef4444); }
.app-toast--info   { border-color:var(--primary); color:var(--primary); }

/* ── Importador CSV ─────────────────────────────────────────────────────────── */
.import-csv-overlay{ display:flex; align-items:center; justify-content:center;
  position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:1200;
  opacity:0; transition:opacity .2s; }
.import-csv-overlay.open{ opacity:1; }

.import-csv-box{ background:var(--surface); border-radius:14px; width:min(640px,95vw);
  max-height:90vh; display:flex; flex-direction:column; overflow:hidden;
  box-shadow:0 8px 40px rgba(0,0,0,.25); }

.import-csv-body{ padding:20px 24px; overflow-y:auto; display:flex; flex-direction:column; gap:18px; }

.import-field-row{ display:flex; flex-direction:column; gap:6px; }
.import-label{ font-size:.8rem; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.04em; }
.import-hint{ font-size:.76rem; color:var(--text-muted); }

.import-file-area{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.import-file-btn{ display:inline-flex; align-items:center; gap:6px; padding:7px 14px;
  border-radius:8px; border:1.5px dashed var(--border); background:transparent;
  color:var(--primary); font-size:.85rem; cursor:pointer; transition:background .15s,border-color .15s; }
.import-file-btn:hover{ background:color-mix(in srgb,var(--primary) 8%,transparent); border-color:var(--primary); }
.import-file-name{ font-size:.82rem; color:var(--text-muted); }

.import-radio-group{ display:flex; gap:20px; }
.import-radio{ display:inline-flex; align-items:center; gap:7px; cursor:pointer; font-size:.88rem; }
.import-radio input{ accent-color:var(--primary); width:15px; height:15px; }

.import-input{ padding:9px 12px; border:1.5px solid var(--border); border-radius:8px;
  background:var(--bg); color:var(--text); font-size:.88rem; outline:none;
  transition:border-color .15s; }
.import-input:focus{ border-color:var(--primary); }

.import-preview-area{ border-top:1px solid var(--border); padding-top:16px; display:flex; flex-direction:column; gap:10px; }
.import-preview-header{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:.84rem; }
.import-count{ display:inline-flex; align-items:center; gap:5px; color:var(--text); font-size:.88rem; }
.import-warn{ display:inline-flex; align-items:center; gap:6px; color:var(--warning,#f59e0b); font-size:.85rem; }

.import-tag{ display:inline-flex; align-items:center; padding:2px 8px; border-radius:20px; font-size:.75rem; font-weight:600; }
.import-tag--ok { background:color-mix(in srgb,var(--green,#22c55e) 15%,transparent); color:var(--green,#22c55e); }
.import-tag--off{ background:color-mix(in srgb,var(--text-muted) 15%,transparent); color:var(--text-muted); }

.import-preview-table-wrap{ overflow-x:auto; border-radius:8px; border:1px solid var(--border); }
.import-preview-table{ width:100%; border-collapse:collapse; font-size:.82rem; }
.import-preview-table th{ padding:8px 12px; background:var(--bg); font-weight:600;
  color:var(--text-muted); text-align:left; border-bottom:1px solid var(--border); font-size:.76rem; text-transform:uppercase; }
.import-preview-table td{ padding:8px 12px; border-bottom:1px solid var(--border); color:var(--text); }
.import-preview-table tr:last-child td{ border-bottom:none; }

/* Botão importar no toolbar */
.cad-add-btn--import{ display:inline-flex; align-items:center; gap:6px;
  background:transparent; border:1.5px dashed var(--border); color:var(--text-muted);
  margin-left:auto; }
.cad-add-btn--import:hover{ border-color:var(--primary); color:var(--primary); background:color-mix(in srgb,var(--primary) 8%,transparent); }

/* ── Autocomplete de equipe no importador ──────────────────────────────────── */
.import-ac-wrap{ position:relative; }
.import-ac-list{
  position:absolute; top:calc(100% + 4px); left:0; right:0; z-index:200;
  background:var(--surface); border:1.5px solid var(--border); border-radius:10px;
  list-style:none; margin:0; padding:4px 0;
  box-shadow:0 6px 24px rgba(0,0,0,.15); max-height:220px; overflow-y:auto;
}
.import-ac-item{
  display:flex; align-items:center; gap:8px; padding:9px 14px;
  cursor:pointer; transition:background .12s; font-size:.86rem;
}
.import-ac-item:hover{ background:color-mix(in srgb,var(--primary) 8%,transparent); }
.import-ac-name{ font-weight:600; color:var(--text); flex:1; }
.import-ac-role{
  font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  padding:2px 7px; border-radius:20px;
  background:color-mix(in srgb,var(--primary) 12%,transparent);
  color:var(--primary);
}
.import-ac-email{ font-size:.75rem; color:var(--text-muted); }

/* ── Mapping table (step 2) ─────────────────────────────────────────────── */
.import-mapping-wrap{ overflow-x:auto; border-radius:8px; border:1px solid var(--border); margin-top:8px; }
.import-mapping-table{ width:100%; border-collapse:collapse; font-size:.82rem; }
.import-mapping-table th{
  padding:7px 10px; background:var(--bg); font-weight:600;
  color:var(--text-muted); text-align:left; border-bottom:1px solid var(--border);
  font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; white-space:nowrap; }
.import-mapping-table td{ padding:6px 10px; border-bottom:1px solid var(--border); vertical-align:middle; }
.import-mapping-table tr:last-child td{ border-bottom:none; }

.imap-col-name{ width:30%; font-size:.8rem; color:var(--text-muted); font-family:monospace; }
.imap-col-arrow{ width:5%; text-align:center; color:var(--text-muted); font-size:.9rem; }
.imap-col-select{ width:35%; }
.imap-col-sample{ width:30%; font-size:.77rem; color:var(--text-muted); white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis; max-width:160px; }

.imap-select{
  width:100%; padding:5px 8px; border-radius:7px; font-size:.82rem;
  border:1px solid var(--border); background:var(--bg); color:var(--text);
  cursor:pointer; appearance:auto; }
.imap-select:focus{ outline:none; border-color:var(--primary); }

/* "Confirmar mapeamento" button inside modal */
.import-preview-btn{
  display:inline-flex; align-items:center; gap:6px;
  padding:.42rem 1rem; border-radius:8px; font-size:.85rem; font-weight:600; cursor:pointer;
  background:var(--primary); color:#fff; border:none; margin-top:10px; transition:filter .15s; }
.import-preview-btn:hover{ filter:brightness(1.08); }
.import-preview-btn:disabled{ opacity:.5; cursor:not-allowed; filter:none; }


/* ══════════════════════════════════════════════════════════════════════════════
   BUSCA — Hub de busca estilo CRM imobiliário
══════════════════════════════════════════════════════════════════════════════ */

/* Badge no nav */
.busca-pend-nav {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px;
  background: var(--danger, #ef4444); color: #fff;
  font-size: 9px; font-weight: 700; margin-left: 4px;
}

.bs-page { display: flex; flex-direction: column; gap: 0; height: 100%; }

/* ── Abas de contexto ──────────────────────────────────────────────────────── */
.bs-ctx-tabs {
  display: flex; gap: 2px; padding: 0 0 16px; border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.bs-ctx-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px; border: none; cursor: pointer;
  font-size: .85rem; font-weight: 500; background: transparent; color: var(--text-muted);
  transition: background .12s, color .12s;
}
.bs-ctx-tab:hover { background: var(--surface-2); color: var(--text); }
.bs-ctx-tab--active {
  background: var(--primary); color: #fff;
}
.bs-ctx-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: rgba(255,255,255,.25); color: #fff;
  font-size: 10px; font-weight: 700;
}
.bs-ctx-tab:not(.bs-ctx-tab--active) .bs-ctx-badge {
  background: var(--danger, #ef4444); color: #fff;
}

/* ── Barra de busca principal ──────────────────────────────────────────────── */
.bs-search-bar {
  display: flex; align-items: stretch; gap: 0;
  border: 1.5px solid var(--border); border-radius: 10px;
  overflow: hidden; margin-bottom: 12px;
  transition: border-color .15s; background: var(--surface);
}
.bs-search-bar:focus-within { border-color: var(--primary); }
.bs-type-sel {
  padding: 0 12px; border: none; border-right: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: .84rem; font-weight: 500;
  cursor: pointer; outline: none; min-width: 148px;
}
.bs-search-inp {
  flex: 1; padding: 11px 14px; border: none; background: transparent;
  color: var(--text); font-size: .92rem; outline: none;
}
.bs-search-inp::placeholder { color: var(--text-muted); }
.bs-search-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 20px; border-radius: 0; font-size: .88rem; font-weight: 600;
  white-space: nowrap;
}

/* ── Filtros rápidos (pílulas) ─────────────────────────────────────────────── */
.bs-quick-filters {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.bs-pill-wrap { position: relative; }
.bs-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 99px; font-size: .8rem; font-weight: 500;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text-muted);
  cursor: pointer; white-space: nowrap; transition: all .13s;
}
.bs-pill:hover { border-color: var(--primary); color: var(--primary); }
.bs-pill--active {
  border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary); font-weight: 600;
}
.bs-pill--more { border-style: dashed; }
.bs-pill-chev { transition: transform .15s; }
.bs-pill-drop.open .bs-pill-chev { transform: rotate(180deg); }
.bs-pill-clear {
  background: none; border: none; color: var(--text-muted); font-size: .78rem;
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.bs-pill-clear:hover { color: var(--danger, #ef4444); background: var(--danger-bg, #fee2e2); }

/* Dropdown das pílulas */
.bs-pill-drop {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 180px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 5px; z-index: 400;
}
.bs-pill-drop.open { display: block; }
.bs-drop-title {
  padding: 4px 8px 6px; font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted);
}
.bs-drop-item {
  display: block; width: 100%; padding: 7px 10px; border-radius: 7px;
  border: none; text-align: left; cursor: pointer; font-size: .84rem;
  background: transparent; color: var(--text); transition: background .1s;
}
.bs-drop-item:hover, .bs-drop-item.active { background: var(--surface-2); }
.bs-drop-item.active { font-weight: 600; color: var(--primary); }
.bs-drop-inp {
  width: 100%; padding: 6px 8px; margin: 3px 0; border-radius: 7px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: .84rem; outline: none; box-sizing: border-box;
}
.bs-drop-inp:focus { border-color: var(--primary); }

/* ── Corpo: resultados + painel avançado ───────────────────────────────────── */
.bs-body {
  display: flex; gap: 0; flex: 1; min-height: 0; position: relative;
}
.bs-results {
  flex: 1; min-width: 0; overflow-y: auto;
}
.bs-results-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 8px;
}
.bs-results-count { font-size: .78rem; color: var(--text-muted); font-weight: 500; }

/* ── Cards de resultado ────────────────────────────────────────────────────── */
.bs-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px; margin-bottom: 6px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; transition: border-color .12s, box-shadow .12s;
}
.bs-card:hover { border-color: var(--primary); box-shadow: 0 2px 12px rgba(0,0,0,.07); }
.bs-card__icon {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.bs-card__icon--locacao { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.bs-card__icon--imovel  { background: color-mix(in srgb, #8b5cf6 12%, transparent); color: #8b5cf6; }
.bs-card__icon--negocio { background: color-mix(in srgb, #f59e0b 12%, transparent); color: #f59e0b; }
.bs-card__body { flex: 1; min-width: 0; }
.bs-card__title { font-size: .88rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-card__sub   { font-size: .76rem; color: var(--text-muted); margin-top: 2px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.bs-card__right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.bs-card__val   { font-size: .88rem; font-weight: 700; color: var(--text); }
.bs-card__val small { font-weight: 400; color: var(--text-muted); }
.bs-chip {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 99px;
  font-size: .72rem; font-weight: 600; white-space: nowrap;
}
.bs-chip--green { background: color-mix(in srgb, #22c55e 15%, transparent); color: #16a34a; }
.bs-chip--blue  { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.bs-chip--grey  { background: var(--surface-2); color: var(--text-muted); }

/* ── Cards de pendência ────────────────────────────────────────────────────── */
.bs-pend-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 5px;
  border-left: 3px solid transparent;
}
.bs-pend--danger  { background: color-mix(in srgb,#ef4444 8%,var(--surface)); border-color: #ef4444; }
.bs-pend--warning { background: color-mix(in srgb,#f59e0b 8%,var(--surface)); border-color: #f59e0b; }
.bs-pend--muted   { background: var(--surface); border-color: var(--border); }
.bs-pend-icon     { flex-shrink: 0; color: var(--text-muted); }
.bs-pend--danger .bs-pend-icon  { color: #ef4444; }
.bs-pend--warning .bs-pend-icon { color: #d97706; }
.bs-pend-body  { flex: 1; min-width: 0; }
.bs-pend-title { font-size: .84rem; font-weight: 600; color: var(--text); }
.bs-pend-desc  { font-size: .76rem; color: var(--text-muted); }
.bs-pend-nav   { flex-shrink: 0; }

/* ── Empty state ───────────────────────────────────────────────────────────── */
.bs-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 56px 24px; color: var(--text-muted); text-align: center;
}
.bs-empty p { font-size: .9rem; max-width: 280px; line-height: 1.5; }
.bs-empty--ok { color: #16a34a; }

/* ── Painel avançado ───────────────────────────────────────────────────────── */
.bs-adv-panel {
  width: 0; overflow: hidden; flex-shrink: 0;
  background: var(--surface); border-left: 1px solid var(--border);
  transition: width .25s ease; display: flex; flex-direction: column;
  position: sticky; top: 0; max-height: calc(100vh - 160px);
}
.bs-adv-panel--open { width: 280px; }
.bs-adv-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-size: .88rem; font-weight: 600; color: var(--text); flex-shrink: 0;
}
.bs-adv-body { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.bs-adv-footer {
  padding: 12px 16px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; flex-shrink: 0;
}
.bs-adv-footer button { flex: 1; }
.bs-adv-field { display: flex; flex-direction: column; gap: 4px; }
.bs-adv-field label { font-size: .74rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.bs-adv-sel, .bs-adv-inp {
  padding: 7px 9px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: .84rem; outline: none;
  transition: border-color .13s;
}
.bs-adv-sel:focus, .bs-adv-inp:focus { border-color: var(--primary); }

/* ═══════════════════════════════════════════════════════════════════
   SIDEBAR COLAPSÁVEL
════════════════════════════════════════════════════════════════════ */
.sidebar {
  transition: width .22s cubic-bezier(.4,0,.2,1);
  will-change: width;
}
.sidebar--collapsed {
  width: 62px;
}
/* Botão de toggle */
.sidebar-collapse-btn {
  flex: none; border: none; background: transparent; cursor: pointer;
  color: var(--sidebar-tab-text); padding: 4px 6px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.6; transition: opacity .15s, background .15s;
}
.sidebar-collapse-btn:hover { opacity: 1; background: var(--sidebar-tab-hover-bg); }

/* ── Logo na brand area ─────────────────────────────────────────── */
/* Logo horizontal — visível com menu aberto */
.brand-logo-full {
  height: 34px; width: auto; max-width: 150px;
  object-fit: contain; object-position: left center;
  display: block; flex: 1; min-width: 0;
  transition: opacity .2s;
}
/* Ícones — menu fechado (ambos ocultos por padrão) */
.brand-logo-icon {
  display: none;
  width: 44px; height: 44px;
  object-fit: contain;
  flex: none;
}
/* Menu fechado, modo claro → logo escura */
.sidebar--collapsed .brand-logo-full         { display: none; }
.sidebar--collapsed .brand-logo-icon--light  { display: block; }
.sidebar--collapsed .brand-logo-icon--dark   { display: none; }
/* Menu fechado, modo escuro → logo clara */
body.theme-dark .sidebar--collapsed .brand-logo-icon--light { display: none; }
body.theme-dark .sidebar--collapsed .brand-logo-icon--dark  { display: block; }
/* Dark mode: logo horizontal clara (quando disponível) */
body.theme-dark .brand-logo-full { content: url('logo-id-light.png'); }
/* Compatibilidade com regras antigas */
.brand-logo { display: none; }
.brand-text  { display: none; }
/* Menu fechado: empilha botão + ícone centralizados */
.sidebar--collapsed .sidebar-brand {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 0 12px;
  gap: 8px;
}
/* Esconde textos de abas no collapsed */
.sidebar--collapsed .tab span:not(.tab-icon) { display: none; }
.sidebar--collapsed .tab-icon { width: auto; }
.sidebar--collapsed .tab { justify-content: center; padding: 10px 0; }
.sidebar--collapsed .sidebar-footer .sidebar-logout span { display: none; }
.sidebar--collapsed .sidebar-logout { justify-content: center; padding: 8px 0; }
.sidebar--collapsed .sidebar-version { display: none; }
.sidebar--collapsed .tab.tab--footer span:not(.tab-icon) { display: none; }
.sidebar--collapsed .busca-pend-nav { display: none !important; }
/* Mantém nav com overflow-x escondido no collapsed */
.sidebar--collapsed .sidebar-nav { padding: 10px 6px; }

/* Tooltips no collapsed */
.sidebar--collapsed .tab { position: relative; }
.sidebar--collapsed .tab::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 10px); top: 50%;
  transform: translateY(-50%);
  background: var(--sidebar-heading); color: var(--sidebar-badge-text);
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
  padding: 4px 9px; border-radius: 6px;
  pointer-events: none; opacity: 0;
  transition: opacity .15s .08s;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.sidebar--collapsed .tab:hover::after { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════
   TOPBAR — BUSCA RÁPIDA
════════════════════════════════════════════════════════════════════ */
.topbar-search-wrap { position: relative; }
.topbar-search-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  color: var(--muted);
  font-size: 13px; font-weight: 400;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  min-width: 160px;
  position: relative;
  font-family: inherit;
}
.topbar-search-btn:hover {
  border-color: var(--primary); background: var(--surface); color: var(--text);
}
.topbar-search-btn svg { flex: none; opacity: .65; }
.topbar-search-btn .busca-pend-nav {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════
   RAIL — NOVO+ DROPDOWN
════════════════════════════════════════════════════════════════════ */
.rail-novo-wrap { position: relative; }
.rail-novo-drop {
  position: absolute; bottom: calc(100% + 6px); right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.14);
  min-width: 190px;
  overflow: hidden;
  display: none;
  z-index: 9999;
}
.rail-novo-drop.open { display: block; }
.rail-novo-drop-title {
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  padding: 9px 13px 5px;
}
.rail-novo-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 13px;
  font-size: 13px; font-weight: 500;
  color: var(--text); /* overridden below with higher specificity */
  background: transparent; border: none; cursor: pointer;
  text-align: left; transition: background .13s;
  font-family: inherit;
}
/* Ensure text is always readable regardless of parent color inheritance */
.rail-novo-drop .rail-novo-item { color: var(--text); }
.rail-novo-drop .rail-novo-item:hover { background: var(--surface-2); color: var(--text); }
.rail-novo-item:hover { background: var(--surface-2); }
.rail-novo-item svg { opacity: .6; flex: none; color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════
   COROA DOURADA — plano Pro
════════════════════════════════════════════════════════════════════ */
.crown-gold { color: #D4A017; filter: drop-shadow(0 1px 3px rgba(212,160,23,.5)); }

/* old perf-radar replaced by .prw-card — see below */

/* ═══════════════════════════════════════════════════════════════════
   EQUIPE — PERMISSÕES EXPANDIDAS
════════════════════════════════════════════════════════════════════ */
.eq-perm-section-title {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.eq-perm-mod-block {
  margin-bottom: 16px;
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.eq-perm-mod-label {
  font-size: 12.5px; font-weight: 700; color: var(--text);
  padding: 9px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.eq-perm-mod-actions {
  display: flex; flex-direction: column; gap: 0;
}
.eq-perm-toggle-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.eq-perm-toggle-row:last-child { border-bottom: none; }
.eq-perm-toggle-row:hover { background: var(--surface-2); }
.eq-perm-toggle-row input[type=checkbox] { flex: none; accent-color: var(--primary); width: 15px; height: 15px; }
.eq-perm-toggle-label { display: flex; flex-direction: column; gap: 1px; }
.eq-perm-toggle-label strong { font-size: 12.5px; font-weight: 600; color: var(--text); }
.eq-perm-toggle-desc { font-size: 11px; color: var(--muted); }

/* ── Grupos da matriz de permissões ──────────────────────────────── */
.eq-perm-group {
  margin-bottom: 20px;
}
.eq-perm-group-label {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: var(--primary);
  padding: 4px 0 8px; margin-bottom: 6px;
  border-bottom: 2px solid var(--primary);
  opacity: .85;
}
/* Módulos dentro do grupo ficam mais compactos */
.eq-perm-group .eq-perm-mod-block { margin-bottom: 8px; }
.eq-perm-group .eq-perm-mod-label {
  font-size: 12px; padding: 7px 12px;
}
.eq-perm-group .eq-perm-toggle-row { padding: 7px 12px; }

/* ── Card template de permissões para corretores (Configurações) ── */
.cfg-corretor-perm-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 20px 22px; margin-top: 8px;
}
.cfg-corretor-perm-card__head {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.cfg-corretor-perm-card__head h3 { margin: 0 0 3px; font-size: 14px; font-weight: 700; }
.cfg-corretor-perm-card__head p { margin: 0; font-size: 12px; color: var(--muted); }
.cfg-corretor-perm-body {
  max-height: 420px; overflow-y: auto;
  padding-right: 4px;
}
.cfg-corretor-perm-body .eq-perm-group-label { color: var(--primary); border-bottom-color: var(--primary); }
.cfg-corretor-perm-actions {
  display: flex; gap: 8px; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════════
   SIDEBAR COLLAPSED — logout icon only
════════════════════════════════════════════════════════════════════ */
/* Logout: "Sair" text oculto quando fechado */
.sidebar--collapsed .sidebar-logout__label { display: none; }

/* ═══════════════════════════════════════════════════════════════════
   RADAR DE DESEMPENHO — Spider Chart SaaS
════════════════════════════════════════════════════════════════════ */
.prw-card {
  background: #F5F7F8;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 20px 22px 18px;
  margin-bottom: 22px;
  position: relative;
  overflow: visible;
}
.prw-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.prw-head__left {
  display: flex; align-items: center; gap: 8px;
}
.prw-title {
  font-size: 13px; font-weight: 700; color: #1e3c59;
  font-family: 'Inter','DM Sans',sans-serif;
}
.prw-sub {
  font-size: 11px; color: #9CA3AF;
  padding: 2px 7px; background: #E5E7EB;
  border-radius: 10px; font-weight: 500;
}
.prw-score {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0;
}
.prw-score__num {
  font-size: 26px; font-weight: 800; color: #1e3c59;
  line-height: 1; font-family: 'Inter','DM Sans',sans-serif;
}
.prw-score__label {
  font-size: 10px; font-weight: 600; color: #9CA3AF;
  text-transform: uppercase; letter-spacing: .06em;
}
.prw-body {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.prw-body--chart-only {
  justify-content: center; gap: 0;
}
.prw-body--chart-only .prw-chart-wrap {
  margin: 0 auto;
}

/* ── Radar mini (rodapé do dashboard) ─── */
#perfRadarWidget {
  margin-top: 20px;
}
.prw-card--mini {
  display: flex; flex-direction: row; align-items: center;
  gap: 20px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  position: relative;
  max-width: 420px;
}
.prw-mini-info {
  display: flex; flex-direction: column; gap: 4px; flex: 1;
}
.prw-mini-header {
  display: flex; align-items: center; gap: 6px;
}
.prw-score--mini {
  display: flex; align-items: baseline; gap: 4px; margin-top: 4px;
}
.prw-score--mini .prw-score__num {
  font-size: 26px; font-weight: 700; color: #1e3c59;
  font-family: 'Inter','DM Sans',sans-serif; line-height: 1;
}
.prw-score--mini .prw-score__label {
  font-size: 10px; color: #9CA3AF; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em;
}
.prw-chart-wrap {
  flex: none;
  position: relative;
}
.prw-metrics {
  flex: 1; min-width: 180px;
  display: flex; flex-direction: column; gap: 10px;
}
.prw-metric__top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.prw-metric__label {
  font-size: 11.5px; color: #6B7280;
  font-family: 'Inter','DM Sans',sans-serif; font-weight: 500;
}
.prw-metric__pct {
  font-size: 12px; font-weight: 700; color: #1e3c59;
  font-family: 'Inter','DM Sans',sans-serif;
}
.prw-bar {
  height: 4px; background: #E5E7EB; border-radius: 2px; overflow: hidden;
}
.prw-bar__fill {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, #1e3c59 0%, #2d6a9f 100%);
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

/* Tooltip do radar */
.prw-tooltip {
  position: absolute;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px; color: #374151;
  font-family: 'Inter','DM Sans',sans-serif;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* ══════════════════════════════════════════════════════
   PAINEL DE DETALHE DO NEGÓCIO
   ══════════════════════════════════════════════════════ */

.neg-detail-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.35);
  z-index: 900;
  backdrop-filter: blur(2px);
  animation: overlayIn .18s ease;
}
@keyframes overlayIn { from{opacity:0} to{opacity:1} }

.neg-detail-panel {
  position: fixed; top: 0; right: 0;
  width: 420px; max-width: 96vw;
  height: 100vh;
  background: #fff;
  box-shadow: -8px 0 32px rgba(15,23,42,.12);
  z-index: 910;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
  font-family: 'DM Sans','Inter',sans-serif;
}
.neg-detail-panel--open {
  transform: translateX(0);
}

/* Header */
.ndp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid #F1F5F9;
  flex-shrink: 0;
  gap: 12px;
}
.ndp-header__left {
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.ndp-back-btn {
  background: none; border: none; cursor: pointer;
  color: #6B7280; display: flex; align-items: center;
  padding: 4px; border-radius: 6px;
  flex-shrink: 0;
}
.ndp-back-btn:hover { background: #F3F4F6; color: #111827; }
.ndp-title-wrap {
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.ndp-title {
  font-size: 15px; font-weight: 700; color: #111827;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ndp-badge-tipo {
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; flex-shrink: 0;
}
.ndp-badge-tipo--locacao { background: #EFF6FF; color: #2563EB; }
.ndp-badge-tipo--venda   { background: #FFF7ED; color: #EA580C; }
.ndp-header__actions {
  display: flex; gap: 8px; flex-shrink: 0;
}

/* Pipeline progress */
.ndp-pipeline-wrap {
  padding: 14px 20px 0;
  flex-shrink: 0;
}
.ndp-pipeline {
  display: flex; align-items: center; gap: 0;
  overflow-x: auto; padding-bottom: 12px;
  scrollbar-width: none;
}
.ndp-pipeline::-webkit-scrollbar { display: none; }
.ndp-pipe-step {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; flex-shrink: 0;
}
.ndp-pipe-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #E5E7EB; border: 2px solid #E5E7EB;
  transition: all .2s;
}
.ndp-pipe-step.done .ndp-pipe-dot {
  background: #1e3c59; border-color: #1e3c59;
}
.ndp-pipe-step.active .ndp-pipe-dot {
  background: #fff; border: 3px solid #1e3c59;
  box-shadow: 0 0 0 3px rgba(30,60,89,.15);
  width: 13px; height: 13px;
}
.ndp-pipe-label {
  font-size: 9.5px; color: #9CA3AF; font-weight: 500;
  white-space: nowrap; text-align: center; max-width: 60px;
}
.ndp-pipe-step.done .ndp-pipe-label,
.ndp-pipe-step.active .ndp-pipe-label { color: #1e3c59; font-weight: 600; }
.ndp-pipe-line {
  height: 2px; flex: 1; min-width: 14px;
  background: #E5E7EB; margin-bottom: 16px;
}
.ndp-pipe-terminal {
  font-size: 11px; font-weight: 700; padding: 3px 12px;
  border-radius: 20px; flex-shrink: 0; margin-left: 12px; margin-bottom: 14px;
}
.ndp-pipe-terminal--ganho  { background: #D1FAE5; color: #059669; }
.ndp-pipe-terminal--perdido { background: #FEE2E2; color: #DC2626; }

/* Body scroll */
.ndp-body {
  flex: 1; overflow-y: auto; padding: 0 20px 20px;
}

/* Sections */
.ndp-section {
  margin-top: 20px;
}
.ndp-section__head {
  font-size: 10px; font-weight: 700; color: #9CA3AF;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 10px;
}

/* Cliente card */
.ndp-cliente-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: #F8FAFC;
  border-radius: 10px; border: 1px solid #E5E7EB;
}
.ndp-pessoa-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg,#1e3c59 0%,#2d6a9f 100%);
  color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ndp-pessoa-info { display: flex; flex-direction: column; gap: 3px; }
.ndp-pessoa-nome { font-size: 14px; font-weight: 600; color: #111827; }
.ndp-pessoa-detalhe {
  font-size: 12px; color: #6B7280;
  display: flex; align-items: center; gap: 4px;
}

/* Imóvel card */
.ndp-imovel-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: #F8FAFC;
  border-radius: 10px; border: 1px solid #E5E7EB;
}
.ndp-imovel-icon {
  color: #1e3c59; flex-shrink: 0; opacity: .7;
}
.ndp-imovel-info { display: flex; flex-direction: column; gap: 3px; }
.ndp-imovel-end  { font-size: 13px; font-weight: 600; color: #111827; }
.ndp-imovel-cat  { font-size: 11px; color: #6B7280; }
.ndp-imovel-val  { font-size: 13px; font-weight: 700; color: #1e3c59; }

/* Detalhes grid */
.ndp-details-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.ndp-detail-row {
  display: flex; flex-direction: column; gap: 2px;
  background: #F8FAFC; border-radius: 8px; padding: 10px 12px;
}
.ndp-detail-key { font-size: 10px; color: #9CA3AF; font-weight: 600; text-transform: uppercase; letter-spacing:.05em; }
.ndp-detail-val { font-size: 13px; font-weight: 600; color: #1F2937; }

/* Observação */
.ndp-obs {
  font-size: 13px; color: #374151; line-height: 1.55;
  background: #FFFBEB; border-left: 3px solid #F59E0B;
  padding: 10px 14px; border-radius: 0 8px 8px 0;
}

/* Timeline */
.ndp-timeline { display: flex; flex-direction: column; gap: 0; }
.ndp-tl-item {
  display: flex; gap: 12px; padding: 8px 0;
  border-left: 2px solid #E5E7EB; margin-left: 6px;
  padding-left: 14px; position: relative;
}
.ndp-tl-dot {
  position: absolute; left: -5px; top: 12px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #1e3c59; border: 2px solid #fff;
  box-shadow: 0 0 0 1px #1e3c59;
}
.ndp-tl-content { display: flex; flex-direction: column; gap: 2px; }
.ndp-tl-text  { font-size: 13px; color: #374151; font-weight: 500; }
.ndp-tl-date  { font-size: 11px; color: #9CA3AF; }
.ndp-tl-empty { font-size: 12px; color: #9CA3AF; font-style: italic; padding: 8px 0; }

/* Footer com botões de ação */
.ndp-footer {
  display: flex; gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #F1F5F9;
  flex-shrink: 0;
}
.ndp-btn-ganho {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #059669; color: #fff;
  border: none; border-radius: 10px; padding: 12px 16px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.ndp-btn-ganho:hover { background: #047857; }
.ndp-btn-perdido {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #FEF2F2; color: #DC2626;
  border: 1.5px solid #FECACA; border-radius: 10px; padding: 12px 16px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.ndp-btn-perdido:hover { background: #FEE2E2; }

/* Modal de perda */
.perda-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  z-index: 950;
  width: 380px; max-width: 95vw;
  animation: modalIn .18s cubic-bezier(.4,0,.2,1);
}
.perda-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 15px; font-weight: 700; color: #111827;
}
.perda-modal__close {
  background: none; border: none; cursor: pointer; color: #6B7280;
  padding: 4px; border-radius: 6px; display: flex; align-items: center;
}
.perda-modal__close:hover { background: #F3F4F6; color: #111827; }
.perda-modal__body { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.perda-modal__footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid #F1F5F9;
}

/* Kanban card — cursor pointer pq clicável */
.biz-card { cursor: pointer; }
.biz-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }

/* Impede scroll do body quando panel aberto */
body.neg-detail-open { overflow: hidden; }

/* ══════════════════════════════════════════════════════════════════════════
   PÁGINA COMPLETA DO NEGÓCIO — neg-fp (full-page overlay)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Layout base ──────────────────────────────────────────────────────────── */
.neg-fp {
  position: fixed; inset: 0; z-index: 800;
  background: #F1F5F9;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
  font-family: 'DM Sans','Inter',sans-serif;
}
.neg-fp--visible { opacity: 1; transform: translateY(0); }
body.neg-fp-open { overflow: hidden; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.nfp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  height: 62px; min-height: 62px;
  background: #fff;
  border-bottom: 1.5px solid #E2E8F0;
  flex-shrink: 0;
  gap: 16px;
  box-shadow: 0 1px 6px rgba(15,23,42,.06);
  z-index: 10;
}
.nfp-hdr-left {
  display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1;
}
.nfp-back-btn {
  background: none; border: none; cursor: pointer;
  color: #64748B; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.nfp-back-btn:hover { background: #F1F5F9; color: #1e3c59; }
.nfp-hdr-identity { min-width: 0; }
.nfp-hdr-name {
  font-size: 16px; font-weight: 700; color: #0F172A;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2;
}
.nfp-hdr-meta {
  display: flex; align-items: center; gap: 8px; margin-top: 3px; flex-wrap: wrap;
}
.nfp-stage-badge {
  font-size: 11px; font-weight: 600; padding: 2px 10px;
  border-radius: 20px; display: inline-flex; align-items: center; gap: 4px;
}
.nfp-stage--active  { background: #EFF6FF; color: #2563EB; }
.nfp-stage--ganho   { background: #D1FAE5; color: #059669; }
.nfp-stage--perdido { background: #FEE2E2; color: #DC2626; }
.nfp-tipo-badge {
  font-size: 10.5px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px;
}
.nfp-tipo--locacao { background: #F0F9FF; color: #0284C7; }
.nfp-tipo--venda   { background: #FFF7ED; color: #EA580C; }
.nfp-imovel-chip {
  font-size: 11px; color: #64748B; display: inline-flex; align-items: center; gap: 4px;
  background: #F8FAFC; padding: 2px 8px; border-radius: 6px;
  border: 1px solid #E2E8F0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px;
}
.nfp-hdr-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

/* GANHO / PERDIDO — botões de destaque no header */
.nfp-btn-ganho {
  display: inline-flex; align-items: center; gap: 6px;
  background: #059669; color: #fff;
  border: none; border-radius: 9px; padding: 9px 18px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: inherit; letter-spacing: .01em;
  transition: background .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(5,150,105,.3);
}
.nfp-btn-ganho:hover { background: #047857; box-shadow: 0 4px 14px rgba(5,150,105,.4); }
.nfp-btn-perdido {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: #DC2626;
  border: 2px solid #FECACA; border-radius: 9px; padding: 7px 16px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s;
}
.nfp-btn-perdido:hover { background: #FEF2F2; border-color: #DC2626; }
.nfp-closed-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 6px 14px;
  border-radius: 9px;
}
.nfp-closed--ganho   { background: #D1FAE5; color: #059669; }
.nfp-closed--perdido { background: #FEE2E2; color: #DC2626; }

/* ── Body: 3 colunas ──────────────────────────────────────────────────────── */
.neg-fp-body {
  flex: 1; overflow: hidden;
  display: grid;
  grid-template-columns: 280px 1fr 340px;
  gap: 0;
}
.nfp-col {
  overflow-y: auto; height: 100%;
  scrollbar-width: thin; scrollbar-color: #CBD5E1 transparent;
}
.nfp-col::-webkit-scrollbar { width: 5px; }
.nfp-col::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }

.nfp-col--left   { background: #fff; border-right: 1.5px solid #E2E8F0; padding: 20px 0; }
.nfp-col--center { background: #F8FAFC; padding: 24px 24px 40px; }
.nfp-col--right  { background: #fff; border-left: 1.5px solid #E2E8F0; padding: 20px 0; }

/* ── Cards (coluna esquerda / direita) ────────────────────────────────────── */
.nfp-card {
  padding: 16px 20px;
  border-bottom: 1px solid #F1F5F9;
}
.nfp-card:last-child { border-bottom: none; }
.nfp-card__head {
  font-size: 10px; font-weight: 700; color: #94A3B8;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}

/* Cliente */
.nfp-pessoa-row {
  display: flex; align-items: center; gap: 12px;
}
.nfp-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #1e3c59 0%, #2d6a9f 100%);
  color: #fff; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.nfp-pessoa-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nfp-pessoa-nome { font-size: 14px; font-weight: 600; color: #0F172A; }
.nfp-pessoa-sub  {
  font-size: 12px; color: #64748B;
  display: flex; align-items: center; gap: 5px;
}

/* Imóvel */
.nfp-imovel-row {
  display: flex; align-items: flex-start; gap: 10px;
}
.nfp-imovel-ico { color: #1e3c59; opacity: .6; flex-shrink: 0; margin-top: 1px; }
.nfp-imovel-end { font-size: 13px; font-weight: 600; color: #0F172A; }
.nfp-imovel-cat { font-size: 11px; color: #64748B; margin-top: 2px; }
.nfp-imovel-val { font-size: 13px; font-weight: 700; color: #1e3c59; margin-top: 4px; }

/* Detalhes rows */
.nfp-drow {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 7px 0; border-bottom: 1px solid #F8FAFC;
  gap: 12px;
}
.nfp-drow:last-child { border-bottom: none; }
.nfp-drow__k { font-size: 11px; color: #94A3B8; font-weight: 500; flex-shrink: 0; }
.nfp-drow__v { font-size: 12px; font-weight: 600; color: #1E293B; text-align: right; }

/* Observação */
.nfp-obs {
  font-size: 12.5px; color: #374151; line-height: 1.55;
  background: #FFFBEB; border-left: 3px solid #F59E0B;
  padding: 10px 12px; border-radius: 0 8px 8px 0;
}

/* ── Sections (coluna centro e direita) ───────────────────────────────────── */
.nfp-section {
  background: #fff; border-radius: 14px;
  border: 1px solid #E2E8F0;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.nfp-section__head {
  font-size: 10.5px; font-weight: 700; color: #94A3B8;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
}

/* Coluna direita: sections sem border-radius (flush ao painel) */
.nfp-col--right .nfp-section {
  border-radius: 0; border-left: none; border-right: none;
  border-top: none; border-bottom: 1px solid #F1F5F9;
  padding: 16px 20px;
  margin-bottom: 0;
}
.nfp-col--right .nfp-section:last-child { border-bottom: none; }

/* Hint vazio */
.nfp-hint {
  font-size: 12px; color: #94A3B8; font-style: italic; padding: 4px 0;
}

/* ── Pipeline vertical (coluna central) ───────────────────────────────────── */
.nfp-pipe-vert {
  display: flex; flex-direction: column; gap: 0;
}
.nfp-pipe-step {
  display: flex; align-items: center; gap: 12px;
  position: relative; padding: 8px 0;
  cursor: default;
}
.nfp-pipe-step__line {
  position: absolute; left: 10px; top: 50%;
  width: 2px; height: calc(100% + 0px); background: #E2E8F0;
  transform: translateX(-50%); z-index: 0;
}
.nfp-pipe-step:last-of-type .nfp-pipe-step__line { display: none; }
.nfp-pipe-step__dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: #E2E8F0; border: 2px solid #E2E8F0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; z-index: 1; color: #fff; font-size: 9px;
  transition: all .2s;
}
.nfp-pipe-step.past .nfp-pipe-step__dot {
  background: #1e3c59; border-color: #1e3c59;
}
.nfp-pipe-step.active .nfp-pipe-step__dot {
  background: #fff; border: 3px solid #1e3c59;
  box-shadow: 0 0 0 4px rgba(30,60,89,.12);
  width: 22px; height: 22px;
}
.nfp-pipe-step__body { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.nfp-pipe-step__name {
  font-size: 13px; font-weight: 500; color: #94A3B8;
}
.nfp-pipe-step.past .nfp-pipe-step__name  { color: #1e3c59; }
.nfp-pipe-step.active .nfp-pipe-step__name {
  font-size: 14px; font-weight: 700; color: #0F172A;
}
.nfp-pipe-step__cur {
  font-size: 9.5px; font-weight: 700; color: #2563EB;
  background: #EFF6FF; padding: 2px 7px; border-radius: 20px;
  letter-spacing: .03em; text-transform: uppercase;
}
.nfp-move-btn {
  font-size: 11px !important;
  opacity: 0; transition: opacity .15s;
  margin-left: auto; flex-shrink: 0;
}
.nfp-pipe-step:hover .nfp-move-btn { opacity: 1; }
.nfp-pipe-terminal {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700;
  padding: 12px 16px; border-radius: 10px; margin-top: 8px;
}
.nfp-pipe-terminal--ganho   { background: #D1FAE5; color: #059669; }
.nfp-pipe-terminal--perdido { background: #FEE2E2; color: #DC2626; }

/* ── Checklist ────────────────────────────────────────────────────────────── */
.nfp-checklist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.nfp-cl-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: #374151; cursor: pointer;
  padding: 6px 8px; border-radius: 8px; transition: background .12s;
}
.nfp-cl-item:hover { background: #F8FAFC; }
.nfp-cl-item input[type=checkbox] { width: 16px; height: 16px; accent-color: #1e3c59; cursor: pointer; }
.nfp-cl-item.done span { text-decoration: line-through; color: #94A3B8; }
.nfp-cl-count {
  font-size: 11px; font-weight: 700; color: #fff;
  background: #1e3c59; padding: 2px 8px; border-radius: 20px;
}
.nfp-cl-bar {
  height: 4px; background: #E2E8F0; border-radius: 2px; overflow: hidden;
  margin-top: 4px;
}
.nfp-cl-bar__fill {
  height: 4px; background: linear-gradient(90deg, #1e3c59, #2d6a9f);
  border-radius: 2px; transition: width .4s cubic-bezier(.4,0,.2,1);
}

/* ── Ações rápidas ────────────────────────────────────────────────────────── */
.nfp-acoes { display: flex; flex-direction: column; gap: 8px; }
.nfp-acao-btn {
  display: flex; align-items: center; gap: 8px;
  background: #F8FAFC; border: 1px solid #E2E8F0;
  border-radius: 9px; padding: 10px 14px;
  font-size: 13px; font-weight: 500; color: #1E293B;
  cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s, box-shadow .15s;
  text-align: left;
}
.nfp-acao-btn:hover { background: #EFF6FF; border-color: #BFDBFE; box-shadow: 0 2px 8px rgba(37,99,235,.08); }
.nfp-acao-btn--done { background: #D1FAE5 !important; border-color: #6EE7B7 !important; color: #059669; }

/* ── Documentos ───────────────────────────────────────────────────────────── */
.nfp-doc-tipos {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px;
}
.nfp-doc-tipo-btn {
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border: 1px solid #E2E8F0; border-radius: 20px;
  background: #F8FAFC; color: #64748B; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.nfp-doc-tipo-btn.active { background: #1e3c59; color: #fff; border-color: #1e3c59; }
.nfp-upload-lbl {
  cursor: pointer !important;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px !important;
}
.nfp-docs-list { display: flex; flex-direction: column; gap: 6px; }
.nfp-doc-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px;
  background: #F8FAFC; border: 1px solid #E2E8F0;
  transition: background .15s;
}
.nfp-doc-item:hover { background: #EFF6FF; }
.nfp-doc-ico { color: #64748B; flex-shrink: 0; }
.nfp-doc-info { flex: 1; min-width: 0; }
.nfp-doc-nome { font-size: 12.5px; font-weight: 600; color: #1E293B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nfp-doc-meta { font-size: 11px; color: #94A3B8; margin-top: 1px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nfp-doc-tipo-tag {
  font-size: 10px; font-weight: 600; padding: 1px 6px;
  background: #EFF6FF; color: #2563EB; border-radius: 20px;
}
.nfp-doc-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.nfp-doc-tipo-sel {
  font-size: 10px; border: 1px solid #E2E8F0; border-radius: 6px;
  padding: 2px 4px; color: #64748B; background: #fff; cursor: pointer;
  max-width: 80px;
}

/* ── Histórico ────────────────────────────────────────────────────────────── */
.nfp-hist { display: flex; flex-direction: column; gap: 0; }
.nfp-hist-item {
  display: flex; gap: 12px;
  padding: 9px 0; padding-left: 12px;
  border-left: 2px solid #E2E8F0;
  margin-left: 6px;
  position: relative;
}
.nfp-hist-dot {
  position: absolute; left: -5px; top: 14px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #1e3c59; border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px #1e3c59;
}
.nfp-hist-content { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nfp-hist-text  { font-size: 12.5px; color: #374151; font-weight: 500; word-break: break-word; }
.nfp-hist-date  { font-size: 10.5px; color: #94A3B8; }

/* ── Modal de perda ───────────────────────────────────────────────────────── */
.nfp-perda-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.4);
  z-index: 920; backdrop-filter: blur(2px);
}
.nfp-perda-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.2);
  z-index: 930; width: 400px; max-width: 95vw;
  animation: modalIn .18s cubic-bezier(.4,0,.2,1);
  font-family: 'DM Sans','Inter',sans-serif;
}
.nfp-perda-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 14px;
  font-size: 15px; font-weight: 700; color: #0F172A;
  border-bottom: 1px solid #F1F5F9;
  gap: 12px;
}
.nfp-perda-modal__head button {
  background: none; border: none; cursor: pointer; color: #94A3B8;
  display: flex; padding: 4px; border-radius: 6px;
  transition: background .15s;
}
.nfp-perda-modal__head button:hover { background: #F1F5F9; color: #374151; }
.nfp-perda-modal__body { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.nfp-perda-modal__footer {
  padding: 14px 22px; border-top: 1px solid #F1F5F9;
  display: flex; gap: 10px; justify-content: flex-end;
}
.req { color: #DC2626; }

/* ── Kanban card: clicável ────────────────────────────────────────────────── */
.biz-card { cursor: pointer; }
.biz-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════════════════
   IMÓVEL — Visibilidade & Portais
════════════════════════════════════════════════════════════════════ */
.imovel-vis-row { margin-bottom: 14px; }
.imovel-vis-toggle {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  padding: 12px 14px; border-radius: 10px;
  background: var(--surface-2); border: 1.5px solid var(--border);
  transition: border-color .15s;
}
.imovel-vis-toggle:hover { border-color: var(--primary); }
.imovel-vis-toggle input[type=checkbox] { display: none; }
.imovel-vis-toggle__track {
  flex: none; margin-top: 2px;
  width: 36px; height: 20px; border-radius: 10px;
  background: var(--border); position: relative;
  transition: background .2s;
}
.imovel-vis-toggle__track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .2s;
}
.imovel-vis-toggle input:checked ~ .imovel-vis-toggle__track { background: var(--primary); }
.imovel-vis-toggle input:checked ~ .imovel-vis-toggle__track::after { transform: translateX(16px); }
.imovel-vis-toggle__label { display: flex; flex-direction: column; gap: 2px; }
.imovel-vis-toggle__label strong { font-size: 13px; font-weight: 600; color: var(--text); }
.imovel-vis-toggle__hint { font-size: 11.5px; color: var(--muted); }

/* Badge visibilidade nos cards de imóvel */
.imovel-priv-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600; padding: 2px 7px;
  border-radius: 20px; background: #fef2f2; color: #dc2626;
  border: 1px solid #fecaca;
}

/* ── Portais de publicação ─────────────────────────────────────── */
.imovel-portais-section { margin-top: 12px; }
.imovel-portais-label {
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px;
}
.imovel-portais-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.imovel-portal-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 8px; cursor: default;
  border: 1.5px solid var(--border); background: var(--surface-2);
  font-size: 11.5px; transition: all .15s;
}
.imovel-portal-chip .portal-chip-logo {
  font-size: 9px; font-weight: 800; letter-spacing: .04em;
  background: var(--muted); color: #fff;
  padding: 2px 5px; border-radius: 4px;
}
.imovel-portal-chip .portal-chip-name { font-weight: 600; color: var(--text); }
.imovel-portal-chip .portal-chip-status { font-size: 10.5px; color: var(--muted); }
.imovel-portal-chip.pub--ok { border-color: #10b981; background: #f0fdf4; }
.imovel-portal-chip.pub--ok .portal-chip-logo { background: #10b981; }
.imovel-portal-chip.pub--ok .portal-chip-status { color: #059669; font-weight: 600; }
.imovel-portal-chip.pub--pend { border-color: #f59e0b; background: #fffbeb; }
.imovel-portal-chip.pub--pend .portal-chip-logo { background: #f59e0b; }
.imovel-portal-chip.pub--err { border-color: #ef4444; background: #fef2f2; }
.imovel-portal-chip.pub--err .portal-chip-logo { background: #ef4444; }
.imovel-portal-chip.pub--paused { opacity: .55; }
.imovel-portais-hint { font-size: 11px; color: var(--muted); margin: 4px 0 0; }

/* ── Grupo ZAP — Card de Configurações ────────────────────────── */
.cfg-card--zap { border-left: 4px solid #FF6B2B; }
.cfg-zap-status-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.cfg-zap-fields { display: flex; flex-direction: column; gap: 0; }
.cfg-portal-section { margin-bottom: 16px; }
.cfg-portal-section__label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: var(--primary); margin-bottom: 10px;
  padding-bottom: 6px; border-bottom: 1.5px solid var(--border);
}
.cfg-zap-test-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; flex-wrap: wrap;
}
.cfg-badge {
  font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; letter-spacing: .03em;
}
.cfg-badge--ok { background: #d1fae5; color: #059669; }
.cfg-badge--off { background: var(--surface-2); color: var(--muted); }

/* ══════════════════════════════════════════════════════════════════════════
   NEGÓCIO — Reestruturação (funil horizontal, header botões, histórico)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Funil horizontal (pipe bar) ─────────────────────────────────────────── */
.nfp-pipe-bar {
  background: #fff;
  border-bottom: 1.5px solid #E2E8F0;
  padding: 10px 20px;
  flex-shrink: 0;
  overflow-x: auto;
}
.nfp-pipe-bar::-webkit-scrollbar { height: 3px; }
.nfp-pipe-bar::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 2px; }

.nfp-pipe-horiz {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
}
.nfp-pipe-horiz--terminal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  min-width: unset;
}
.nfp-pipe-horiz--ganho   { background: #D1FAE5; color: #059669; }
.nfp-pipe-horiz--perdido { background: #FEE2E2; color: #DC2626; }
.nfp-pipe-horiz-sub { font-size: 11px; font-weight: 400; opacity: .7; margin-left: 6px; }

.nfp-pipe-hs {
  display: flex;
  align-items: center;
  position: relative;
  cursor: default;
  user-select: none;
}
.nfp-pipe-hs__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 18px 6px 14px;
  border-radius: 6px;
  transition: background .15s;
  min-width: 80px;
  text-align: center;
}
.nfp-pipe-hs--future .nfp-pipe-hs__inner { cursor: pointer; }
.nfp-pipe-hs--future .nfp-pipe-hs__inner:hover { background: #EFF6FF; }
.nfp-pipe-hs--past .nfp-pipe-hs__inner { cursor: pointer; }
.nfp-pipe-hs--past .nfp-pipe-hs__inner:hover { background: #F0FDF4; }

.nfp-pipe-hs__dot {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #CBD5E1; background: #fff; flex-shrink: 0;
  font-size: 9px; color: #fff;
  transition: all .2s;
}
.nfp-pipe-hs--past  .nfp-pipe-hs__dot { background: #059669; border-color: #059669; }
.nfp-pipe-hs--active .nfp-pipe-hs__dot { background: #fff; border: 3px solid #1e3c59; width: 20px; height: 20px; box-shadow: 0 0 0 3px rgba(30,60,89,.15); }

.nfp-pipe-hs__name {
  font-size: 11px; font-weight: 500; color: #94A3B8;
  white-space: nowrap;
}
.nfp-pipe-hs--past   .nfp-pipe-hs__name { color: #059669; }
.nfp-pipe-hs--active .nfp-pipe-hs__name { font-size: 12px; font-weight: 700; color: #0F172A; }

.nfp-pipe-hs__cur {
  font-size: 9px; font-weight: 700; color: #2563EB;
  background: #EFF6FF; border-radius: 4px; padding: 1px 5px;
  letter-spacing: .04em; text-transform: uppercase;
}

.nfp-pipe-hs__arr {
  width: 22px; height: 2px; background: #E2E8F0;
  position: relative; flex-shrink: 0;
}
.nfp-pipe-hs__arr::after {
  content: '';
  position: absolute; right: -1px; top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid #E2E8F0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.nfp-pipe-hs--past + .nfp-pipe-hs .nfp-pipe-hs__arr,
.nfp-pipe-hs--past .nfp-pipe-hs__arr { background: #6EE7B7; }
.nfp-pipe-hs--past .nfp-pipe-hs__arr::after { border-left-color: #6EE7B7; }

/* ── Header: botão X (fechar) ────────────────────────────────────────────── */
.nfp-close-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: none; border: 1.5px solid #E2E8F0;
  cursor: pointer; color: #64748B;
  transition: background .15s, color .15s, border-color .15s;
  flex-shrink: 0;
}
.nfp-close-btn:hover { background: #FEE2E2; border-color: #FCA5A5; color: #DC2626; }

/* ── Header: Mais opções dropdown ────────────────────────────────────────── */
.nfp-mais-wrap { position: relative; }
.nfp-mais-trigger { white-space: nowrap; }
.nfp-mais-trigger.active { background: #EFF6FF; border-color: #BFDBFE; color: #2563EB; }
.nfp-mais-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1.5px solid #E2E8F0;
  border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,.12);
  z-index: 900; min-width: 200px; overflow: hidden;
  animation: dropIn .12s ease;
}
@keyframes dropIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }
.nfp-mais-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px; border: none; background: none;
  font-size: 13px; font-weight: 500; color: #1E293B;
  cursor: pointer; text-align: left;
  transition: background .1s;
}
.nfp-mais-item:hover { background: #F8FAFC; }
.nfp-mais-item--danger { color: #DC2626; }
.nfp-mais-item--danger:hover { background: #FEF2F2; }

/* ── neg-fp layout: include pipe bar ─────────────────────────────────────── */
.neg-fp {
  display: flex;
  flex-direction: column;
}
.neg-fp-body {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
}

/* ── Histórico: sections + pin ───────────────────────────────────────────── */
.nfp-hist-section-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: #94A3B8;
  margin: 12px 0 6px;
}
.nfp-hist-divider {
  height: 1px; background: #F1F5F9; margin: 10px 0;
}
.nfp-hist-item--pinned {
  background: #FFFBEB; border-radius: 8px; padding: 6px 8px;
  margin-bottom: 4px;
}
.nfp-hist-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 2px;
}
.nfp-hist-tipo {
  font-size: 10px; font-weight: 600; color: #94A3B8;
  display: inline-flex; align-items: center; gap: 3px;
}
.nfp-hist-date { font-size: 10.5px; color: #94A3B8; }
.nfp-hist-pin-btn {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 600; color: #94A3B8;
  background: none; border: none; cursor: pointer; padding: 1px 4px;
  border-radius: 4px; transition: background .1s, color .1s;
}
.nfp-hist-pin-btn:hover { background: #FEF9C3; color: #CA8A04; }
.nfp-hist-item--pinned .nfp-hist-pin-btn { color: #D97706; }

/* Nota inline input */
.nfp-hist-input { margin-bottom: 10px; }

/* ── Coluna direita mais estreita ─────────────────────────────────────────── */
.nfp-col--right .nfp-doc-tipos { gap: 4px; }
.nfp-col--right .nfp-doc-tipo-btn { font-size: 10px; padding: 3px 7px; }

/* Dark mode adjustments */
body.theme-dark .nfp-pipe-bar   { background: var(--surface-2); border-color: rgba(255,255,255,.07); }
body.theme-dark .nfp-pipe-hs--future .nfp-pipe-hs__inner:hover { background: rgba(255,255,255,.05); }
body.theme-dark .nfp-pipe-hs__arr { background: rgba(255,255,255,.12); }
body.theme-dark .nfp-mais-menu  { background: var(--surface-2); border-color: rgba(255,255,255,.1); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
body.theme-dark .nfp-mais-item  { color: #E2E8F0; }
body.theme-dark .nfp-mais-item:hover { background: rgba(255,255,255,.06); }
body.theme-dark .nfp-close-btn  { border-color: rgba(255,255,255,.12); color: #94A3B8; }
body.theme-dark .nfp-close-btn:hover { background: rgba(220,38,38,.15); border-color: #DC2626; color: #F87171; }
body.theme-dark .nfp-hist-item--pinned { background: rgba(245,158,11,.08); }
body.theme-dark .nfp-hist-section-label { color: #64748B; }

/* ══════════════════════════════════════════════════════════════════════════
   CONGELAR NEGÓCIO — botão azul + vista congelados + badge no card
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Dropdown item: Congelar (fundo azul) ────────────────────────────────── */
.nfp-mais-item--congelar {
  color: #fff !important;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
  border-radius: 0;
  font-weight: 600;
}
.nfp-mais-item--congelar:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%) !important;
}
.nfp-mais-item--congelar svg { stroke: #fff; }

/* ── Chip "Congelados" na tipo bar ───────────────────────────────────────── */
.neg-tipo-chip--freeze {
  color: #2563EB;
  border-color: #BFDBFE;
  background: #EFF6FF;
}
.neg-tipo-chip--freeze.active {
  background: #2563EB;
  color: #fff;
  border-color: #2563EB;
}
.neg-tipo-chip--freeze svg { stroke: currentColor; }
.neg-freeze-cnt {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; border-radius: 9px;
  background: rgba(37,99,235,.15); color: #2563EB;
  font-size: 10px; font-weight: 800; padding: 0 4px;
  margin-left: 2px;
}
.neg-tipo-chip--freeze.active .neg-freeze-cnt {
  background: rgba(255,255,255,.25); color: #fff;
}

/* ── Badge de congelado no card do kanban ────────────────────────────────── */
.biz-card--frozen {
  border-left: 3px solid #2563EB;
  background: linear-gradient(180deg, #EFF6FF 0%, #fff 40%);
}
.biz-card__freeze-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; color: #2563EB;
  background: #EFF6FF; border-radius: 5px; padding: 2px 7px;
  margin-bottom: 6px;
}
.biz-card__freeze-badge svg { stroke: #2563EB; }

/* ── Lista de congelados (vista) ─────────────────────────────────────────── */
.neg-freeze-list {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px; max-width: 900px;
}
.neg-freeze-card {
  display: flex; align-items: flex-start; gap: 16px;
  background: #fff; border: 1.5px solid #BFDBFE;
  border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(37,99,235,.06);
  transition: box-shadow .15s;
}
.neg-freeze-card:hover { box-shadow: 0 4px 16px rgba(37,99,235,.12); }
.neg-freeze-card__ico {
  width: 42px; height: 42px; border-radius: 10px;
  background: #EFF6FF; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.neg-freeze-card__body { flex: 1; min-width: 0; }
.neg-freeze-card__name {
  font-size: 14px; font-weight: 700; color: #0F172A; margin-bottom: 5px;
}
.neg-freeze-card__meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: #64748B; margin-bottom: 6px;
}
.neg-freeze-card__retorno {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: #2563EB;
  background: #EFF6FF; border-radius: 6px; padding: 3px 9px;
  margin-bottom: 5px;
}
.neg-freeze-card__retorno--vencido {
  color: #DC2626; background: #FEF2F2;
}
.neg-freeze-card__obs {
  font-size: 11.5px; color: #64748B; font-style: italic;
  display: flex; align-items: center; gap: 5px;
}
.neg-freeze-card__actions {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0;
}
.neg-descongelar-btn {
  white-space: nowrap;
}
.neg-freeze-tipo {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px;
}
.neg-freeze-tipo--locacao { background: #F0F9FF; color: #0284C7; }
.neg-freeze-tipo--venda   { background: #FFF7ED; color: #EA580C; }

/* Dark mode */
body.theme-dark .biz-card--frozen { background: rgba(37,99,235,.08); border-left-color: #3B82F6; }
body.theme-dark .biz-card__freeze-badge { background: rgba(37,99,235,.2); color: #93C5FD; }
body.theme-dark .neg-freeze-card { background: var(--surface-2); border-color: rgba(37,99,235,.3); }
body.theme-dark .neg-freeze-card__ico { background: rgba(37,99,235,.15); }
body.theme-dark .neg-freeze-card__retorno { background: rgba(37,99,235,.15); color: #93C5FD; }
body.theme-dark .neg-freeze-card__retorno--vencido { background: rgba(220,38,38,.15); color: #FCA5A5; }

/* ══════════════════════════════════════════════════════════════════════════
   PERMISSÕES — grupo master toggle + módulo master toggle
   ══════════════════════════════════════════════════════════════════════════ */

.eq-perm-group-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}
.eq-perm-group-toggle {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
}
.eq-perm-group-toggle input[type=checkbox] {
  width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer;
  flex-shrink: 0;
}
.eq-perm-group-toggle .eq-perm-group-label {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: var(--primary); opacity: .85;
  margin: 0; padding: 0; border: none;
}
.eq-grp-toggle-hint {
  font-size: 10px; color: #94A3B8; font-style: italic;
}

/* Módulo: linha com label + "todas" toggle */
.eq-perm-mod-label-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.eq-perm-mod-label-row .eq-perm-mod-label { margin: 0; }
.eq-perm-mod-toggle-all {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; color: #94A3B8; cursor: pointer; font-weight: 600;
}
.eq-perm-mod-toggle-all input[type=checkbox] {
  width: 13px; height: 13px; accent-color: var(--primary); cursor: pointer;
}
.eq-perm-group-body { padding-left: 2px; }

body.theme-dark .eq-grp-toggle-hint { color: #475569; }
body.theme-dark .eq-perm-mod-toggle-all { color: #475569; }

/* ══════════════════════════════════════════════════════════════════════════
   PERMISSÕES — bloqueio de seção + modal Gerais/Individuais
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Tela de bloqueio de permissão ───────────────────────────────────────── */
.perm-bloq {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 60px 24px; text-align: center;
  min-height: 300px;
}
.perm-bloq__title {
  font-size: 16px; font-weight: 700; color: #64748B;
}
.perm-bloq__msg {
  font-size: 13px; color: #94A3B8; max-width: 320px; line-height: 1.5;
}

/* ── Modal permissões: seções Gerais / Individuais ────────────────────────── */
.eq-perm-section {
  border-bottom: 1.5px solid #F1F5F9;
}
.eq-perm-section--geral {
  background: linear-gradient(135deg, #F0F9FF 0%, #EFF6FF 100%);
  padding: 16px 20px;
}
.eq-perm-section--individual { padding: 16px 20px 0; }

.eq-perm-section-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.eq-perm-section-hdr__left {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: #1E293B;
}
.eq-perm-section-hdr__left svg { stroke: #2563EB; flex-shrink: 0; }
.eq-perm-section-badge {
  font-size: 9.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; padding: 2px 7px; border-radius: 5px;
  background: #2563EB; color: #fff;
}
.eq-perm-section-badge--ind {
  background: #7C3AED; color: #fff;
}
.eq-perm-section-desc {
  font-size: 12px; color: #64748B; line-height: 1.55; margin: 0;
}
.eq-perm-section-desc strong { color: #1E293B; }
.eq-perm-section-desc em { font-style: normal; color: #DC2626; font-weight: 600; }

body.theme-dark .eq-perm-section--geral { background: rgba(37,99,235,.08); }
body.theme-dark .eq-perm-section { border-color: rgba(255,255,255,.07); }
body.theme-dark .eq-perm-section-hdr__left { color: #E2E8F0; }
body.theme-dark .eq-perm-section-desc { color: #94A3B8; }
body.theme-dark .eq-perm-section-desc strong { color: #E2E8F0; }
