* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background: #f4f6fb; color: #1a2233; }
.hidden { display: none !important; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.card { background: #fff; border-radius: 14px; box-shadow: 0 8px 30px rgba(20,40,90,.1); padding: 28px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { margin: 0 0 4px; }
.muted { color: #6b7689; }
.tabs { display: flex; gap: 8px; margin: 18px 0; }
.tab { flex: 1; padding: 10px; border: 1px solid #dbe2f0; background: #f7f9fd; border-radius: 8px; cursor: pointer; font-weight: 600; }
.tab.active { background: #1f6feb; color: #fff; border-color: #1f6feb; }
label { display: block; margin: 10px 0; font-size: 14px; font-weight: 600; }
input, select, textarea { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #d5dce9; border-radius: 8px; font-size: 15px; font-weight: 400; }
.btn { padding: 10px 16px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; font-weight: 700; }
.btn.primary { background: #1f6feb; color: #fff; width: 100%; margin-top: 12px; }
.toolbar .btn.primary, .modal-actions .btn.primary { width: auto; margin-top: 0; }
.btn.ghost { background: #fff; border-color: #d5dce9; }
.error { color: #c0392b; font-size: 14px; min-height: 18px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; background: #fff; border-bottom: 1px solid #e5eaf3; position: sticky; top: 0; }
.topbar-right { display: flex; gap: 12px; align-items: center; }
.container { max-width: 1000px; margin: 0 auto; padding: 24px 16px 60px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 4px 16px rgba(20,40,90,.06); display: flex; flex-direction: column; }
.stat-label { font-size: 13px; color: #6b7689; }
.stat-value { font-size: 26px; font-weight: 800; margin-top: 4px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input, .toolbar select { margin-top: 0; }
.toolbar input { flex: 2; min-width: 200px; }
.toolbar select { flex: 1; min-width: 150px; }
.table-wrap { background: #fff; border-radius: 12px; overflow-x: auto; box-shadow: 0 4px 16px rgba(20,40,90,.06); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px; border-bottom: 1px solid #eef1f6; text-align: left; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: capitalize; }
.badge.lead { background: #fff4d6; color: #8a6d00; }
.badge.prospect { background: #e0efff; color: #0b5ed7; }
.badge.cliente { background: #dcf5e3; color: #117a3d; }
.badge.inativo { background: #eee; color: #666; }
.row-actions { display: flex; gap: 6px; }
.row-actions button { padding: 6px 10px; font-size: 13px; border-radius: 6px; border: 1px solid #d5dce9; background: #fff; cursor: pointer; }
.row-actions button.danger { color: #c0392b; border-color: #f0c4c4; }
.modal { position: fixed; inset: 0; background: rgba(15,25,45,.5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-card { width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.recent { list-style: none; padding: 0; }
.recent li { background: #fff; margin-bottom: 8px; padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1a2233; color: #fff; padding: 12px 20px; border-radius: 10px; z-index: 50; }