"use client"; import React, { useEffect, useState } from "react"; import Link from "next/link"; import Image from "next/image"; import { ArrowLeft } from "lucide-react"; import { ThemeToggle } from "@/lib/theme-toggle"; interface AuthLayoutProps { title: string; subtitle: string; children: React.ReactNode; footerText?: string; footerLinkText?: string; footerLinkHref?: string; } /* Waveform design — "Golden Studio": the auth visual column is a dim control room: amber record light (pulsing LED + mono timecode), a live waveform as the single hero object, and the tail of the guest pipeline fading into canvas at the bottom. Collapses below 900px per the design system (§5.4) — the form is never broken. Bar heights are a fixed, hand-tuned array (never Math.random — would cause hydration mismatches between SSR and client). */ const WAVE_HEIGHTS = [ 12, 18, 26, 20, 34, 48, 42, 60, 84, 72, 96, 120, 104, 132, 116, 140, 124, 108, 128, 96, 112, 78, 88, 60, 68, 44, 52, 32, 40, 24, 28, 16, 20, 12, ]; const PIPELINE_CARDS = [ { label: "Prospect", count: 8, color: "var(--status-prospect)", rotate: "-2deg" }, { label: "Contacted", count: 5, color: "var(--status-contacted)", rotate: "1.5deg" }, { label: "Scheduled", count: 3, color: "var(--status-scheduled)", rotate: "-1deg" }, ]; function formatTimecode(totalSeconds: number): string { const h = Math.floor(totalSeconds / 3600); const m = Math.floor((totalSeconds % 3600) / 60); const s = totalSeconds % 60; return `${h}:${String(m).padStart(2, "0")}:${String(s).padStart(2, "0")}`; } export function AuthLayout({ title, subtitle, children, footerText, footerLinkText, footerLinkHref, }: AuthLayoutProps) { return (
{children} {footerText && footerLinkText && footerLinkHref && (

{footerText}{" "} {footerLinkText}

)}
); } /* ─── Form column (left, 40%) ──────────────────────────────── */ function AuthFormColumn({ title, subtitle, children, }: { title: string; subtitle: string; children: React.ReactNode; }) { return (
MicProtocol MicProtocol
Back to home

{title}

{subtitle}

{children}
© {new Date().getFullYear()} MicProtocol
Privacy Terms Security
); } /* ─── Visual column (right, 60%) ───────────────────────────── */ function AuthVisualColumn() { const [seconds, setSeconds] = useState(0); useEffect(() => { const id = window.setInterval(() => { setSeconds((prev) => prev + 1); }, 1000); return () => window.clearInterval(id); }, []); return (