html { color-scheme: light; -webkit-font-smoothing: antialiased; }
* { transition: background-color .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s; }

::-webkit-scrollbar { width:8px; height:8px; }
::-webkit-scrollbar-track { background:#F1F4F7; }
::-webkit-scrollbar-thumb { background:#CED0D4; border-radius:4px; }
::-webkit-scrollbar-thumb:hover { background:#909396; }

.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.focus\:not-sr-only:focus { position:static; width:auto; height:auto; padding:8px 12px; margin:0; overflow:visible; clip:auto; white-space:normal; background:#0064E0; color:#fff; }

.bg-mesh { background:
  radial-gradient(at 20% 10%, rgba(0,100,224,.08) 0px, transparent 50%),
  radial-gradient(at 80% 30%, rgba(71,165,250,.06) 0px, transparent 50%),
  radial-gradient(at 50% 90%, rgba(231,234,239,.5) 0px, transparent 50%);
}

/* Buttons */
.btn-primary { background:#0064E0; color:#fff; border-radius:100px; padding:10px 22px; font-weight:500; font-size:14px; display:inline-flex; align-items:center; gap:8px; }
.btn-primary:hover { background:#0143B5; }
.btn-primary:active { transform:scale(.97); opacity:.95; }
.btn-primary:disabled { opacity:.5; cursor:not-allowed; }
.btn-secondary { border:1.5px solid rgba(10,19,23,.12); border-radius:100px; padding:8px 18px; font-weight:500; font-size:14px; color:#1C2B33; background:#fff; display:inline-flex; align-items:center; gap:6px; }
.btn-secondary:hover { background:#1C2B33; color:#fff; border-color:#1C2B33; }
.btn-ghost { color:#0064E0; border-radius:8px; padding:6px 12px; font-weight:500; font-size:13px; display:inline-flex; align-items:center; gap:6px; }
.btn-ghost:hover { background:#E8F3FF; }
.btn-danger { background:#E41E3F; color:#fff; border-radius:100px; padding:8px 18px; font-weight:500; font-size:13px; }
.btn-danger:hover { background:#C80A28; }
.btn-icon { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:8px; color:#5D6C7B; background:transparent; }
.btn-icon:hover { background:#F1F4F7; color:#1C2B33; }
.btn-icon.danger:hover { color:#E41E3F; background:#FCE4E8; }

/* Inputs */
.input { border:1px solid #DEE3E9; background:#fff; border-radius:10px; padding:9px 12px; color:#1C2B33; outline:none; font-size:14px; width:100%; }
.input:focus { border-color:#0064E0; box-shadow:0 0 0 3px rgba(0,100,224,.18); }
.input:disabled { background:#F7F8FA; color:#909396; cursor:not-allowed; }
textarea.input { min-height:96px; resize:vertical; }
select.input { appearance:auto; background:#fff; }

/* Cards */
.card { background:#fff; border:1px solid #DEE3E9; border-radius:16px; padding:20px; }
.card-feature { background:#fff; border:1px solid #DEE3E9; border-radius:24px; padding:32px; box-shadow:0 2px 4px rgba(0,0,0,.04); }
.card-flat { background:#F7F8FA; border-radius:16px; padding:20px; }

/* KPIs */
.kpi { background:#fff; border:1px solid #DEE3E9; border-radius:16px; padding:18px 20px; display:flex; flex-direction:column; gap:6px; }
.kpi-label { font-size:12px; color:#65676B; text-transform:uppercase; letter-spacing:.5px; font-weight:600; }
.kpi-value { font-size:28px; font-weight:600; color:#1C2B33; font-variant-numeric: tabular-nums; line-height:1; }
.kpi-delta { font-size:12px; color:#31A24C; font-weight:500; }
.kpi-icon { width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:#E8F3FF; color:#0064E0; }

/* Nav */
.nav-link { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:10px; color:#4B4C4F; font-size:14px; font-weight:500; cursor:pointer; }
.nav-link:hover { background:#F1F4F7; }
.nav-link.active { background:#E8F3FF; color:#0064E0; }
.nav-link i { width:18px; height:18px; }
.badge { background:#E41E3F; color:#fff; border-radius:99px; padding:1px 7px; font-size:11px; font-weight:600; margin-left:auto; }

/* Table */
.table-wrap { background:#fff; border:1px solid #DEE3E9; border-radius:16px; overflow:hidden; }
table.t { width:100%; font-size:13px; border-collapse:collapse; }
table.t thead { background:#F7F8FA; border-bottom:1px solid #DEE3E9; }
table.t th { color:#4B4C4F; font-weight:600; padding:12px 14px; text-align:left; white-space:nowrap; user-select:none; position:sticky; top:0; background:#F7F8FA; z-index:1; }
table.t th.sortable { cursor:pointer; }
table.t th.sortable:hover { color:#0064E0; }
table.t th .sort-icon { display:inline-block; margin-left:4px; opacity:.4; font-size:10px; }
table.t th.sorted-asc .sort-icon, table.t th.sorted-desc .sort-icon { opacity:1; color:#0064E0; }
table.t td { color:#1C2B33; padding:12px 14px; border-bottom:1px solid #F0F2F5; vertical-align:top; }
table.t tbody tr:hover { background:#F7F8FA; cursor:pointer; }
table.t tbody tr.selected { background:#E8F3FF; }

/* Pills/badges */
.pill { border-radius:100px; padding:3px 10px; font-size:11px; font-weight:600; display:inline-block; line-height:1.4; white-space:nowrap; }
.pill-novo { background:#E8F3FF; color:#0064E0; }
.pill-contactado { background:#FFF3CD; color:#856404; }
.pill-negociacao { background:#FCE4F0; color:#A12B5C; }
.pill-cliente { background:#D1F1D9; color:#007D1E; }
.pill-sem_interesse { background:#F0F2F5; color:#65676B; }
.pill-Ativa { background:#D1F1D9; color:#007D1E; }
.pill-Suspensa { background:#FFF3CD; color:#856404; }
.pill-Inapta { background:#F0F2F5; color:#65676B; }
.pill-Baixada { background:#FCE4E8; color:#C80A28; }
.tag-chip { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:99px; font-size:11px; font-weight:500; color:#fff; line-height:1.4; }
.tag-chip .x { opacity:.6; cursor:pointer; }
.tag-chip .x:hover { opacity:1; }

.tabular { font-variant-numeric: tabular-nums; }

/* Linkish */
a.linkish { color:#0064E0; text-decoration:none; }
a.linkish:hover { text-decoration:underline; }

/* Drawer */
#drawer.open { transform: translateX(0); }
#drawer-overlay.open { display:block; }
.drawer-section { padding:18px 24px; border-bottom:1px solid #F0F2F5; }
.drawer-section h3 { font-size:13px; font-weight:600; color:#4B4C4F; text-transform:uppercase; letter-spacing:.5px; margin-bottom:10px; display:flex; align-items:center; gap:6px; }
.drawer-section h3 i { width:14px; height:14px; }

/* Kanban */
.kanban-board { display:grid; grid-template-columns: repeat(5, minmax(260px, 1fr)); gap:14px; padding:4px; }
.kanban-col { background:#F7F8FA; border-radius:14px; padding:12px; min-height:60vh; display:flex; flex-direction:column; }
.kanban-col h4 { font-size:13px; font-weight:600; margin-bottom:10px; display:flex; align-items:center; justify-content:space-between; }
.kanban-col-list { flex:1; min-height:40px; display:flex; flex-direction:column; gap:8px; overflow-y:auto; max-height:75vh; }
.kanban-card { background:#fff; border:1px solid #DEE3E9; border-radius:10px; padding:12px; cursor:grab; user-select:none; }
.kanban-card:hover { box-shadow:0 4px 12px rgba(0,0,0,.06); border-color:#CED0D4; }
.kanban-card.dragging { opacity:.4; }
.kanban-col.over { background:#E8F3FF; outline:2px dashed #47A5FA; }
.kanban-card .ttl { font-size:13px; font-weight:600; color:#1C2B33; margin-bottom:4px; line-height:1.3; }
.kanban-card .sub { font-size:11px; color:#65676B; }

/* Toast */
#toast.show { display:block; animation: toastIn .3s cubic-bezier(.4,0,.2,1); }
@keyframes toastIn { from { transform:translateY(20px); opacity:0; } to { transform:translateY(0); opacity:1; } }
.toast-success { background:#1C2B33; color:#fff; padding:12px 20px; border-radius:12px; box-shadow:0 12px 28px rgba(0,0,0,.18); font-size:14px; display:flex; align-items:center; gap:8px; }
.toast-error { background:#E41E3F; }

/* Skeleton */
.skel { background: linear-gradient(90deg, #F0F2F5 0%, #F7F8FA 50%, #F0F2F5 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Mapa */
#mapa-leaflet { height: calc(100vh - 180px); border-radius:16px; border:1px solid #DEE3E9; }
.leaflet-popup-content { font-family:'DM Sans', sans-serif; font-size:13px; }

/* Empty state */
.empty { text-align:center; padding:60px 20px; color:#65676B; font-size:14px; }
.empty i { width:48px; height:48px; margin-bottom:12px; opacity:.4; }

/* View toggle */
.viewmode { display:inline-flex; background:#F1F4F7; border-radius:10px; padding:3px; gap:2px; }
.viewmode button { padding:6px 12px; border-radius:8px; font-size:12px; font-weight:500; color:#65676B; display:inline-flex; align-items:center; gap:5px; }
.viewmode button.active { background:#fff; color:#1C2B33; box-shadow:0 1px 2px rgba(0,0,0,.06); }

/* Page header */
.page-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:24px; }
.page-title { font-size:26px; font-weight:600; line-height:1.2; color:#1C2B33; }
.page-subtitle { font-size:13px; color:#65676B; margin-top:4px; }

/* Filter bar */
.filterbar { background:#fff; border:1px solid #DEE3E9; border-radius:14px; padding:14px; margin-bottom:16px; }

/* Cards grid (contatos) */
.cards-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap:14px; }
.contact-card { background:#fff; border:1px solid #DEE3E9; border-radius:14px; padding:16px; cursor:pointer; }
.contact-card:hover { border-color:#0064E0; box-shadow:0 4px 14px rgba(0,100,224,.08); transform:translateY(-2px); }

/* Disparo modal */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:60; display:flex; align-items:center; justify-content:center; padding:20px; }
.modal { background:#fff; border-radius:20px; max-width:600px; width:100%; max-height:90vh; overflow-y:auto; }

/* Loading bar */
.loader { position:fixed; top:0; left:0; height:3px; background:#0064E0; z-index:200; transition:width .3s ease; }
