:root{--primary:#0066CC;--primary-dark:#004C99;--primary-light:#E6F0FF;--secondary:#10B981;--accent:#F59E0B;--danger:#EF4444;--text:#1E293B;--text-muted:#64748B;--bg:#F8FAFC;--border:#E2E8F0;--sidebar-bg:#0F172A;--sidebar-text:#CBD5E1;--radius:12px;--shadow:0 4px 6px -1px rgba(0,0,0,0.1)}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Plus Jakarta Sans',sans-serif;background:var(--bg);display:flex;min-height:100vh}
.sidebar{width:260px;background:var(--sidebar-bg);display:flex;flex-direction:column;position:fixed;height:100vh;z-index:100}
.sidebar-header{padding:1.5rem;display:flex;align-items:center;gap:1rem;border-bottom:1px solid rgba(255,255,255,0.1)}
.sidebar-header .logo-icon{width:40px;height:40px;background:linear-gradient(135deg,var(--primary),var(--secondary));border-radius:10px;display:flex;align-items:center;justify-content:center;color:#fff}
.sidebar-header .logo-title{color:#fff;font-weight:700;font-size:1rem}
.sidebar-header .logo-subtitle{color:var(--sidebar-text);font-size:.75rem}
.logo-text{display:flex;flex-direction:column}
.sidebar-nav{flex:1;padding:1rem}
.nav-item{display:flex;align-items:center;gap:.75rem;padding:.875rem 1rem;color:var(--sidebar-text);text-decoration:none;border-radius:8px;margin-bottom:.25rem;transition:all .2s}
.nav-item:hover{background:rgba(255,255,255,0.1);color:#fff}
.nav-item.active{background:var(--primary);color:#fff}
.nav-item i{width:20px;text-align:center}
.sidebar-footer{padding:1rem;border-top:1px solid rgba(255,255,255,0.1)}
.main-content{flex:1;margin-left:260px;min-height:100vh}
.topbar{background:#fff;padding:1rem 2rem;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:50}
.topbar h1{font-size:1.5rem;font-weight:700}
.topbar-right{display:flex;align-items:center;gap:1rem}
.prefeitura-info{text-align:right}
.prefeitura-nome{display:block;font-weight:600;font-size:.875rem}
.prefeitura-setor{font-size:.75rem;color:var(--text-muted)}
.user-avatar{width:40px;height:40px;background:var(--primary-light);border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--primary)}
.content-section{padding:2rem}
.content-section.hidden{display:none}
.metrics-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1.5rem;margin-bottom:2rem}
.metric-card{background:#fff;border-radius:var(--radius);padding:1.5rem;display:flex;align-items:center;gap:1rem;box-shadow:var(--shadow)}
.metric-icon{width:56px;height:56px;border-radius:var(--radius);display:flex;align-items:center;justify-content:center;font-size:1.5rem}
.metric-icon.blue{background:#DBEAFE;color:#2563EB}
.metric-icon.orange{background:#FEF3C7;color:#D97706}
.metric-icon.red{background:#FEE2E2;color:#DC2626}
.metric-icon.green{background:#D1FAE5;color:#059669}
.metric-value{display:block;font-size:1.75rem;font-weight:700}
.metric-label{font-size:.875rem;color:var(--text-muted)}
.charts-grid{display:grid;grid-template-columns:2fr 1fr;gap:1.5rem;margin-bottom:2rem}
.chart-card,.table-card{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.chart-header,.table-header{padding:1rem 1.5rem;border-bottom:1px solid var(--border)}
.chart-header h3,.table-header h3{font-size:1rem;display:flex;align-items:center;gap:.5rem}
.chart-header h3 i,.table-header h3 i{color:var(--primary)}
.chart-body{padding:1.5rem;height:300px}
.table-body{padding:.5rem}
.data-table{width:100%;border-collapse:collapse}
.data-table th,.data-table td{padding:1rem;text-align:left;border-bottom:1px solid var(--border)}
.data-table th{font-size:.75rem;text-transform:uppercase;color:var(--text-muted);font-weight:600}
.data-table tbody tr:hover{background:var(--bg)}
.status-badge{padding:.25rem .75rem;border-radius:9999px;font-size:.75rem;font-weight:600}
.status-badge.ATIVA{background:#FEE2E2;color:#DC2626}
.status-badge.PAGA{background:#D1FAE5;color:#059669}
.status-badge.NEGOCIANDO{background:#FEF3C7;color:#D97706}
.status-badge.PARCELADA{background:#DBEAFE;color:#2563EB}
.btn-action{padding:.5rem 1rem;border:none;border-radius:6px;font-size:.75rem;cursor:pointer;transition:all .2s}
.btn-action.primary{background:var(--primary);color:#fff}
.btn-action.primary:hover{background:var(--primary-dark)}
.section-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem;gap:1rem}
.search-box{display:flex;align-items:center;background:#fff;border:1px solid var(--border);border-radius:8px;padding:0 1rem;flex:1;max-width:400px}
.search-box i{color:var(--text-muted)}
.search-box input{border:none;padding:.75rem;flex:1;font-family:inherit;background:transparent}
.search-box input:focus{outline:none}
.filtros{display:flex;gap:.75rem}
.filtros select{padding:.75rem 1rem;border:1px solid var(--border);border-radius:8px;font-family:inherit;background:#fff}
.comm-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin-bottom:2rem}
.stat-card{background:#fff;border-radius:var(--radius);padding:1.5rem;display:flex;align-items:center;gap:1rem;box-shadow:var(--shadow)}
.stat-icon{width:48px;height:48px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:1.25rem}
.stat-icon.whatsapp{background:#D1FAE5;color:#059669}
.stat-icon.email{background:#DBEAFE;color:#2563EB}
.stat-icon.sms{background:#FEF3C7;color:#D97706}
.stat-icon.taxa{background:#E0E7FF;color:#4F46E5}
.stat-value{display:block;font-size:1.5rem;font-weight:700}
.stat-label{font-size:.8125rem;color:var(--text-muted)}
.preview-card{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.preview-header{padding:1rem 1.5rem;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center}
.preview-header h3{display:flex;align-items:center;gap:.5rem;font-size:1rem}
.preview-header h3 i{color:#25D366}
.preview-controls select{padding:.5rem 1rem;border:1px solid var(--border);border-radius:6px;font-family:inherit}
.preview-body{padding:1.5rem;display:flex;justify-content:center}
.whatsapp-preview{width:320px;background:#E5DDD5;border-radius:12px;overflow:hidden;box-shadow:var(--shadow)}
.whatsapp-header{background:#075E54;color:#fff;padding:.75rem 1rem;display:flex;align-items:center;gap:.75rem}
.whatsapp-avatar{width:36px;height:36px;background:rgba(255,255,255,0.2);border-radius:50%;display:flex;align-items:center;justify-content:center}
.whatsapp-contact{display:flex;flex-direction:column}
.contact-name{font-weight:600;font-size:.875rem}
.contact-status{font-size:.75rem;opacity:.8}
.whatsapp-messages{padding:1rem;min-height:200px}
.message-bubble{background:#fff;padding:.75rem 1rem;border-radius:0 8px 8px 8px;max-width:85%;font-size:.875rem;line-height:1.5;white-space:pre-wrap;box-shadow:0 1px 1px rgba(0,0,0,0.1)}
.message-time{font-size:.6875rem;color:#667781;text-align:right;margin-top:.25rem}
.whatsapp-button{background:#25D366;color:#fff;padding:.75rem;text-align:center;font-weight:600;font-size:.875rem;display:flex;align-items:center;justify-content:center;gap:.5rem;margin:.5rem 1rem 1rem;border-radius:8px}
.campaign-form-card{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);margin-bottom:1.5rem}
.form-header{padding:1rem 1.5rem;border-bottom:1px solid var(--border)}
.form-header h3{display:flex;align-items:center;gap:.5rem}
.form-header h3 i{color:var(--accent)}
.form-body{padding:1.5rem}
.form-row{display:flex;gap:1.5rem;margin-bottom:1.5rem}
.form-group{flex:1}
.form-group label{display:block;font-size:.875rem;font-weight:500;margin-bottom:.5rem}
.form-group select,.form-group input{width:100%;padding:.75rem 1rem;border:1px solid var(--border);border-radius:8px;font-family:inherit}
.channel-buttons{display:flex;gap:.75rem}
.channel-btn{flex:1;padding:1rem;border:2px solid var(--border);border-radius:8px;background:#fff;cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center;gap:.5rem;font-family:inherit;font-weight:500}
.channel-btn:hover{border-color:var(--primary)}
.channel-btn.active{border-color:var(--primary);background:var(--primary-light);color:var(--primary)}
.form-actions{display:flex;justify-content:flex-end;gap:1rem}
.btn-primary,.btn-secondary{padding:.75rem 1.5rem;border:none;border-radius:8px;font-family:inherit;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .2s}
.btn-primary{background:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-dark)}
.btn-secondary{background:var(--bg);color:var(--text)}
.simulation-card{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow)}
.simulation-card.hidden{display:none}
.simulation-header{padding:1rem 1.5rem;border-bottom:1px solid var(--border)}
.simulation-header h3{display:flex;align-items:center;gap:.5rem}
.simulation-body{padding:2rem;display:flex;justify-content:center;gap:4rem}
.simulation-stat{text-align:center}
.stat-number{display:block;font-size:2.5rem;font-weight:700;color:var(--primary)}
.stat-desc{font-size:.875rem;color:var(--text-muted)}
@media(max-width:1024px){.metrics-grid,.comm-stats{grid-template-columns:repeat(2,1fr)}.charts-grid{grid-template-columns:1fr}}
@media(max-width:768px){.sidebar{width:60px}.sidebar .logo-text,.sidebar .nav-item span{display:none}.main-content{margin-left:60px}.metrics-grid,.comm-stats{grid-template-columns:1fr}}
