The user wants a SALT (State and Local Tax) nexus monitor. This is a complex tax compliance tool that needs to track:
- Nexus thresholds (economic and physical)
- Filing requirements and deadlines
- Risk alerts when approaching thresholds
Since this is a tax compliance tool, I should make it look professional, data-heavy, and sophisticated. Let me plan:
Design Direction:
- Professional, corporate but modern
- Dark theme with high contrast (think Bloomberg terminal meets modern fintech)
- Color scheme: Dark navy/charcoal base with amber/gold accents for alerts, green for compliant
- Typography: Something professional but distinctive
Key Features:
- State-by-state nexus tracking
- Economic nexus thresholds (sales/$)
- Physical nexus indicators
- Filing calendar
- Risk alerts panel
- Interactive map or state list
- Filter by risk level, state, etc.
Data Structure:
- States with nexus thresholds
- Current sales/transactions per state
- Filing status
- Risk levels
Interactions:
- Click on states to see details
- Filter states by risk/compliance
- Dismiss/acknowledge alerts
- Sort columns
- Tab navigation between views
Visual Elements:
- Risk indicators (color coded)
- Progress bars for threshold approach
- Status badges
- Interactive table
- Alert cards with animations
Let me build this with:
- A clean sidebar navigation
- Main dashboard with KPIs
- State table with sorting
- Alerts panel
- Filing calendar view
- State detail modal
Font choices:
- Display: "Space Grotesk" (technical, modern)
- UI: "DM Sans" (clean, readable)
Colors:
- Base: Deep slate/charcoal
- Accent: Amber/gold for warnings
- Secondary accent: Emerald for compliant
- Muted blues for data viz
This is a sophisticated tax compliance tool - I'll build a professional dashboard with a data-dense, terminal-inspired aesthetic that feels authoritative for financial professionals.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SALT Nexus Monitor</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
:root {
--bg: #0a0e14;
--bg-elevated: #111820;
--bg-card: #151c27;
--fg: #e8ecf1;
--fg-muted: #6b7a8f;
--border: #1e2937;
--accent: #d4a72c;
--accent-dim: rgba(212, 167, 44, 0.15);
--success: #22c55e;
--success-dim: rgba(34, 197, 94, 0.15);
--danger: #ef4444;
--danger-dim: rgba(239, 68, 68, 0.15);
--warning: #f59e0b;
--warning-dim: rgba(245, 158, 11, 0.15);
--info: #3b82f6;
--info-dim: rgba(59, 130, 246, 0.15);
}
* {
font-family: 'Space Grotesk', sans-serif;
}
.mono {
font-family: 'JetBrains Mono', monospace;
}
body {
background: var(--bg);
color: var(--fg);
}
.bg-grid {
background-image:
linear-gradient(rgba(212, 167, 44, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(212, 167, 44, 0.03) 1px, transparent 1px);
background-size: 40px 40px;
}
.glow-accent {
box-shadow: 0 0 40px rgba(212, 167, 44, 0.1);
}
.scrollbar-thin::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.scrollbar-thin::-webkit-scrollbar-track {
background: var(--bg);
}
.scrollbar-thin::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 3px;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulse-ring {
0% { transform: scale(0.8); opacity: 0.8; }
50% { transform: scale(1.2); opacity: 0; }
100% { transform: scale(0.8); opacity: 0; }
}
.animate-slide-in {
animation: slideIn 0.3s ease-out forwards;
}
.pulse-dot::before {
content: '';
position: absolute;
inset: -4px;
border-radius: 50%;
background: currentColor;
animation: pulse-ring 2s ease-out infinite;
}
.threshold-bar {
background: linear-gradient(90deg,
var(--success) 0%,
var(--success) var(--safe, 60%),
var(--warning) var(--safe, 60%),
var(--warning) var(--warn, 80%),
var(--danger) var(--warn, 80%),
var(--danger) 100%
);
}
.state-row:hover {
background: var(--bg-elevated);
}
.tab-active {
border-color: var(--accent);
color: var(--accent);
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
</style>
</head>
<body class="min-h-screen bg-grid">
<!-- Header -->
<header class="border-b border-[var(--border)] bg-[var(--bg-elevated)]/80 backdrop-blur-sm sticky top-0 z-50">
<div class="max-w-[1600px] mx-auto px-4 lg:px-6 h-16 flex items-center justify-between">
<div class="flex items-center gap-3">
<div class="w-9 h-9 rounded-lg bg-[var(--accent)] flex items-center justify-center">
<svg class="w-5 h-5 text-[var(--bg)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"/>
</svg>
</div>
<div>
<h1 class="text-lg font-semibold tracking-tight">SALT Nexus Monitor</h1>
<p class="text-xs text-[var(--fg-muted)] -mt-0.5">State & Local Tax Compliance</p>
</div>
</div>
<div class="flex items-center gap-4">
<div class="hidden md:flex items-center gap-2 text-xs text-[var(--fg-muted)]">
<span class="w-2 h-2 rounded-full bg-[var(--success)]"></span>
Last synced: 2 min ago
</div>
<button class="p-2 rounded-lg border border-[var(--border)] hover:border-[var(--accent)] transition-colors" aria-label="Notifications">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"/>
</svg>
</button>
<button class="px-4 py-2 rounded-lg bg-[var(--accent)] text-[var(--bg)] font-medium text-sm hover:brightness-110 transition-all">
Run Analysis
</button>
</div>
</div>
</header>
<main class="max-w-[1600px] mx-auto px-4 lg:px-6 py-6">
<!-- KPI Cards -->
<div class="grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
<div class="bg-[var(--bg-card)] border border-[var(--border)] rounded-xl p-4 animate-slide-in" style="animation-delay: 0ms">
<div class="flex items-start justify-between">
<div>
<p class="text-xs text-[var(--fg-muted)] uppercase tracking-wider">Active Nexus</p>
<p class="text-3xl font-bold mt-1" id="activeNexus">28</p>
</div>
<div class="w-10 h-10 rounded-lg bg-[var(--info-dim)] flex items-center justify-center">
<svg class="w-5 h-5 text-[var(--info)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"/>
</svg>
</div>
</div>
<p class="text-xs text-[var(--fg-muted)] mt-2">Across 28 jurisdictions</p>
</div>
<div class="bg-[var(--bg-card)] border border-[var(--border)] rounded-xl p-4 animate-slide-in" style="animation-delay: 50ms">
<div class="flex items-start justify-between">
<div>
<p class="text-xs text-[var(--fg-muted)] uppercase tracking-wider">Approaching Threshold</p>
<p class="text-3xl font-bold mt-1 text-[var(--warning)]" id="approachingCount">7</p>
</div>
<div class="w-10 h-10 rounded-lg bg-[var(--warning-dim)] flex items-center justify-center">
<svg class="w-5 h-5 text-[var(--warning)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/>
</svg>
</div>
</div>
<p class="text-xs text-[var(--fg-muted)] mt-2">Within 20% of threshold</p>
</div>
<div class="bg-[var(--bg-card)] border border-[var(--border)] rounded-xl p-4 animate-slide-in" style="animation-delay: 100ms">
<div class="flex items-start justify-between">
<div>
<p class="text-xs text-[var(--fg-muted)] uppercase tracking-wider">Nexus Triggered</p>
<p class="text-3xl font-bold mt-1 text-[var(--danger)]" id="triggeredCount">3</p>
</div>
<div class="w-10 h-10 rounded-lg bg-[var(--danger-dim)] flex items-center justify-center">
<svg class="w-5 h-5 text-[var(--danger)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
</div>
</div>
<p class="text-xs text-[var(--fg-muted)] mt-2">Requires registration</p>
</div>
<div class="bg-[var(--bg-card)] border border-[var(--border)] rounded-xl p-4 animate-slide-in" style="animation-delay: 150ms">
<div class="flex items-start justify-between">
<div>
<p class="text-xs text-[var(--fg-muted)] uppercase tracking-wider">Upcoming Filings</p>
<p class="text-3xl font-bold mt-1" id="upcomingFilings">12</p>
</div>
<div class="w-10 h-10 rounded-lg bg-[var(--accent-dim)] flex items-center justify-center">
<svg class="w-5 h-5 text-[var(--accent)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/>
</svg>
</div>
</div>
<p class="text-xs text-[var(--fg-muted)] mt-2">Next 30 days</p>
</div>
</div>
<!-- Main Content Grid -->
<div class="grid lg:grid-cols-3 gap-6">
<!-- State Monitor Table -->
<div class="lg:col-span-2 bg-[var(--bg-card)] border border-[var(--border)] rounded-xl overflow-hidden animate-slide-in" style="animation-delay: 200ms">
<div class="p-4 border-b border-[var(--border)] flex flex-col sm:flex-row sm:items-center justify-between gap-3">
<div>
<h2 class="font-semibold">State Nexus Monitor</h2>
<p class="text-xs text-[var(--fg-muted)]">Economic & physical nexus tracking</p>
</div>
<div class="flex items-center gap-2">
<div class="relative">
<input
type="text"
id="stateSearch"
placeholder="Search states..."
class="w-40 pl-8 pr-3 py-2 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-lg focus:outline-none focus:border-[var(--accent)] transition-colors"
>
<svg class="w-4 h-4 absolute left-2.5 top-1/2 -translate-y-1/2 text-[var(--fg-muted)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
</svg>
</div>
<select id="riskFilter" class="px-3 py-2 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-lg focus:outline-none focus:border-[var(--accent)] transition-colors">
<option value="all">All Risk</option>
<option value="danger">Critical</option>
<option value="warning">Warning</option>
<option value="safe">Safe</option>
</select>
</div>
</div>
<div class="overflow-x-auto scrollbar-thin">
<table class="w-full text-sm">
<thead class="text-xs text-[var(--fg-muted)] uppercase tracking-wider bg-[var(--bg-elevated)]">
<tr>
<th class="text-left px-4 py-3 cursor-pointer hover:text-[var(--accent)] transition-colors" data-sort="state">
State
<svg class="w-3 h-3 inline ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"/>
</svg>
</th>
<th class="text-left px-4 py-3">Nexus Type</th>
<th class="text-right px-4 py-3 cursor-pointer hover:text-[var(--accent)] transition-colors" data-sort="threshold">
Threshold
<svg class="w-3 h-3 inline ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"/>
</svg>
</th>
<th class="text-right px-4 py-3">Current</th>
<th class="text-center px-4 py-3">Progress</th>
<th class="text-center px-4 py-3">Status</th>
</tr>
</thead>
<tbody id="stateTable">
<!-- Populated by JS -->
</tbody>
</table>
</div>
</div>
<!-- Right Sidebar -->
<div class="space-y-6">
<!-- Risk Alerts -->
<div class="bg-[var(--bg-card)] border border-[var(--border)] rounded-xl overflow-hidden animate-slide-in" style="animation-delay: 250ms">
<div class="p-4 border-b border-[var(--border)]">
<h2 class="font-semibold">Risk Alerts</h2>
<p class="text-xs text-[var(--fg-muted)]">Requires immediate attention</p>
</div>
<div class="divide-y divide-[var(--border)] max-h-[320px] overflow-y-auto scrollbar-thin" id="alertsList">
<!-- Populated by JS -->
</div>
</div>
<!-- Upcoming Filings -->
<div class="bg-[var(--bg-card)] border border-[var(--border)] rounded-xl overflow-hidden animate-slide-in" style="animation-delay: 300ms">
<div class="p-4 border-b border-[var(--border)]">
<h2 class="font-semibold">Upcoming Filings</h2>
<p class="text-xs text-[var(--fg-muted)]">Next 30 days</p>
</div>
<div class="divide-y divide-[var(--border)] max-h-[280px] overflow-y-auto scrollbar-thin" id="filingsList">
<!-- Populated by JS -->
</div>
</div>
</div>
</div>
<!-- Tabs Section -->
<div class="mt-6 bg-[var(--bg-card)] border border-[var(--border)] rounded-xl overflow-hidden animate-slide-in" style="animation-delay: 350ms">
<div class="border-b border-[var(--border)] flex overflow-x-auto scrollbar-thin">
<button class="tab-btn px-5 py-3 text-sm font-medium border-b-2 border-transparent whitespace-nowrap tab-active" data-tab="thresholds">
Threshold Details
</button>
<button class="tab-btn px-5 py-3 text-sm font-medium border-b-2 border-transparent text-[var(--fg-muted)] hover:text-[var(--fg)] whitespace-nowrap transition-colors" data-tab="filings">
Filing Calendar
</button>
<button class="tab-btn px-5 py-3 text-sm font-medium border-b-2 border-transparent text-[var(--fg-muted)] hover:text-[var(--fg)] whitespace-nowrap transition-colors" data-tab="history">
Nexus History
</button>
</div>
<!-- Threshold Details Tab -->
<div id="tab-thresholds" class="tab-content p-4">
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-4">
<div class="p-4 bg-[var(--bg)] rounded-lg border border-[var(--border)]">
<h3 class="font-medium mb-3 flex items-center gap-2">
<span class="w-2 h-2 rounded-full bg-[var(--success)]"></span>
Sales Threshold
</h3>
<p class="text-xs text-[var(--fg-muted)] mb-2">Most common economic nexus threshold</p>
<p class="text-2xl font-bold mono">$100,000</p>
<p class="text-xs text-[var(--fg-muted)] mt-1">31 states use this threshold</p>
</div>
<div class="p-4 bg-[var(--bg)] rounded-lg border border-[var(--border)]">
<h3 class="font-medium mb-3 flex items-center gap-2">
<span class="w-2 h-2 rounded-full bg-[var(--info)]"></span>
Transaction Threshold
</h3>
<p class="text-xs text-[var(--fg-muted)] mb-2">Alternative or combined threshold</p>
<p class="text-2xl font-bold mono">200</p>
<p class="text-xs text-[var(--fg-muted)] mt-1">transactions in 12 states</p>
</div>
<div class="p-4 bg-[var(--bg)] rounded-lg border border-[var(--border)]">
<h3 class="font-medium mb-3 flex items-center gap-2">
<span class="w-2 h-2 rounded-full bg-[var(--accent)]"></span>
Combined Threshold
</h3>
<p class="text-xs text-[var(--fg-muted)] mb-2">Either sales OR transactions</p>
<p class="text-2xl font-bold mono">$100K / 200</p>
<p class="text-xs text-[var(--fg-muted)] mt-1">24 states have combined rules</p>
</div>
</div>
</div>
<!-- Filing Calendar Tab -->
<div id="tab-filings" class="tab-content p-4 hidden">
<div class="grid md:grid-cols-4 gap-3">
<div class="text-center p-3 rounded-lg bg-[var(--danger-dim)] border border-[var(--danger)]/30">
<p class="text-xs text-[var(--fg-muted)]">Jan 20</p>
<p class="text-lg font-bold">5</p>
<p class="text-xs text-[var(--danger)]">Due Soon</p>
</div>
<div class="text-center p-3 rounded-lg bg-[var(--warning-dim)] border border-[var(--warning)]/30">
<p class="text-xs text-[var(--fg-muted)]">Jan 25</p>
<p class="text-lg font-bold">3</p>
<p class="text-xs text-[var(--warning)]">This Week</p>
</div>
<div class="text-center p-3 rounded-lg bg-[var(--info-dim)] border border-[var(--info)]/30">
<p class="text-xs text-[var(--fg-muted)]">Feb 01</p>
<p class="text-lg font-bold">8</p>
<p class="text-xs text-[var(--info)]">Next Month</p>
</div>
<div class="text-center p-3 rounded-lg bg-[var(--success-dim)] border border-[var(--success)]/30">
<p class="text-xs text-[var(--fg-muted)]">Feb 20</p>
<p class="text-lg font-bold">12</p>
<p class="text-xs text-[var(--success)]">On Track</p>
</div>
</div>
</div>
<!-- Nexus History Tab -->
<div id="tab-history" class="tab-content p-4 hidden">
<div class="space-y-3">
<div class="flex items-center gap-4 p-3 rounded-lg bg-[var(--bg)] border border-[var(--border)]">
<div class="w-2 h-2 rounded-full bg-[var(--danger)]"></div>
<div class="flex-1">
<p class="font-medium">Texas nexus triggered</p>
<p class="text-xs text-[var(--fg-muted)]">Economic threshold exceeded</p>
</div>
<p class="text-xs text-[var(--fg-muted)] mono">Jan 15, 2025</p>
</div>
<div class="flex items-center gap-4 p-3 rounded-lg bg-[var(--bg)] border border-[var(--border)]">
<div class="w-2 h-2 rounded-full bg-[var(--warning)]"></div>
<div class="flex-1">
<p class="font-medium">California approaching threshold</p>
<p class="text-xs text-[var(--fg-muted)]">80% of sales threshold reached</p>
</div>
<p class="text-xs text-[var(--fg-muted)] mono">Jan 12, 2025</p>
</div>
<div class="flex items-center gap-4 p-3 rounded-lg bg-[var(--bg)] border border-[var(--border)]">
<div class="w-2 h-2 rounded-full bg-[var(--success)]"></div>
<div class="flex-1">
<p class="font-medium">New York filing completed</p>
<p class="text-xs text-[var(--fg-muted)]">Q4 2024 return submitted</p>
</div>
<p class="text-xs text-[var(--fg-muted)] mono">Jan 10, 2025</p>
</div>
</div>
</div>
</div>
</main>
<!-- State Detail Modal -->
<div id="stateModal" class="fixed inset-0 z-50 hidden items-center justify-center p-4" role="dialog" aria-modal="true">
<div class="absolute inset-0 bg-black/60 backdrop-blur-sm" id="modalOverlay"></div>
<div class="relative bg-[var(--bg-card)] border border-[var(--border)] rounded-2xl w-full max-w-lg max-h-[90vh] overflow-y-auto">
<div class="p-5 border-b border-[var(--border)] flex items-start justify-between">
<div>
<h3 class="text-lg font-semibold" id="modalState">State Details</h3>
<p class="text-sm text-[var(--fg-muted)]" id="modalSubtitle">Nexus & filing information</p>
</div>
<button id="closeModal" class="p-2 rounded-lg hover:bg-[var(--bg)] transition-colors" aria-label="Close modal">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
<div class="p-5 space-y-4" id="modalContent">
<!-- Populated by JS -->
</div>
</div>
</div>
<script>
// State data
const statesData = [
{ state: 'California', abbr: 'CA', nexusType: ['Economic', 'Physical'], thresholdSales: 500000, thresholdTx: null, currentSales: 412500, currentTx: 1850, filingFreq: 'Monthly', nextFiling: '2025-01-20', status: 'warning' },
{ state: 'Texas', abbr: 'TX', nexusType: ['Economic'], thresholdSales: 500000, thresholdTx: null, currentSales: 525000, currentTx: 2100, filingFreq: 'Quarterly', nextFiling: '2025-01-25', status: 'danger' },
{ state: 'New York', abbr: 'NY', nexusType: ['Economic', 'Physical'], thresholdSales: 500000, thresholdTx: null, currentSales: 380000, currentTx: 1620, filingFreq: 'Monthly', nextFiling: '2025-02-01', status: 'safe' },
{ state: 'Florida', abbr: 'FL', nexusType: ['Economic'], thresholdSales: 100000, thresholdTx: null, currentSales: 87500, currentTx: 420, filingFreq: 'Quarterly', nextFiling: '2025-02-01', status: 'warning' },
{ state: 'Illinois', abbr: 'IL', nexusType: ['Economic'], thresholdSales: 100000, thresholdTx: null, currentSales: 45000, currentTx: 180, filingFreq: 'Annual', nextFiling: '2025-03-15', status: 'safe' },
{ state: 'Pennsylvania', abbr: 'PA', nexusType: ['Economic'], thresholdSales: 100000, thresholdTx: null, currentSales: 95000, currentTx: 380, filingFreq: 'Quarterly', nextFiling: '2025-01-25', status: 'warning' },
{ state: 'Ohio', abbr: 'OH', nexusType: ['Economic'], thresholdSales: 100000, thresholdTx: null, currentSales: 102000, currentTx: 410, filingFreq: 'Quarterly', nextFiling: '2025-02-01', status: 'danger' },
{ state: 'Georgia', abbr: 'GA', nexusType: ['Economic'], thresholdSales: 100000, thresholdTx: null, currentSales: 62000, currentTx: 250, filingFreq: 'Annual', nextFiling: '2025-03-15', status: 'safe' },
{ state: 'North Carolina', abbr: 'NC', nexusType: ['Economic'], thresholdSales: 100000, thresholdTx: null, currentSales: 78000, currentTx: 310, filingFreq: 'Quarterly', nextFiling: '2025-01-25', status: 'safe' },
{ state: 'Michigan', abbr: 'MI', nexusType: ['Economic'], thresholdSales: 100000, thresholdTx: null, currentSales: 55000, currentTx: 220, filingFreq: 'Annual', nextFiling: '2025-03-15', status: 'safe' },
{ state: 'New Jersey', abbr: 'NJ', nexusType: ['Economic'], thresholdSales: 100000, thresholdTx: 200, currentSales: 112000, currentTx: 245, filingFreq: 'Quarterly', nextFiling: '2025-02-01', status: 'danger' },
{ state: 'Virginia', abbr: 'VA', nexusType: ['Economic'], thresholdSales: 100000, thresholdTx: null, currentSales: 48000, currentTx: 190, filingFreq: 'Annual', nextFiling: '2025-03-15', status: 'safe' },
{ state: 'Washington', abbr: 'WA', nexusType: ['Economic'], thresholdSales: 100000, thresholdTx: null, currentSales: 92000, currentTx: 365, filingFreq: 'Quarterly', nextFiling: '2025-01-25', status: 'warning' },
{ state: 'Arizona', abbr: 'AZ', nexusType: ['Economic'], thresholdSales: 100000, thresholdTx: null, currentSales: 41000, currentTx: 165, filingFreq: 'Annual', nextFiling: '2025-03-15', status: 'safe' },
{ state: 'Massachusetts', abbr: 'MA', nexusType: ['Economic'], thresholdSales: 100000, thresholdTx: null, currentSales: 88000, currentTx: 350, filingFreq: 'Quarterly', nextFiling: '2025-02-01', status: 'warning' }
];
const alerts = [
{ type: 'danger', state: 'Texas', message: 'Economic nexus exceeded by 5%. Register for sales tax permit.', date: 'Jan 15, 2025' },
{ type: 'danger', state: 'Ohio', message: 'Sales threshold exceeded. Filing required immediately.', date: 'Jan 14, 2025' },
{ type: 'danger', state: 'New Jersey', message: 'Both sales and transaction thresholds exceeded.', date: 'Jan 12, 2025' },
{ type: 'warning', state: 'California', message: 'At 82.5% of threshold. Projected to trigger Q1.', date: 'Jan 10, 2025' },
{ type: 'warning', state: 'Pennsylvania', message: 'At 95% of threshold. Review customer data.', date: 'Jan 8, 2025' },
{ type: 'warning', state: 'Washington', message: 'At 92% of threshold. Monitor closely.', date: 'Jan 5, 2025' },
{ type: 'info', state: 'New York', message: 'Q4 filing due February 1, 2025.', date: 'Jan 3, 2025' }
];
const filings = [
{ state: 'Texas', type: 'Quarterly Return', due: 'Jan 25, 2025', status: 'pending' },
{ state: 'Pennsylvania', type: 'Quarterly Return', due: 'Jan 25, 2025', status: 'pending' },
{ state: 'Washington', type: 'Quarterly Return', due: 'Jan 25, 2025', status: 'pending' },
{ state: 'California', type: 'Monthly Return', due: 'Jan 20, 2025', status: 'overdue' },
{ state: 'New York', type: 'Monthly Return', due: 'Feb 1, 2025', status: 'upcoming' },
{ state: 'Florida', type: 'Quarterly Return', due: 'Feb 1, 2025', status: 'upcoming' }
];
// Initialize DOM elements
const stateTable = document.getElementById('stateTable');
const alertsList = document.getElementById('alertsList');
const filingsList = document.getElementById('filingsList');
const stateSearch = document.getElementById('stateSearch');
const riskFilter = document.getElementById('riskFilter');
const modal = document.getElementById('stateModal');
const modalOverlay = document.getElementById('modalOverlay');
const closeModalBtn = document.getElementById('closeModal');
// Render state table
function renderStateTable(data) {
stateTable.innerHTML = data.map(state => {
const thresholdPct = Math.min(100, (state.currentSales / state.thresholdSales) * 100);
const statusColors = {
safe: { bg: 'bg-[var(--success-dim)]', text: 'text-[var(--success)]', label: 'Safe' },
warning: { bg: 'bg-[var(--warning-dim)]', text: 'text-[var(--warning)]', label: 'Warning' },
danger: { bg: 'bg-[var(--danger-dim)]', text: 'text-[var(--danger)]', label: 'Triggered' }
};
const status = statusColors[state.status];
return `
<tr class="state-row border-b border-[var(--border)] cursor-pointer transition-colors" data-state="${state.abbr}">
<td class="px-4 py-3">
<div class="flex items-center gap-2">
<span class="font-medium">${state.state}</span>
<span class="text-xs text-[var(--fg-muted)]">${state.abbr}</span>
</div>
</td>
<td class="px-4 py-3">
<div class="flex flex-wrap gap-1">
${state.nexusType.map(t => `<span class="text-xs px-2 py-0.5 rounded bg-[var(--bg)] border border-[var(--border)]">${t}</span>`).join('')}
</div>
</td>
<td class="px-4 py-3 text-right mono">${formatCurrency(state.thresholdSales)}</td>
<td class="px-4 py-3 text-right mono font-medium">${formatCurrency(state.currentSales)}</td>
<td class="px-4 py-3">
<div class="w-24 mx-auto">
<div class="h-1.5 bg-[var(--bg)] rounded-full overflow-hidden">
<div class="h-full rounded-full transition-all duration-500" style="width: ${thresholdPct}%; background: ${thresholdPct >= 100 ? 'var(--danger)' : thresholdPct >= 80 ? 'var(--warning)' : 'var(--success)'}"></div>
</div>
<p class="text-xs text-center mt-1 mono ${thresholdPct >= 100 ? 'text-[var(--danger)]' : thresholdPct >= 80 ? 'text-[var(--warning)]' : 'text-[var(--fg-muted)]'}">${thresholdPct.toFixed(0)}%</p>
</div>
</td>
<td class="px-4 py-3 text-center">
<span class="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium ${status.bg} ${status.text}">
${state.status === 'danger' ? '<span class="relative w-1.5 h-1.5 rounded-full bg-current pulse-dot"></span>' : ''}
${status.label}
</span>
</td>
</tr>
`;
}).join('');
// Add click handlers
document.querySelectorAll('.state-row').forEach(row => {
row.addEventListener('click', () => {
const stateAbbr = row.dataset.state;
const state = statesData.find(s => s.abbr === stateAbbr);
if (state) openModal(state);
});
});
}
// Render alerts
function renderAlerts() {
alertsList.innerHTML = alerts.map(alert => {
const colors = {
danger: { bg: 'bg-[var(--danger-dim)]', border: 'border-[var(--danger)]/30', icon: 'text-[var(--danger)]' },
warning: { bg: 'bg-[var(--warning-dim)]', border: 'border-[var(--warning)]/30', icon: 'text-[var(--warning)]' },
info: { bg: 'bg-[var(--info-dim)]', border: 'border-[var(--info)]/30', icon: 'text-[var(--info)]' }
};
const color = colors[alert.type];
return `
<div class="p-4 ${color.bg} border-l-2 ${color.border} animate-slide-in">
<div class="flex items-start justify-between gap-2">
<div>
<p class="font-medium text-sm">${alert.state}</p>
<p class="text-xs text-[var(--fg-muted)] mt-0.5">${alert.message}</p>
</div>
<button class="p-1 rounded hover:bg-[var(--bg)] transition-colors shrink-0" aria-label="Dismiss alert">
<svg class="w-4 h-4 text-[var(--fg-muted)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
<p class="text-xs text-[var(--fg-muted)] mt-2 mono">${alert.date}</p>
</div>
`;
}).join('');
}
// Render filings
function renderFilings() {
filingsList.innerHTML = filings.map(filing => {
const statusColors = {
overdue: { bg: 'bg-[var(--danger)]', text: 'Overdue' },
pending: { bg: 'bg-[var(--warning)]', text: 'Pending' },
upcoming: { bg: 'bg-[var(--info)]', text: 'Upcoming' }
};
const status = statusColors[filing.status];
return `
<div class="p-4 hover:bg-[var(--bg-elevated)] transition-colors cursor-pointer">
<div class="flex items-center justify-between">
<div>
<p class="font-medium text-sm">${filing.state}</p>
<p class="text-xs text-[var(--fg-muted)]">${filing.type}</p>
</div>
<div class="text-right">
<p class="text-sm mono">${filing.due}</p>
<span class="inline-block px-2 py-0.5 rounded text-xs font-medium text-white ${status.bg}">${status.text}</span>
</div>
</div>
</div>
`;
}).join('');
}
// Format currency
function formatCurrency(num) {
return '$' + num.toLocaleString();
}
// Filter states
function filterStates() {
const searchTerm = stateSearch.value.toLowerCase();
const riskLevel = riskFilter.value;
let filtered = statesData.filter(state => {
const matchesSearch = state.state.toLowerCase().includes(searchTerm) || state.abbr.toLowerCase().includes(searchTerm);
const matchesRisk = riskLevel === 'all' || state.status === riskLevel;
return matchesSearch && matchesRisk;
});
renderStateTable(filtered);
}
// Open modal
function openModal(state) {
const thresholdPct = (state.currentSales / state.thresholdSales) * 100;
document.getElementById('modalState').textContent = `${state.state} (${state.abbr})`;
document.getElementById('modalSubtitle').textContent = `${state.filingFreq} filer - Next: ${state.nextFiling}`;
document.getElementById('modalContent').innerHTML = `
<div class="space-y-4">
<div class="p-4 rounded-lg bg-[var(--bg)] border border-[var(--border)]">
<h4 class="text-sm font-medium mb-3">Threshold Progress</h4>
<div class="flex items-end justify-between mb-2">
<span class="text-3xl font-bold mono">${formatCurrency(state.currentSales)}</span>
<span class="text-sm text-[var(--fg-muted)]">of ${formatCurrency(state.thresholdSales)}</span>
</div>
<div class="h-2 bg-[var(--bg-elevated)] rounded-full overflow-hidden">
<div class="h-full rounded-full" style="width: ${Math.min(100, thresholdPct)}%; background: ${thresholdPct >= 100 ? 'var(--danger)' : thresholdPct >= 80 ? 'var(--warning)' : 'var(--success)'}"></div>
</div>
<p class="text-xs text-[var(--fg-muted)] mt-2">${thresholdPct.toFixed(1)}% of economic nexus threshold</p>
</div>
<div class="grid grid-cols-2 gap-3">
<div class="p-3 rounded-lg bg-[var(--bg)] border border-[var(--border)]">
<p class="text-xs text-[var(--fg-muted)]">Nexus Type</p>
<p class="font-medium mt-1">${state.nexusType.join(', ')}</p>
</div>
<div class="p-3 rounded-lg bg-[var(--bg)] border border-[var(--border)]">
<p class="text-xs text-[var(--fg-muted)]">Filing Frequency</p>
<p class="font-medium mt-1">${state.filingFreq}</p>
</div>
<div class="p-3 rounded-lg bg-[var(--bg)] border border-[var(--border)]">
<p class="text-xs text-[var(--fg-muted)]">Transactions</p>
<p class="font-medium mt-1 mono">${state.currentTx.toLocaleString()}</p>
</div>
<div class="p-3 rounded-lg bg-[var(--bg)] border border-[var(--border)]">
<p class="text-xs text-[var(--fg-muted)]">Next Filing</p>
<p class="font-medium mt-1 mono">${state.nextFiling}</p>
</div>
</div>
<div class="flex gap-3 pt-2">
<button class="flex-1 px-4 py-2.5 rounded-lg bg-[var(--accent)] text-[var(--bg)] font-medium text-sm hover:brightness-110 transition-all">
View Filing Details
</button>
<button class="px-4 py-2.5 rounded-lg border border-[var(--border)] text-sm hover:border-[var(--accent)] transition-colors">
Export
</button>
</div>
</div>
`;
modal.classList.remove('hidden');
modal.classList.add('flex');
}
// Close modal
function closeModal() {
modal.classList.add('hidden');
modal.classList.remove('flex');
}
// Tab switching
document.querySelectorAll('.tab-btn').forEach(btn => {
btn.addEventListener('click', () => {
document.querySelectorAll('.tab-btn').forEach(b => {
b.classList.remove('tab-active');
b.classList.add('text-[var(--fg-muted)]');
});
btn.classList.add('tab-active');
btn.classList.remove('text-[var(--fg-muted)]');
const tabId = btn.dataset.tab;
document.querySelectorAll('.tab-content').forEach(content => {
content.classList.add('hidden');
});
document.getElementById(`tab-${tabId}`).classList.remove('hidden');
});
});
// Event listeners
stateSearch.addEventListener('input', filterStates);
riskFilter.addEventListener('change', filterStates);
modalOverlay.addEventListener('click', closeModal);
closeModalBtn.addEventListener('click', closeModal);
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape') closeModal();
});
// Initial render
renderStateTable(statesData);
renderAlerts();
renderFilings();
// Animate KPI numbers on load
function animateValue(id, start, end, duration) {
const el = document.getElementById(id);
if (!el) return;
const range = end - start;
const startTime = performance.now();
function update(currentTime) {
const elapsed = currentTime - startTime;
const progress = Math.min(elapsed / duration, 1);
const eased = 1 - Math.pow(1 - progress, 3);
const current = Math.floor(start + range * eased);
el.textContent = current;
if (progress < 1) {
requestAnimationFrame(update);
}
}
requestAnimationFrame(update);
}
// Run animations after short delay
setTimeout(() => {
animateValue('activeNexus', 0, 28, 800);
animateValue('approachingCount', 0, 7, 800);
animateValue('triggeredCount', 0, 3, 800);
animateValue('upcomingFilings', 0, 12, 800);
}, 300);
</script>
</body>
</html>
Key Features
Dashboard KPIs:
- Active nexus count with animated counters
- States approaching threshold (warning level)
- Triggered nexus requiring registration (critical)
- Upcoming filing deadlines
State Monitor Table:
- Searchable and filterable by risk level
- Shows economic/physical nexus types
- Progress bars with color-coded thresholds (green → yellow → red)
- Status badges with pulse animation for critical items
- Click any row for detailed modal view
Risk Alerts Panel:
- Color-coded by severity (danger/warning/info)
- Dismissible alerts with context
- Timestamps for audit trail
Filing Calendar:
- Upcoming deadlines sorted by urgency
- Status indicators (overdue/pending/upcoming)
Tabbed Detail Section:
- Threshold details with state distribution
- Filing calendar overview
- Nexus history log
Interactions:
- Search and filter states in real-time
- Click state rows for detailed modal
- Tab navigation between views
- Dismissible alerts
- Animated entrance on load
- Keyboard accessible (Escape closes modal)