import { useState } from "react"; import { Shield, Users, AlertTriangle, ShieldCheck, BarChart3, ChevronDown, } from "lucide-react"; import Button from "@/components/common/button"; import StatCard from "@/components/common/dashStatCard"; import InfoBanner from '@/components/common/infoBanner'; import Table from '@/components/common/dataTable'; import { auditLogHeaders, auditLogRows, trustedDeviceHeaders, trustedDeviceRows } from "@/constants/adminTableData"; export default function SecurityPortal() { const [enforceMfa, setEnforceMfa] = useState(true); const [keepMeSignedIn, setKeepMeSignedIn] = useState(true); const [reAuthenticate, setReAuthenticate] = useState(false); return (
{/* --- HEADER SECTION --- */}
PLATFORM SECURITY

Security & sessions

Platform-wide sign-in policy, trusted devices and the immutable authentication audit trail. Sign-ins, MFA, resets and policy changes are logged automatically.

{/* --- HEADER BUTTONS --- */}
{/* --- STAT CARDS --- */}
{/* --- TOP GRID SECTION: AUDIT LOG + SIGN-IN POLICY --- */}
{/* --- LEFT: AUDIT LOG TABLE CONTAINER --- */}

Authentication audit trail

immutable 90-day retention
{/* AUDIT LOG TABLE */} {/* --- RIGHT: SIGN-IN POLICY PANEL --- */}

Sign-in policy

{/* Toggle 1: Enforce MFA */}

Enforce MFA for all users

6-digit code required on every untrusted device

{/* Select 1: Idle Session Timeout */}

Idle session timeout

Auto sign-out after inactivity

{/* Toggle 2: Keep me signed in */}

“Keep me signed in” by default

Pre-checks the persistent-session option at sign-in

{/* Toggle 3: Re-authenticate */}

Re-authenticate for sensitive actions

Password prompt before user, role or policy changes

{/* Select 2: Trusted device window */}

Trusted device window

Days MFA is skipped on a trusted device

{/* --- BOTTOM SECTION: TRUSTED DEVICES TABLE CONTAINER --- */}

Trusted devices

MFA skipped until expiry

{/* TRUSTED DEVICES TABLE */}

Revoking forces MFA on the next sign-in from that device. Password changes revoke all devices automatically.

{/* --- INFO BANNER --- */}
); }