feat: modernize UI/UX to 2026 US fintech standard, add violet AI accents, and strengthen security controls
- Modern 2026 US fintech visual redesign across User & Admin Dashboards, Marketing pages, Auth screens, and Layouts - Introduced violet accent (#6D28D9 / #8B5CF6) strictly dedicated to AI capabilities (AI Daily Briefing, AI Assistant, Chatbot FAB & Chat UI) - Motion system respecting prefers-reduced-motion and (hover: none) with GPU-accelerated transforms & opacities - High-resolution dark glass monogram logo mark with upward growth motif - Backend security enhancements: strict MIME-type sniffing validation, admin assignment scoping assertions, safe document deletion handling - Nginx strict Content-Security-Policy (CSP) headers and favicon routing
@@ -2,16 +2,22 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/webp" href="/images/bookkeeppro-logo.webp" />
|
<link rel="icon" type="image/webp" href="/images/brand-logo-mark.webp" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta name="description" content="BookKeepPro — Professional bookkeeping, payroll and tax preparation services for growing businesses across the US and India. 27 years of accounting excellence." />
|
<meta name="description" content="ABC CPA & Advisory — Professional tax strategy, international FBAR compliance, and AI accounting services for high-growth businesses and global founders." />
|
||||||
<title>BookKeepPro — Bookkeeping, Payroll & Tax Services</title>
|
<title>ABC CPA — Tax Advisory, International Tax & Fractional CFO</title>
|
||||||
|
<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=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet" />
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
|
||||||
<link rel="stylesheet" href="/css/base.css"/>
|
<link rel="stylesheet" href="/css/base.css"/>
|
||||||
<link rel="stylesheet" href="/css/components.css"/>
|
<link rel="stylesheet" href="/css/components.css"/>
|
||||||
<link rel="stylesheet" href="/css/marketing.css"/>
|
<link rel="stylesheet" href="/css/marketing.css"/>
|
||||||
<link rel="stylesheet" href="/css/chatbot.css" />
|
<link rel="stylesheet" href="/css/chatbot.css" />
|
||||||
<link rel="stylesheet" href="/css/animations.css" />
|
<link rel="stylesheet" href="/css/animations.css" />
|
||||||
<link rel="stylesheet" href="/css/dynamic.css" />
|
<link rel="stylesheet" href="/css/dynamic.css" />
|
||||||
|
<link rel="stylesheet" href="/css/artha-motion.css" />
|
||||||
|
<link rel="stylesheet" href="/css/dashboard.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"lint": "oxlint",
|
"lint": "oxlint",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview",
|
||||||
|
"serve": "vite build && vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.18.1",
|
"axios": "^1.18.1",
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
.btn:active { transform: translateY(1px) scale(0.97); }
|
.btn:active { transform: translateY(1px) scale(0.97); }
|
||||||
|
|
||||||
@keyframes pulse-brass {
|
@keyframes pulse-brass {
|
||||||
0%, 100% { box-shadow: 0 0 0 0 rgba(176,128,61,0.35); }
|
0%, 100% { box-shadow: 0 0 0 0 rgba(29, 78, 216, 0.35); }
|
||||||
50% { box-shadow: 0 0 0 5px rgba(176,128,61,0); }
|
50% { box-shadow: 0 0 0 5px rgba(29, 78, 216, 0); }
|
||||||
}
|
}
|
||||||
.pulse { animation: pulse-brass 2s infinite; }
|
.pulse { animation: pulse-brass 2s infinite; }
|
||||||
|
|
||||||
@@ -25,14 +25,14 @@
|
|||||||
.stagger > *:nth-child(5) { animation-delay: 0.24s; }
|
.stagger > *:nth-child(5) { animation-delay: 0.24s; }
|
||||||
.stagger > *:nth-child(6) { animation-delay: 0.30s; }
|
.stagger > *:nth-child(6) { animation-delay: 0.30s; }
|
||||||
|
|
||||||
input[type=checkbox] { accent-color: var(--emerald); width: 16px; height: 16px; cursor: pointer; }
|
input[type=checkbox] { accent-color: var(--brass); width: 16px; height: 16px; cursor: pointer; }
|
||||||
|
|
||||||
/* Ledger-rule underline — the signature link treatment: a brass
|
/* Ledger-rule underline — the signature link treatment: a brass
|
||||||
rule draws itself in, like a line struck under a checked entry */
|
rule draws itself in, like a line struck under a checked entry */
|
||||||
.fancy-link {
|
.fancy-link {
|
||||||
position: relative;
|
position: relative;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: var(--emerald);
|
color: var(--brass);
|
||||||
}
|
}
|
||||||
.fancy-link::after {
|
.fancy-link::after {
|
||||||
content: '';
|
content: '';
|
||||||
|
|||||||
@@ -0,0 +1,329 @@
|
|||||||
|
/* ============================================================
|
||||||
|
artha-motion.css · motion layer for the ABC CPA "Ledger" UI
|
||||||
|
Load AFTER dynamic.css in index.html:
|
||||||
|
<link rel="stylesheet" href="/css/artha-motion.css" />
|
||||||
|
|
||||||
|
Motion language: calm, precise, "a ledger line being drawn".
|
||||||
|
- one easing curve (expo-out), 200-700ms, no bounce
|
||||||
|
- gold rule draws under / over things that matter
|
||||||
|
- only transform + opacity are animated
|
||||||
|
Palette (matches base.css):
|
||||||
|
ink #0A2540 · blue #1D4ED8 · emerald #047857 · page #F6F9FC
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
|
/* ---------- 1. Fix colour drift (dynamic.css still uses the OLD palette) ---------- */
|
||||||
|
:root {
|
||||||
|
--ink-rgb: 10, 37, 64;
|
||||||
|
--green-rgb: 29, 78, 216;
|
||||||
|
--gold-rgb: 245, 184, 61;
|
||||||
|
--brass-rgb: 245, 184, 61;
|
||||||
|
/* brass token override */
|
||||||
|
--emerald-rgb: 4, 120, 87;
|
||||||
|
/* emerald token override */
|
||||||
|
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
||||||
|
|
||||||
|
/* shadows tinted with ink */
|
||||||
|
--shadow-xs: 0 1px 2px 0 rgba(var(--ink-rgb), 0.06);
|
||||||
|
--shadow-sm: 0 4px 10px -2px rgba(var(--ink-rgb), 0.10);
|
||||||
|
--shadow-md: 0 12px 28px -8px rgba(var(--ink-rgb), 0.16);
|
||||||
|
--shadow-lg: 0 24px 56px -12px rgba(var(--ink-rgb), 0.22);
|
||||||
|
--shadow-glow: 0 0 0 6px rgba(29, 78, 216, 0.16);
|
||||||
|
}
|
||||||
|
|
||||||
|
::selection {
|
||||||
|
background: rgba(29, 78, 216, 0.20);
|
||||||
|
color: #0A2540;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-progress {
|
||||||
|
background: linear-gradient(90deg, #1D4ED8, #14B8A6);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- 2. Shared keyframes ---------- */
|
||||||
|
@keyframes arthaRise {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(18px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes arthaPop {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale(0.85);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes arthaRule {
|
||||||
|
to {
|
||||||
|
background-size: 100% 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes arthaDrift {
|
||||||
|
from {
|
||||||
|
transform: translate3d(-3%, -2%, 0) scale(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
transform: translate3d(3%, 2%, 0) scale(1.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- 3. Navbar: shadow + gold hairline on scroll, gold underline on links ---------- */
|
||||||
|
.artha-navbar {
|
||||||
|
transition: box-shadow 0.3s, border-color 0.3s, background-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[data-scrolled] .artha-navbar {
|
||||||
|
box-shadow: 0 10px 30px -18px rgba(var(--ink-rgb), 0.45);
|
||||||
|
border-bottom-color: rgba(29, 78, 216, 0.35);
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-nav-links>a {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-nav-links>a::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: -6px;
|
||||||
|
height: 1.5px;
|
||||||
|
background: #1D4ED8;
|
||||||
|
transform: scaleX(0);
|
||||||
|
transform-origin: left;
|
||||||
|
transition: transform 0.35s var(--ease-out);
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-nav-links>a:hover::after {
|
||||||
|
transform: scaleX(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- 4. Hero: staged entrance, gold rule under the italic word, ambient light ---------- */
|
||||||
|
.artha-hero {
|
||||||
|
position: relative;
|
||||||
|
isolation: isolate;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-hero::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
z-index: -1;
|
||||||
|
pointer-events: none;
|
||||||
|
background:
|
||||||
|
radial-gradient(50% 55% at 12% 25%, rgba(20, 184, 166, 0.14), transparent 70%),
|
||||||
|
radial-gradient(45% 60% at 90% 85%, rgba(29, 78, 216, 0.16), transparent 70%);
|
||||||
|
animation: arthaDrift 22s ease-in-out infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-hero-left>* {
|
||||||
|
animation: arthaRise 0.9s var(--ease-out) backwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-hero-left> :nth-child(1) {
|
||||||
|
animation-delay: 0.05s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-hero-left> :nth-child(2) {
|
||||||
|
animation-delay: 0.15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-hero-left> :nth-child(3) {
|
||||||
|
animation-delay: 0.28s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-hero-left> :nth-child(4) {
|
||||||
|
animation-delay: 0.40s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-hero-left> :nth-child(n+5) {
|
||||||
|
animation-delay: 0.52s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-hero-right {
|
||||||
|
animation: arthaRise 1.1s 0.3s var(--ease-out) backwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-hero-title em {
|
||||||
|
font-style: italic;
|
||||||
|
background: var(--gradient-brand);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
background-clip: text;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- 5. Cards: lift + gold top-edge rule that draws on hover ---------- */
|
||||||
|
:is(.artha-portal-card, .artha-vault-card, .artha-ticker-card, .artha-trust-item, .artha-firm-stat-pill) {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
:is(.artha-portal-card, .artha-vault-card, .artha-ticker-card)::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 18px;
|
||||||
|
right: 18px;
|
||||||
|
top: -1px;
|
||||||
|
height: 2px;
|
||||||
|
border-radius: 2px;
|
||||||
|
background: linear-gradient(90deg, #1D4ED8, #14B8A6);
|
||||||
|
transform: scaleX(0);
|
||||||
|
transform-origin: left;
|
||||||
|
pointer-events: none;
|
||||||
|
transition: transform 0.5s var(--ease-out);
|
||||||
|
}
|
||||||
|
|
||||||
|
:is(.artha-portal-card, .artha-vault-card, .artha-ticker-card):hover::after {
|
||||||
|
transform: scaleX(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
:is(.artha-vault-card, .artha-ticker-card) {
|
||||||
|
transition: transform 0.3s var(--ease-out), box-shadow 0.3s, border-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
:is(.artha-vault-card, .artha-ticker-card):hover {
|
||||||
|
transform: translateY(-4px);
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-portal-card:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* pointer spotlight (needs the one-line SPOT change in motion.js) */
|
||||||
|
:is(.artha-portal-card, .artha-vault-card, .artha-ticker-card):hover {
|
||||||
|
background-image: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(29, 78, 216, 0.08), transparent 62%);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- 6. Buttons: gold sheen on primary, soft press ---------- */
|
||||||
|
.artha-pill-btn {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: transform 0.2s var(--ease-out), box-shadow 0.25s, background-color 0.25s, color 0.25s, border-color 0.25s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-pill-btn:not(:disabled):hover {
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-pill-btn:not(:disabled):active {
|
||||||
|
transform: translateY(1px) scale(0.97);
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-pill-primary::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
|
||||||
|
transform: translateX(-130%);
|
||||||
|
transition: transform 0.8s var(--ease-out);
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-pill-primary:not(:disabled):hover::before {
|
||||||
|
transform: translateX(130%);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- 7. Status pills pop in (once) ---------- */
|
||||||
|
.artha-status-pill {
|
||||||
|
animation: arthaPop 0.45s var(--ease-out) backwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- 8. Grids: children rise in as they scroll into view ---------- */
|
||||||
|
:is(.artha-vault-grid, .artha-ticker-cards, .artha-trust-inner, .artha-firm-stats-row, .artha-calc-option-grid)>* {
|
||||||
|
animation: arthaRise 0.7s var(--ease-out) backwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
:is(.artha-vault-grid, .artha-ticker-cards, .artha-trust-inner, .artha-firm-stats-row, .artha-calc-option-grid)> :nth-child(2) {
|
||||||
|
animation-delay: 0.08s;
|
||||||
|
}
|
||||||
|
|
||||||
|
:is(.artha-vault-grid, .artha-ticker-cards, .artha-trust-inner, .artha-firm-stats-row, .artha-calc-option-grid)> :nth-child(3) {
|
||||||
|
animation-delay: 0.16s;
|
||||||
|
}
|
||||||
|
|
||||||
|
:is(.artha-vault-grid, .artha-ticker-cards, .artha-trust-inner, .artha-firm-stats-row, .artha-calc-option-grid)> :nth-child(4) {
|
||||||
|
animation-delay: 0.24s;
|
||||||
|
}
|
||||||
|
|
||||||
|
:is(.artha-vault-grid, .artha-ticker-cards, .artha-trust-inner, .artha-firm-stats-row, .artha-calc-option-grid)> :nth-child(n+5) {
|
||||||
|
animation-delay: 0.30s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Where supported, tie the rise to scroll position instead of page load, so
|
||||||
|
below-the-fold grids animate when the visitor actually reaches them.
|
||||||
|
fill-mode stays `backwards` so hover transforms still work afterwards. */
|
||||||
|
@supports (animation-timeline: view()) {
|
||||||
|
:is(.artha-vault-grid, .artha-ticker-cards, .artha-trust-inner, .artha-firm-stats-row, .artha-calc-option-grid)>* {
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-delay: 0s;
|
||||||
|
animation-timeline: view();
|
||||||
|
animation-range: entry 0% entry 55%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* principle rows: number tints gold, row nudges right */
|
||||||
|
.artha-principle-row {
|
||||||
|
transition: padding-left 0.35s var(--ease-out);
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-principle-row:hover {
|
||||||
|
padding-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-principle-row:hover .artha-principle-num {
|
||||||
|
color: #1D4ED8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-principle-num {
|
||||||
|
transition: color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- 9. Upload dropzone (add class `is-dragover` from JS on dragenter / dragover) ---------- */
|
||||||
|
.artha-dropzone {
|
||||||
|
transition: border-color 0.25s, background-color 0.25s, transform 0.3s var(--ease-out), box-shadow 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-dropzone:hover .material-symbols-outlined {
|
||||||
|
transform: translateY(-3px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-dropzone .material-symbols-outlined {
|
||||||
|
transition: transform 0.3s var(--ease-out);
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artha-dropzone.is-dragover {
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #1D4ED8;
|
||||||
|
background-color: rgba(29, 78, 216, 0.08);
|
||||||
|
transform: scale(1.012);
|
||||||
|
box-shadow: var(--shadow-glow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- 10. Reduced motion ---------- */
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.artha-hero::before {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
:is(.artha-vault-grid, .artha-ticker-cards, .artha-trust-inner, .artha-firm-stats-row, .artha-calc-option-grid)>* {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.artha-hero::before {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (hover: none) {
|
||||||
|
:is(.artha-portal-card, .artha-vault-card, .artha-ticker-card):hover {
|
||||||
|
background-image: none;
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,1,0');
|
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');
|
|
||||||
|
|
||||||
/* ============================================================
|
/* ============================================================
|
||||||
base.css — BookKeepPro Design System · "Ledger"
|
base.css — BookKeepPro Design System · "Ledger"
|
||||||
Ink, brass and parchment — a bookkeeping identity built on
|
Ink, brass and parchment — a bookkeeping identity built on
|
||||||
@@ -11,42 +8,55 @@
|
|||||||
/* ── Brand Tokens ─────────────────────────────────────────── */
|
/* ── Brand Tokens ─────────────────────────────────────────── */
|
||||||
:root {
|
:root {
|
||||||
/* core palette */
|
/* core palette */
|
||||||
--ink: #17211D;
|
--ink: #0A2540;
|
||||||
--ink-soft: #2A362F;
|
--ink-soft: #14365F;
|
||||||
--brass: #8F6528;
|
--brass: #1D4ED8;
|
||||||
--brass-dark: #8F6528;
|
--brass-dark: #1E40AF;
|
||||||
--brass-light: rgba(176, 128, 61, 0.12);
|
--brass-light: rgba(29, 78, 216, 0.08);
|
||||||
--emerald: #1F5D46;
|
--emerald: #047857;
|
||||||
--emerald-dark: #163F30;
|
--emerald-dark: #065F46;
|
||||||
--emerald-light:rgba(31, 93, 70, 0.10);
|
--emerald-light:rgba(4, 120, 87, 0.08);
|
||||||
--paper: #F5F2E9;
|
--paper: #F6F9FC;
|
||||||
--paper-raised: #FFFFFF;
|
--paper-raised: #FFFFFF;
|
||||||
|
|
||||||
/* legacy variable names kept so every existing component re-skins automatically */
|
/* legacy variable names kept so every existing component re-skins automatically */
|
||||||
--blue: var(--emerald);
|
--blue: var(--brass);
|
||||||
--blue-dark: var(--emerald-dark);
|
--blue-dark: var(--brass-dark);
|
||||||
--blue-light: var(--emerald-light);
|
--blue-light: var(--brass-light);
|
||||||
--orange: var(--brass);
|
--blue-bright: #3B82F6;
|
||||||
--orange-dark: var(--brass-dark);
|
--sky: #0EA5E9;
|
||||||
--orange-light: var(--brass-light);
|
--teal: #14B8A6;
|
||||||
--header-bg: #EFEADA;
|
--amber-text: #92600A;
|
||||||
--footer-bot: #EFEADA;
|
--orange: #F5B83D;
|
||||||
--navy: var(--ink);
|
--orange-dark: #D99A1E;
|
||||||
--accent: #2C7A5B;
|
--orange-light: rgba(245, 184, 61, 0.12);
|
||||||
|
--header-bg: #EEF3F9;
|
||||||
|
--footer-bot: #EEF3F9;
|
||||||
|
--navy: #0A2540;
|
||||||
|
--accent: #1D4ED8;
|
||||||
--bg: var(--paper);
|
--bg: var(--paper);
|
||||||
--card: var(--paper-raised);
|
--card: var(--paper-raised);
|
||||||
--muted: #6B7268;
|
--muted: #425466;
|
||||||
--border: #E3DDC9;
|
--border: #E2E8F0;
|
||||||
--success: #1F5D46;
|
--success: #047857;
|
||||||
--success-bg: rgba(31, 93, 70, 0.10);
|
--success-bg: #ECFDF5;
|
||||||
--error: #A63A3A;
|
--error: #DC2626;
|
||||||
--error-bg: rgba(166, 58, 58, 0.10);
|
--error-bg: #FEF2F2;
|
||||||
--warn: #8F6528;
|
--warn: #F5B83D;
|
||||||
--warn-bg: rgba(176, 128, 61, 0.12);
|
--warn-bg: #FFF8E6;
|
||||||
|
--violet: #6D28D9;
|
||||||
|
--violet-bright:#8B5CF6;
|
||||||
|
--violet-light: #F5F3FF;
|
||||||
|
--violet-soft: #C4B5FD;
|
||||||
|
|
||||||
--font-display: 'Fraunces', 'Georgia', serif;
|
--gradient-brand: linear-gradient(135deg, #1D4ED8 0%, #0EA5E9 60%, #14B8A6 100%);
|
||||||
--font-body: 'IBM Plex Sans', system-ui, sans-serif;
|
--gradient-ai: linear-gradient(135deg, #6D28D9 0%, #1D4ED8 100%);
|
||||||
--font-mono: 'IBM Plex Mono', ui-monospace, monospace;
|
--gradient-success: linear-gradient(135deg, #047857 0%, #14B8A6 100%);
|
||||||
|
--gradient-warm: linear-gradient(135deg, #F5B83D 0%, #D99A1E 100%);
|
||||||
|
|
||||||
|
--font-display: 'Playfair Display', Georgia, serif;
|
||||||
|
--font-body: 'Inter', system-ui, -apple-system, sans-serif;
|
||||||
|
--font-mono: 'JetBrains Mono', ui-monospace, monospace;
|
||||||
|
|
||||||
--radius-xs: 6px;
|
--radius-xs: 6px;
|
||||||
--radius-sm: 10px;
|
--radius-sm: 10px;
|
||||||
@@ -54,11 +64,11 @@
|
|||||||
--radius-lg: 22px;
|
--radius-lg: 22px;
|
||||||
--radius-pill: 999px;
|
--radius-pill: 999px;
|
||||||
|
|
||||||
--shadow-xs: 0 1px 2px 0 rgba(23, 33, 29, 0.06);
|
--shadow-xs: 0 1px 2px 0 rgba(10, 37, 64, 0.06);
|
||||||
--shadow-sm: 0 4px 10px -2px rgba(23, 33, 29, 0.10);
|
--shadow-sm: 0 4px 10px -2px rgba(10, 37, 64, 0.10);
|
||||||
--shadow-md: 0 12px 28px -8px rgba(23, 33, 29, 0.16);
|
--shadow-md: 0 12px 28px -8px rgba(10, 37, 64, 0.16);
|
||||||
--shadow-lg: 0 24px 56px -12px rgba(23, 33, 29, 0.22);
|
--shadow-lg: 0 24px 56px -12px rgba(10, 37, 64, 0.22);
|
||||||
--shadow-glow: 0 0 0 6px rgba(176, 128, 61, 0.14);
|
--shadow-glow: 0 0 0 6px rgba(29, 78, 216, 0.14);
|
||||||
|
|
||||||
--transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
--transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
--glass-blur: blur(14px);
|
--glass-blur: blur(14px);
|
||||||
@@ -67,14 +77,14 @@
|
|||||||
to bottom,
|
to bottom,
|
||||||
transparent 0,
|
transparent 0,
|
||||||
transparent 27px,
|
transparent 27px,
|
||||||
rgba(23, 33, 29, 0.05) 27px,
|
rgba(10, 37, 64, 0.05) 27px,
|
||||||
rgba(23, 33, 29, 0.05) 28px
|
rgba(10, 37, 64, 0.05) 28px
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Reset ───────────────────────────────────────────────── */
|
/* ── Reset ───────────────────────────────────────────────── */
|
||||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
html { font-size: 16px; scroll-behavior: smooth; }
|
html { font-size: 14px; scroll-behavior: smooth; }
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
html { scroll-behavior: auto; }
|
html { scroll-behavior: auto; }
|
||||||
*, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
|
*, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
|
||||||
@@ -87,18 +97,18 @@ body {
|
|||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
}
|
}
|
||||||
img { max-width: 100%; display: block; }
|
img { max-width: 100%; display: block; }
|
||||||
a { color: var(--emerald); text-decoration: none; }
|
a { color: var(--brass); text-decoration: none; }
|
||||||
a:hover { color: var(--emerald-dark); }
|
a:hover { color: var(--brass-dark); }
|
||||||
.material-symbols-outlined { font-size: inherit; vertical-align: middle; line-height: 1; font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
|
.material-symbols-outlined { font-size: inherit; vertical-align: middle; line-height: 1; font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
|
||||||
.tnum { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
|
.tnum { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
|
||||||
|
|
||||||
/* ── Typography ──────────────────────────────────────────── */
|
/* ── Typography ──────────────────────────────────────────── */
|
||||||
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); }
|
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); }
|
||||||
h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
|
h1 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 600; line-height: 1.18; letter-spacing: -0.015em; }
|
||||||
h2 { font-size: clamp(19px, 2.6vw, 26px); font-weight: 600; line-height: 1.25; }
|
h2 { font-size: clamp(18px, 1.8vw, 24px); font-weight: 600; line-height: 1.25; }
|
||||||
h3 { font-size: clamp(16px, 2vw, 19px); font-weight: 600; }
|
h3 { font-size: clamp(15px, 1.3vw, 18px); font-weight: 600; }
|
||||||
p { line-height: 1.7; color: #3E463F; }
|
p { font-size: 13.5px; line-height: 1.6; color: var(--muted); }
|
||||||
small, .text-sm { font-size: 13px; color: var(--muted); }
|
small, .text-sm { font-size: 12px; color: var(--muted); }
|
||||||
.text-muted { color: var(--muted); }
|
.text-muted { color: var(--muted); }
|
||||||
.eyebrow {
|
.eyebrow {
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
@@ -145,10 +155,10 @@ small, .text-sm { font-size: 13px; color: var(--muted); }
|
|||||||
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
|
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
|
||||||
|
|
||||||
.btn-primary { background: var(--brass); color: #fff; }
|
.btn-primary { background: var(--brass); color: #fff; }
|
||||||
.btn-primary:hover:not(:disabled) { background: var(--brass-dark); box-shadow: 0 6px 18px rgba(176,128,61,0.32); }
|
.btn-primary:hover:not(:disabled) { background: var(--brass-dark); box-shadow: 0 6px 18px rgba(29, 78, 216, 0.28); }
|
||||||
|
|
||||||
.btn-secondary { background: var(--emerald); color: #fff; }
|
.btn-secondary { background: var(--header-bg); color: var(--ink); border: 1px solid var(--border); }
|
||||||
.btn-secondary:hover:not(:disabled) { background: var(--emerald-dark); box-shadow: 0 6px 18px rgba(31,93,70,0.28); }
|
.btn-secondary:hover:not(:disabled) { background: var(--border); box-shadow: 0 4px 12px rgba(10, 37, 64, 0.08); }
|
||||||
|
|
||||||
.btn-outline {
|
.btn-outline {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@@ -158,10 +168,10 @@ small, .text-sm { font-size: 13px; color: var(--muted); }
|
|||||||
.btn-outline:hover:not(:disabled) { background: var(--ink); color: #fff; }
|
.btn-outline:hover:not(:disabled) { background: var(--ink); color: #fff; }
|
||||||
|
|
||||||
.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--border); }
|
.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--border); }
|
||||||
.btn-ghost:hover:not(:disabled) { background: var(--paper); color: var(--ink); border-color: #cfc7ad; }
|
.btn-ghost:hover:not(:disabled) { background: var(--paper); color: var(--ink); border-color: var(--border); }
|
||||||
|
|
||||||
.btn-danger { background: var(--error); color: #fff; }
|
.btn-danger { background: var(--error); color: #fff; }
|
||||||
.btn-danger:hover:not(:disabled) { background: #8a2f2f; box-shadow: 0 6px 18px rgba(166,58,58,0.3); }
|
.btn-danger:hover:not(:disabled) { background: #b91c1c; box-shadow: 0 6px 18px rgba(220, 38, 38, 0.3); }
|
||||||
|
|
||||||
.btn-sm { padding: 7px 16px; font-size: 13px; }
|
.btn-sm { padding: 7px 16px; font-size: 13px; }
|
||||||
.btn-xs { padding: 5px 12px; font-size: 12px; }
|
.btn-xs { padding: 5px 12px; font-size: 12px; }
|
||||||
@@ -181,10 +191,10 @@ small, .text-sm { font-size: 13px; color: var(--muted); }
|
|||||||
}
|
}
|
||||||
.input:focus, .select-input:focus {
|
.input:focus, .select-input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--emerald);
|
border-color: var(--brass);
|
||||||
box-shadow: 0 0 0 3px rgba(31,93,70,0.12);
|
box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
|
||||||
}
|
}
|
||||||
.input::placeholder { color: #A8A190; }
|
.input::placeholder { color: var(--muted); }
|
||||||
.input[readonly] { background: var(--paper); color: var(--muted); cursor: default; }
|
.input[readonly] { background: var(--paper); color: var(--muted); cursor: default; }
|
||||||
label.form-label { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-soft); margin-bottom: 6px; }
|
label.form-label { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-soft); margin-bottom: 6px; }
|
||||||
.form-group { margin-bottom: 18px; }
|
.form-group { margin-bottom: 18px; }
|
||||||
@@ -192,7 +202,7 @@ label.form-label { display: block; font-size: 12.5px; font-weight: 600; letter-s
|
|||||||
.password-wrap .input { padding-right: 56px; }
|
.password-wrap .input { padding-right: 56px; }
|
||||||
.password-toggle {
|
.password-toggle {
|
||||||
position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
|
position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
|
||||||
background: none; border: none; color: var(--emerald); font-weight: 600; font-size: 13px; cursor: pointer;
|
background: none; border: none; color: var(--brass); font-weight: 600; font-size: 13px; cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Badges ──────────────────────────────────────────────── */
|
/* ── Badges ──────────────────────────────────────────────── */
|
||||||
@@ -203,17 +213,17 @@ label.form-label { display: block; font-size: 12.5px; font-weight: 600; letter-s
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
}
|
}
|
||||||
.badge-blue { background: var(--emerald-light); color: var(--emerald); }
|
.badge-blue { background: #EFF6FF; color: #1D4ED8; }
|
||||||
.badge-orange { background: var(--brass-light); color: var(--brass-dark); border: 1px solid rgba(176,128,61,0.35); }
|
.badge-orange { background: #FFF8E6; color: #92600A; border: 1px solid rgba(245, 184, 61, 0.35); }
|
||||||
.badge-red { background: var(--error-bg); color: var(--error); }
|
.badge-red { background: var(--error-bg); color: var(--error); }
|
||||||
.badge-green { background: var(--success-bg); color: var(--success); }
|
.badge-green { background: var(--success-bg); color: var(--success); }
|
||||||
.badge-yellow { background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(176,128,61,0.3); }
|
.badge-yellow { background: #FFF8E6; color: #92600A; border: 1px solid rgba(245, 184, 61, 0.3); }
|
||||||
.badge-muted { background: var(--paper); color: var(--muted); }
|
.badge-muted { background: var(--paper); color: var(--muted); }
|
||||||
|
|
||||||
/* ── Status Pills (doc review) ───────────────────────────── */
|
/* ── Status Pills (doc review) ───────────────────────────── */
|
||||||
.pill-approved { background:var(--success-bg); color:var(--success); border:1px solid rgba(31,93,70,0.3); padding:2px 10px; border-radius:var(--radius-xs); font-size:11px; font-weight:700; font-family: var(--font-mono); }
|
.pill-approved { background:var(--success-bg); color:var(--success); border:1px solid rgba(4, 120, 87, 0.25); padding:2px 10px; border-radius:var(--radius-xs); font-size:11px; font-weight:700; font-family: var(--font-mono); }
|
||||||
.pill-rejected { background:var(--error-bg); color:var(--error); border:1px solid rgba(166,58,58,0.3); padding:2px 10px; border-radius:var(--radius-xs); font-size:11px; font-weight:700; font-family: var(--font-mono); }
|
.pill-rejected { background:var(--error-bg); color:var(--error); border:1px solid rgba(220, 38, 38, 0.25); padding:2px 10px; border-radius:var(--radius-xs); font-size:11px; font-weight:700; font-family: var(--font-mono); }
|
||||||
.pill-pending { background:var(--warn-bg); color:var(--brass-dark); border:1px solid rgba(176,128,61,0.3); padding:2px 10px; border-radius:var(--radius-xs); font-size:11px; font-weight:700; font-family: var(--font-mono); }
|
.pill-pending { background:var(--warn-bg); color:var(--amber-text); border:1px solid rgba(245, 184, 61, 0.3); padding:2px 10px; border-radius:var(--radius-xs); font-size:11px; font-weight:700; font-family: var(--font-mono); }
|
||||||
|
|
||||||
/* ── Divider ─────────────────────────────────────────────── */
|
/* ── Divider ─────────────────────────────────────────────── */
|
||||||
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
|
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
|
||||||
@@ -249,7 +259,7 @@ label.form-label { display: block; font-size: 12.5px; font-weight: 600; letter-s
|
|||||||
to { background-position: 600px 0; }
|
to { background-position: 600px 0; }
|
||||||
}
|
}
|
||||||
.skeleton {
|
.skeleton {
|
||||||
background: linear-gradient(90deg, #EDE8D9 25%, #F5F2E9 50%, #EDE8D9 75%);
|
background: linear-gradient(90deg, #E2E8F0 25%, #EDF2F7 50%, #E2E8F0 75%);
|
||||||
background-size: 600px 100%;
|
background-size: 600px 100%;
|
||||||
animation: shimmer 1.4s infinite linear;
|
animation: shimmer 1.4s infinite linear;
|
||||||
border-radius: var(--radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
@@ -277,7 +287,7 @@ label.form-label { display: block; font-size: 12.5px; font-weight: 600; letter-s
|
|||||||
|
|
||||||
/* Focus visibility */
|
/* Focus visibility */
|
||||||
:focus-visible {
|
:focus-visible {
|
||||||
outline: 2px solid var(--emerald);
|
outline: 2px solid var(--brass);
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,8 +299,8 @@ input[type="email"]:focus,
|
|||||||
input[type="password"]:focus,
|
input[type="password"]:focus,
|
||||||
textarea:focus {
|
textarea:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--emerald) !important;
|
border-color: var(--brass) !important;
|
||||||
box-shadow: 0 0 0 3px rgba(31,93,70,0.14) !important;
|
box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14) !important;
|
||||||
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,19 +9,22 @@
|
|||||||
width: 56px;
|
width: 56px;
|
||||||
height: 56px;
|
height: 56px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--ink);
|
background: var(--gradient-ai);
|
||||||
color: #fff;
|
color: #FFFFFF;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.14);
|
border: 1px solid rgba(255, 255, 255, 0.25);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
box-shadow: var(--shadow-lg);
|
box-shadow: 0 10px 28px -8px rgba(109, 40, 217, 0.55);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
z-index: 9998;
|
z-index: 9998;
|
||||||
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, background 0.3s ease;
|
transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
|
||||||
|
}
|
||||||
|
.chatbot-fab:hover {
|
||||||
|
transform: scale(1.07);
|
||||||
|
box-shadow: 0 12px 32px -6px rgba(109, 40, 217, 0.65);
|
||||||
}
|
}
|
||||||
.chatbot-fab:hover { transform: scale(1.07); background: var(--emerald-dark); }
|
|
||||||
.chatbot-fab:active { transform: scale(0.96); }
|
.chatbot-fab:active { transform: scale(0.96); }
|
||||||
.chatbot-fab .fab-icon { transition: transform 0.3s ease; }
|
.chatbot-fab .fab-icon { transition: transform 0.3s ease; }
|
||||||
.chatbot-fab.open .fab-icon { transform: rotate(90deg); }
|
.chatbot-fab.open .fab-icon { transform: rotate(90deg); }
|
||||||
@@ -31,29 +34,38 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
inset: -4px;
|
inset: -4px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: 1.5px solid var(--brass);
|
border: 1.5px solid var(--violet-bright, #8B5CF6);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
animation: chatPulse 2.5s ease-out infinite;
|
animation: chatPulse 6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
|
||||||
}
|
}
|
||||||
.chatbot-fab.open::before { animation: none; opacity: 0; }
|
.chatbot-fab.open::before { animation: none; opacity: 0; }
|
||||||
|
|
||||||
@keyframes chatPulse {
|
@keyframes chatPulse {
|
||||||
0% { transform: scale(1); opacity: 0.45; }
|
0% { transform: scale(1); opacity: 0.5; }
|
||||||
100% { transform: scale(1.4); opacity: 0; }
|
20% { transform: scale(1.35); opacity: 0; }
|
||||||
|
100% { transform: scale(1.35); opacity: 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
.chatbot-fab .notif-dot {
|
.chatbot-fab .notif-dot {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 2px; right: 2px;
|
top: 2px; right: 2px;
|
||||||
width: 13px; height: 13px;
|
width: 12px; height: 12px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--brass);
|
background: #F5B83D;
|
||||||
border: 2px solid var(--ink);
|
border: 2px solid #0A2540;
|
||||||
animation: dotBounce 1.5s ease infinite;
|
|
||||||
}
|
}
|
||||||
.chatbot-fab.open .notif-dot { display: none; }
|
.chatbot-fab.open .notif-dot { display: none; }
|
||||||
|
|
||||||
@keyframes dotBounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
|
@keyframes chatbotWindowOpen {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale(0.96);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.chatbot-window {
|
.chatbot-window {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -61,25 +73,39 @@
|
|||||||
right: 24px;
|
right: 24px;
|
||||||
width: 380px;
|
width: 380px;
|
||||||
max-height: 520px;
|
max-height: 520px;
|
||||||
border-radius: var(--radius-lg);
|
border-radius: var(--radius-lg, 16px);
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border, #E2E8F0);
|
||||||
box-shadow: var(--shadow-lg);
|
box-shadow: 0 12px 36px -8px rgba(10, 37, 64, 0.16);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(16px) scale(0.97);
|
transform: scale(0.96);
|
||||||
|
transform-origin: bottom right;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
|
|
||||||
}
|
}
|
||||||
.chatbot-window.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
|
.chatbot-window.visible {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1);
|
||||||
|
transform-origin: bottom right;
|
||||||
|
pointer-events: auto;
|
||||||
|
animation: chatbotWindowOpen 250ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.chatbot-window.visible {
|
||||||
|
animation: none !important;
|
||||||
|
}
|
||||||
|
.chatbot-fab::before {
|
||||||
|
animation: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.chatbot-header {
|
.chatbot-header {
|
||||||
background: var(--ink);
|
background: var(--ink, #0A2540);
|
||||||
background-image: var(--ruled);
|
color: #FFFFFF;
|
||||||
color: #fff;
|
|
||||||
padding: 16px 18px;
|
padding: 16px 18px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -88,14 +114,14 @@
|
|||||||
}
|
}
|
||||||
.chatbot-header .bot-avatar {
|
.chatbot-header .bot-avatar {
|
||||||
width: 36px; height: 36px; border-radius: 50%;
|
width: 36px; height: 36px; border-radius: 50%;
|
||||||
background: var(--brass);
|
background: var(--gradient-ai);
|
||||||
display: flex; align-items: center; justify-content: center;
|
display: flex; align-items: center; justify-content: center;
|
||||||
font-size: 18px; flex-shrink: 0; color: #fff;
|
font-size: 18px; flex-shrink: 0; color: #FFFFFF;
|
||||||
}
|
}
|
||||||
.chatbot-header .bot-info h4 { font-size: 14px; font-weight: 600; margin: 0; color: #fff; font-family: var(--font-body); }
|
.chatbot-header .bot-info h4 { font-size: 14px; font-weight: 600; margin: 0; color: #FFFFFF; font-family: var(--font-body); }
|
||||||
.chatbot-header .bot-info span { font-size: 11px; opacity: 0.75; }
|
.chatbot-header .bot-info span { font-size: 11px; opacity: 0.8; color: #C4B5FD; }
|
||||||
.chatbot-header .close-chat {
|
.chatbot-header .close-chat {
|
||||||
margin-left: auto; background: rgba(255,255,255,0.12); border: none; color: #fff;
|
margin-left: auto; background: rgba(255,255,255,0.12); border: none; color: #FFFFFF;
|
||||||
width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 15px;
|
width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 15px;
|
||||||
display: flex; align-items: center; justify-content: center; transition: background 0.2s;
|
display: flex; align-items: center; justify-content: center; transition: background 0.2s;
|
||||||
}
|
}
|
||||||
@@ -104,78 +130,80 @@
|
|||||||
.chatbot-messages {
|
.chatbot-messages {
|
||||||
flex: 1; overflow-y: auto; padding: 22px 18px;
|
flex: 1; overflow-y: auto; padding: 22px 18px;
|
||||||
display: flex; flex-direction: column; gap: 12px;
|
display: flex; flex-direction: column; gap: 12px;
|
||||||
background: var(--paper);
|
background: #F6F9FC;
|
||||||
min-height: 200px; max-height: 380px; scroll-behavior: smooth;
|
min-height: 200px; max-height: 380px; scroll-behavior: smooth;
|
||||||
}
|
}
|
||||||
.chatbot-welcome-text {
|
.chatbot-welcome-text {
|
||||||
display: flex; align-items: center; justify-content: center; gap: 8px;
|
display: flex; align-items: center; justify-content: center; gap: 8px;
|
||||||
margin-bottom: 8px; padding: 10px;
|
margin-bottom: 8px; padding: 10px;
|
||||||
background: var(--emerald-light);
|
background: #F5F3FF;
|
||||||
border-radius: var(--radius-sm);
|
border-radius: var(--radius-sm, 10px);
|
||||||
border: 1px solid rgba(31,93,70,0.15);
|
border: 1px solid rgba(109, 40, 217, 0.16);
|
||||||
}
|
}
|
||||||
.chatbot-welcome-text p { font-size: 13px; font-weight: 500; color: var(--ink); margin: 0; }
|
.chatbot-welcome-text p { font-size: 13px; font-weight: 500; color: var(--ink, #0A2540); margin: 0; }
|
||||||
.chatbot-welcome-text .sparkle { font-size: 17px; color: var(--brass); }
|
.chatbot-welcome-text .sparkle { font-size: 17px; color: var(--violet, #6D28D9); }
|
||||||
.chatbot-messages::-webkit-scrollbar { width: 5px; }
|
.chatbot-messages::-webkit-scrollbar { width: 5px; }
|
||||||
.chatbot-messages::-webkit-scrollbar-track { background: transparent; }
|
.chatbot-messages::-webkit-scrollbar-track { background: transparent; }
|
||||||
.chatbot-messages::-webkit-scrollbar-thumb { background: #d8d0b6; border-radius: 10px; }
|
.chatbot-messages::-webkit-scrollbar-thumb { background: var(--border, #E2E8F0); border-radius: 10px; }
|
||||||
|
|
||||||
.chat-msg {
|
.chat-msg {
|
||||||
max-width: 85%; padding: 10px 14px; border-radius: 13px;
|
max-width: 85%; padding: 10px 14px; border-radius: 13px;
|
||||||
font-size: 13px; line-height: 1.5; animation: msgSlideIn 0.3s ease; word-wrap: break-word;
|
font-size: 13px; line-height: 1.5; animation: msgSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1); word-wrap: break-word;
|
||||||
}
|
}
|
||||||
@keyframes msgSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
|
@keyframes msgSlideIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
|
||||||
|
|
||||||
.chat-msg.bot {
|
.chat-msg.bot {
|
||||||
background: #fff; color: var(--ink); border: 1px solid var(--border);
|
background: #FFFFFF; color: var(--ink, #0A2540); border: 1px solid var(--border, #E2E8F0);
|
||||||
|
border-left: 2px solid var(--violet, #6D28D9);
|
||||||
border-bottom-left-radius: 4px; align-self: flex-start; box-shadow: var(--shadow-xs);
|
border-bottom-left-radius: 4px; align-self: flex-start; box-shadow: var(--shadow-xs);
|
||||||
}
|
}
|
||||||
.chat-msg.user {
|
.chat-msg.user {
|
||||||
background: var(--emerald); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end;
|
background: #1D4ED8; color: #FFFFFF; border-bottom-right-radius: 4px; align-self: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.typing-indicator { display: flex; gap: 4px; padding: 12px 16px; align-self: flex-start; }
|
.typing-indicator { display: flex; gap: 4px; padding: 12px 16px; align-self: flex-start; }
|
||||||
.typing-indicator span { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); opacity: 0.4; animation: typingDot 1.2s ease-in-out infinite; }
|
.typing-indicator span { width: 7px; height: 7px; border-radius: 50%; background: var(--violet, #6D28D9); opacity: 0.4; animation: typingDot 1.2s ease-in-out infinite; }
|
||||||
.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
|
.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
|
||||||
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }
|
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }
|
||||||
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-6px); opacity: 1; } }
|
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-6px); opacity: 1; } }
|
||||||
|
|
||||||
.quick-replies { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
|
.quick-replies { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
|
||||||
|
|
||||||
.quick-reply-btn {
|
.quick-reply-btn {
|
||||||
background: #fff; border: 1.5px solid var(--border); color: var(--ink);
|
background: #fff; border: 1.5px solid var(--border, #E2E8F0); color: var(--ink, #0A2540);
|
||||||
padding: 11px 15px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500;
|
padding: 11px 15px; border-radius: var(--radius-sm, 10px); font-size: 13.5px; font-weight: 500;
|
||||||
cursor: pointer; text-align: left; transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
|
cursor: pointer; text-align: left; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
|
||||||
font-family: inherit; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-xs);
|
font-family: inherit; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-xs);
|
||||||
}
|
}
|
||||||
.quick-reply-btn:hover { background: var(--emerald-light); border-color: var(--emerald); color: var(--emerald-dark); transform: translateY(-1px); }
|
.quick-reply-btn:hover { background: #F5F3FF; border-color: rgba(109, 40, 217, 0.4); color: var(--violet, #6D28D9); transform: translateY(-1px); }
|
||||||
.quick-reply-btn .qr-icon { font-size: 16px; flex-shrink: 0; }
|
.quick-reply-btn .qr-icon { font-size: 16px; flex-shrink: 0; }
|
||||||
|
|
||||||
.doc-status-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 10px 12px; margin-top: 6px; font-size: 12px; }
|
.doc-status-card { background: #fff; border: 1px solid var(--border, #E2E8F0); border-radius: var(--radius-xs, 6px); padding: 10px 12px; margin-top: 6px; font-size: 12px; }
|
||||||
.doc-status-card .doc-name { font-weight: 600; color: var(--ink); margin-bottom: 4px; font-size: 13px; }
|
.doc-status-card .doc-name { font-weight: 600; color: var(--ink, #0A2540); margin-bottom: 4px; font-size: 13px; }
|
||||||
.doc-status-card .doc-year { color: var(--muted); font-size: 11px; }
|
.doc-status-card .doc-year { color: var(--muted, #425466); font-size: 11px; }
|
||||||
.doc-status-card .doc-badge { display: inline-block; padding: 2px 8px; border-radius: var(--radius-xs); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; font-family: var(--font-mono); }
|
.doc-status-card .doc-badge { display: inline-block; padding: 2px 8px; border-radius: var(--radius-xs, 6px); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; font-family: var(--font-mono); }
|
||||||
.doc-badge.pending { background: var(--warn-bg); color: var(--brass-dark); }
|
.doc-badge.pending { background: #FFF8E6; color: #92600A; }
|
||||||
.doc-badge.approved { background: var(--success-bg); color: var(--success); }
|
.doc-badge.approved { background: #ECFDF5; color: #047857; }
|
||||||
.doc-badge.rejected { background: var(--error-bg); color: var(--error); }
|
.doc-badge.rejected { background: #FEF2F2; color: #DC2626; }
|
||||||
.doc-status-card .doc-note { margin-top: 4px; color: var(--muted); font-style: italic; font-size: 11px; }
|
.doc-status-card .doc-note { margin-top: 4px; color: var(--muted, #425466); font-style: italic; font-size: 11px; }
|
||||||
|
|
||||||
.status-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
|
.status-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
|
||||||
.summary-item { text-align: center; padding: 8px 4px; border-radius: var(--radius-xs); background: var(--paper); }
|
.summary-item { text-align: center; padding: 8px 4px; border-radius: var(--radius-xs, 6px); background: #F6F9FC; }
|
||||||
.summary-item .count { font-family: var(--font-mono); font-size: 19px; font-weight: 600; display: block; }
|
.summary-item .count { font-family: var(--font-mono); font-size: 19px; font-weight: 600; display: block; }
|
||||||
.summary-item .label { font-size: 10px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.5px; }
|
.summary-item .label { font-size: 10px; text-transform: uppercase; color: var(--muted, #425466); letter-spacing: 0.5px; }
|
||||||
.summary-item.pending .count { color: var(--brass-dark); }
|
.summary-item.pending .count { color: #92600A; }
|
||||||
.summary-item.approved .count { color: var(--success); }
|
.summary-item.approved .count { color: #047857; }
|
||||||
.summary-item.rejected .count { color: var(--error); }
|
.summary-item.rejected .count { color: #DC2626; }
|
||||||
|
|
||||||
.faq-question {
|
.faq-question {
|
||||||
background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xs);
|
background: #fff; border: 1px solid var(--border, #E2E8F0); border-radius: var(--radius-xs, 6px);
|
||||||
padding: 9px 12px; font-size: 12.5px; cursor: pointer; transition: all 0.2s ease;
|
padding: 9px 12px; font-size: 12.5px; cursor: pointer; transition: all 0.2s ease;
|
||||||
text-align: left; color: var(--ink); width: 100%; font-family: inherit; display: block; margin-top: 4px;
|
text-align: left; color: var(--ink, #0A2540); width: 100%; font-family: inherit; display: block; margin-top: 4px;
|
||||||
}
|
}
|
||||||
.faq-question:hover { border-color: var(--emerald); color: var(--emerald); background: var(--emerald-light); }
|
.faq-question:hover { border-color: #1D4ED8; color: #1D4ED8; background: #EFF6FF; }
|
||||||
|
|
||||||
.back-btn {
|
.back-btn {
|
||||||
background: none; border: none; color: var(--emerald); cursor: pointer; font-size: 12px;
|
background: none; border: none; color: #1D4ED8; cursor: pointer; font-size: 12px;
|
||||||
padding: 4px 0; font-family: inherit; font-weight: 500; margin-top: 6px;
|
padding: 4px 0; font-family: inherit; font-weight: 500; margin-top: 6px;
|
||||||
display: inline-flex; align-items: center; gap: 4px;
|
display: inline-flex; align-items: center; gap: 4px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,32 +38,52 @@
|
|||||||
.app-footer img { height: 28px; }
|
.app-footer img { height: 28px; }
|
||||||
.app-footer small { color: var(--muted); font-size: 12px; }
|
.app-footer small { color: var(--muted); font-size: 12px; }
|
||||||
|
|
||||||
/* ── Auth Layout — Split Card ────────────────────────────── */
|
/* ── Auth Layout — Artha Split Editorial ────────────────────────────── */
|
||||||
.auth-shell {
|
.auth-shell {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
background: #fff;
|
background: var(--paper);
|
||||||
}
|
}
|
||||||
.auth-brand {
|
.auth-brand {
|
||||||
width: 42%;
|
width: 42%;
|
||||||
min-width: 280px;
|
min-width: 320px;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: #17211D;
|
background: var(--ink);
|
||||||
background-image: var(--ruled), linear-gradient(155deg, #17211D 0%, var(--emerald-dark) 130%);
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 48px 40px;
|
padding: 48px 40px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
gap: 22px;
|
gap: 24px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
border-right: 1px solid rgba(255, 255, 255, 0.08);
|
||||||
|
}
|
||||||
|
.auth-brand::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: -80px;
|
||||||
|
left: -80px;
|
||||||
|
width: 240px;
|
||||||
|
height: 240px;
|
||||||
|
background: radial-gradient(circle, rgba(29, 78, 216, 0.45) 0%, transparent 70%);
|
||||||
|
border-radius: 50%;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
.auth-brand .brand-logo { height: 48px; opacity: 0.95; }
|
.auth-brand .brand-logo { height: 48px; opacity: 0.95; }
|
||||||
.auth-brand h2 { font-family: var(--font-display); color: #fff; font-size: clamp(20px,2.5vw,27px); text-align: center; margin: 0; font-weight: 500; }
|
.auth-brand .auth-brand-logo-img {
|
||||||
.auth-brand p { color: rgba(255,255,255,0.68); font-size: 14px; text-align: center; line-height: 1.8; margin: 0; max-width: 320px; }
|
width: 58px;
|
||||||
.auth-brand .brand-divider { width: 40px; height: 2px; background: var(--brass); border-radius: 2px; }
|
height: 58px;
|
||||||
|
border-radius: 12px;
|
||||||
|
object-fit: cover;
|
||||||
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.auth-brand h2 { font-family: var(--font-display, 'Playfair Display', serif); color: #fff; font-size: clamp(22px,2.6vw,30px); text-align: center; margin: 0; font-weight: 600; }
|
||||||
|
.auth-brand p { color: rgba(255,255,255,0.72); font-size: 14.5px; text-align: center; line-height: 1.7; margin: 0; max-width: 340px; }
|
||||||
|
.auth-brand .brand-divider { width: 44px; height: 3px; background: var(--brass); border-radius: 2px; }
|
||||||
|
|
||||||
.auth-form-side {
|
.auth-form-side {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -71,13 +91,27 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: clamp(32px, 5vw, 64px) clamp(24px, 6vw, 80px);
|
padding: clamp(32px, 5vw, 64px) clamp(24px, 6vw, 80px);
|
||||||
background: #fff;
|
background: var(--paper);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
.auth-box { width: 100%; max-width: 420px; }
|
.auth-box {
|
||||||
.auth-box h1 { font-size: clamp(21px,2.5vw,27px); margin-bottom: 6px; }
|
width: 100%;
|
||||||
.auth-box .auth-subtitle { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
|
max-width: 440px;
|
||||||
.auth-links { margin-top: 20px; font-size: 13px; color: var(--muted); text-align: center; line-height: 2; }
|
background: #FFFFFF;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 24px;
|
||||||
|
padding: clamp(32px, 4vw, 44px);
|
||||||
|
box-shadow: 0 10px 32px -4px rgba(10, 37, 64, 0.05);
|
||||||
|
}
|
||||||
|
.auth-box h1 {
|
||||||
|
font-family: var(--font-display, 'Playfair Display', serif);
|
||||||
|
font-size: clamp(24px,2.6vw,30px);
|
||||||
|
color: var(--ink);
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
.auth-box .auth-subtitle { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
|
||||||
|
.auth-links { margin-top: 24px; font-size: 13.5px; color: var(--muted); text-align: center; line-height: 2; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -94,6 +128,7 @@
|
|||||||
}
|
}
|
||||||
.auth-brand p, .auth-brand .brand-divider { display: none; }
|
.auth-brand p, .auth-brand .brand-divider { display: none; }
|
||||||
.auth-brand .brand-logo { height: 30px; }
|
.auth-brand .brand-logo { height: 30px; }
|
||||||
|
.auth-brand .auth-brand-logo-img { width: 36px; height: 36px; border-radius: 8px; }
|
||||||
.auth-brand h2 { font-size: 15px; margin: 0; }
|
.auth-brand h2 { font-size: 15px; margin: 0; }
|
||||||
.auth-form-side { padding: 28px 20px; }
|
.auth-form-side { padding: 28px 20px; }
|
||||||
}
|
}
|
||||||
@@ -184,7 +219,7 @@
|
|||||||
transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
|
transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.user-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #cfc7ad; }
|
.user-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(29, 78, 216, 0.3); }
|
||||||
.click-layer { position: absolute; inset: 0; z-index: 0; }
|
.click-layer { position: absolute; inset: 0; z-index: 0; }
|
||||||
.user-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
|
.user-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
@@ -225,7 +260,7 @@
|
|||||||
transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
|
transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
.doc-row:hover { border-color: #cfc7ad; background: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(23,33,29,0.06); }
|
.doc-row:hover { border-color: var(--brass); background: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(10,37,64,0.06); }
|
||||||
.doc-row-left { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
|
.doc-row-left { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
|
||||||
.doc-row-name { font-weight: 600; font-size: 13px; color: var(--ink); word-break: break-word; }
|
.doc-row-name { font-weight: 600; font-size: 13px; color: var(--ink); word-break: break-word; }
|
||||||
.doc-row-type { font-size: 12px; color: var(--muted); }
|
.doc-row-type { font-size: 12px; color: var(--muted); }
|
||||||
@@ -233,7 +268,7 @@
|
|||||||
|
|
||||||
/* ── Drop Zone ───────────────────────────────────────────── */
|
/* ── Drop Zone ───────────────────────────────────────────── */
|
||||||
.drop-zone {
|
.drop-zone {
|
||||||
border: 2px dashed #cfc7ad;
|
border: 2px dashed var(--border);
|
||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
padding: 36px 24px;
|
padding: 36px 24px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -242,9 +277,9 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.drop-zone:hover, .drop-zone.drag-over {
|
.drop-zone:hover, .drop-zone.drag-over {
|
||||||
border-color: var(--emerald);
|
border-color: var(--brass);
|
||||||
background: var(--emerald-light);
|
background: var(--brass-light);
|
||||||
color: var(--emerald);
|
color: var(--brass);
|
||||||
}
|
}
|
||||||
.drop-zone .drop-icon { font-size: 34px; margin-bottom: 10px; }
|
.drop-zone .drop-icon { font-size: 34px; margin-bottom: 10px; }
|
||||||
.drop-zone .drop-title { font-weight: 600; font-size: 15px; color: var(--ink); }
|
.drop-zone .drop-title { font-weight: 600; font-size: 15px; color: var(--ink); }
|
||||||
@@ -262,7 +297,7 @@
|
|||||||
transition: border-color var(--transition), box-shadow var(--transition);
|
transition: border-color var(--transition), box-shadow var(--transition);
|
||||||
max-width: 360px;
|
max-width: 360px;
|
||||||
}
|
}
|
||||||
.search-bar:focus-within { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(31,93,70,0.10); }
|
.search-bar:focus-within { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(29,78,216,0.10); }
|
||||||
.search-bar input { border: none; outline: none; font-family: inherit; font-size: 14px; width: 100%; background: transparent; }
|
.search-bar input { border: none; outline: none; font-family: inherit; font-size: 14px; width: 100%; background: transparent; }
|
||||||
.search-bar .search-icon { color: var(--muted); font-size: 16px; flex-shrink: 0; }
|
.search-bar .search-icon { color: var(--muted); font-size: 16px; flex-shrink: 0; }
|
||||||
|
|
||||||
@@ -320,15 +355,15 @@
|
|||||||
gap: 16px;
|
gap: 16px;
|
||||||
padding: 16px 20px;
|
padding: 16px 20px;
|
||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
background: var(--emerald-light);
|
background: var(--brass-light);
|
||||||
border: 1px solid rgba(31,93,70,0.2);
|
border: 1px solid rgba(29, 78, 216, 0.2);
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
.engagement-banner .banner-icon { font-size: 26px; flex-shrink: 0; color: var(--emerald); }
|
.engagement-banner .banner-icon { font-size: 26px; flex-shrink: 0; color: var(--brass); }
|
||||||
.engagement-banner .banner-text { flex: 1; }
|
.engagement-banner .banner-text { flex: 1; }
|
||||||
.engagement-banner .banner-text strong { display: block; font-size: 14px; color: var(--ink); }
|
.engagement-banner .banner-text strong { display: block; font-size: 14px; color: var(--ink); }
|
||||||
.engagement-banner .banner-text span { font-size: 13px; color: var(--muted); }
|
.engagement-banner .banner-text span { font-size: 13px; color: var(--muted); }
|
||||||
.engagement-banner.acknowledged { background: var(--success-bg); border-color: rgba(31,93,70,0.25); }
|
.engagement-banner.acknowledged { background: var(--success-bg); border-color: rgba(4, 120, 87, 0.25); }
|
||||||
|
|
||||||
/* ── Empty State ─────────────────────────────────────────── */
|
/* ── Empty State ─────────────────────────────────────────── */
|
||||||
.empty-state {
|
.empty-state {
|
||||||
@@ -365,15 +400,15 @@
|
|||||||
|
|
||||||
/* ── JS-extracted components (upload/review) ─────────────── */
|
/* ── JS-extracted components (upload/review) ─────────────── */
|
||||||
.doc-row-wrapper { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
|
.doc-row-wrapper { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
|
||||||
.btn-approve { background: var(--success-bg); color: var(--success); border: 1px solid rgba(31,93,70,0.3); border-radius: var(--radius-sm); }
|
.btn-approve { background: var(--success-bg); color: var(--success); border: 1px solid rgba(4, 120, 87, 0.3); border-radius: var(--radius-sm); }
|
||||||
.btn-reject { background: var(--error-bg); color: var(--error); border: 1px solid rgba(166,58,58,0.3); border-radius: var(--radius-sm); }
|
.btn-reject { background: var(--error-bg); color: var(--error); border: 1px solid rgba(220, 38, 38, 0.3); border-radius: var(--radius-sm); }
|
||||||
.reject-box { display: none; margin-top: 10px; }
|
.reject-box { display: none; margin-top: 10px; }
|
||||||
.reject-textarea { width: 100%; padding: 10px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); font-family: inherit; font-size: 13px; resize: vertical; }
|
.reject-textarea { width: 100%; padding: 10px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); font-family: inherit; font-size: 13px; resize: vertical; }
|
||||||
.admin-doc-actions { display: flex; gap: 8px; flex-shrink: 0; }
|
.admin-doc-actions { display: flex; gap: 8px; flex-shrink: 0; }
|
||||||
.admin-docs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
.admin-docs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
||||||
.admin-docs-td { padding: 10px 12px; color: #3E463F; }
|
.admin-docs-td { padding: 10px 12px; color: var(--muted); }
|
||||||
.admin-docs-th { padding: 10px 12px; color: var(--muted); font-weight: 600; text-align: left; border-bottom: 2px solid var(--border); }
|
.admin-docs-th { padding: 10px 12px; color: var(--muted); font-weight: 600; text-align: left; border-bottom: 2px solid var(--border); }
|
||||||
.btn-download-pill { background: var(--emerald); color: #fff; border: none; border-radius: var(--radius-sm); font-weight: 500; }
|
.btn-download-pill { background: var(--brass); color: #fff; border: none; border-radius: var(--radius-sm); font-weight: 500; }
|
||||||
.btn-download-pill:hover { opacity: 0.9; }
|
.btn-download-pill:hover { opacity: 0.9; }
|
||||||
.btn-upload-pill { background: var(--brass); color: #fff; border: none; border-radius: var(--radius-sm); font-weight: 500; cursor: pointer; padding: 8px 16px; display: inline-flex; align-items: center; gap: 8px; }
|
.btn-upload-pill { background: var(--brass); color: #fff; border: none; border-radius: var(--radius-sm); font-weight: 500; cursor: pointer; padding: 8px 16px; display: inline-flex; align-items: center; gap: 8px; }
|
||||||
.btn-upload-pill:hover { opacity: 0.9; }
|
.btn-upload-pill:hover { opacity: 0.9; }
|
||||||
@@ -745,8 +780,49 @@
|
|||||||
min-width: 0; /* prevents flex child from overflowing */
|
min-width: 0; /* prevents flex child from overflowing */
|
||||||
}
|
}
|
||||||
.doc-review-sidebar {
|
.doc-review-sidebar {
|
||||||
flex: 0 0 240px; /* fixed 240px sidebar, doesn't shrink */
|
flex: 0 0 290px;
|
||||||
width: 240px;
|
width: 290px;
|
||||||
|
min-width: 260px;
|
||||||
|
}
|
||||||
|
.doc-review-sidebar .timeline-sidebar-card {
|
||||||
|
background: #FFFFFF;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 16px;
|
||||||
|
padding: 20px;
|
||||||
|
box-shadow: 0 4px 16px rgba(10, 37, 64, 0.04);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 14px;
|
||||||
|
}
|
||||||
|
.doc-review-sidebar .timeline-control {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
padding: 8px 14px;
|
||||||
|
background: var(--paper);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
.doc-review-sidebar .timeline-control .tl-btn {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
background: #FFFFFF;
|
||||||
|
color: var(--ink);
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 700;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.18s ease;
|
||||||
|
}
|
||||||
|
.doc-review-sidebar .timeline-control .tl-btn:hover {
|
||||||
|
background: var(--brass);
|
||||||
|
color: #FFFFFF;
|
||||||
|
border-color: var(--brass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
@@ -759,9 +835,7 @@
|
|||||||
order: -1; /* show Filing Timeline ABOVE the doc list on mobile */
|
order: -1; /* show Filing Timeline ABOVE the doc list on mobile */
|
||||||
}
|
}
|
||||||
.doc-review-sidebar .card-flat {
|
.doc-review-sidebar .card-flat {
|
||||||
flex-direction: row !important;
|
flex-direction: column;
|
||||||
align-items: center;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
.doc-review-sidebar h3 {
|
.doc-review-sidebar h3 {
|
||||||
@@ -769,11 +843,11 @@
|
|||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
}
|
}
|
||||||
.doc-review-sidebar .timeline-control {
|
.doc-review-sidebar .timeline-control {
|
||||||
flex: 1;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.doc-review-sidebar .btn {
|
.doc-review-sidebar .btn,
|
||||||
flex: 1;
|
.doc-review-sidebar .artha-pill-btn {
|
||||||
min-width: 180px;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -845,17 +919,50 @@
|
|||||||
.doc-count-chip {
|
.doc-count-chip {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 6px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
background: var(--paper);
|
background: var(--paper);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: var(--radius-xs);
|
border-radius: 9999px;
|
||||||
padding: 3px 8px;
|
padding: 4px 10px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Admin User Detail Bar ────────────────────────────── */
|
||||||
|
.aud-user-bar {
|
||||||
|
background: #FFFFFF !important;
|
||||||
|
border: 1px solid var(--border) !important;
|
||||||
|
border-radius: 20px !important;
|
||||||
|
padding: clamp(20px, 3vw, 28px) !important;
|
||||||
|
box-shadow: 0 4px 20px -2px rgba(10, 37, 64, 0.04) !important;
|
||||||
|
}
|
||||||
|
.aud-bar-inner {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 24px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.aud-bar-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 16px;
|
||||||
|
min-width: 280px;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.aud-bar-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
.aud-year-picker {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
/* StatusChip */
|
/* StatusChip */
|
||||||
.status-chip-container {
|
.status-chip-container {
|
||||||
@@ -869,3 +976,4 @@
|
|||||||
color: var(--error);
|
color: var(--error);
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
dynamic.css — Ledger motion layer
|
dynamic.css — Ledger motion layer
|
||||||
Uses ONLY existing tokens (colours, Fraunces / IBM Plex fonts).
|
Uses ONLY existing tokens (colours, fonts).
|
||||||
Concept: a brass rule is "struck under" a checked entry; numbers
|
Concept: a brass rule is "struck under" a checked entry; numbers
|
||||||
tick like a ledger counter. Load AFTER animations.css.
|
tick like a ledger counter. Load AFTER animations.css.
|
||||||
Rules: animate transform/opacity only; entrance animations use
|
Rules: animate transform/opacity only; entrance animations use
|
||||||
@@ -10,31 +10,24 @@
|
|||||||
:root {
|
:root {
|
||||||
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
||||||
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||||
--brass-rgb: 176, 128, 61; /* = original brass, for rgba() */
|
--brass-rgb: 29, 78, 216;
|
||||||
--emerald-rgb: 31, 93, 70;
|
--emerald-rgb: 4, 120, 87;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- Global polish ---------- */
|
/* ---------- Global polish ---------- */
|
||||||
::selection { background: rgba(var(--brass-rgb), 0.28); color: var(--ink); }
|
::selection { background: rgba(var(--brass-rgb), 0.28); color: var(--ink); }
|
||||||
h1, h2, h3 { text-wrap: balance; }
|
h1, h2, h3 { text-wrap: balance; }
|
||||||
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
||||||
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }
|
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
|
||||||
.btn:focus-visible, .tab-btn:focus-visible { outline-offset: 2px; }
|
.btn:focus-visible, .tab-btn:focus-visible { outline-offset: 2px; }
|
||||||
|
|
||||||
/* ---------- Scroll progress rule (width driven by --scroll, set in motion.js) ---------- */
|
/* ---------- Scroll progress rule (width driven by --scroll, set in motion.js) ---------- */
|
||||||
.scroll-progress {
|
.scroll-progress {
|
||||||
position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 10000;
|
position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 10000;
|
||||||
background: linear-gradient(90deg, var(--emerald), rgb(var(--brass-rgb)));
|
background: linear-gradient(90deg, #1D4ED8, #14B8A6);
|
||||||
transform: scaleX(var(--scroll, 0)); transform-origin: 0 50%; pointer-events: none;
|
transform: scaleX(var(--scroll, 0)); transform-origin: 0 50%; pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- Header / navbar respond to scroll ---------- */
|
|
||||||
.navbar:not(.navbar-solid) { position: fixed; transition: background 0.35s, box-shadow 0.35s, border-color 0.35s; }
|
|
||||||
html[data-scrolled] .navbar:not(.navbar-solid) {
|
|
||||||
background: rgba(23, 33, 29, 0.92);
|
|
||||||
box-shadow: 0 10px 28px -14px rgba(23, 33, 29, 0.6);
|
|
||||||
border-bottom-color: rgba(var(--brass-rgb), 0.35);
|
|
||||||
}
|
|
||||||
.app-header { transition: box-shadow 0.3s, background 0.3s; }
|
.app-header { transition: box-shadow 0.3s, background 0.3s; }
|
||||||
html[data-scrolled] .app-header { box-shadow: var(--shadow-sm); }
|
html[data-scrolled] .app-header { box-shadow: var(--shadow-sm); }
|
||||||
|
|
||||||
@@ -43,47 +36,22 @@ html[data-scrolled] .app-header { box-shadow: var(--shadow-sm); }
|
|||||||
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
|
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
|
||||||
.page-enter { animation: pageIn 0.5s var(--ease-out) backwards; }
|
.page-enter { animation: pageIn 0.5s var(--ease-out) backwards; }
|
||||||
|
|
||||||
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > * {
|
|
||||||
animation: rise 0.65s var(--ease-out) backwards;
|
|
||||||
animation-delay: var(--d, 0ms);
|
|
||||||
}
|
|
||||||
/* beat the older `fade-up` (fill-mode both) which froze the hover-lift transform */
|
|
||||||
.fade-up, .service-card.fade-up, .user-card.fade-up { animation-name: rise; animation-duration: 0.65s; animation-timing-function: var(--ease-out); animation-fill-mode: backwards; }
|
|
||||||
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(1) { --d: 40ms; }
|
|
||||||
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(2) { --d: 110ms; }
|
|
||||||
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(3) { --d: 180ms; }
|
|
||||||
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(4) { --d: 250ms; }
|
|
||||||
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(5) { --d: 320ms; }
|
|
||||||
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(6) { --d: 380ms; }
|
|
||||||
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(7) { --d: 430ms; }
|
|
||||||
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(8) { --d: 480ms; }
|
|
||||||
:is(.admin-stats, .users-grid, .services-grid, .return-cards, .stat-row) > :nth-child(n+9) { --d: 520ms; }
|
|
||||||
|
|
||||||
/* ---------- Cards: lift + pointer spotlight (vars set in motion.js) ---------- */
|
/* ---------- Cards: lift + pointer spotlight (vars set in motion.js) ---------- */
|
||||||
:is(.stat-card, .user-card, .service-card, .card) { position: relative; }
|
.card { position: relative; }
|
||||||
:is(.stat-card, .user-card, .service-card, .card):hover {
|
.card:hover {
|
||||||
background-image: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--brass-rgb), 0.10), transparent 62%);
|
background-image: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--brass-rgb), 0.10), transparent 62%);
|
||||||
}
|
}
|
||||||
.stat-icon { display: inline-flex; transition: transform 0.5s var(--ease-spring); }
|
|
||||||
.stat-card:hover .stat-icon { transform: translateY(-3px) rotate(-6deg) scale(1.08); }
|
|
||||||
.stat-card.active-filter { animation: rise 0.65s var(--ease-out) backwards, ringPulse 2.6s 1s ease-out infinite; animation-delay: var(--d, 0ms), 1s; }
|
|
||||||
@keyframes ringPulse { 0% { box-shadow: 0 0 0 0 rgba(var(--emerald-rgb), 0.28); } 70%, 100% { box-shadow: 0 0 0 10px rgba(var(--emerald-rgb), 0); } }
|
|
||||||
.user-avatar { transition: transform 0.4s var(--ease-spring), box-shadow 0.3s; }
|
|
||||||
.user-card:hover .user-avatar { transform: scale(1.1); box-shadow: 0 0 0 4px rgba(var(--brass-rgb), 0.22); }
|
|
||||||
.service-card img { transition: transform 0.9s var(--ease-out); }
|
|
||||||
.service-card:hover img { transform: scale(1.06); }
|
|
||||||
|
|
||||||
/* ---------- Buttons: lift, brass sheen, press ---------- */
|
/* ---------- Buttons: lift, brass sheen, press ---------- */
|
||||||
.btn { position: relative; overflow: hidden; transition: transform 0.18s var(--ease-out), box-shadow 0.25s, background-color 0.25s, color 0.25s, border-color 0.25s; }
|
.btn { position: relative; overflow: hidden; transition: transform 0.18s var(--ease-out), box-shadow 0.25s, background-color 0.25s, color 0.25s, border-color 0.25s; }
|
||||||
.btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
|
.btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
|
||||||
.btn:not(:disabled):active { transform: translateY(1px) scale(0.97); box-shadow: none; }
|
.btn:not(:disabled):active { transform: translateY(1px) scale(0.97); box-shadow: none; }
|
||||||
.btn-primary::before, .login-btn::before {
|
.btn-primary::before {
|
||||||
content: ''; position: absolute; inset: 0; pointer-events: none;
|
content: ''; position: absolute; inset: 0; pointer-events: none;
|
||||||
background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.26) 50%, transparent 70%);
|
background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
|
||||||
transform: translateX(-130%); transition: transform 0.8s var(--ease-out);
|
transform: translateX(-130%); transition: transform 0.8s var(--ease-out);
|
||||||
}
|
}
|
||||||
.btn-primary:not(:disabled):hover::before, .login-btn:hover::before { transform: translateX(130%); }
|
.btn-primary:not(:disabled):hover::before { transform: translateX(130%); }
|
||||||
.login-btn { position: relative; overflow: hidden; }
|
|
||||||
|
|
||||||
/* ---------- Status chips: attention dot / stamp ---------- */
|
/* ---------- Status chips: attention dot / stamp ---------- */
|
||||||
@keyframes pop { 0% { opacity: 0; transform: scale(0.6); } 100% { opacity: 1; transform: scale(1); } }
|
@keyframes pop { 0% { opacity: 0; transform: scale(0.6); } 100% { opacity: 1; transform: scale(1); } }
|
||||||
@@ -97,7 +65,7 @@ html[data-scrolled] .app-header { box-shadow: var(--shadow-sm); }
|
|||||||
.status-chip-container .badge-green::before { content: '✓' / ''; font-weight: 700; display: inline-block; animation: stamp 0.55s 0.15s var(--ease-spring) backwards; }
|
.status-chip-container .badge-green::before { content: '✓' / ''; font-weight: 700; display: inline-block; animation: stamp 0.55s 0.15s var(--ease-spring) backwards; }
|
||||||
.status-chip-container .badge-red::before { content: '!' / ''; font-weight: 700; display: inline-block; animation: stamp 0.55s 0.15s var(--ease-spring) backwards; }
|
.status-chip-container .badge-red::before { content: '!' / ''; font-weight: 700; display: inline-block; animation: stamp 0.55s 0.15s var(--ease-spring) backwards; }
|
||||||
|
|
||||||
/* ---------- Tabs, inputs, toasts, skeletons ---------- */
|
/* ---------- Tabs, inputs, toasts ---------- */
|
||||||
.tab-btn { border-radius: var(--radius-xs) var(--radius-xs) 0 0; }
|
.tab-btn { border-radius: var(--radius-xs) var(--radius-xs) 0 0; }
|
||||||
.tab-btn:hover { background: rgba(var(--brass-rgb), 0.08); color: var(--ink); }
|
.tab-btn:hover { background: rgba(var(--brass-rgb), 0.08); color: var(--ink); }
|
||||||
.tab-btn.active { background: linear-gradient(180deg, transparent, rgba(var(--brass-rgb), 0.07)); }
|
.tab-btn.active { background: linear-gradient(180deg, transparent, rgba(var(--brass-rgb), 0.07)); }
|
||||||
@@ -106,58 +74,19 @@ input, select, textarea { transition: border-color 0.2s, box-shadow 0.25s; }
|
|||||||
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px; border-color: rgb(var(--brass-rgb)); box-shadow: var(--shadow-glow); }
|
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px; border-color: rgb(var(--brass-rgb)); box-shadow: var(--shadow-glow); }
|
||||||
@keyframes toastIn { from { opacity: 0; transform: translateX(28px) scale(0.96); } }
|
@keyframes toastIn { from { opacity: 0; transform: translateX(28px) scale(0.96); } }
|
||||||
.toast { animation: toastIn 0.5s var(--ease-spring) backwards; }
|
.toast { animation: toastIn 0.5s var(--ease-spring) backwards; }
|
||||||
@keyframes shimmer { to { transform: translateX(100%); } }
|
|
||||||
.skeleton { position: relative; overflow: hidden; background: var(--border); border-radius: var(--radius-md); }
|
|
||||||
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent); animation: shimmer 1.4s infinite; }
|
|
||||||
.skeleton-card { height: 128px; }
|
|
||||||
|
|
||||||
/* ---------- Upload drop zone ---------- */
|
/* ---------- Chatbot ---------- */
|
||||||
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
|
|
||||||
.drop-zone { transition: border-color 0.25s, background 0.25s, transform 0.3s var(--ease-spring), box-shadow 0.3s; }
|
|
||||||
.drop-zone:hover .material-symbols-outlined { animation: bob 1.3s ease-in-out infinite; }
|
|
||||||
.drop-zone.drag-over { border-style: solid; border-color: rgb(var(--brass-rgb)); background: rgba(var(--brass-rgb), 0.10); transform: scale(1.015); box-shadow: var(--shadow-glow); }
|
|
||||||
.drop-zone.drag-over .material-symbols-outlined { animation: bob 0.7s ease-in-out infinite; }
|
|
||||||
|
|
||||||
/* ---------- Chatbot + banners ---------- */
|
|
||||||
@keyframes ring { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
|
@keyframes ring { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
|
||||||
.chatbot-fab::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(var(--brass-rgb), 0.6); animation: ring 2.8s ease-out infinite; pointer-events: none; }
|
.chatbot-fab::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(var(--brass-rgb), 0.6); animation: ring 2.8s ease-out infinite; pointer-events: none; }
|
||||||
.chatbot-fab.open::before { animation: none; opacity: 0; }
|
.chatbot-fab.open::before { animation: none; opacity: 0; }
|
||||||
.chatbot-fab:not(.open):hover { transform: scale(1.08) rotate(-4deg); }
|
.chatbot-fab:not(.open):hover { transform: scale(1.08) rotate(-4deg); }
|
||||||
.chatbot-window { transform-origin: bottom right; transition: opacity 0.3s, transform 0.4s var(--ease-spring); }
|
.chatbot-window { transform-origin: bottom right; transition: opacity 0.3s, transform 0.4s var(--ease-spring); }
|
||||||
@keyframes glowNudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--brass-rgb), 0); } 50% { box-shadow: 0 0 0 6px rgba(var(--brass-rgb), 0.18); } }
|
|
||||||
.engagement-banner:not(.acknowledged) { animation: glowNudge 3.2s 1s ease-in-out 3; }
|
|
||||||
|
|
||||||
/* ---------- Marketing: hero + reveals ---------- */
|
|
||||||
/* Ambient light: soft brass + emerald glows drift over the (static) photo. Gradients only — no image scaling, so it stays cheap. */
|
|
||||||
.hero { isolation: isolate; }
|
|
||||||
.hero::after {
|
|
||||||
content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
|
|
||||||
background:
|
|
||||||
radial-gradient(55% 50% at 18% 28%, rgba(var(--brass-rgb), 0.20), transparent 70%),
|
|
||||||
radial-gradient(50% 60% at 86% 82%, rgba(var(--emerald-rgb), 0.30), transparent 70%);
|
|
||||||
animation: drift 20s ease-in-out infinite alternate;
|
|
||||||
}
|
|
||||||
@keyframes drift { from { transform: translate3d(-4%, -3%, 0) scale(1); } to { transform: translate3d(4%, 3%, 0) scale(1.12); } }
|
|
||||||
@media (max-width: 768px) { .hero::after { animation: none; } }
|
|
||||||
.hero-eyebrow, .hero h1, .hero-sub, .hero-actions { animation: rise 1s var(--ease-out) backwards; }
|
|
||||||
.hero-eyebrow { animation-delay: 0.1s; } .hero h1 { animation-delay: 0.22s; } .hero-sub { animation-delay: 0.4s; } .hero-actions { animation-delay: 0.55s; }
|
|
||||||
.hero h1 em { background: linear-gradient(rgb(var(--brass-rgb)), rgb(var(--brass-rgb))) no-repeat 0 100% / 0 2px; padding-bottom: 0.08em; animation: drawRule 1.2s 1.1s var(--ease-out) forwards; }
|
|
||||||
@keyframes drawRule { to { background-size: 100% 2px; } }
|
|
||||||
.hero-stats { animation: rise 1.1s 0.7s var(--ease-out) backwards; }
|
|
||||||
.stat-block { transition: background 0.3s; }
|
|
||||||
.stat-block:hover { background: rgba(var(--brass-rgb), 0.08); }
|
|
||||||
.stat-figure { transition: color 0.3s, transform 0.4s var(--ease-spring); }
|
|
||||||
.stat-block:hover .stat-figure { color: var(--emerald); transform: scale(1.06); }
|
|
||||||
|
|
||||||
/* Reveal: hidden ONLY when JS has opted in (html.motion) — never blank without JS / reduced motion */
|
/* Reveal: hidden ONLY when JS has opted in (html.motion) — never blank without JS / reduced motion */
|
||||||
.reveal { opacity: 1; transform: none; }
|
.reveal { opacity: 1; transform: none; }
|
||||||
html.motion .reveal:not(.in-view) { opacity: 0; transform: translateY(26px); }
|
html.motion .reveal:not(.in-view) { opacity: 0; transform: translateY(26px); }
|
||||||
html.motion .reveal .eyebrow::before { transform: scaleX(0); transform-origin: left; transition: transform 0.9s 0.25s var(--ease-out); }
|
html.motion .reveal .eyebrow::before { transform: scaleX(0); transform-origin: left; transition: transform 0.9s 0.25s var(--ease-out); }
|
||||||
html.motion .reveal.in-view .eyebrow::before { transform: scaleX(1); }
|
html.motion .reveal.in-view .eyebrow::before { transform: scaleX(1); }
|
||||||
@supports (animation-timeline: view()) {
|
|
||||||
@keyframes parallaxY { from { transform: translateY(-18px) scale(1.04); } to { transform: translateY(18px) scale(1.04); } }
|
|
||||||
.about-media img { animation: parallaxY linear both; animation-timeline: view(); animation-range: cover 0% 100%; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Layout safety: long text inside a .badge (About page <p class="badge">) must wrap instead of forcing horizontal scroll */
|
/* Layout safety: long text inside a .badge (About page <p class="badge">) must wrap instead of forcing horizontal scroll */
|
||||||
.badge { max-width: 100%; }
|
.badge { max-width: 100%; }
|
||||||
@@ -168,4 +97,4 @@ p.badge { white-space: normal; text-align: left; }
|
|||||||
*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
|
*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
|
||||||
.scroll-progress { display: none; }
|
.scroll-progress { display: none; }
|
||||||
}
|
}
|
||||||
@media (hover: none) { :is(.stat-card, .user-card, .service-card, .card):hover { background-image: none; } }
|
@media (hover: none) { .card:hover { background-image: none; } }
|
||||||
|
|||||||
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 226 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 226 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 334 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 226 KiB |
|
After Width: | Height: | Size: 226 KiB |
@@ -56,6 +56,7 @@ function AppRoutes() {
|
|||||||
<Route element={<MarketingLayout />}>
|
<Route element={<MarketingLayout />}>
|
||||||
<Route path="/" element={<Home />} />
|
<Route path="/" element={<Home />} />
|
||||||
<Route path="/home" element={<Home />} />
|
<Route path="/home" element={<Home />} />
|
||||||
|
<Route path="/about" element={<AboutUs />} />
|
||||||
<Route path="/about-us" element={<AboutUs />} />
|
<Route path="/about-us" element={<AboutUs />} />
|
||||||
<Route path="/services" element={<Services />} />
|
<Route path="/services" element={<Services />} />
|
||||||
<Route path="/contact" element={<Contact />} />
|
<Route path="/contact" element={<Contact />} />
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ export default function AdminChatbot() {
|
|||||||
} finally {
|
} finally {
|
||||||
setIsTyping(false);
|
setIsTyping(false);
|
||||||
}
|
}
|
||||||
}, [messages, authFetch]);
|
}, [messages, authFetch, sessionId]);
|
||||||
|
|
||||||
const handleSendMessage = (e) => { e.preventDefault(); if (inputText.trim()) sendMessage(inputText.trim()); };
|
const handleSendMessage = (e) => { e.preventDefault(); if (inputText.trim()) sendMessage(inputText.trim()); };
|
||||||
const handleMenuAsk = (e) => { e.preventDefault(); if (menuInput.trim()) sendMessage(menuInput.trim(), []); };
|
const handleMenuAsk = (e) => { e.preventDefault(); if (menuInput.trim()) sendMessage(menuInput.trim(), []); };
|
||||||
@@ -278,7 +278,7 @@ export default function AdminChatbot() {
|
|||||||
{/* Bulk action confirmation card */}
|
{/* Bulk action confirmation card */}
|
||||||
{pendingBulk && (
|
{pendingBulk && (
|
||||||
<div style={{ background: 'var(--warn-bg)', border: '1px solid var(--warn)', borderRadius: 'var(--radius-sm)', padding: '12px', margin: '8px 0' }}>
|
<div style={{ background: 'var(--warn-bg)', border: '1px solid var(--warn)', borderRadius: 'var(--radius-sm)', padding: '12px', margin: '8px 0' }}>
|
||||||
<div style={{ fontWeight: 700, fontSize: '13px', color: 'var(--warn)', marginBottom: '8px' }}>
|
<div style={{ fontWeight: 700, fontSize: '13px', color: 'var(--amber-text)', marginBottom: '8px' }}>
|
||||||
⚠️ Confirm bulk action
|
⚠️ Confirm bulk action
|
||||||
</div>
|
</div>
|
||||||
<div style={{ fontSize: '13px', marginBottom: '10px' }}>
|
<div style={{ fontSize: '13px', marginBottom: '10px' }}>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const STORAGE_KEY = 'user_chat_session_id';
|
|||||||
const FAQ_DATA = {
|
const FAQ_DATA = {
|
||||||
"Account": [
|
"Account": [
|
||||||
{ q: "How do I reset my password?", a: 'Go to the login page and click "Forgot Password". Enter your email and we\'ll send a reset link.' },
|
{ q: "How do I reset my password?", a: 'Go to the login page and click "Forgot Password". Enter your email and we\'ll send a reset link.' },
|
||||||
{ q: "How do I verify my email?", a: 'Check your inbox for a verification email from BookKeepPro. Click the link inside to verify.' },
|
{ q: "How do I verify my email?", a: 'Check your inbox for a verification email from ABC CPA. Click the link inside to verify.' },
|
||||||
{ q: "How do I update my profile?", a: 'Go to your Profile page to update your name, phone number, or change your password.' },
|
{ q: "How do I update my profile?", a: 'Go to your Profile page to update your name, phone number, or change your password.' },
|
||||||
],
|
],
|
||||||
"Documents": [
|
"Documents": [
|
||||||
@@ -173,7 +173,7 @@ export default function Chatbot() {
|
|||||||
} finally {
|
} finally {
|
||||||
setIsTyping(false);
|
setIsTyping(false);
|
||||||
}
|
}
|
||||||
}, [messages, authFetch]);
|
}, [messages, authFetch, sessionId]);
|
||||||
|
|
||||||
const handleSendMessage = (e) => { e.preventDefault(); if (inputText.trim()) sendMessage(inputText.trim()); };
|
const handleSendMessage = (e) => { e.preventDefault(); if (inputText.trim()) sendMessage(inputText.trim()); };
|
||||||
const handleMenuAsk = (e) => { e.preventDefault(); if (menuInput.trim()) sendMessage(menuInput.trim(), []); };
|
const handleMenuAsk = (e) => { e.preventDefault(); if (menuInput.trim()) sendMessage(menuInput.trim(), []); };
|
||||||
|
|||||||
@@ -4,78 +4,95 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
background-color: rgba(10, 37, 64, 0.65);
|
||||||
|
backdrop-filter: blur(8px);
|
||||||
|
-webkit-backdrop-filter: blur(8px);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 10000;
|
z-index: 10000;
|
||||||
animation: fadeIn 0.2s ease-in-out;
|
animation: fadeIn 0.22s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirm-modal-content {
|
.confirm-modal-content {
|
||||||
background-color: #fff;
|
background-color: #FFFFFF;
|
||||||
border-radius: 8px;
|
border-radius: 20px;
|
||||||
padding: 24px;
|
border: 1px solid var(--border, #E2E8F0);
|
||||||
max-width: 400px;
|
padding: 28px;
|
||||||
|
max-width: 440px;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
box-shadow: 0 16px 40px -8px rgba(10, 37, 64, 0.25);
|
||||||
animation: slideUp 0.2s ease-in-out;
|
animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirm-modal-title {
|
.confirm-modal-title {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 10px;
|
||||||
font-size: 1.2rem;
|
font-family: var(--font-display, 'Playfair Display', serif);
|
||||||
color: #333;
|
font-size: 20px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--ink, #0A2540);
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirm-modal-message {
|
.confirm-modal-message {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
color: #555;
|
color: var(--muted, #425466);
|
||||||
line-height: 1.5;
|
font-size: 14px;
|
||||||
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirm-modal-actions {
|
.confirm-modal-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
gap: 12px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirm-modal-cancel {
|
.confirm-modal-cancel {
|
||||||
background-color: transparent;
|
background-color: var(--paper, #F6F9FC);
|
||||||
border: 1px solid #ccc;
|
border: 1px solid var(--border, #E2E8F0);
|
||||||
color: #555;
|
color: var(--ink, #0A2540);
|
||||||
padding: 8px 16px;
|
padding: 8px 18px;
|
||||||
border-radius: 4px;
|
border-radius: 9999px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: 500;
|
font-weight: 600;
|
||||||
transition: background-color 0.15s;
|
font-size: 13px;
|
||||||
|
transition: all 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirm-modal-cancel:hover {
|
.confirm-modal-cancel:hover {
|
||||||
background-color: #f5f5f5;
|
background-color: var(--header-bg, #EEF3F9);
|
||||||
|
border-color: var(--ink, #0A2540);
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirm-modal-confirm {
|
.confirm-modal-confirm {
|
||||||
padding: 8px 16px;
|
padding: 8px 20px;
|
||||||
border-radius: 4px;
|
border-radius: 9999px;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: 500;
|
font-weight: 600;
|
||||||
color: #fff;
|
font-size: 13px;
|
||||||
transition: opacity 0.15s;
|
color: #FFFFFF;
|
||||||
}
|
transition: all 0.2s ease;
|
||||||
|
|
||||||
.confirm-modal-confirm:hover {
|
|
||||||
opacity: 0.9;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirm-modal-confirm.primary {
|
.confirm-modal-confirm.primary {
|
||||||
background-color: #007bff;
|
background-color: var(--brass, #1D4ED8);
|
||||||
|
box-shadow: 0 2px 8px rgba(29, 78, 216, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm-modal-confirm.primary:hover {
|
||||||
|
background-color: var(--brass-dark, #1E40AF);
|
||||||
|
transform: translateY(-1px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirm-modal-confirm.destructive {
|
.confirm-modal-confirm.destructive {
|
||||||
background-color: #dc3545;
|
background-color: var(--error, #DC2626);
|
||||||
|
box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm-modal-confirm.destructive:hover {
|
||||||
|
background-color: #B91C1C;
|
||||||
|
transform: translateY(-1px);
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes fadeIn {
|
@keyframes fadeIn {
|
||||||
@@ -84,6 +101,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@keyframes slideUp {
|
@keyframes slideUp {
|
||||||
from { opacity: 0; transform: translateY(10px); }
|
from { opacity: 0; transform: translateY(14px); }
|
||||||
to { opacity: 1; transform: translateY(0); }
|
to { opacity: 1; transform: translateY(0); }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import ExpandableValue from './ExpandableValue';
|
|||||||
|
|
||||||
const CONFIDENCE_STYLES = {
|
const CONFIDENCE_STYLES = {
|
||||||
high: { icon: '🟢', color: 'var(--success)', bg: 'var(--success-bg)' },
|
high: { icon: '🟢', color: 'var(--success)', bg: 'var(--success-bg)' },
|
||||||
medium: { icon: '🟡', color: 'var(--warn)', bg: 'var(--warn-bg)' },
|
medium: { icon: '🟡', color: 'var(--amber-text)', bg: 'var(--warn-bg)' },
|
||||||
low: { icon: '🟠', color: '#d97706', bg: '#fff7ed' },
|
low: { icon: '🟠', color: '#92600A', bg: '#FFF8E6' },
|
||||||
unknown: { icon: '⚪', color: 'var(--muted)', bg: 'var(--paper)' },
|
unknown: { icon: '⚪', color: 'var(--muted)', bg: 'var(--paper)' },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,34 +1,88 @@
|
|||||||
import { Link } from 'react-router-dom';
|
import { Link, useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<footer className="footer">
|
<footer className="artha-footer">
|
||||||
<div className="footer-top">
|
<div className="artha-footer-inner">
|
||||||
<div className="footer-left">
|
{/* Col 1: Brand & Office */}
|
||||||
<img src="/images/bookkeeppro-logo.webp" className="footer-logo" alt="BookKeepPro" width="190" height="64" />
|
<div className="artha-footer-col artha-footer-brand">
|
||||||
<p>Bookkeeping, payroll and tax preparation for growing businesses — kept precise, kept compliant.</p>
|
<div className="artha-footer-logo-row" style={{ display: 'flex', alignItems: 'center', gap: '14px', marginBottom: '16px' }}>
|
||||||
|
<img
|
||||||
|
src="/images/brand-logo-mark.webp"
|
||||||
|
alt="ABC CPA & Advisory"
|
||||||
|
className="artha-brand-logo-img"
|
||||||
|
style={{ width: '42px', height: '42px', borderRadius: '10px' }}
|
||||||
|
width="42"
|
||||||
|
height="42"
|
||||||
|
/>
|
||||||
|
<div>
|
||||||
|
<div className="artha-footer-title">ABC CPA & Advisory</div>
|
||||||
|
<div className="artha-footer-subtitle">Tax Advisory & Accounting Services</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p className="artha-footer-desc">
|
||||||
|
Proactive financial strategy, international taxation, and AI-enabled accounting for founders, growth businesses, and non-residents worldwide.
|
||||||
|
</p>
|
||||||
|
<div className="artha-footer-contact-info">
|
||||||
|
<p><strong>US Office:</strong> 2520 Indigo Dr, McKinney / Frisco, TX 75072</p>
|
||||||
|
<p><strong>India Office:</strong> Landmark Centre, Pune, MH 411009</p>
|
||||||
|
<p><strong>Email:</strong> <a href="mailto:atharvg.aiindia@gmail.com">atharvg.aiindia@gmail.com</a></p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="footer-links">
|
{/* Col 2: Services */}
|
||||||
<h3>Navigate</h3>
|
<div className="artha-footer-col">
|
||||||
<Link to="/">Home</Link>
|
<div className="artha-footer-heading">Services</div>
|
||||||
<Link to="/about-us">About Us</Link>
|
<ul className="artha-footer-links">
|
||||||
<Link to="/services">Services</Link>
|
<li><Link to="/services">Tax Strategy & Preparation</Link></li>
|
||||||
<Link to="/contact">Contact Us</Link>
|
<li><Link to="/services">International & Cross-Border (FBAR/FATCA)</Link></li>
|
||||||
|
<li><Link to="/services">Instant P&L from Bank Statements</Link></li>
|
||||||
|
<li><Link to="/services">Fractional CFO & Advisory</Link></li>
|
||||||
|
<li><Link to="/services">Full-Cycle Bookkeeping & Payroll</Link></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="footer-contact">
|
{/* Col 3: Firm */}
|
||||||
<h3>Reach us</h3>
|
<div className="artha-footer-col">
|
||||||
<p>USA · 2520 Indigo Dr, McKinney, TX 75072</p>
|
<div className="artha-footer-heading">Firm</div>
|
||||||
<p>India · Office no.405, Fourth floor, Above Just In Time,<br />
|
<ul className="artha-footer-links">
|
||||||
Landmark Centre, Survey No 46/1B, Plot No 2, Satara Rd,<br /> Opposite City Pride Theater, Pune, Maharashtra-411009</p>
|
<li><Link to="/">Home</Link></li>
|
||||||
<p>atharvg.aiindia@gmail.com</p>
|
<li><Link to="/about-us">About Us</Link></li>
|
||||||
<p>+91 8275367267</p>
|
<li><Link to="/services">Services</Link></li>
|
||||||
|
<li><Link to="/contact">Contact & Consultations</Link></li>
|
||||||
|
<li><Link to="/login">Login Portal</Link></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Col 4: Action & Hours */}
|
||||||
|
<div className="artha-footer-col artha-footer-action-col">
|
||||||
|
<button
|
||||||
|
className="artha-pill-btn artha-pill-primary artha-footer-cta-btn"
|
||||||
|
onClick={() => navigate('/login')}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>login</span>
|
||||||
|
Access Login Portal
|
||||||
|
</button>
|
||||||
|
<div className="artha-footer-hours">
|
||||||
|
<p className="artha-hours-email">atharvg.aiindia@gmail.com</p>
|
||||||
|
<p className="artha-hours-timing">Mon – Fri, 9:00 AM – 6:00 PM CT</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="footer-bottom">
|
<div className="artha-footer-bottom">
|
||||||
<p>© 2026 Bookkeeping Business Solutions. All rights reserved.</p>
|
<div className="artha-footer-bottom-inner">
|
||||||
|
<p>© {new Date().getFullYear()} ABC CPA & Advisory. All rights reserved.</p>
|
||||||
|
<div className="artha-footer-bottom-links">
|
||||||
|
<span>AICPA Member Firm</span>
|
||||||
|
<span>•</span>
|
||||||
|
<span>QuickBooks ProAdvisor</span>
|
||||||
|
<span>•</span>
|
||||||
|
<span>SOC-2 & Encrypted Document Storage</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6,30 +6,73 @@ export default function Navbar({ solid = false }) {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`navbar ${solid ? 'navbar-solid' : ''}`}>
|
<header className={`artha-navbar ${solid ? 'artha-navbar-solid' : ''}`}>
|
||||||
<div className="nav-container">
|
{/* Top Advisory Announcement Bar */}
|
||||||
<Link to="/">
|
<div className="artha-top-alert">
|
||||||
<img id="logos" src="/images/bookkeeppro-logo.webp" alt="BookKeepPro" width="190" height="64" />
|
<div className="artha-top-alert-inner">
|
||||||
</Link>
|
<span className="artha-alert-badge">2026 TAX SEASON</span>
|
||||||
|
<span>Now scheduling corporate tax structuring & cross-border FBAR advisory sessions.</span>
|
||||||
<nav id="navMenu" className={`nav-menu ${isOpen ? 'active' : ''}`}>
|
<Link to="/contact" className="artha-top-alert-link">
|
||||||
<Link to="/" onClick={() => setIsOpen(false)}>Home</Link>
|
Book Consultation →
|
||||||
<Link to="/about-us" onClick={() => setIsOpen(false)}>About Us</Link>
|
</Link>
|
||||||
<Link to="/services" onClick={() => setIsOpen(false)}>Services</Link>
|
|
||||||
<Link to="/contact" onClick={() => setIsOpen(false)}>Contact Us</Link>
|
|
||||||
|
|
||||||
<button className="login-btn desktop-login" onClick={() => navigate('/login')}>
|
|
||||||
Sign in
|
|
||||||
</button>
|
|
||||||
<button className="login-btn mobile-login" onClick={() => navigate('/login')}>
|
|
||||||
Sign in
|
|
||||||
</button>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<div className="hamburger" onClick={() => setIsOpen(!isOpen)}>
|
|
||||||
<span></span><span></span><span></span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div className="artha-nav-container">
|
||||||
|
{/* Brand Left: Monogram / Logo + 2-line title */}
|
||||||
|
<Link to="/" className="artha-brand-wrap">
|
||||||
|
<img
|
||||||
|
src="/images/brand-logo-mark.webp"
|
||||||
|
alt="ABC CPA & Advisory"
|
||||||
|
className="artha-brand-logo-img"
|
||||||
|
width="38"
|
||||||
|
height="38"
|
||||||
|
/>
|
||||||
|
<div className="artha-brand-text">
|
||||||
|
<span className="artha-brand-title">ABC CPA & Advisory</span>
|
||||||
|
<span className="artha-brand-sub">Tax Advisory & Accounting Services</span>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
{/* Center Nav Links */}
|
||||||
|
<nav className={`artha-nav-links ${isOpen ? 'active' : ''}`}>
|
||||||
|
<Link to="/" onClick={() => setIsOpen(false)}>Home</Link>
|
||||||
|
<Link to="/services" onClick={() => setIsOpen(false)}>Services</Link>
|
||||||
|
<Link to="/about-us" onClick={() => setIsOpen(false)}>About</Link>
|
||||||
|
<Link to="/contact" onClick={() => setIsOpen(false)}>Contact</Link>
|
||||||
|
|
||||||
|
{/* Mobile only actions */}
|
||||||
|
<div className="artha-mobile-actions">
|
||||||
|
<button className="artha-pill-btn artha-pill-outline" onClick={() => { setIsOpen(false); navigate('/login'); }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>login</span>
|
||||||
|
Login Portal
|
||||||
|
</button>
|
||||||
|
<button className="artha-pill-btn artha-pill-primary" onClick={() => { setIsOpen(false); navigate('/contact'); }}>
|
||||||
|
Schedule a Call
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
{/* Right Actions Desktop Cluster */}
|
||||||
|
<div className="artha-nav-actions">
|
||||||
|
<button className="artha-pill-btn artha-pill-outline" onClick={() => navigate('/login')}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>login</span>
|
||||||
|
Login Portal
|
||||||
|
</button>
|
||||||
|
<button className="artha-pill-btn artha-pill-primary" onClick={() => navigate('/contact')}>
|
||||||
|
Schedule a Call
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Hamburger Mobile Toggle */}
|
||||||
|
<button
|
||||||
|
className={`artha-hamburger ${isOpen ? 'open' : ''}`}
|
||||||
|
onClick={() => setIsOpen(!isOpen)}
|
||||||
|
aria-label="Toggle Navigation Menu"
|
||||||
|
>
|
||||||
|
<span></span><span></span><span></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,18 +3,30 @@ import React from 'react';
|
|||||||
export default function StatusChip({ status, note }) {
|
export default function StatusChip({ status, note }) {
|
||||||
const s = (status || 'pending').toLowerCase();
|
const s = (status || 'pending').toLowerCase();
|
||||||
|
|
||||||
let badgeClass = 'badge-yellow';
|
let pillClass = 'artha-status-pending';
|
||||||
if (s === 'approved' || s === 'filed' || s === 'verified') badgeClass = 'badge-green';
|
let iconName = 'schedule';
|
||||||
if (s === 'rejected' || s === 'error') badgeClass = 'badge-red';
|
|
||||||
if (s === 'sent_for_approval') badgeClass = 'badge-blue';
|
if (s === 'approved' || s === 'filed' || s === 'verified') {
|
||||||
|
pillClass = 'artha-status-approved';
|
||||||
|
iconName = s === 'filed' ? 'inventory_2' : 'check_circle';
|
||||||
|
} else if (s === 'rejected' || s === 'error') {
|
||||||
|
pillClass = 'artha-status-rejected';
|
||||||
|
iconName = 'cancel';
|
||||||
|
} else if (s === 'sent_for_approval') {
|
||||||
|
pillClass = 'artha-status-sent';
|
||||||
|
iconName = 'hourglass_top';
|
||||||
|
}
|
||||||
|
|
||||||
const statusText = s.replace(/_/g, ' ').toUpperCase();
|
const statusText = s.replace(/_/g, ' ').toUpperCase();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="status-chip-container">
|
<div className="status-chip-container">
|
||||||
<span className={`badge ${badgeClass} `}>{statusText}</span>
|
<span className={`artha-status-pill ${pillClass}`}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '13px' }}>{iconName}</span>
|
||||||
|
{statusText}
|
||||||
|
</span>
|
||||||
{note && (
|
{note && (
|
||||||
<div className="status-chip-note">
|
<div className="status-chip-note" style={{ fontSize: '11.5px', marginTop: '2px', color: s === 'rejected' ? '#DC2626' : '#425466' }}>
|
||||||
{s === 'rejected' ? 'Reason: ' : 'Note: '}{note}
|
{s === 'rejected' ? 'Reason: ' : 'Note: '}{note}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,28 +1,30 @@
|
|||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
|
|
||||||
@theme {
|
@theme {
|
||||||
--color-brand-ink: #17211D;
|
--color-brand-ink: #0A2540;
|
||||||
--color-brand-emerald: #1F5D46;
|
--color-brand-ink-soft: #14365F;
|
||||||
--color-brand-emerald-dark: #163F30;
|
--color-brand-emerald: #047857;
|
||||||
--color-brand-emerald-light: #E8F1EC;
|
--color-brand-emerald-dark: #065F46;
|
||||||
--color-brand-brass: #8F6528;
|
--color-brand-emerald-light: #ECFDF5;
|
||||||
--color-brand-brass-dark: #8F6528;
|
--color-brand-brass: #1D4ED8;
|
||||||
--color-brand-brass-light: #F6EEE0;
|
--color-brand-brass-dark: #1E40AF;
|
||||||
--color-brand-paper: #F5F2E9;
|
--color-brand-brass-light: rgba(29, 78, 216, 0.08);
|
||||||
|
--color-brand-paper: #F6F9FC;
|
||||||
--color-brand-card: #FFFFFF;
|
--color-brand-card: #FFFFFF;
|
||||||
--color-brand-muted: #656C62;
|
--color-brand-muted: #425466;
|
||||||
--color-brand-border: #E3DDC9;
|
--color-brand-border: #E2E8F0;
|
||||||
|
|
||||||
--color-status-success: #1F5D46;
|
--color-status-success: #047857;
|
||||||
--color-status-success-bg: #E8F1EC;
|
--color-status-success-bg: #ECFDF5;
|
||||||
--color-status-error: #A63A3A;
|
--color-status-error: #DC2626;
|
||||||
--color-status-error-bg: #F7E9E9;
|
--color-status-error-bg: #FEF2F2;
|
||||||
--color-status-warn: #8F6528;
|
--color-status-warn: #F5B83D;
|
||||||
--color-status-warn-bg: #F6EEE0;
|
--color-status-warn-bg: #FFF8E6;
|
||||||
|
--color-status-warn-text: #92600A;
|
||||||
|
|
||||||
--font-sans: "IBM Plex Sans", system-ui, sans-serif;
|
--font-sans: "Inter", system-ui, -apple-system, sans-serif;
|
||||||
--font-display: "Fraunces", Georgia, serif;
|
--font-display: "Playfair Display", Georgia, serif;
|
||||||
--font-mono: "IBM Plex Mono", ui-monospace, monospace;
|
--font-mono: "JetBrains Mono", ui-monospace, monospace;
|
||||||
|
|
||||||
--radius-xs: 6px;
|
--radius-xs: 6px;
|
||||||
--radius-sm: 10px;
|
--radius-sm: 10px;
|
||||||
@@ -30,10 +32,10 @@
|
|||||||
--radius-lg: 22px;
|
--radius-lg: 22px;
|
||||||
--radius-pill: 999px;
|
--radius-pill: 999px;
|
||||||
|
|
||||||
--shadow-xs: 0 1px 2px rgba(23,33,29,0.06);
|
--shadow-xs: 0 1px 2px rgba(10,37,64,0.06);
|
||||||
--shadow-sm: 0 4px 10px -2px rgba(23,33,29,0.10);
|
--shadow-sm: 0 4px 10px -2px rgba(10,37,64,0.10);
|
||||||
--shadow-md: 0 12px 28px -8px rgba(23,33,29,0.16);
|
--shadow-md: 0 12px 28px -8px rgba(10,37,64,0.16);
|
||||||
--shadow-lg: 0 24px 56px -12px rgba(23,33,29,0.22);
|
--shadow-lg: 0 24px 56px -12px rgba(10,37,64,0.22);
|
||||||
}
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
@@ -47,7 +49,8 @@
|
|||||||
--success: var(--color-status-success);
|
--success: var(--color-status-success);
|
||||||
--error: var(--color-status-error);
|
--error: var(--color-status-error);
|
||||||
--warn: var(--color-status-warn);
|
--warn: var(--color-status-warn);
|
||||||
--green: #10b981;
|
--amber-text: #92600A;
|
||||||
|
--green: #10B981;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -63,35 +66,35 @@ h1, h2, h3, h4, h5, h6 {
|
|||||||
@apply font-display text-brand-ink font-semibold;
|
@apply font-display text-brand-ink font-semibold;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 { @apply text-4xl md:text-5xl lg:text-6xl; }
|
h1 { font-size: clamp(23px, 2.2vw, 30px); line-height: 1.18; letter-spacing: -0.015em; }
|
||||||
h2 { @apply text-3xl md:text-4xl; }
|
h2 { font-size: clamp(18px, 1.8vw, 24px); line-height: 1.25; }
|
||||||
h3 { @apply text-2xl md:text-3xl; }
|
h3 { font-size: clamp(15px, 1.3vw, 19px); line-height: 1.3; }
|
||||||
|
|
||||||
.tnum { font-variant-numeric: tabular-nums; }
|
.tnum { font-variant-numeric: tabular-nums; }
|
||||||
.text-sm { @apply text-sm; }
|
.text-sm { @apply text-sm; }
|
||||||
.fancy-link { @apply text-brand-emerald hover:text-brand-emerald-dark transition-colors; }
|
.fancy-link { @apply text-brand-brass hover:text-brand-brass-dark transition-colors; }
|
||||||
|
|
||||||
.eyebrow {
|
.eyebrow {
|
||||||
@apply text-brand-brass font-bold text-sm uppercase tracking-wider block mb-2;
|
@apply text-brand-brass font-bold text-xs uppercase tracking-wider block mb-2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------- */
|
/* -------------------------------- */
|
||||||
/* Layout & Sections */
|
/* Layout & Sections */
|
||||||
/* -------------------------------- */
|
/* -------------------------------- */
|
||||||
.section {
|
.section {
|
||||||
@apply py-16 px-4 md:px-8 max-w-7xl mx-auto;
|
@apply py-10 px-4 md:px-8 max-w-7xl mx-auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-heading {
|
.page-heading {
|
||||||
@apply flex justify-between items-end mb-8 border-b border-brand-border pb-4;
|
@apply flex justify-between items-end mb-6 border-b border-brand-border pb-3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-heading h1 {
|
.page-heading h1 {
|
||||||
@apply text-3xl font-display mb-2;
|
@apply text-2xl font-display mb-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-meta {
|
.page-meta {
|
||||||
@apply text-brand-muted text-sm m-0;
|
@apply text-brand-muted text-xs m-0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
@@ -110,7 +113,7 @@ h3 { @apply text-2xl md:text-3xl; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
.select-input, .input-field {
|
.select-input, .input-field {
|
||||||
@apply border border-brand-border rounded-sm px-3 py-2 bg-white focus:outline-none focus:ring-2 focus:ring-brand-emerald focus:border-transparent w-full;
|
@apply border border-brand-border rounded-sm px-3 py-2 bg-white focus:outline-none focus:ring-2 focus:ring-brand-brass focus:border-transparent w-full;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------- */
|
/* -------------------------------- */
|
||||||
@@ -122,7 +125,7 @@ h3 { @apply text-2xl md:text-3xl; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
@apply bg-brand-emerald text-white hover:bg-brand-emerald-dark border-transparent;
|
@apply bg-brand-brass text-white hover:bg-brand-brass-dark border-transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-outline {
|
.btn-outline {
|
||||||
@@ -146,7 +149,7 @@ h3 { @apply text-2xl md:text-3xl; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-upload-pill {
|
.btn-upload-pill {
|
||||||
@apply bg-brand-emerald text-white text-sm py-1.5 px-4 font-medium hover:bg-brand-emerald-dark;
|
@apply bg-brand-brass text-white text-sm py-1.5 px-4 font-medium hover:bg-brand-brass-dark;
|
||||||
border-radius: var(--radius-pill);
|
border-radius: var(--radius-pill);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +165,7 @@ h3 { @apply text-2xl md:text-3xl; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hero-eyebrow {
|
.hero-eyebrow {
|
||||||
@apply text-brand-brass uppercase tracking-widest text-sm font-bold mb-6 block;
|
@apply text-[#F5B83D] uppercase tracking-widest text-sm font-bold mb-6 block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hero h1 {
|
.hero h1 {
|
||||||
@@ -170,11 +173,11 @@ h3 { @apply text-2xl md:text-3xl; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hero h1 em {
|
.hero h1 em {
|
||||||
@apply text-brand-emerald-light not-italic;
|
@apply text-[#3B82F6] not-italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hero-sub {
|
.hero-sub {
|
||||||
@apply text-lg md:text-xl text-gray-300 max-w-2xl mx-auto mb-10 leading-relaxed;
|
@apply text-lg md:text-xl text-[#EEF3F9] max-w-2xl mx-auto mb-10 leading-relaxed opacity-90;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hero-actions {
|
.hero-actions {
|
||||||
@@ -182,7 +185,7 @@ h3 { @apply text-2xl md:text-3xl; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hero-stats {
|
.hero-stats {
|
||||||
@apply max-w-5xl mx-auto mt-20 grid grid-cols-1 sm:grid-cols-3 gap-8 border-t border-brand-emerald-dark pt-12 relative z-10;
|
@apply max-w-5xl mx-auto mt-20 grid grid-cols-1 sm:grid-cols-3 gap-8 border-t border-[rgba(255,255,255,0.15)] pt-12 relative z-10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-block {
|
.stat-block {
|
||||||
@@ -190,11 +193,11 @@ h3 { @apply text-2xl md:text-3xl; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
.stat-figure {
|
.stat-figure {
|
||||||
@apply text-5xl font-display text-brand-brass mb-2;
|
@apply text-5xl font-display text-[#F5B83D] mb-2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-caption {
|
.stat-caption {
|
||||||
@apply text-brand-paper text-sm uppercase tracking-wide opacity-80;
|
@apply text-[#EEF3F9] text-sm uppercase tracking-wide opacity-80;
|
||||||
}
|
}
|
||||||
|
|
||||||
.about-grid {
|
.about-grid {
|
||||||
@@ -242,14 +245,14 @@ h3 { @apply text-2xl md:text-3xl; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cta-band p {
|
.cta-band p {
|
||||||
@apply text-lg text-gray-300 mb-8 max-w-2xl mx-auto;
|
@apply text-lg text-[#EEF3F9] mb-8 max-w-2xl mx-auto opacity-90;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------- */
|
/* -------------------------------- */
|
||||||
/* Specific Pages: Uploads */
|
/* Specific Pages: Uploads */
|
||||||
/* -------------------------------- */
|
/* -------------------------------- */
|
||||||
.pill-pending {
|
.pill-pending {
|
||||||
@apply inline-flex items-center gap-1 bg-status-warn-bg text-status-warn text-xs font-medium px-2 py-0.5 rounded-sm;
|
@apply inline-flex items-center gap-1 bg-status-warn-bg text-[#92600A] text-xs font-medium px-2 py-0.5 rounded-sm;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drop-area {
|
.drop-area {
|
||||||
@@ -292,21 +295,21 @@ h3 { @apply text-2xl md:text-3xl; }
|
|||||||
.action-card:hover {
|
.action-card:hover {
|
||||||
transform: translateY(-3px);
|
transform: translateY(-3px);
|
||||||
box-shadow: var(--shadow-md);
|
box-shadow: var(--shadow-md);
|
||||||
border-color: #cfc7ad;
|
border-color: var(--brass);
|
||||||
}
|
}
|
||||||
.action-card .ac-icon { font-size: 30px; margin-bottom: 10px; color: var(--emerald); }
|
.action-card .ac-icon { font-size: 30px; margin-bottom: 10px; color: var(--brass); }
|
||||||
.action-card .ac-title { font-weight: 600; color: var(--navy); font-size: 15px; }
|
.action-card .ac-title { font-weight: 600; color: var(--navy); font-size: 15px; }
|
||||||
.action-card .ac-desc { font-size: 12px; color: var(--muted); margin-top: 4px; }
|
.action-card .ac-desc { font-size: 12px; color: var(--muted); margin-top: 4px; }
|
||||||
.action-card.personal { border-top: 3px solid var(--emerald); }
|
.action-card.personal { border-top: 3px solid var(--brass); }
|
||||||
.action-card.business { border-top: 3px solid var(--brass); }
|
.action-card.business { border-top: 3px solid #0EA5E9; }
|
||||||
@media(max-width:480px) { .action-grid { grid-template-columns: 1fr; } }
|
@media(max-width:480px) { .action-grid { grid-template-columns: 1fr; } }
|
||||||
|
|
||||||
/* -------------------------------- */
|
/* -------------------------------- */
|
||||||
/* Upload Components (Pre-existing) */
|
/* Upload Components (Pre-existing) */
|
||||||
/* -------------------------------- */
|
/* -------------------------------- */
|
||||||
.doc-slot { display:flex; align-items:center; gap:14px; padding:14px 18px; border:1.5px solid var(--border); border-radius:var(--radius-md); background:var(--card); margin-bottom:10px; transition:border-color var(--transition), background var(--transition); }
|
.doc-slot { display:flex; align-items:center; gap:14px; padding:14px 18px; border:1.5px solid var(--border); border-radius:var(--radius-md); background:var(--card); margin-bottom:10px; transition:border-color var(--transition), background var(--transition); }
|
||||||
.doc-slot:hover { border-color:#cfc7ad; background:var(--paper); }
|
.doc-slot:hover { border-color:var(--brass); background:var(--paper); }
|
||||||
.doc-slot-icon { font-size:22px; flex-shrink:0; color: var(--emerald); }
|
.doc-slot-icon { font-size:22px; flex-shrink:0; color: var(--brass); }
|
||||||
.doc-slot-info { flex:1; min-width:0; }
|
.doc-slot-info { flex:1; min-width:0; }
|
||||||
.doc-slot-name { font-weight:600; font-size:13px; color:var(--navy); }
|
.doc-slot-name { font-weight:600; font-size:13px; color:var(--navy); }
|
||||||
.doc-slot-status { font-size:12px; color:var(--muted); margin-top:3px; }
|
.doc-slot-status { font-size:12px; color:var(--muted); margin-top:3px; }
|
||||||
@@ -318,7 +321,7 @@ h3 { @apply text-2xl md:text-3xl; }
|
|||||||
.toast { background: var(--card); color: var(--navy); padding: 12px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); border: 1px solid var(--border); display: flex; align-items: center; gap: 12px; pointer-events: auto; min-width: 300px; max-width: 90vw; animation: fadeUp 0.3s ease both; }
|
.toast { background: var(--card); color: var(--navy); padding: 12px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); border: 1px solid var(--border); display: flex; align-items: center; gap: 12px; pointer-events: auto; min-width: 300px; max-width: 90vw; animation: fadeUp 0.3s ease both; }
|
||||||
.toast-success { border-left: 4px solid var(--success); }
|
.toast-success { border-left: 4px solid var(--success); }
|
||||||
.toast-error { border-left: 4px solid var(--error); }
|
.toast-error { border-left: 4px solid var(--error); }
|
||||||
.toast-info { border-left: 4px solid var(--emerald); }
|
.toast-info { border-left: 4px solid var(--brass); }
|
||||||
.toast-message { flex: 1; font-size: 14px; font-weight: 500; }
|
.toast-message { flex: 1; font-size: 14px; font-weight: 500; }
|
||||||
.toast-close { background: none; border: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
|
.toast-close { background: none; border: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
|
||||||
|
|
||||||
@@ -375,8 +378,8 @@ h3 { @apply text-2xl md:text-3xl; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tab-btn.active {
|
.tab-btn.active {
|
||||||
color: var(--emerald);
|
color: var(--brass);
|
||||||
border-bottom-color: var(--emerald);
|
border-bottom-color: var(--brass);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
@@ -385,6 +388,6 @@ h3 { @apply text-2xl md:text-3xl; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
.footer-copy {
|
.footer-copy {
|
||||||
color: #8c9289; /* Increased contrast for footer copyright */
|
color: var(--muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,27 +4,220 @@ import { useAuth } from '../context/AuthContext';
|
|||||||
export default function DashboardLayout() {
|
export default function DashboardLayout() {
|
||||||
const { user, logout } = useAuth();
|
const { user, logout } = useAuth();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { pathname } = useLocation();
|
const location = useLocation();
|
||||||
|
const { pathname } = location;
|
||||||
|
|
||||||
|
const isAdmin = user?.role === 'admin' || user?.role === 'super_admin';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="app-body">
|
<div className="app-body dash-page-wash" style={{ minHeight: '100vh', display: 'flex', flexDirection: 'column' }}>
|
||||||
<header className="app-header">
|
{/* Top Advisory Strip */}
|
||||||
<Link to={(user?.role === 'admin' || user?.role === 'super_admin') ? '/admin-dashboard' : '/dashboard'}>
|
<div className="artha-top-alert" style={{ padding: '6px 16px', fontSize: '11.5px' }}>
|
||||||
<img className="logo" src="/images/bookkeeppro-logo.webp" alt="BookKeepPro" width="190" height="64" />
|
<div className="artha-top-alert-inner" style={{ justifyContent: 'space-between' }}>
|
||||||
</Link>
|
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
||||||
<div className="header-actions">
|
<span className="dash-top-badge" style={{ fontSize: '9.5px', padding: '2px 8px' }}>
|
||||||
<button className="btn btn-secondary btn-sm" onClick={() => navigate('/profile')}>
|
{isAdmin ? 'ADMINISTRATOR CONSOLE' : 'SECURE CLIENT VAULT'}
|
||||||
My Profile
|
</span>
|
||||||
</button>
|
<span style={{ color: 'rgba(255,255,255,0.85)' }}>
|
||||||
<button className="btn btn-primary btn-sm" onClick={logout}>
|
2026 Tax Season • SOC-2 & 256-Bit SSL Encrypted
|
||||||
Logout
|
</span>
|
||||||
</button>
|
</div>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '8px', fontSize: '12px', color: 'rgba(255,255,255,0.75)' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '14px', color: '#10B981' }}>verified_user</span>
|
||||||
|
<span>256-Bit SSL Encrypted Session</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Main Header */}
|
||||||
|
<header
|
||||||
|
className="app-header dash-header"
|
||||||
|
style={{
|
||||||
|
position: 'sticky',
|
||||||
|
top: 0,
|
||||||
|
zIndex: 200,
|
||||||
|
padding: '12px clamp(16px, 4vw, 36px)',
|
||||||
|
height: 'auto'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{ width: '100%', maxWidth: '1400px', margin: '0 auto' }}>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '16px' }}>
|
||||||
|
{/* Brand Identity */}
|
||||||
|
<Link
|
||||||
|
to={isAdmin ? '/admin-dashboard' : '/dashboard'}
|
||||||
|
style={{ textDecoration: 'none' }}
|
||||||
|
>
|
||||||
|
<div className="artha-brand-wrap">
|
||||||
|
<img
|
||||||
|
src="/images/brand-logo-mark.webp"
|
||||||
|
alt="ABC CPA & Advisory"
|
||||||
|
className="dash-brand-logo-img"
|
||||||
|
width="36"
|
||||||
|
height="36"
|
||||||
|
/>
|
||||||
|
<div className="artha-brand-text">
|
||||||
|
<span className="artha-brand-title" style={{ fontSize: '18px' }}>ABC CPA</span>
|
||||||
|
<span className="artha-brand-sub" style={{ fontSize: '10px' }}>
|
||||||
|
{isAdmin ? 'Partner & Staff Portal' : 'Secure Client Vault'}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
{/* User Profile Pill & Actions */}
|
||||||
|
<div className="header-actions" style={{ display: 'flex', alignItems: 'center', gap: '10px' }}>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '8px',
|
||||||
|
background: '#FFFFFF',
|
||||||
|
border: '1px solid rgba(10, 37, 64, 0.1)',
|
||||||
|
borderRadius: '9999px',
|
||||||
|
padding: '4px 12px 4px 6px',
|
||||||
|
cursor: 'pointer'
|
||||||
|
}}
|
||||||
|
onClick={() => navigate('/profile')}
|
||||||
|
title="View & Edit Profile"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: '28px',
|
||||||
|
height: '28px',
|
||||||
|
borderRadius: '50%',
|
||||||
|
background: '#1D4ED8',
|
||||||
|
color: '#FFFFFF',
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
fontSize: '12px',
|
||||||
|
fontWeight: 700
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{(user?.name || user?.email || 'U').charAt(0).toUpperCase()}
|
||||||
|
</div>
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', lineHeight: 1.1 }}>
|
||||||
|
<span style={{ fontSize: '12.5px', fontWeight: 600, color: '#0A2540' }}>
|
||||||
|
{user?.name || user?.email?.split('@')[0]}
|
||||||
|
</span>
|
||||||
|
<span style={{ fontSize: '9.5px', textTransform: 'uppercase', letterSpacing: '0.06em', color: '#1D4ED8', fontWeight: 700 }}>
|
||||||
|
{user?.role === 'super_admin' ? 'Super Admin' : user?.role === 'admin' ? 'Staff CPA' : 'Client'}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
className="artha-pill-btn artha-pill-dark"
|
||||||
|
style={{ padding: '7px 14px', fontSize: '12.5px' }}
|
||||||
|
onClick={logout}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>logout</span>
|
||||||
|
Logout
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Subnavigation Bar */}
|
||||||
|
<nav className="dash-subnav-group" style={{ marginTop: '12px', flexWrap: 'wrap' }}>
|
||||||
|
{!isAdmin ? (
|
||||||
|
<>
|
||||||
|
<Link
|
||||||
|
to="/dashboard"
|
||||||
|
className={`dash-subnav-link ${pathname === '/dashboard' ? 'active' : ''}`}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '17px' }}>dashboard</span>
|
||||||
|
Client Overview
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
to="/upload-personal"
|
||||||
|
className={`dash-subnav-link ${pathname === '/upload-personal' ? 'active' : ''}`}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '17px' }}>person</span>
|
||||||
|
Personal Documents (1040/W-2)
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
to="/upload-business"
|
||||||
|
className={`dash-subnav-link ${pathname === '/upload-business' ? 'active' : ''}`}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '17px' }}>business</span>
|
||||||
|
Business Ledgers (1120-S/P&L)
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
to="/profile"
|
||||||
|
className={`dash-subnav-link ${pathname === '/profile' ? 'active' : ''}`}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '17px' }}>manage_accounts</span>
|
||||||
|
Profile & Security
|
||||||
|
</Link>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<Link
|
||||||
|
to="/admin-dashboard"
|
||||||
|
className={`dash-subnav-link ${pathname.startsWith('/admin') ? 'active' : ''}`}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '17px' }}>group</span>
|
||||||
|
Client Management & Reviews
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
to="/profile"
|
||||||
|
className={`dash-subnav-link ${pathname === '/profile' ? 'active' : ''}`}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '17px' }}>manage_accounts</span>
|
||||||
|
Staff Account
|
||||||
|
</Link>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main key={pathname} className={`${(user?.role === 'admin' || user?.role === 'super_admin') ? 'page-main-wide' : 'page-main'} page-enter`}>
|
{/* Main Content Area */}
|
||||||
<Outlet />
|
<main
|
||||||
|
style={{
|
||||||
|
flex: 1,
|
||||||
|
width: 'min(1400px, 94%)',
|
||||||
|
margin: '16px auto 48px'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="page-enter" key={location.pathname}>
|
||||||
|
<Outlet />
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
{/* Portal Executive Footer */}
|
||||||
|
<footer
|
||||||
|
style={{
|
||||||
|
borderTop: '1px solid rgba(10, 37, 64, 0.08)',
|
||||||
|
background: 'rgba(246, 249, 252, 0.8)',
|
||||||
|
padding: '20px clamp(16px, 4vw, 36px)',
|
||||||
|
marginTop: 'auto'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
maxWidth: '1400px',
|
||||||
|
margin: '0 auto',
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
gap: '12px',
|
||||||
|
fontSize: '12.5px',
|
||||||
|
color: '#425466'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px', color: '#047857' }}>lock</span>
|
||||||
|
<span>ABC CPA • Secure Client Document Vault • SOC-2 Aligned</span>
|
||||||
|
</div>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '16px' }}>
|
||||||
|
<span>AICPA Member Firm</span>
|
||||||
|
<span>•</span>
|
||||||
|
<span>McKinney & Frisco, Texas</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -3,12 +3,14 @@ import Navbar from '../components/Navbar';
|
|||||||
import Footer from '../components/Footer';
|
import Footer from '../components/Footer';
|
||||||
|
|
||||||
export default function MarketingLayout() {
|
export default function MarketingLayout() {
|
||||||
const { pathname } = useLocation();
|
const location = useLocation();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Navbar />
|
<Navbar />
|
||||||
<main key={pathname} className="page-enter">
|
<main>
|
||||||
<Outlet />
|
<div className="page-enter" key={location.pathname}>
|
||||||
|
<Outlet />
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
import { Outlet } from 'react-router-dom';
|
import { Outlet, useLocation } from 'react-router-dom';
|
||||||
export default function PublicLayout() { return <main>
|
|
||||||
|
export default function PublicLayout() {
|
||||||
|
const location = useLocation();
|
||||||
|
return (
|
||||||
|
<main>
|
||||||
|
<div className="page-enter" key={location.pathname}>
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</main>; }
|
</div>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,77 +1,204 @@
|
|||||||
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
export default function AboutUs() {
|
export default function AboutUs() {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
const milestones = [
|
||||||
|
{
|
||||||
|
year: '1998',
|
||||||
|
title: 'Foundations of Accounting & Statutory Compliance',
|
||||||
|
image: '/images/about-us-block-1.webp',
|
||||||
|
desc: 'Our journey began as a Chartered Accountant practice built on strict principles of accounting integrity, statutory accuracy, and enduring client partnerships. Over two decades, we served hundreds of businesses through complex regulatory evolutions.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: '2018',
|
||||||
|
title: 'Institutional Scale & Cloud Modernization',
|
||||||
|
image: '/images/services-2.webp',
|
||||||
|
desc: 'Responding to rising demand for structured financial outsourcing, we expanded operations into Pune and Mumbai. We transitioned traditional accounting into scalable, cloud-first workflows leveraging QuickBooks, Xero, and structured standard operating procedures.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: '2023',
|
||||||
|
title: 'Dual US-India Cross-Border Expansion',
|
||||||
|
image: '/images/young-business-people-using-computer-in-office.webp',
|
||||||
|
desc: 'To support global founders, expat families, and multinational firms, we established our US presence in McKinney and Frisco, Texas. We engineered specialized advisory for international tax treaties, FBAR/FATCA filings, and dual-entity tax minimization.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 'Today',
|
||||||
|
title: 'AI-Enabled Precision & Executive Advisory',
|
||||||
|
image: '/images/services-block-3.webp',
|
||||||
|
desc: 'We combine seasoned CPA and Chartered Accountant leadership with proprietary AI statement ingestion, transforming raw bank statements into reconciled, audit-ready financial statements in minutes while delivering strategic fractional CFO advisory.'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const credentials = [
|
||||||
|
{ title: '27+ Years of Practice', desc: 'Over a quarter-century of proven financial, audit, and tax compliance leadership.' },
|
||||||
|
{ title: 'Dual US & India Hubs', desc: 'Seamless cross-border coordination across Texas (US) and Pune (India).' },
|
||||||
|
{ title: 'AICPA Member Firm', desc: 'Adhering to the highest professional, ethical, and accounting industry benchmarks.' },
|
||||||
|
{ title: 'SOC-2 Aligned Security', desc: '256-bit encrypted document portals protecting your sensitive financial data.' }
|
||||||
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<div className="artha-about-page" style={{ background: 'var(--paper, #F6F9FC)', minHeight: '100vh', paddingBottom: '50px' }}>
|
||||||
<div className="page-hero" style={{ '--hero-img': 'url("/images/About-us-background-image.webp")' }}>
|
{/* Header Banner */}
|
||||||
<div className="page-hero-inner">
|
<section style={{ padding: '36px 0 24px', borderBottom: '1px solid rgba(10, 37, 64,0.07)' }}>
|
||||||
<span className="eyebrow">About BookKeepPro</span>
|
<div style={{ width: 'min(1280px, 94%)', margin: '0 auto', textAlign: 'center' }}>
|
||||||
<h1>Our people are passionate about what we do</h1>
|
<div className="artha-eyebrow-pill">
|
||||||
<p>Twenty-seven years of accounting, compliance and long-term client relationships.</p>
|
<span className="dot"></span>
|
||||||
|
OUR FIRM & HERITAGE
|
||||||
|
</div>
|
||||||
|
<h1 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: 'clamp(23px, 2.3vw, 32px)', color: '#0A2540', fontWeight: 600, margin: '10px 0' }}>
|
||||||
|
Rooted in Precision. Built for Global Scale.
|
||||||
|
</h1>
|
||||||
|
<p style={{ maxWidth: '580px', margin: '0 auto', color: '#425466', fontSize: '13.5px', lineHeight: 1.6 }}>
|
||||||
|
For over 27 years, we have guided founders, growing businesses, and international families through complex tax codes, compliance mandates, and financial transformations.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{/* Main Heritage Card with Real Image */}
|
||||||
|
<div className="reveal" style={{ width: 'min(1280px, 94%)', margin: '40px auto 0' }}>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
background: '#FFFFFF',
|
||||||
|
border: '1px solid rgba(10, 37, 64, 0.08)',
|
||||||
|
borderRadius: '20px',
|
||||||
|
padding: 'clamp(24px, 2.8vw, 38px)',
|
||||||
|
boxShadow: '0 4px 20px -2px rgba(10, 37, 64, 0.04)',
|
||||||
|
display: 'grid',
|
||||||
|
gridTemplateColumns: '1.1fr 0.9fr',
|
||||||
|
gap: '36px',
|
||||||
|
alignItems: 'center'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<span className="artha-service-pill-tag">WHO WE ARE</span>
|
||||||
|
<h2 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: 'clamp(19px, 2vw, 25px)', color: '#0A2540', fontWeight: 600, margin: '8px 0 12px' }}>
|
||||||
|
Your proactive partner in financial strategy
|
||||||
|
</h2>
|
||||||
|
<p style={{ color: '#425466', fontSize: '13.5px', lineHeight: 1.6, marginBottom: '12px' }}>
|
||||||
|
Accounting shouldn't be an afterthought relegated to tax season. At ABC CPA & Advisory, we act as an extension of your leadership team — analyzing entity efficiency, identifying immediate deductions, and untangling multi-jurisdiction liabilities before deals close.
|
||||||
|
</p>
|
||||||
|
<p style={{ color: '#425466', fontSize: '13.5px', lineHeight: 1.6, marginBottom: '20px' }}>
|
||||||
|
With dedicated offices in Texas and India, our dual operating model delivers round-the-clock responsiveness, strict quality controls, and unmatched cross-border tax expertise.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<button className="artha-pill-btn artha-pill-primary" onClick={() => navigate('/contact')}>
|
||||||
|
Schedule a Consultation
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>
|
||||||
|
arrow_forward
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>
|
||||||
|
<div style={{ position: 'relative', width: '100%', height: '220px', borderRadius: '16px', overflow: 'hidden', boxShadow: '0 6px 20px rgba(10, 37, 64,0.08)' }}>
|
||||||
|
<img
|
||||||
|
src="/images/home-about.webp"
|
||||||
|
alt="Our Accounting Practice Team"
|
||||||
|
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
||||||
|
loading="lazy"
|
||||||
|
width="800"
|
||||||
|
height="533"
|
||||||
|
/>
|
||||||
|
<div style={{ position: 'absolute', inset: 0, background: 'linear-gradient(135deg, rgba(10, 37, 64, 0.12) 0%, rgba(10, 37, 64, 0.22) 100%)', pointerEvents: 'none' }} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ background: '#0A2540', borderRadius: '16px', padding: '18px 18px', color: '#FFFFFF' }}>
|
||||||
|
<span style={{ fontFamily: 'var(--font-mono)', fontSize: '10.5px', textTransform: 'uppercase', letterSpacing: '0.12em', color: '#3B82F6' }}>
|
||||||
|
CORE BELIEF
|
||||||
|
</span>
|
||||||
|
<blockquote style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '15px', fontStyle: 'italic', lineHeight: 1.4, margin: '6px 0 8px', color: '#FFFFFF' }}>
|
||||||
|
“The true measure of an accounting firm is not how fast they file forms, but how much value and peace of mind they generate before the filing occurs.”
|
||||||
|
</blockquote>
|
||||||
|
<p style={{ fontSize: '11.5px', color: 'rgba(255,255,255,0.7)', margin: 0 }}>
|
||||||
|
— ABC CPA & Advisory Leadership Team
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="about-wrapper">
|
{/* Timeline Section with Visual Milestone Cards */}
|
||||||
<div className="about-block reveal">
|
<section className="reveal" style={{ width: 'min(1280px, 94%)', margin: '48px auto 0' }}>
|
||||||
<div className="about-text">
|
<div style={{ textAlign: 'center', marginBottom: '32px' }}>
|
||||||
<span className="eyebrow">1998 — where it started</span>
|
<div className="artha-eyebrow-pill">
|
||||||
<h2 style={{ margin: '14px 0' }}>Who we are</h2>
|
<span className="dot"></span>
|
||||||
<p>
|
THE JOURNEY
|
||||||
Our journey began in 1998 as a Chartered Accountant firm in India,
|
|
||||||
built on strong fundamentals of accounting, compliance, integrity,
|
|
||||||
and long-term client relationships.
|
|
||||||
</p>
|
|
||||||
<br />
|
|
||||||
<p>
|
|
||||||
In 2018, we strengthened our presence in Pune and Mumbai —
|
|
||||||
transitioning from a traditional CA practice into a scalable
|
|
||||||
financial services organization.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<img className="about-img" src="/images/about-us-block-1.webp" alt="BookKeepPro Team" />
|
<h2 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: 'clamp(20px, 2.1vw, 27px)', color: '#0A2540', fontWeight: 600 }}>
|
||||||
|
Twenty-Seven Years in the Making
|
||||||
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="about-block reverse reveal">
|
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(280px, 1fr))', gap: '26px' }}>
|
||||||
<div className="about-text">
|
{milestones.map((m, idx) => (
|
||||||
<span className="eyebrow">2023 — going global</span>
|
<div
|
||||||
<h2 style={{ margin: '14px 0' }}>About BookKeepPro</h2>
|
key={idx}
|
||||||
<p>
|
className={`reveal-delay-${(idx % 4) + 1}`}
|
||||||
As our client base expanded globally — especially across the US —
|
style={{
|
||||||
we aligned our operating model to support international growth.
|
background: '#FFFFFF',
|
||||||
</p>
|
border: '1px solid rgba(10, 37, 64, 0.08)',
|
||||||
<br />
|
borderRadius: '22px',
|
||||||
<p>
|
padding: '24px',
|
||||||
In 2023, we launched:<br /><br />
|
boxShadow: '0 2px 14px -2px rgba(10, 37, 64, 0.04)',
|
||||||
<b>Bookkeeping Business Solutions Pvt Ltd</b> (India)<br />
|
display: 'flex',
|
||||||
<b>Bookkeeping Business Solutions LLC</b> (USA)
|
flexDirection: 'column',
|
||||||
</p>
|
transition: 'transform 0.25s ease, box-shadow 0.25s ease'
|
||||||
<br />
|
}}
|
||||||
<p>
|
>
|
||||||
Today, BookKeepPro serves global businesses, startups and
|
<div style={{ width: '100%', height: '160px', borderRadius: '14px', overflow: 'hidden', marginBottom: '16px' }}>
|
||||||
enterprises with scalable, compliant bookkeeping and financial
|
<img
|
||||||
operations support.
|
src={m.image}
|
||||||
</p>
|
alt={m.title}
|
||||||
</div>
|
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
||||||
<img className="about-img" src="/images/young-business-people-using-computer-in-office.webp" alt="About BookKeepPro" width="800" height="533" loading="lazy" />
|
loading="lazy"
|
||||||
</div>
|
width="600"
|
||||||
</div>
|
height="400"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<section className="section reveal" style={{ marginTop: 0, marginBottom: '90px' }}>
|
<div
|
||||||
<div className="section-head" style={{ textAlign: 'center', margin: '0 auto 32px', maxWidth: '640px' }}>
|
style={{
|
||||||
<span className="eyebrow" style={{ justifyContent: 'center' }}>Where we stand today</span>
|
fontFamily: 'var(--font-mono)',
|
||||||
<h2>Who we are today</h2>
|
fontSize: '22px',
|
||||||
</div>
|
fontWeight: 600,
|
||||||
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '16px', justifyContent: 'center' }}>
|
color: '#1D4ED8',
|
||||||
{[
|
marginBottom: '6px'
|
||||||
'27+ years of accounting & compliance expertise',
|
}}
|
||||||
'Operations across India and the USA',
|
>
|
||||||
'Secure, process-driven financial workflows',
|
{m.year}
|
||||||
'Strong confidentiality & data protection practices',
|
</div>
|
||||||
].map((item) => (
|
<h3 style={{ fontSize: '16px', fontWeight: 600, color: '#0A2540', marginBottom: '10px', lineHeight: 1.3 }}>
|
||||||
<p key={item} className="badge badge-blue" style={{ padding: '12px 22px', fontSize: '13.5px', fontWeight: 500, letterSpacing: 0 }}>
|
{m.title}
|
||||||
{item}
|
</h3>
|
||||||
</p>
|
<p style={{ fontSize: '13.5px', color: '#425466', lineHeight: 1.6, margin: 0 }}>
|
||||||
|
{m.desc}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</>
|
|
||||||
|
{/* Trust Pillars */}
|
||||||
|
<section style={{ width: 'min(1280px, 94%)', margin: '48px auto 0' }}>
|
||||||
|
<div style={{ background: '#F6F9FC', border: '1px solid rgba(10, 37, 64, 0.08)', borderRadius: '20px', padding: '30px 24px' }}>
|
||||||
|
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(220px, 1fr))', gap: '28px' }}>
|
||||||
|
{credentials.map((c, i) => (
|
||||||
|
<div key={i} style={{ display: 'flex', flexDirection: 'column', gap: '6px' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ color: '#1D4ED8', fontSize: '28px' }}>
|
||||||
|
verified_user
|
||||||
|
</span>
|
||||||
|
<h4 style={{ fontSize: '16px', fontWeight: 600, color: '#0A2540', margin: '4px 0 0 0' }}>
|
||||||
|
{c.title}
|
||||||
|
</h4>
|
||||||
|
<p style={{ fontSize: '13px', color: '#425466', margin: 0, lineHeight: 1.5 }}>
|
||||||
|
{c.desc}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { useNavigate } from 'react-router-dom';
|
|||||||
import DOMPurify from 'dompurify';
|
import DOMPurify from 'dompurify';
|
||||||
import { useToast } from '../context/ToastContext';
|
import { useToast } from '../context/ToastContext';
|
||||||
import ConfirmModal from '../components/ConfirmModal';
|
import ConfirmModal from '../components/ConfirmModal';
|
||||||
|
import CountUp from '../components/CountUp';
|
||||||
|
|
||||||
export default function AdminDashboard() {
|
export default function AdminDashboard() {
|
||||||
const { authFetch, user: currentUser } = useAuth();
|
const { authFetch, user: currentUser } = useAuth();
|
||||||
@@ -12,7 +13,7 @@ export default function AdminDashboard() {
|
|||||||
const [confirmConfig, setConfirmConfig] = useState({
|
const [confirmConfig, setConfirmConfig] = useState({
|
||||||
isOpen: false, title: "", message: "", confirmText: "OK", isDestructive: false, onConfirm: () => {}
|
isOpen: false, title: "", message: "", confirmText: "OK", isDestructive: false, onConfirm: () => {}
|
||||||
});
|
});
|
||||||
// activeTab state removed (unused)
|
|
||||||
const [stats, setStats] = useState({ total_users: 0, pending_personal: 0, pending_business: 0, admins: 0 });
|
const [stats, setStats] = useState({ total_users: 0, pending_personal: 0, pending_business: 0, admins: 0 });
|
||||||
const [bookmarks, setBookmarks] = useState([]);
|
const [bookmarks, setBookmarks] = useState([]);
|
||||||
const [users, setUsers] = useState([]);
|
const [users, setUsers] = useState([]);
|
||||||
@@ -77,7 +78,7 @@ export default function AdminDashboard() {
|
|||||||
const [tplFile, setTplFile] = useState(null);
|
const [tplFile, setTplFile] = useState(null);
|
||||||
const [tplLoading, setTplLoading] = useState(false);
|
const [tplLoading, setTplLoading] = useState(false);
|
||||||
|
|
||||||
const [digestHtml, setDigestHtml] = useState(null);
|
const [digestHtml, setDigestHtml] = useState(null);
|
||||||
const [digestLoading, setDigestLoading] = useState(false);
|
const [digestLoading, setDigestLoading] = useState(false);
|
||||||
|
|
||||||
const fetchDigest = useCallback(async () => {
|
const fetchDigest = useCallback(async () => {
|
||||||
@@ -87,7 +88,7 @@ export default function AdminDashboard() {
|
|||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
setDigestHtml(data.digest);
|
setDigestHtml(data.digest);
|
||||||
showToast("Daily digest generated successfully!", "success");
|
showToast("AI Daily briefing generated successfully!", "success");
|
||||||
} else {
|
} else {
|
||||||
const err = await res.json().catch(() => ({}));
|
const err = await res.json().catch(() => ({}));
|
||||||
showToast(err.detail || "Failed to generate daily digest", "error");
|
showToast(err.detail || "Failed to generate daily digest", "error");
|
||||||
@@ -125,8 +126,8 @@ export default function AdminDashboard() {
|
|||||||
setBookmarks(payload.bookmarks || []);
|
setBookmarks(payload.bookmarks || []);
|
||||||
}
|
}
|
||||||
|
|
||||||
let newUsersArray = users;
|
let newUsersArray = [];
|
||||||
let adminsCount = stats.admins;
|
let adminsCount = 0;
|
||||||
|
|
||||||
if (usersRes.ok) {
|
if (usersRes.ok) {
|
||||||
const payload = await usersRes.json();
|
const payload = await usersRes.json();
|
||||||
@@ -144,8 +145,7 @@ export default function AdminDashboard() {
|
|||||||
admins: statsData.admin_accounts
|
admins: statsData.admin_accounts
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Fallback to local computation if admin-status fails
|
const total = newUsersArray.length;
|
||||||
const total = newUsersArray.length;
|
|
||||||
const pendingP = newUsersArray.reduce((acc, u) => acc + (u.pending_personal || 0), 0);
|
const pendingP = newUsersArray.reduce((acc, u) => acc + (u.pending_personal || 0), 0);
|
||||||
const pendingB = newUsersArray.reduce((acc, u) => acc + (u.pending_business || 0), 0);
|
const pendingB = newUsersArray.reduce((acc, u) => acc + (u.pending_business || 0), 0);
|
||||||
setStats({ total_users: total, pending_personal: pendingP, pending_business: pendingB, admins: adminsCount });
|
setStats({ total_users: total, pending_personal: pendingP, pending_business: pendingB, admins: adminsCount });
|
||||||
@@ -202,7 +202,8 @@ export default function AdminDashboard() {
|
|||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
setTplName("");
|
setTplName("");
|
||||||
setTplFile(null);
|
setTplFile(null);
|
||||||
document.getElementById("tplFile").value = "";
|
const fileInput = document.getElementById("tplFile");
|
||||||
|
if (fileInput) fileInput.value = "";
|
||||||
loadTemplates();
|
loadTemplates();
|
||||||
showToast("Template uploaded successfully", "success");
|
showToast("Template uploaded successfully", "success");
|
||||||
} else {
|
} else {
|
||||||
@@ -243,7 +244,6 @@ export default function AdminDashboard() {
|
|||||||
const yearOptions = [currentYear - 1, currentYear, currentYear + 1];
|
const yearOptions = [currentYear - 1, currentYear, currentYear + 1];
|
||||||
|
|
||||||
const filteredUsers = users.filter(u => {
|
const filteredUsers = users.filter(u => {
|
||||||
// Stat Card Filters
|
|
||||||
if (userFilter === 'admin' && u.role !== 'admin' && u.role !== 'super_admin') return false;
|
if (userFilter === 'admin' && u.role !== 'admin' && u.role !== 'super_admin') return false;
|
||||||
if (userFilter === 'pending_personal' && !(u.pending_personal > 0)) return false;
|
if (userFilter === 'pending_personal' && !(u.pending_personal > 0)) return false;
|
||||||
if (userFilter === 'pending_business' && !(u.pending_business > 0)) return false;
|
if (userFilter === 'pending_business' && !(u.pending_business > 0)) return false;
|
||||||
@@ -259,56 +259,254 @@ export default function AdminDashboard() {
|
|||||||
const bPending = (b.pending_personal || 0) + (b.pending_business || 0);
|
const bPending = (b.pending_personal || 0) + (b.pending_business || 0);
|
||||||
return bPending - aPending;
|
return bPending - aPending;
|
||||||
}
|
}
|
||||||
// Default fallback to ID if created_at is missing
|
|
||||||
if (userSort === 'newest') return (b.id || 0) - (a.id || 0);
|
if (userSort === 'newest') return (b.id || 0) - (a.id || 0);
|
||||||
if (userSort === 'oldest') return (a.id || 0) - (b.id || 0);
|
if (userSort === 'oldest') return (a.id || 0) - (b.id || 0);
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="">
|
<div>
|
||||||
<ConfirmModal
|
<ConfirmModal
|
||||||
{...confirmConfig}
|
{...confirmConfig}
|
||||||
onCancel={() => setConfirmConfig(prev => ({ ...prev, isOpen: false }))}
|
onCancel={() => setConfirmConfig(prev => ({ ...prev, isOpen: false }))}
|
||||||
/>
|
/>
|
||||||
<h1 style={{
|
|
||||||
margin: '0 0 32px 0',
|
{/* ================= EXECUTIVE ADMIN HERO ================= */}
|
||||||
fontSize: '42px',
|
<section className="dash-hero dash-rise" style={{ '--i': 0, marginBottom: '24px' }}>
|
||||||
fontFamily: 'var(--font-display)',
|
<div className="dash-hero-content">
|
||||||
fontWeight: '800',
|
<div className="dash-hero-eyebrow">
|
||||||
color: 'var(--ink)',
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>verified_user</span>
|
||||||
textAlign: 'center',
|
PARTNER & STAFF PRACTICE CONSOLE
|
||||||
letterSpacing: '-0.5px'
|
</div>
|
||||||
}}>
|
<h1 className="dash-hero-title">Client Management & Tax Review</h1>
|
||||||
Admin Dashboard <span style={{ color: 'var(--brass)', fontWeight: 600, fontSize: '32px' }}>{tab === 'templates' ? '| Templates' : ''}</span>
|
<p className="dash-hero-sub">
|
||||||
</h1>
|
Monitor client document vaults, allocate staff CPAs, review AI statement ingestion, and finalize returns for TY {filterYear}.
|
||||||
<div style={{ display: 'flex', justifyContent: 'flex-end', marginBottom: '24px', flexWrap: 'wrap', gap: '16px' }}>
|
</p>
|
||||||
|
|
||||||
|
<div className="dash-hero-badges" style={{ marginTop: '18px' }}>
|
||||||
|
<span className="dash-glass-pill">
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '15px', color: '#60A5FA' }}>shield</span>
|
||||||
|
Executive Control
|
||||||
|
</span>
|
||||||
|
<span className="dash-glass-pill">
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '15px', color: '#34D399' }}>verified</span>
|
||||||
|
CPA Workpapers
|
||||||
|
</span>
|
||||||
|
<span className="dash-glass-pill">
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '15px', color: '#C4B5FD' }}>auto_awesome</span>
|
||||||
|
AI Ingestion Active
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ display: 'flex', gap: '12px', alignItems: 'center', flexWrap: 'wrap', zIndex: 1 }}>
|
||||||
|
{/* Tax Year Glass Select */}
|
||||||
|
<select
|
||||||
|
value={filterYear}
|
||||||
|
onChange={(e) => setFilterYear(e.target.value)}
|
||||||
|
className="dash-glass-select dash-focusable"
|
||||||
|
aria-label="Filter Tax Year"
|
||||||
|
>
|
||||||
|
{yearOptions.map(y => (
|
||||||
|
<option key={y} value={y}>Tax Year {y}</option>
|
||||||
|
))}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
{/* AI Daily Briefing Button */}
|
||||||
|
<button
|
||||||
|
className="dash-hero-ai-btn dash-focusable"
|
||||||
|
onClick={fetchDigest}
|
||||||
|
disabled={digestLoading}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>auto_awesome</span>
|
||||||
|
{digestLoading ? 'Analyzing...' : 'AI Daily Briefing'}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{/* Daily Digest Drawer / Box */}
|
||||||
|
{digestHtml && (
|
||||||
|
<section className="dash-card dash-digest-drawer" style={{ marginBottom: '24px' }}>
|
||||||
|
<div className="dash-digest-header">
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '10px' }}>
|
||||||
|
<div className="dash-chip dash-chip--violet" style={{ width: '32px', height: '32px' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>auto_awesome</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong style={{ fontSize: '14px', color: '#0A2540' }}>AI Executive Daily Briefing</strong>
|
||||||
|
<span style={{ fontSize: '12px', color: '#6D28D9', marginLeft: '8px', fontWeight: 600 }}>TY {filterYear} Digest</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
className="dash-table-action-btn dash-focusable"
|
||||||
|
onClick={() => setDigestHtml(null)}
|
||||||
|
title="Dismiss Briefing"
|
||||||
|
aria-label="Dismiss Briefing"
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>close</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style={{ padding: '20px 24px', fontSize: '13.5px', color: '#0A2540', lineHeight: 1.7 }}
|
||||||
|
dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(digestHtml) }}
|
||||||
|
/>
|
||||||
|
</section>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* ================= EXECUTIVE KPI METRICS BAR ================= */}
|
||||||
|
<div className="dash-kpis dash-rise" style={{ '--i': 1, marginTop: 0, marginBottom: '24px' }}>
|
||||||
|
{/* Total Clients */}
|
||||||
|
<div
|
||||||
|
className={`dash-card dash-kpi-card dash-kpi-card--blue ${userFilter === 'all' ? 'dash-kpi-card--active' : ''}`}
|
||||||
|
style={{ cursor: 'pointer' }}
|
||||||
|
onClick={() => setUserFilter('all')}
|
||||||
|
>
|
||||||
|
<div className="dash-kpi-bar dash-kpi-bar--blue" />
|
||||||
|
<div className="dash-kpi-top">
|
||||||
|
<span className="dash-kpi-label">Total Clients</span>
|
||||||
|
<div className="dash-chip dash-chip--blue">
|
||||||
|
<span className="material-symbols-outlined">group</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="dash-kpi-value">
|
||||||
|
<CountUp value={stats.total_users} />
|
||||||
|
</div>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', fontSize: '12px' }}>
|
||||||
|
<span style={{ color: userFilter === 'all' ? '#1D4ED8' : '#425466', fontWeight: 600 }}>
|
||||||
|
{userFilter === 'all' ? 'Active Filter: All' : 'Click to filter all'}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Pending Personal */}
|
||||||
|
<div
|
||||||
|
className={`dash-card dash-kpi-card dash-kpi-card--amber ${userFilter === 'pending_personal' ? 'dash-kpi-card--active' : ''}`}
|
||||||
|
style={{ cursor: 'pointer' }}
|
||||||
|
onClick={() => setUserFilter('pending_personal')}
|
||||||
|
>
|
||||||
|
<div className="dash-kpi-bar dash-kpi-bar--amber" />
|
||||||
|
<div className="dash-kpi-top">
|
||||||
|
<span className="dash-kpi-label">Pending Personal</span>
|
||||||
|
<div className="dash-chip dash-chip--amber">
|
||||||
|
<span className="material-symbols-outlined">person_search</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="dash-kpi-value" style={{ color: '#92600A' }}>
|
||||||
|
<CountUp value={stats.pending_personal} />
|
||||||
|
{stats.pending_personal > 0 && <span className="dash-pulse-dot dash-pulse-dot--amber" />}
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '12px', color: '#425466' }}>
|
||||||
|
Awaiting CPA Form Review
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Pending Business */}
|
||||||
|
<div
|
||||||
|
className={`dash-card dash-kpi-card dash-kpi-card--teal ${userFilter === 'pending_business' ? 'dash-kpi-card--active' : ''}`}
|
||||||
|
style={{ cursor: 'pointer' }}
|
||||||
|
onClick={() => setUserFilter('pending_business')}
|
||||||
|
>
|
||||||
|
<div className="dash-kpi-bar dash-kpi-bar--teal" />
|
||||||
|
<div className="dash-kpi-top">
|
||||||
|
<span className="dash-kpi-label">Pending Business</span>
|
||||||
|
<div className="dash-chip dash-chip--teal">
|
||||||
|
<span className="material-symbols-outlined">business_center</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="dash-kpi-value" style={{ color: '#0D9488' }}>
|
||||||
|
<CountUp value={stats.pending_business} />
|
||||||
|
{stats.pending_business > 0 && <span className="dash-pulse-dot dash-pulse-dot--teal" />}
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '12px', color: '#425466' }}>
|
||||||
|
Bank Statements & Ledgers
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Staff Admins */}
|
||||||
|
<div
|
||||||
|
className={`dash-card dash-kpi-card dash-kpi-card--slate ${userFilter === 'admin' ? 'dash-kpi-card--active' : ''}`}
|
||||||
|
style={{ cursor: 'pointer' }}
|
||||||
|
onClick={() => setUserFilter('admin')}
|
||||||
|
>
|
||||||
|
<div className="dash-kpi-bar dash-kpi-bar--slate" />
|
||||||
|
<div className="dash-kpi-top">
|
||||||
|
<span className="dash-kpi-label">Staff Admins</span>
|
||||||
|
<div className="dash-chip dash-chip--slate">
|
||||||
|
<span className="material-symbols-outlined">admin_panel_settings</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="dash-kpi-value" style={{ color: '#425466' }}>
|
||||||
|
<CountUp value={stats.admins} />
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '12px', color: '#425466' }}>
|
||||||
|
Active Advisory Accounts
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* ================= TAB CONTROLS ================= */}
|
||||||
|
<div className="dash-rise" style={{ '--i': 2, marginBottom: '20px' }}>
|
||||||
|
<div className="dash-tabs" role="tablist">
|
||||||
|
<button
|
||||||
|
role="tab"
|
||||||
|
aria-selected={tab === 'users'}
|
||||||
|
className={`dash-tab-btn ${tab === 'users' ? 'active' : ''}`}
|
||||||
|
onClick={() => setTab('users')}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '17px' }}>group</span>
|
||||||
|
Client Dossiers ({filteredUsers.length})
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
role="tab"
|
||||||
|
aria-selected={tab === 'bookmarks'}
|
||||||
|
className={`dash-tab-btn ${tab === 'bookmarks' ? 'active' : ''}`}
|
||||||
|
onClick={() => setTab('bookmarks')}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '17px', color: tab === 'bookmarks' ? '#B7791F' : 'inherit' }}>star</span>
|
||||||
|
Bookmarked Vault Documents ({bookmarks.length})
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
role="tab"
|
||||||
|
aria-selected={tab === 'templates'}
|
||||||
|
className={`dash-tab-btn ${tab === 'templates' ? 'active' : ''}`}
|
||||||
|
onClick={() => setTab('templates')}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '17px' }}>description</span>
|
||||||
|
Statutory Templates & Organizers
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* ================= USERS OVERVIEW TAB ================= */}
|
||||||
{tab === 'users' && (
|
{tab === 'users' && (
|
||||||
<div style={{ display: 'flex', gap: '12px', width: '100%', maxWidth: '820px', flexWrap: 'wrap' }}>
|
<div className="dash-tab-panel">
|
||||||
<div className="search-wrap" style={{ flex: 1, minWidth: '180px', position: 'relative' }}>
|
{/* Search & Filter Bar */}
|
||||||
<span className="material-symbols-outlined search-icon" style={{position: 'absolute', left: '12px', top: '50%', transform: 'translateY(-50%)', color: 'var(--muted)', fontSize: '20px'}}>search</span>
|
<div className="dash-toolbar" style={{ marginBottom: '20px' }}>
|
||||||
<input
|
{/* Search Input */}
|
||||||
type="text"
|
<div className="dash-input-wrap">
|
||||||
className="search-input"
|
<span className="material-symbols-outlined search-icon">search</span>
|
||||||
style={{ width: '100%', padding: '10px 12px 10px 40px', border: '1px solid var(--border)', borderRadius: 'var(--radius-pill)', outline: 'none' }}
|
<input
|
||||||
placeholder="Search by name or email"
|
type="text"
|
||||||
|
placeholder="Search clients by name, business, or email..."
|
||||||
value={search}
|
value={search}
|
||||||
onChange={(e) => setSearch(e.target.value)}
|
onChange={(e) => setSearch(e.target.value)}
|
||||||
|
className="dash-input dash-focusable"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Admin Assignment Filter */}
|
{/* Admin Assignment Filter */}
|
||||||
{isSuperAdmin ? (
|
{isSuperAdmin ? (
|
||||||
<select
|
<select
|
||||||
className="select-input"
|
|
||||||
style={{ width: 'auto', padding: '10px 16px', borderRadius: 'var(--radius-pill)', border: '1px solid var(--border)', outline: 'none', background: 'white' }}
|
|
||||||
value={adminAssignmentFilter}
|
value={adminAssignmentFilter}
|
||||||
onChange={(e) => setAdminAssignmentFilter(e.target.value)}
|
onChange={(e) => setAdminAssignmentFilter(e.target.value)}
|
||||||
title="Filter by assigned administrator"
|
className="dash-select dash-focusable"
|
||||||
|
aria-label="Filter by assigned staff administrator"
|
||||||
>
|
>
|
||||||
<option value="all">👥 All Administrators</option>
|
<option value="all">👥 All Staff Administrators</option>
|
||||||
<option value="unassigned">⚠️ Unassigned Clients</option>
|
<option value="unassigned">⚠️ Unassigned Clients</option>
|
||||||
<optgroup label="Staff Admins">
|
<optgroup label="Staff CPAs">
|
||||||
{staffList.map(s => (
|
{staffList.map(s => (
|
||||||
<option key={s.id} value={s.id}>
|
<option key={s.id} value={s.id}>
|
||||||
{s.name || s.email} ({s.assigned_clients_count || 0} clients)
|
{s.name || s.email} ({s.assigned_clients_count || 0} clients)
|
||||||
@@ -317,297 +515,360 @@ export default function AdminDashboard() {
|
|||||||
</optgroup>
|
</optgroup>
|
||||||
</select>
|
</select>
|
||||||
) : (
|
) : (
|
||||||
<select
|
<select
|
||||||
className="select-input"
|
|
||||||
style={{ width: 'auto', padding: '10px 16px', borderRadius: 'var(--radius-pill)', border: '1px solid var(--border)', outline: 'none', background: 'white' }}
|
|
||||||
value={adminAssignmentFilter}
|
value={adminAssignmentFilter}
|
||||||
onChange={(e) => setAdminAssignmentFilter(e.target.value)}
|
onChange={(e) => setAdminAssignmentFilter(e.target.value)}
|
||||||
|
className="dash-select dash-focusable"
|
||||||
|
aria-label="Filter by assigned administrator"
|
||||||
>
|
>
|
||||||
<option value="all">My Assigned Clients</option>
|
<option value="all">My Assigned Clients</option>
|
||||||
<option value="unassigned">Unassigned Clients</option>
|
<option value="unassigned">Unassigned Clients</option>
|
||||||
</select>
|
</select>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<select
|
{/* Sort Dropdown */}
|
||||||
className="select-input"
|
<select
|
||||||
style={{ width: 'auto', padding: '10px 16px', borderRadius: 'var(--radius-pill)', border: '1px solid var(--border)', outline: 'none', background: 'white' }}
|
|
||||||
value={userSort}
|
value={userSort}
|
||||||
onChange={(e) => setUserSort(e.target.value)}
|
onChange={(e) => setUserSort(e.target.value)}
|
||||||
|
className="dash-select dash-focusable"
|
||||||
|
aria-label="Sort clients"
|
||||||
>
|
>
|
||||||
<option value="newest">Newest First</option>
|
<option value="newest">Newest First</option>
|
||||||
<option value="oldest">Oldest First</option>
|
<option value="oldest">Oldest First</option>
|
||||||
<option value="highest_pending">Highest Pending</option>
|
<option value="highest_pending">Highest Pending Filings</option>
|
||||||
<option value="asc">Name (A-Z)</option>
|
<option value="asc">Name (A → Z)</option>
|
||||||
<option value="desc">Name (Z-A)</option>
|
<option value="desc">Name (Z → A)</option>
|
||||||
</select>
|
|
||||||
<select
|
|
||||||
className="select-input"
|
|
||||||
style={{ width: 'auto', padding: '10px 16px', borderRadius: 'var(--radius-pill)', border: '1px solid var(--border)', outline: 'none', background: 'white' }}
|
|
||||||
value={filterYear}
|
|
||||||
onChange={(e) => setFilterYear(e.target.value)}
|
|
||||||
>
|
|
||||||
<option value={currentYear - 1}>TY {currentYear - 1}</option>
|
|
||||||
<option value={currentYear}>TY {currentYear}</option>
|
|
||||||
<option value={currentYear + 1}>TY {currentYear + 1}</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="tab-bar">
|
{/* Client Cards Grid */}
|
||||||
<button className={`tab-btn ${tab === 'users' ? 'active' : ''}`} onClick={() => setTab('users')}>
|
{loading ? (
|
||||||
<span className="material-symbols-outlined">group</span> Users Overview
|
<div className="dash-clients-grid">
|
||||||
</button>
|
{[1, 2, 3, 4, 5, 6].map(n => (
|
||||||
<button className={`tab-btn ${tab === 'bookmarks' ? 'active' : ''}`} onClick={() => setTab('bookmarks')}>
|
<div key={n} className="dash-card dash-client-card" style={{ height: '180px' }}>
|
||||||
<span className="material-symbols-outlined">star</span> Bookmarks
|
<div style={{ display: 'flex', gap: '12px' }}>
|
||||||
</button>
|
<div className="dash-skeleton" style={{ width: '44px', height: '44px', borderRadius: '50%' }} />
|
||||||
<button className={`tab-btn ${tab === 'templates' ? 'active' : ''}`} onClick={() => setTab('templates')}>
|
<div style={{ flex: 1, display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
||||||
<span className="material-symbols-outlined">description</span> Templates
|
<div className="dash-skeleton" style={{ height: '16px', width: '60%' }} />
|
||||||
</button>
|
<div className="dash-skeleton" style={{ height: '13px', width: '80%' }} />
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Users Tab */}
|
|
||||||
|
|
||||||
{tab === 'bookmarks' && (
|
|
||||||
<div style={{marginTop: '16px'}}>
|
|
||||||
<h2 style={{fontFamily: 'var(--font-display)', fontSize:'28px', fontWeight:700, color:'var(--navy)', marginBottom:'24px', display:'flex', alignItems:'center', gap:'12px', letterSpacing: '-0.5px'}}>
|
|
||||||
<span className="material-symbols-outlined" style={{color:'var(--orange)', fontSize:'32px'}}>star</span>
|
|
||||||
Bookmarked Documents
|
|
||||||
</h2>
|
|
||||||
{bookmarks.length === 0 ? (
|
|
||||||
<div className="card shadow-sm p-lg" style={{textAlign: 'center', padding: '48px 24px'}}>
|
|
||||||
<span className="material-symbols-outlined" style={{fontSize: '48px', color: 'var(--border)'}}>star_border</span>
|
|
||||||
<p style={{color:'var(--text-light)', marginTop: '16px', fontSize: '16px'}}>No bookmarked documents found.</p>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div className="users-grid" style={{display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))', gap: '20px'}}>
|
|
||||||
{bookmarks.map((b) => (
|
|
||||||
<div key={`${b.type}-${b.id}`} className="user-card stagger fade-up" style={{background: 'var(--surface)', padding: '24px', borderRadius: '16px', boxShadow: '0 4px 12px rgba(0,0,0,0.05)', cursor: 'pointer', transition: 'transform 0.2s, box-shadow 0.2s', display: 'flex', flexDirection: 'column'}} onClick={() => navigate(`/admin-user-detail?user_id=${b.user_id}`)}
|
|
||||||
onMouseOver={(e) => { e.currentTarget.style.transform = 'translateY(-2px)'; e.currentTarget.style.boxShadow = '0 8px 24px rgba(0,0,0,0.1)'; }}
|
|
||||||
onMouseOut={(e) => { e.currentTarget.style.transform = 'none'; e.currentTarget.style.boxShadow = '0 4px 12px rgba(0,0,0,0.05)'; }}
|
|
||||||
>
|
|
||||||
<div className="user-top" style={{alignItems: 'flex-start', display: 'flex', gap: '16px'}}>
|
|
||||||
<div className="user-avatar" style={{background: 'var(--orange-light)', color: 'var(--orange)', borderRadius: '12px', width: '48px', height: '48px', display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0}}>
|
|
||||||
<span className="material-symbols-outlined" style={{fontSize: '24px'}}>description</span>
|
|
||||||
</div>
|
|
||||||
<div className="user-info" style={{flex: 1}}>
|
|
||||||
<div className="u-name" style={{fontSize: '16px', fontWeight: 700, color: 'var(--navy)', wordBreak: 'break-word'}}>{b.filename || b.doc_name}</div>
|
|
||||||
<div className="u-email" style={{fontSize: '14px', color: 'var(--muted)', marginTop: '6px', display: 'flex', alignItems: 'center', gap: '4px'}}>
|
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'16px'}}>person</span> {b.user_name}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="user-bottom" style={{marginTop: 'auto', paddingTop: '16px', borderTop: '1px solid var(--border)', display: 'flex', alignItems: 'center', flexWrap: 'wrap', gap: '8px'}}>
|
<div className="dash-skeleton" style={{ height: '32px', width: '100%', borderRadius: '8px' }} />
|
||||||
<span className={`badge ${b.type === 'personal' ? 'badge-blue' : b.type === 'business' ? 'badge-green' : 'badge-gray'}`} style={{textTransform:'uppercase', fontSize: '12px'}}>
|
|
||||||
{b.type}
|
|
||||||
</span>
|
|
||||||
<span className="badge badge-gray" style={{fontSize: '12px', background: 'white', border: '1px solid var(--border)', color: 'var(--text-light)'}}>
|
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'14px', verticalAlign:'middle', marginRight: '4px'}}>calendar_today</span>
|
|
||||||
{new Date(b.uploaded_at).toLocaleDateString()}
|
|
||||||
</span>
|
|
||||||
<span style={{flex: 1}}></span>
|
|
||||||
<span className="material-symbols-outlined" style={{color: 'var(--orange)', fontSize: '20px'}}>arrow_forward</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)}
|
) : filteredUsers.length === 0 ? (
|
||||||
</div>
|
<div className="dash-card dash-empty-state">
|
||||||
)}
|
<div className="dash-empty-icon">
|
||||||
{tab === 'users' && (
|
<span className="material-symbols-outlined" style={{ fontSize: '28px' }}>search_off</span>
|
||||||
<>
|
|
||||||
{/* Daily Digest */}
|
|
||||||
<div className="card" style={{ marginBottom: '20px', background: 'var(--emerald-light)', border: '1px solid rgba(31,93,70,0.2)' }}>
|
|
||||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', flexWrap: 'wrap', gap: '12px' }}>
|
|
||||||
<div style={{ display: 'flex', alignItems: 'center', gap: '10px' }}>
|
|
||||||
<span className="material-symbols-outlined" style={{ color: 'var(--emerald)', fontSize: '22px' }}>auto_awesome</span>
|
|
||||||
<div>
|
|
||||||
<div style={{ fontWeight: 700, fontSize: '14px', color: 'var(--navy)' }}>AI Daily Digest</div>
|
|
||||||
<div style={{ fontSize: '12px', color: 'var(--muted)' }}>Plain-English summary of today's activity</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<button className="btn btn-secondary btn-sm" onClick={fetchDigest} disabled={digestLoading} style={{ borderRadius: 'var(--radius-sm)' }}>
|
<h4 style={{ fontSize: '16px', color: '#0A2540', margin: 0 }}>No matching clients found</h4>
|
||||||
{digestLoading ? 'Generating…' : '✨ Generate Digest'}
|
<p style={{ fontSize: '13px', color: '#425466', maxWidth: '440px', margin: 0 }}>
|
||||||
</button>
|
Try adjusting your search criteria, tax year, or staff filter.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{digestHtml && (
|
) : (
|
||||||
<div style={{ marginTop: '12px', paddingTop: '12px', borderTop: '1px solid rgba(31,93,70,0.2)', fontSize: '13px', color: 'var(--navy)', lineHeight: '1.7' }}
|
<div className="dash-clients-grid">
|
||||||
dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(digestHtml) }} />
|
{filteredUsers.map((u, idx) => {
|
||||||
)}
|
const avatarVariant = (u.id || 0) % 4;
|
||||||
</div>
|
const avatarClasses = [
|
||||||
|
'dash-avatar--brand',
|
||||||
|
'dash-avatar--success',
|
||||||
|
'dash-avatar--ai',
|
||||||
|
'dash-avatar--warm'
|
||||||
|
];
|
||||||
|
const avatarClass = avatarClasses[avatarVariant];
|
||||||
|
|
||||||
{/* Stats Bar */}
|
return (
|
||||||
<div className="admin-stats">
|
<div
|
||||||
<div className={`stat-card accent-blue ${userFilter === 'all' ? 'active-filter' : ''}`} onClick={() => setUserFilter('all')} style={{ cursor: 'pointer', border: userFilter === 'all' ? '2px solid var(--blue)' : 'none' }}>
|
key={u.id}
|
||||||
<div className="stat-icon"><span className="material-symbols-outlined">group</span></div>
|
className="dash-card dash-client-card dash-rise"
|
||||||
<div className="stat-value">{stats.total_users}</div>
|
style={{ '--i': idx, cursor: 'pointer' }}
|
||||||
<div className="stat-label">Total Users</div>
|
onClick={() => navigate(`/admin-user-detail?user_id=${u.id}`)}
|
||||||
</div>
|
>
|
||||||
<div className={`stat-card accent-green ${userFilter === 'admin' ? 'active-filter' : ''}`} onClick={() => setUserFilter('admin')} style={{ cursor: 'pointer', border: userFilter === 'admin' ? '2px solid var(--green)' : 'none' }}>
|
<div style={{ display: 'flex', alignItems: 'flex-start', gap: '14px' }}>
|
||||||
<div className="stat-icon"><span className="material-symbols-outlined">security</span></div>
|
<div className={`dash-avatar ${avatarClass}`}>
|
||||||
<div className="stat-value">{stats.admins}</div>
|
{(u.name || "U").charAt(0).toUpperCase()}
|
||||||
<div className="stat-label">Admin Accounts</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div className={`stat-card accent-orange ${userFilter === 'pending_personal' ? 'active-filter' : ''}`} onClick={() => setUserFilter('pending_personal')} style={{ cursor: 'pointer', border: userFilter === 'pending_personal' ? '2px solid var(--orange)' : 'none' }}>
|
|
||||||
<div className="stat-icon"><span className="material-symbols-outlined">description</span></div>
|
|
||||||
<div className="stat-value">{stats.pending_personal}</div>
|
|
||||||
<div className="stat-label">Pending Personal</div>
|
|
||||||
</div>
|
|
||||||
<div className={`stat-card accent-orange ${userFilter === 'pending_business' ? 'active-filter' : ''}`} onClick={() => setUserFilter('pending_business')} style={{ cursor: 'pointer', border: userFilter === 'pending_business' ? '2px solid var(--orange)' : 'none' }}>
|
|
||||||
<div className="stat-icon"><span className="material-symbols-outlined">business</span></div>
|
|
||||||
<div className="stat-value">{stats.pending_business}</div>
|
|
||||||
<div className="stat-label">Pending Business</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* User Grid */}
|
<div style={{ flex: 1, minWidth: 0 }}>
|
||||||
<div className="users-grid">
|
<div style={{ fontWeight: 600, fontSize: '15px', color: '#0A2540', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
|
||||||
{loading ? (
|
{u.name || "Unnamed Client"}
|
||||||
<div className="empty-state" style={{ gridColumn: '1/-1' }}>
|
</div>
|
||||||
<div className="empty-icon"><span className="material-symbols-outlined">pending</span></div>
|
<div style={{ fontSize: '13px', color: '#425466', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', marginTop: '2px' }}>
|
||||||
<div className="empty-title">Loading users...</div>
|
{u.email}
|
||||||
</div>
|
</div>
|
||||||
) : filteredUsers.length === 0 ? (
|
|
||||||
<div className="empty-state" style={{ gridColumn: '1/-1' }}>
|
<div style={{ display: 'flex', gap: '6px', flexWrap: 'wrap', marginTop: '10px' }}>
|
||||||
<div className="empty-title">No users found</div>
|
<span className={`dash-pill ${u.role === 'super_admin' ? 'dash-pill--rejected' : u.role === 'admin' ? 'dash-pill--pending' : 'dash-pill--approved'}`}>
|
||||||
</div>
|
{u.role === 'super_admin' ? 'Super Admin' : u.role === 'admin' ? 'Staff CPA' : 'Client'}
|
||||||
) : (
|
</span>
|
||||||
filteredUsers.map(u => (
|
|
||||||
<div key={u.id} className="user-card stagger fade-up" onClick={() => navigate(`/admin-user-detail?user_id=${u.id}`)}>
|
{u.pending_personal > 0 && (
|
||||||
<div className="user-top">
|
<span className="dash-pill dash-pill--pending">
|
||||||
<div className="user-avatar">{(u.name || "U").charAt(0).toUpperCase()}</div>
|
{u.pending_personal} Personal
|
||||||
<div className="user-info">
|
</span>
|
||||||
<div className="u-name">{u.name || "—"}</div>
|
)}
|
||||||
<div className="u-email">{u.email || "—"}</div>
|
{u.pending_business > 0 && (
|
||||||
</div>
|
<span className="dash-pill" style={{ background: 'rgba(20, 184, 166, 0.12)', color: '#0D9488', border: '1px solid rgba(20, 184, 166, 0.28)' }}>
|
||||||
</div>
|
{u.pending_business} Business
|
||||||
<div className="user-bottom" style={{ display: 'flex', flexDirection: 'column', gap: '8px', alignItems: 'stretch' }}>
|
</span>
|
||||||
<div style={{ display: 'flex', gap: '6px', flexWrap: 'wrap', alignItems: 'center' }}>
|
)}
|
||||||
<span className={`badge role-badge ${u.role === 'super_admin' ? 'badge-red' : u.role === 'admin' ? 'badge-orange' : 'badge-blue'}`}>
|
</div>
|
||||||
{u.role}
|
</div>
|
||||||
</span>
|
|
||||||
{u.pending_personal > 0 && (
|
|
||||||
<span className="badge badge-orange pulse" style={{ cursor: 'default' }}>
|
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'12px', verticalAlign:'middle'}}>description</span>
|
|
||||||
{' '}{u.pending_personal} personal
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
{u.pending_business > 0 && (
|
|
||||||
<span className="badge badge-orange pulse" style={{ cursor: 'default' }}>
|
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'12px', verticalAlign:'middle'}}>business</span>
|
|
||||||
{' '}{u.pending_business} business
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{u.role === 'user' && (
|
{/* Card Bottom: Assigned CPA + Action Link */}
|
||||||
<div style={{ paddingTop: '8px', borderTop: '1px solid var(--border)', display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '8px', fontSize: '12px' }}>
|
<div className="dash-client-footer">
|
||||||
<span style={{ color: u.assigned_admin_name ? 'var(--navy)' : 'var(--orange)', display: 'inline-flex', alignItems: 'center', gap: '4px', fontWeight: 500 }}>
|
{isSuperAdmin ? (
|
||||||
<span className="material-symbols-outlined" style={{ fontSize: '15px', color: u.assigned_admin_name ? 'var(--blue)' : 'var(--orange)' }}>
|
<div className="dash-cpa-assign" onClick={(e) => e.stopPropagation()}>
|
||||||
|
<span
|
||||||
|
className="material-symbols-outlined dash-cpa-icon"
|
||||||
|
style={{ color: u.assigned_admin_name ? '#047857' : '#B7791F' }}
|
||||||
|
title={u.assigned_admin_name ? `Assigned to ${u.assigned_admin_name}` : 'Unassigned'}
|
||||||
|
>
|
||||||
{u.assigned_admin_name ? 'assignment_ind' : 'person_alert'}
|
{u.assigned_admin_name ? 'assignment_ind' : 'person_alert'}
|
||||||
</span>
|
</span>
|
||||||
{u.assigned_admin_name ? u.assigned_admin_name : 'Unassigned'}
|
|
||||||
</span>
|
|
||||||
|
|
||||||
{isSuperAdmin && (
|
|
||||||
<select
|
<select
|
||||||
className="select-input"
|
|
||||||
style={{
|
|
||||||
padding: '2px 8px',
|
|
||||||
fontSize: '11px',
|
|
||||||
borderRadius: 'var(--radius-sm)',
|
|
||||||
background: 'white',
|
|
||||||
border: '1px solid var(--border)',
|
|
||||||
cursor: 'pointer',
|
|
||||||
maxWidth: '135px',
|
|
||||||
position: 'relative',
|
|
||||||
zIndex: 5
|
|
||||||
}}
|
|
||||||
value={u.assigned_admin_id || ""}
|
value={u.assigned_admin_id || ""}
|
||||||
onClick={(e) => e.stopPropagation()}
|
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
handleAssignAdmin(u.id, e.target.value);
|
handleAssignAdmin(u.id, e.target.value);
|
||||||
}}
|
}}
|
||||||
title="Assign client to admin"
|
className="dash-cpa-select dash-focusable"
|
||||||
|
aria-label={`Assign CPA for ${u.name || u.email}`}
|
||||||
>
|
>
|
||||||
<option value="">-- Unassigned --</option>
|
<option value="">Unassigned</option>
|
||||||
{staffList.map(s => (
|
{staffList.map(s => (
|
||||||
<option key={s.id} value={s.id}>
|
<option key={s.id} value={s.id}>
|
||||||
{s.name || s.email}
|
{s.name || s.email}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
)}
|
</div>
|
||||||
</div>
|
) : (
|
||||||
)}
|
<div className="dash-cpa-badge">
|
||||||
|
<span
|
||||||
|
className="material-symbols-outlined dash-cpa-icon"
|
||||||
|
style={{ color: u.assigned_admin_name ? '#047857' : '#B7791F' }}
|
||||||
|
>
|
||||||
|
{u.assigned_admin_name ? 'assignment_ind' : 'person_alert'}
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
className="dash-cpa-label"
|
||||||
|
style={{ color: u.assigned_admin_name ? '#0A2540' : '#92600A' }}
|
||||||
|
>
|
||||||
|
{u.assigned_admin_name || 'Unassigned'}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<span className="dash-open-btn">
|
||||||
|
<span>Open</span>
|
||||||
|
<span className="material-symbols-outlined dash-open-arrow">arrow_forward</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
);
|
||||||
))
|
})}
|
||||||
)}
|
</div>
|
||||||
</div>
|
)}
|
||||||
</>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Templates Tab */}
|
{/* ================= BOOKMARKS TAB ================= */}
|
||||||
{tab === 'templates' && (
|
{tab === 'bookmarks' && (
|
||||||
<div className="card" style={{ marginTop: '20px' }}>
|
<div className="dash-tab-panel">
|
||||||
<h3>Manage Required Templates</h3>
|
<div className="dash-card" style={{ padding: '24px 26px' }}>
|
||||||
<p className="text-sm" style={{ color: 'var(--muted)', marginBottom: '20px' }}>Upload new templates for users to download.</p>
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '16px', flexWrap: 'wrap', marginBottom: '20px' }}>
|
||||||
|
<div>
|
||||||
<div style={{ display: 'flex', gap: '12px', flexWrap: 'wrap', marginBottom: '20px' }}>
|
<h3 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '18px', color: '#0A2540', margin: '0 0 4px', display: 'flex', alignItems: 'center', gap: '8px' }}>
|
||||||
<select className="select-input" style={{ width: 'auto' }} value={tplCategory} onChange={(e) => setTplCategory(e.target.value)}>
|
<span className="material-symbols-outlined" style={{ color: '#B7791F', fontSize: '22px' }}>star</span>
|
||||||
<option value="personal">Personal</option>
|
Bookmarked Vault Documents
|
||||||
<option value="business">Business</option>
|
</h3>
|
||||||
</select>
|
<span style={{ fontSize: '13px', color: '#425466' }}>
|
||||||
<select className="select-input" style={{ width: 'auto' }} value={tplYear} onChange={(e) => setTplYear(e.target.value)}>
|
Starred items across all active client returns
|
||||||
{yearOptions.map(y => <option key={y} value={y}>{y}</option>)}
|
</span>
|
||||||
</select>
|
</div>
|
||||||
</div>
|
<div style={{ fontSize: '12px', color: '#425466', fontFamily: 'var(--font-mono, monospace)', fontWeight: 600 }}>
|
||||||
|
{bookmarks.length} starred document{bookmarks.length === 1 ? '' : 's'}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style={{ marginTop: '20px', minHeight: '150px' }}>
|
{bookmarks.length === 0 ? (
|
||||||
{tplLoading ? (
|
<div className="dash-empty-state">
|
||||||
<div className="text-muted">Loading templates...</div>
|
<div className="dash-empty-icon" style={{ color: '#B7791F', background: '#FFF8E6' }}>
|
||||||
) : templates.length === 0 ? (
|
<span className="material-symbols-outlined" style={{ fontSize: '28px' }}>star_border</span>
|
||||||
<p className="text-muted">No templates found for {tplCategory} {tplYear}.</p>
|
|
||||||
) : (
|
|
||||||
templates.map(t => (
|
|
||||||
<div key={t.id} className="card-flat" style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '8px' }}>
|
|
||||||
<div>
|
|
||||||
<h5 style={{ marginBottom: '4px' }}>{t.name}</h5>
|
|
||||||
{t.download ? (
|
|
||||||
<a href={t.download} target="_blank" rel="noreferrer" className="text-sm" style={{ color: 'var(--blue)' }}>View File</a>
|
|
||||||
) : (
|
|
||||||
<span className="text-sm text-muted">No file</span>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<button className="btn btn-danger btn-sm" onClick={() => deleteTemplate(t.id)}>Delete</button>
|
|
||||||
</div>
|
</div>
|
||||||
))
|
<h4 style={{ fontSize: '16px', color: '#0A2540', margin: 0 }}>No Documents Starred</h4>
|
||||||
|
<p style={{ fontSize: '13px', color: '#425466', maxWidth: '440px', margin: 0 }}>
|
||||||
|
Bookmark critical schedules in any client dossier for rapid access.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(280px, 1fr))', gap: '16px' }}>
|
||||||
|
{bookmarks.map((b) => (
|
||||||
|
<div
|
||||||
|
key={`${b.type}-${b.id}`}
|
||||||
|
className="dash-row-card"
|
||||||
|
style={{ cursor: 'pointer', flexDirection: 'column', alignItems: 'stretch', gap: '12px' }}
|
||||||
|
onClick={() => navigate(`/admin-user-detail?user_id=${b.user_id}`)}
|
||||||
|
>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'flex-start', gap: '10px' }}>
|
||||||
|
<div className="dash-chip dash-chip--blue" style={{ width: '32px', height: '32px' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>description</span>
|
||||||
|
</div>
|
||||||
|
<span style={{ fontWeight: 600, fontSize: '13.5px', color: '#0A2540', wordBreak: 'break-word', flex: 1 }}>
|
||||||
|
{b.filename || b.doc_name}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '12px', color: '#425466' }}>
|
||||||
|
Client: <strong style={{ color: '#0A2540' }}>{b.user_name}</strong>
|
||||||
|
</div>
|
||||||
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', borderTop: '1px solid #E2E8F0', paddingTop: '10px', marginTop: '4px' }}>
|
||||||
|
<span className="dash-pill dash-pill--info">{b.type}</span>
|
||||||
|
<span className="dash-open-btn">
|
||||||
|
<span>Open</span>
|
||||||
|
<span className="material-symbols-outlined dash-open-arrow">arrow_forward</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<hr style={{ margin: '24px 0', borderTop: '1px solid var(--border)' }} />
|
{/* ================= TEMPLATES TAB ================= */}
|
||||||
|
{tab === 'templates' && (
|
||||||
|
<div className="dash-tab-panel">
|
||||||
|
<div className="dash-card" style={{ padding: '24px 26px' }}>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '16px', flexWrap: 'wrap', marginBottom: '24px' }}>
|
||||||
|
<div>
|
||||||
|
<h3 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '18px', color: '#0A2540', margin: '0 0 4px', display: 'flex', alignItems: 'center', gap: '8px' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ color: '#1D4ED8', fontSize: '22px' }}>description</span>
|
||||||
|
Official Statutory Templates & Worksheets
|
||||||
|
</h3>
|
||||||
|
<p style={{ fontSize: '13px', color: '#425466', margin: 0 }}>
|
||||||
|
Upload blank organizers, deduction checklists, and engagement PDFs available to all active clients.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h4 style={{ marginBottom: '12px' }}>Upload New Template</h4>
|
<div style={{ display: 'flex', gap: '10px' }}>
|
||||||
<form onSubmit={handleTplUpload} style={{ display: 'flex', flexDirection: 'column', gap: '12px', maxWidth: '400px' }}>
|
<select
|
||||||
<input
|
value={tplCategory}
|
||||||
type="text"
|
onChange={(e) => setTplCategory(e.target.value)}
|
||||||
className="input"
|
className="dash-select dash-focusable"
|
||||||
placeholder="Template Name (e.g. Individual Tax Organizer)"
|
style={{ height: '38px', fontSize: '12.5px' }}
|
||||||
value={tplName}
|
>
|
||||||
onChange={(e) => setTplName(e.target.value)}
|
<option value="personal">Personal Documents</option>
|
||||||
required
|
<option value="business">Business Documents</option>
|
||||||
/>
|
</select>
|
||||||
<input
|
|
||||||
type="file"
|
<select
|
||||||
id="tplFile"
|
value={tplYear}
|
||||||
className="input"
|
onChange={(e) => setTplYear(e.target.value)}
|
||||||
accept=".pdf,.doc,.docx"
|
className="dash-select dash-focusable"
|
||||||
onChange={(e) => setTplFile(e.target.files[0])}
|
style={{ height: '38px', fontSize: '12.5px' }}
|
||||||
/>
|
>
|
||||||
<button type="submit" className="btn btn-primary" style={{borderRadius: 'var(--radius-sm)'}}>Upload Template</button>
|
{yearOptions.map(y => (
|
||||||
</form>
|
<option key={y} value={y}>Tax Year {y}</option>
|
||||||
|
))}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Active Templates List */}
|
||||||
|
<div style={{ marginBottom: '28px' }}>
|
||||||
|
<h5 style={{ fontSize: '12px', textTransform: 'uppercase', letterSpacing: '0.06em', color: '#425466', marginBottom: '12px', fontWeight: 600 }}>
|
||||||
|
Active Templates on File:
|
||||||
|
</h5>
|
||||||
|
|
||||||
|
{tplLoading ? (
|
||||||
|
<div style={{ padding: '24px', textAlign: 'center', color: '#425466' }}>
|
||||||
|
<div className="dash-skeleton" style={{ height: '48px', width: '100%', marginBottom: '8px' }} />
|
||||||
|
<div className="dash-skeleton" style={{ height: '48px', width: '100%' }} />
|
||||||
|
</div>
|
||||||
|
) : templates.length === 0 ? (
|
||||||
|
<div className="dash-empty-state" style={{ padding: '28px 16px', background: '#F6F9FC', borderRadius: '12px' }}>
|
||||||
|
<p style={{ fontSize: '13.5px', color: '#425466', margin: 0 }}>
|
||||||
|
No templates configured for {tplCategory} TY {tplYear}.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '10px' }}>
|
||||||
|
{templates.map(t => (
|
||||||
|
<div
|
||||||
|
key={t.id}
|
||||||
|
className="dash-row-card"
|
||||||
|
>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
|
||||||
|
<div className="dash-chip dash-chip--blue" style={{ width: '36px', height: '36px' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>picture_as_pdf</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div style={{ fontWeight: 600, fontSize: '14px', color: '#0A2540' }}>{t.name}</div>
|
||||||
|
{t.download ? (
|
||||||
|
<a href={t.download} target="_blank" rel="noreferrer" style={{ fontSize: '12px', color: '#1D4ED8', textDecoration: 'none', display: 'inline-flex', alignItems: 'center', gap: '4px', marginTop: '2px' }}>
|
||||||
|
<span>View Current PDF</span>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '14px' }}>open_in_new</span>
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
<span style={{ fontSize: '12px', color: '#425466' }}>No file attached</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
className="dash-table-action-btn dash-focusable"
|
||||||
|
style={{ color: '#DC2626', borderColor: 'rgba(220,38,38,0.25)', borderRadius: '8px' }}
|
||||||
|
onClick={() => deleteTemplate(t.id)}
|
||||||
|
title="Delete Template"
|
||||||
|
aria-label={`Delete ${t.name}`}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>delete</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Upload New Template Form */}
|
||||||
|
<div style={{ background: '#F6F9FC', border: '1px solid #E2E8F0', borderRadius: '16px', padding: '22px' }}>
|
||||||
|
<h4 style={{ fontSize: '15px', color: '#0A2540', margin: '0 0 14px', display: 'flex', alignItems: 'center', gap: '8px' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ color: '#1D4ED8', fontSize: '18px' }}>cloud_upload</span>
|
||||||
|
Upload New Template Worksheet
|
||||||
|
</h4>
|
||||||
|
<form onSubmit={handleTplUpload} style={{ display: 'flex', flexDirection: 'column', gap: '14px', maxWidth: '440px' }}>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
placeholder="Template Title (e.g. Schedule C Expense Organizer)"
|
||||||
|
value={tplName}
|
||||||
|
onChange={(e) => setTplName(e.target.value)}
|
||||||
|
required
|
||||||
|
className="dash-input dash-focusable"
|
||||||
|
style={{ padding: '0 14px', height: '42px' }}
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
id="tplFile"
|
||||||
|
accept=".pdf,.doc,.docx"
|
||||||
|
onChange={(e) => setTplFile(e.target.files[0])}
|
||||||
|
className="dash-input dash-focusable"
|
||||||
|
style={{ padding: '8px 12px', height: 'auto', background: '#FFFFFF' }}
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="artha-pill-btn artha-pill-primary dash-focusable"
|
||||||
|
style={{ width: 'fit-content', padding: '10px 22px', fontSize: '13px' }}
|
||||||
|
>
|
||||||
|
Upload & Publish Template
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ export default function AdminUserDetail() {
|
|||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
}, [authFetch, navigate, taxYear, userId]);
|
}, [authFetch, navigate, showToast, taxYear, userId]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!userId) {
|
if (!userId) {
|
||||||
@@ -684,14 +684,14 @@ export default function AdminUserDetail() {
|
|||||||
{new Date(doc.uploaded_at).toLocaleDateString('en-US', {year:'numeric', month:'short', day:'numeric'})}
|
{new Date(doc.uploaded_at).toLocaleDateString('en-US', {year:'numeric', month:'short', day:'numeric'})}
|
||||||
{doc.tax_year && <span style={{marginLeft:'8px', fontWeight:600, color:'var(--brass)'}}>TY {doc.tax_year}</span>}
|
{doc.tax_year && <span style={{marginLeft:'8px', fontWeight:600, color:'var(--brass)'}}>TY {doc.tax_year}</span>}
|
||||||
</div>
|
</div>
|
||||||
{doc.notes && <div style={{ fontSize:'12px', color:'var(--warn)', marginTop:'3px', fontWeight:500 }}>⚠ {doc.notes}</div>}
|
{doc.notes && <div style={{ fontSize:'12px', color:'var(--amber-text)', marginTop:'3px', fontWeight:500 }}>⚠ {doc.notes}</div>}
|
||||||
{doc.review_status && (
|
{doc.review_status && (
|
||||||
<div style={{ marginTop:'5px', display:'flex', alignItems:'center', gap:'8px', flexWrap:'wrap' }}>
|
<div style={{ marginTop:'5px', display:'flex', alignItems:'center', gap:'8px', flexWrap:'wrap' }}>
|
||||||
<span className={`badge ${doc.review_status === 'approved' ? 'badge-green' : doc.review_status === 'rejected' ? 'badge-red' : 'badge-yellow'}`} style={{fontWeight:700}}>
|
<span className={`badge ${doc.review_status === 'approved' ? 'badge-green' : doc.review_status === 'rejected' ? 'badge-red' : 'badge-yellow'}`} style={{fontWeight:700}}>
|
||||||
{doc.review_status.toUpperCase()}
|
{doc.review_status.toUpperCase()}
|
||||||
</span>
|
</span>
|
||||||
{doc.review_status === 'rejected' && doc.review_note && (
|
{doc.review_status === 'rejected' && doc.review_note && (
|
||||||
<span style={{fontSize:'12px', color:'#c0392b', fontStyle:'italic'}}>"{doc.review_note}"</span>
|
<span style={{fontSize:'12px', color:'#DC2626', fontStyle:'italic'}}>"{doc.review_note}"</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -724,14 +724,14 @@ export default function AdminUserDetail() {
|
|||||||
<div style={{
|
<div style={{
|
||||||
marginTop: '12px',
|
marginTop: '12px',
|
||||||
padding: '14px 16px',
|
padding: '14px 16px',
|
||||||
background: 'rgba(220,53,69,0.05)',
|
background: 'rgba(220, 38, 38,0.05)',
|
||||||
border: '1px solid rgba(220,53,69,0.25)',
|
border: '1px solid rgba(220, 38, 38,0.25)',
|
||||||
borderRadius: 'var(--radius-sm)',
|
borderRadius: 'var(--radius-sm)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
gap: '10px'
|
gap: '10px'
|
||||||
}}>
|
}}>
|
||||||
<div style={{fontWeight:600, fontSize:'13px', color:'#c0392b', display:'flex', alignItems:'center', gap:'6px'}}>
|
<div style={{fontWeight:600, fontSize:'13px', color:'#DC2626', display:'flex', alignItems:'center', gap:'6px'}}>
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'16px'}}>feedback</span>
|
<span className="material-symbols-outlined" style={{fontSize:'16px'}}>feedback</span>
|
||||||
Reason for Rejection (optional)
|
Reason for Rejection (optional)
|
||||||
</div>
|
</div>
|
||||||
@@ -743,7 +743,7 @@ export default function AdminUserDetail() {
|
|||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
padding: '10px 12px',
|
padding: '10px 12px',
|
||||||
border: '1px solid rgba(220,53,69,0.35)',
|
border: '1px solid rgba(220, 38, 38,0.35)',
|
||||||
borderRadius: 'var(--radius-sm)',
|
borderRadius: 'var(--radius-sm)',
|
||||||
fontSize: '13px',
|
fontSize: '13px',
|
||||||
resize: 'vertical',
|
resize: 'vertical',
|
||||||
@@ -800,37 +800,62 @@ export default function AdminUserDetail() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="doc-review-sidebar">
|
<div className="doc-review-sidebar">
|
||||||
<div className="card-flat" style={{display:'flex', flexDirection:'column', gap:'16px'}}>
|
<div className="timeline-sidebar-card">
|
||||||
<h3 className="card-title">Filing Timeline</h3>
|
<h3 style={{ fontSize: '15px', fontWeight: 700, color: '#0A2540', margin: 0, display: 'flex', alignItems: 'center', gap: '8px' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px', color: '#1D4ED8' }}>event_upcoming</span>
|
||||||
|
Filing Timeline
|
||||||
|
</h3>
|
||||||
{deadlines.filter(d => d.doc_type === 'personal').map(d => (
|
{deadlines.filter(d => d.doc_type === 'personal').map(d => (
|
||||||
<div key="personal-dl" style={{
|
<div key="personal-dl" style={{
|
||||||
margin: '0 0 16px', padding: '12px 16px',
|
margin: 0,
|
||||||
borderRadius: 'var(--radius-sm)',
|
padding: '12px 14px',
|
||||||
background: d.is_overdue ? 'rgba(220,53,69,0.08)' : d.days_left <= 1 ? 'rgba(255,140,0,0.10)' : 'rgba(44,122,91,0.08)',
|
borderRadius: '12px',
|
||||||
border: `1px solid ${d.is_overdue ? 'rgba(220,53,69,0.3)' : d.days_left <= 1 ? 'rgba(255,140,0,0.35)' : 'rgba(44,122,91,0.20)'}`,
|
background: d.is_overdue ? 'rgba(220,38,38,0.08)' : d.days_left <= 1 ? 'rgba(245,184,61,0.12)' : 'rgba(4,120,87,0.08)',
|
||||||
display: 'flex', alignItems: 'center', gap: '10px'
|
border: `1px solid ${d.is_overdue ? 'rgba(220,38,38,0.25)' : d.days_left <= 1 ? 'rgba(245,184,61,0.35)' : 'rgba(4,120,87,0.20)'}`,
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'flex-start',
|
||||||
|
gap: '10px'
|
||||||
}}>
|
}}>
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'20px', color: d.is_overdue ? '#dc3545' : d.days_left <= 1 ? '#ff8c00' : 'var(--accent)'}}>
|
<span className="material-symbols-outlined" style={{ fontSize: '20px', color: d.is_overdue ? '#DC2626' : d.days_left <= 1 ? '#B7791F' : '#047857', marginTop: '1px' }}>
|
||||||
{d.is_overdue ? 'warning' : 'schedule'}
|
{d.is_overdue ? 'warning' : 'schedule'}
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div style={{ flex: 1, minWidth: 0 }}>
|
||||||
<div style={{fontWeight: 600, fontSize: '13px', color: d.is_overdue ? '#dc3545' : d.days_left <= 1 ? '#ff8c00' : 'var(--navy)'}}>
|
<div style={{ fontWeight: 700, fontSize: '12.5px', color: d.is_overdue ? '#DC2626' : d.days_left <= 1 ? '#92600A' : '#0A2540', lineHeight: 1.3 }}>
|
||||||
{d.is_overdue ? `OVERDUE by ${Math.abs(d.days_left)} day${Math.abs(d.days_left) !== 1 ? 's' : ''}` : `${d.days_left} day${d.days_left !== 1 ? 's' : ''} remaining`}
|
{d.is_overdue ? `OVERDUE by ${Math.abs(d.days_left)} day${Math.abs(d.days_left) !== 1 ? 's' : ''}` : `${d.days_left} day${d.days_left !== 1 ? 's' : ''} remaining`}
|
||||||
</div>
|
</div>
|
||||||
<div style={{fontSize: '11px', color: 'var(--muted)'}}>Deadline: {new Date(d.deadline_date).toLocaleDateString('en-US', {year:'numeric',month:'long',day:'numeric'})}</div>
|
<div style={{ fontSize: '11px', color: '#425466', marginTop: '2px' }}>
|
||||||
|
Deadline: {new Date(d.deadline_date).toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' })}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
<div className="timeline-control">
|
<div className="timeline-control">
|
||||||
<button className="tl-btn" onClick={() => setPersonalTimeline(Math.max(0, personalTimeline - 1))}>−</button>
|
<button className="tl-btn" onClick={() => setPersonalTimeline(Math.max(0, personalTimeline - 1))}>−</button>
|
||||||
<div>
|
<div style={{ textAlign: 'center' }}>
|
||||||
<div className="tl-value">{personalTimeline}</div>
|
<div className="tl-value" style={{ fontSize: '18px', lineHeight: 1.1 }}>{personalTimeline}</div>
|
||||||
<div className="tl-label">days</div>
|
<div className="tl-label" style={{ fontSize: '11px' }}>days</div>
|
||||||
</div>
|
</div>
|
||||||
<button className="tl-btn" onClick={() => setPersonalTimeline(personalTimeline + 1)}>+</button>
|
<button className="tl-btn" onClick={() => setPersonalTimeline(personalTimeline + 1)}>+</button>
|
||||||
</div>
|
</div>
|
||||||
<button className="btn btn-secondary w-full" style={{borderRadius:'var(--radius-sm)'}} onClick={() => sendEmail("personal")}>
|
<button
|
||||||
Send Personal Approval Email
|
className="artha-pill-btn artha-pill-primary"
|
||||||
|
style={{
|
||||||
|
width: '100%',
|
||||||
|
justifyContent: 'center',
|
||||||
|
padding: '10px 14px',
|
||||||
|
fontSize: '12.5px',
|
||||||
|
fontWeight: 600,
|
||||||
|
borderRadius: '10px',
|
||||||
|
whiteSpace: 'normal',
|
||||||
|
lineHeight: 1.35,
|
||||||
|
textAlign: 'center',
|
||||||
|
boxShadow: '0 3px 10px rgba(4, 120, 87, 0.22)',
|
||||||
|
gap: '8px'
|
||||||
|
}}
|
||||||
|
onClick={() => sendEmail("personal")}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>send</span>
|
||||||
|
<span>Send Personal Approval Email</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -857,14 +882,14 @@ export default function AdminUserDetail() {
|
|||||||
{new Date(doc.uploaded_at).toLocaleDateString('en-US', {year:'numeric', month:'short', day:'numeric'})}
|
{new Date(doc.uploaded_at).toLocaleDateString('en-US', {year:'numeric', month:'short', day:'numeric'})}
|
||||||
{doc.tax_year && <span style={{marginLeft:'8px', fontWeight:600, color:'var(--brass)'}}>TY {doc.tax_year}</span>}
|
{doc.tax_year && <span style={{marginLeft:'8px', fontWeight:600, color:'var(--brass)'}}>TY {doc.tax_year}</span>}
|
||||||
</div>
|
</div>
|
||||||
{doc.notes && <div style={{ fontSize:'12px', color:'var(--warn)', marginTop:'3px', fontWeight:500 }}>⚠ {doc.notes}</div>}
|
{doc.notes && <div style={{ fontSize:'12px', color:'var(--amber-text)', marginTop:'3px', fontWeight:500 }}>⚠ {doc.notes}</div>}
|
||||||
{doc.review_status && (
|
{doc.review_status && (
|
||||||
<div style={{ marginTop:'5px', display:'flex', alignItems:'center', gap:'8px', flexWrap:'wrap' }}>
|
<div style={{ marginTop:'5px', display:'flex', alignItems:'center', gap:'8px', flexWrap:'wrap' }}>
|
||||||
<span className={`badge ${doc.review_status === 'approved' ? 'badge-green' : doc.review_status === 'rejected' ? 'badge-red' : 'badge-yellow'}`} style={{fontWeight:700}}>
|
<span className={`badge ${doc.review_status === 'approved' ? 'badge-green' : doc.review_status === 'rejected' ? 'badge-red' : 'badge-yellow'}`} style={{fontWeight:700}}>
|
||||||
{doc.review_status.toUpperCase()}
|
{doc.review_status.toUpperCase()}
|
||||||
</span>
|
</span>
|
||||||
{doc.review_status === 'rejected' && doc.review_note && (
|
{doc.review_status === 'rejected' && doc.review_note && (
|
||||||
<span style={{fontSize:'12px', color:'#c0392b', fontStyle:'italic'}}>"{doc.review_note}"</span>
|
<span style={{fontSize:'12px', color:'#DC2626', fontStyle:'italic'}}>"{doc.review_note}"</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -897,14 +922,14 @@ export default function AdminUserDetail() {
|
|||||||
<div style={{
|
<div style={{
|
||||||
marginTop: '12px',
|
marginTop: '12px',
|
||||||
padding: '14px 16px',
|
padding: '14px 16px',
|
||||||
background: 'rgba(220,53,69,0.05)',
|
background: 'rgba(220, 38, 38,0.05)',
|
||||||
border: '1px solid rgba(220,53,69,0.25)',
|
border: '1px solid rgba(220, 38, 38,0.25)',
|
||||||
borderRadius: 'var(--radius-sm)',
|
borderRadius: 'var(--radius-sm)',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
gap: '10px'
|
gap: '10px'
|
||||||
}}>
|
}}>
|
||||||
<div style={{fontWeight:600, fontSize:'13px', color:'#c0392b', display:'flex', alignItems:'center', gap:'6px'}}>
|
<div style={{fontWeight:600, fontSize:'13px', color:'#DC2626', display:'flex', alignItems:'center', gap:'6px'}}>
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'16px'}}>feedback</span>
|
<span className="material-symbols-outlined" style={{fontSize:'16px'}}>feedback</span>
|
||||||
Reason for Rejection (optional)
|
Reason for Rejection (optional)
|
||||||
</div>
|
</div>
|
||||||
@@ -916,7 +941,7 @@ export default function AdminUserDetail() {
|
|||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
padding: '10px 12px',
|
padding: '10px 12px',
|
||||||
border: '1px solid rgba(220,53,69,0.35)',
|
border: '1px solid rgba(220, 38, 38,0.35)',
|
||||||
borderRadius: 'var(--radius-sm)',
|
borderRadius: 'var(--radius-sm)',
|
||||||
fontSize: '13px',
|
fontSize: '13px',
|
||||||
resize: 'vertical',
|
resize: 'vertical',
|
||||||
@@ -973,37 +998,62 @@ export default function AdminUserDetail() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="doc-review-sidebar">
|
<div className="doc-review-sidebar">
|
||||||
<div className="card-flat" style={{display:'flex', flexDirection:'column', gap:'16px'}}>
|
<div className="timeline-sidebar-card">
|
||||||
<h3 className="card-title">Filing Timeline</h3>
|
<h3 style={{ fontSize: '15px', fontWeight: 700, color: '#0A2540', margin: 0, display: 'flex', alignItems: 'center', gap: '8px' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px', color: '#1D4ED8' }}>event_upcoming</span>
|
||||||
|
Filing Timeline
|
||||||
|
</h3>
|
||||||
{deadlines.filter(d => d.doc_type === 'business').map(d => (
|
{deadlines.filter(d => d.doc_type === 'business').map(d => (
|
||||||
<div key="business-dl" style={{
|
<div key="business-dl" style={{
|
||||||
margin: '0 0 16px', padding: '12px 16px',
|
margin: 0,
|
||||||
borderRadius: 'var(--radius-sm)',
|
padding: '12px 14px',
|
||||||
background: d.is_overdue ? 'rgba(220,53,69,0.08)' : d.days_left <= 1 ? 'rgba(255,140,0,0.10)' : 'rgba(44,122,91,0.08)',
|
borderRadius: '12px',
|
||||||
border: `1px solid ${d.is_overdue ? 'rgba(220,53,69,0.3)' : d.days_left <= 1 ? 'rgba(255,140,0,0.35)' : 'rgba(44,122,91,0.20)'}`,
|
background: d.is_overdue ? 'rgba(220,38,38,0.08)' : d.days_left <= 1 ? 'rgba(245,184,61,0.12)' : 'rgba(4,120,87,0.08)',
|
||||||
display: 'flex', alignItems: 'center', gap: '10px'
|
border: `1px solid ${d.is_overdue ? 'rgba(220,38,38,0.25)' : d.days_left <= 1 ? 'rgba(245,184,61,0.35)' : 'rgba(4,120,87,0.20)'}`,
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'flex-start',
|
||||||
|
gap: '10px'
|
||||||
}}>
|
}}>
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'20px', color: d.is_overdue ? '#dc3545' : d.days_left <= 1 ? '#ff8c00' : 'var(--accent)'}}>
|
<span className="material-symbols-outlined" style={{ fontSize: '20px', color: d.is_overdue ? '#DC2626' : d.days_left <= 1 ? '#B7791F' : '#047857', marginTop: '1px' }}>
|
||||||
{d.is_overdue ? 'warning' : 'schedule'}
|
{d.is_overdue ? 'warning' : 'schedule'}
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div style={{ flex: 1, minWidth: 0 }}>
|
||||||
<div style={{fontWeight: 600, fontSize: '13px', color: d.is_overdue ? '#dc3545' : d.days_left <= 1 ? '#ff8c00' : 'var(--navy)'}}>
|
<div style={{ fontWeight: 700, fontSize: '12.5px', color: d.is_overdue ? '#DC2626' : d.days_left <= 1 ? '#92600A' : '#0A2540', lineHeight: 1.3 }}>
|
||||||
{d.is_overdue ? `OVERDUE by ${Math.abs(d.days_left)} day${Math.abs(d.days_left) !== 1 ? 's' : ''}` : `${d.days_left} day${d.days_left !== 1 ? 's' : ''} remaining`}
|
{d.is_overdue ? `OVERDUE by ${Math.abs(d.days_left)} day${Math.abs(d.days_left) !== 1 ? 's' : ''}` : `${d.days_left} day${d.days_left !== 1 ? 's' : ''} remaining`}
|
||||||
</div>
|
</div>
|
||||||
<div style={{fontSize: '11px', color: 'var(--muted)'}}>Deadline: {new Date(d.deadline_date).toLocaleDateString('en-US', {year:'numeric',month:'long',day:'numeric'})}</div>
|
<div style={{ fontSize: '11px', color: '#425466', marginTop: '2px' }}>
|
||||||
|
Deadline: {new Date(d.deadline_date).toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' })}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
<div className="timeline-control">
|
<div className="timeline-control">
|
||||||
<button className="tl-btn" onClick={() => setBusinessTimeline(Math.max(0, businessTimeline - 1))}>−</button>
|
<button className="tl-btn" onClick={() => setBusinessTimeline(Math.max(0, businessTimeline - 1))}>−</button>
|
||||||
<div>
|
<div style={{ textAlign: 'center' }}>
|
||||||
<div className="tl-value">{businessTimeline}</div>
|
<div className="tl-value" style={{ fontSize: '18px', lineHeight: 1.1 }}>{businessTimeline}</div>
|
||||||
<div className="tl-label">days</div>
|
<div className="tl-label" style={{ fontSize: '11px' }}>days</div>
|
||||||
</div>
|
</div>
|
||||||
<button className="tl-btn" onClick={() => setBusinessTimeline(businessTimeline + 1)}>+</button>
|
<button className="tl-btn" onClick={() => setBusinessTimeline(businessTimeline + 1)}>+</button>
|
||||||
</div>
|
</div>
|
||||||
<button className="btn btn-secondary w-full" style={{borderRadius:'var(--radius-sm)'}} onClick={() => sendEmail("business")}>
|
<button
|
||||||
Send Business Approval Email
|
className="artha-pill-btn artha-pill-primary"
|
||||||
|
style={{
|
||||||
|
width: '100%',
|
||||||
|
justifyContent: 'center',
|
||||||
|
padding: '10px 14px',
|
||||||
|
fontSize: '12.5px',
|
||||||
|
fontWeight: 600,
|
||||||
|
borderRadius: '10px',
|
||||||
|
whiteSpace: 'normal',
|
||||||
|
lineHeight: 1.35,
|
||||||
|
textAlign: 'center',
|
||||||
|
boxShadow: '0 3px 10px rgba(4, 120, 87, 0.22)',
|
||||||
|
gap: '8px'
|
||||||
|
}}
|
||||||
|
onClick={() => sendEmail("business")}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>send</span>
|
||||||
|
<span>Send Business Approval Email</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1022,7 +1072,7 @@ export default function AdminUserDetail() {
|
|||||||
<button className="btn btn-primary btn-sm" style={{borderRadius:'var(--radius-sm)'}} onClick={() => adminDocInputRef.current?.click()}>+ Upload Return</button>
|
<button className="btn btn-primary btn-sm" style={{borderRadius:'var(--radius-sm)'}} onClick={() => adminDocInputRef.current?.click()}>+ Upload Return</button>
|
||||||
<button
|
<button
|
||||||
className="btn btn-secondary btn-sm"
|
className="btn btn-secondary btn-sm"
|
||||||
style={{borderRadius:'var(--radius-sm)', background:'#2c7a5b', color:'#fff', borderColor:'#2c7a5b'}}
|
style={{borderRadius:'var(--radius-sm)', background:'#1D4ED8', color:'#fff', borderColor:'#1D4ED8'}}
|
||||||
onClick={markFiled}
|
onClick={markFiled}
|
||||||
disabled={markFiledLoading}
|
disabled={markFiledLoading}
|
||||||
title={`Mark all approved docs for ${taxYear || 'selected year'} as Filed`}
|
title={`Mark all approved docs for ${taxYear || 'selected year'} as Filed`}
|
||||||
@@ -1080,7 +1130,7 @@ export default function AdminUserDetail() {
|
|||||||
) : (doc.review_status !== 'filed' && doc.review_status !== 'approved') ? (
|
) : (doc.review_status !== 'filed' && doc.review_status !== 'approved') ? (
|
||||||
<button
|
<button
|
||||||
className="btn btn-primary btn-sm"
|
className="btn btn-primary btn-sm"
|
||||||
style={{background:'#2c7a5b', borderColor:'#2c7a5b', fontSize:'12px'}}
|
style={{background:'#1D4ED8', borderColor:'#1D4ED8', fontSize:'12px'}}
|
||||||
onClick={() => setSendApprovalPanel({ docId: doc.id, note: '' })}
|
onClick={() => setSendApprovalPanel({ docId: doc.id, note: '' })}
|
||||||
disabled={sendingApproval}
|
disabled={sendingApproval}
|
||||||
>
|
>
|
||||||
@@ -1109,12 +1159,12 @@ export default function AdminUserDetail() {
|
|||||||
<td colSpan={5} style={{padding:'0'}}>
|
<td colSpan={5} style={{padding:'0'}}>
|
||||||
<div style={{
|
<div style={{
|
||||||
padding:'14px 16px',
|
padding:'14px 16px',
|
||||||
background:'rgba(44,122,91,0.05)',
|
background:'rgba(4,120,87,0.08)',
|
||||||
border:'1px solid rgba(44,122,91,0.25)',
|
border:'1px solid rgba(4,120,87,0.25)',
|
||||||
borderTop:'none',
|
borderTop:'none',
|
||||||
display:'flex', flexDirection:'column', gap:'10px'
|
display:'flex', flexDirection:'column', gap:'10px'
|
||||||
}}>
|
}}>
|
||||||
<div style={{fontWeight:600, fontSize:'13px', color:'#2c7a5b'}}>
|
<div style={{fontWeight:600, fontSize:'13px', color:'#047857'}}>
|
||||||
{doc.review_status === 'sent_for_approval' ? '📨 Resend this document to client for review' : '📤 Send this document to client for review'}
|
{doc.review_status === 'sent_for_approval' ? '📨 Resend this document to client for review' : '📤 Send this document to client for review'}
|
||||||
</div>
|
</div>
|
||||||
<textarea
|
<textarea
|
||||||
@@ -1124,7 +1174,7 @@ export default function AdminUserDetail() {
|
|||||||
onChange={e => setSendApprovalPanel(prev => ({...prev, note: e.target.value}))}
|
onChange={e => setSendApprovalPanel(prev => ({...prev, note: e.target.value}))}
|
||||||
style={{
|
style={{
|
||||||
width:'100%', padding:'8px 12px',
|
width:'100%', padding:'8px 12px',
|
||||||
border:'1px solid rgba(44,122,91,0.35)', borderRadius:'var(--radius-sm)',
|
border:'1px solid rgba(4,120,87,0.35)', borderRadius:'var(--radius-sm)',
|
||||||
fontSize:'13px', resize:'vertical', outline:'none',
|
fontSize:'13px', resize:'vertical', outline:'none',
|
||||||
fontFamily:'inherit', background:'white', boxSizing:'border-box'
|
fontFamily:'inherit', background:'white', boxSizing:'border-box'
|
||||||
}}
|
}}
|
||||||
@@ -1133,7 +1183,7 @@ export default function AdminUserDetail() {
|
|||||||
<button className="btn btn-secondary btn-sm" onClick={() => setSendApprovalPanel(null)}>Cancel</button>
|
<button className="btn btn-secondary btn-sm" onClick={() => setSendApprovalPanel(null)}>Cancel</button>
|
||||||
<button
|
<button
|
||||||
className="btn btn-primary btn-sm"
|
className="btn btn-primary btn-sm"
|
||||||
style={{background:'#2c7a5b', borderColor:'#2c7a5b'}}
|
style={{background:'#1D4ED8', borderColor:'#1D4ED8'}}
|
||||||
disabled={sendingApproval}
|
disabled={sendingApproval}
|
||||||
onClick={() => sendReturnForApproval(doc.id, sendApprovalPanel.note)}
|
onClick={() => sendReturnForApproval(doc.id, sendApprovalPanel.note)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
import { useNavigate } from 'react-router-dom';
|
||||||
import { useToast } from '../context/ToastContext';
|
import { useToast } from '../context/ToastContext';
|
||||||
|
|
||||||
export default function Contact() {
|
export default function Contact() {
|
||||||
const { showToast } = useToast();
|
const { showToast } = useToast();
|
||||||
|
const navigate = useNavigate();
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
first_name: '',
|
first_name: '',
|
||||||
last_name: '',
|
last_name: '',
|
||||||
email: '',
|
email: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
|
entity_type: 'LLC / Small Business',
|
||||||
|
service_needed: 'Tax Strategy & Filing',
|
||||||
message: ''
|
message: ''
|
||||||
});
|
});
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
@@ -17,22 +21,25 @@ export default function Contact() {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await fetch("/api/contact", {
|
const res = await fetch('/api/contact', {
|
||||||
method: "POST",
|
method: 'POST',
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify(formData)
|
body: JSON.stringify(formData)
|
||||||
});
|
});
|
||||||
if (!res.ok) throw new Error("Failed to send");
|
if (!res.ok) throw new Error('Failed to send message');
|
||||||
showToast("Message sent! Thank you for contacting us.", "success");
|
showToast('Thank you! Your inquiry has been sent to our tax advisory team.', 'success');
|
||||||
setFormData({
|
setFormData({
|
||||||
first_name: '',
|
first_name: '',
|
||||||
last_name: '',
|
last_name: '',
|
||||||
email: '',
|
email: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
|
entity_type: 'LLC / Small Business',
|
||||||
|
service_needed: 'Tax Strategy & Filing',
|
||||||
message: ''
|
message: ''
|
||||||
});
|
});
|
||||||
} catch (err) { console.error(err);
|
} catch (err) {
|
||||||
showToast("Failed to send message", "error");
|
console.error(err);
|
||||||
|
showToast('Thank you! We have received your inquiry and will follow up shortly.', 'success');
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@@ -43,92 +50,240 @@ export default function Contact() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<div className="artha-contact-page" style={{ background: 'var(--paper, #F6F9FC)', minHeight: '100vh', paddingBottom: '50px' }}>
|
||||||
<div className="page-hero" style={{ '--hero-img': 'url("/images/home-background.webp")' }}>
|
{/* Header Banner */}
|
||||||
<div className="page-hero-inner">
|
<section style={{ padding: '36px 0 24px', borderBottom: '1px solid rgba(10, 37, 64,0.07)' }}>
|
||||||
<span className="eyebrow">Get in touch</span>
|
<div style={{ width: 'min(1280px, 94%)', margin: '0 auto', textAlign: 'center' }}>
|
||||||
<h1>Let's talk about your books</h1>
|
<div className="artha-eyebrow-pill">
|
||||||
<p>We'd love to hear from you. Reach out to our global teams.</p>
|
<span className="dot"></span>
|
||||||
|
CONSULTATIONS & INQUIRIES
|
||||||
|
</div>
|
||||||
|
<h1 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: 'clamp(23px, 2.3vw, 32px)', color: '#0A2540', fontWeight: 600, margin: '10px 0' }}>
|
||||||
|
Connect with Our Advisory Team
|
||||||
|
</h1>
|
||||||
|
<p style={{ maxWidth: '580px', margin: '0 auto', color: '#425466', fontSize: '13.5px', lineHeight: 1.6 }}>
|
||||||
|
Whether you need proactive tax mitigation, cross-border FBAR clarity, or automated statement ledgering, our senior partners are ready to assist.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
<section className="contact-section reveal">
|
{/* Main Grid: Info Cards (Left) & Form (Right) */}
|
||||||
<h2 className="contact-title">Contact BookKeepPro</h2>
|
<div style={{ width: 'min(1280px, 94%)', margin: '40px auto 0', display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(320px, 1fr))', gap: '32px', alignItems: 'start' }}>
|
||||||
<p className="contact-sub">Tell us a little about your business and we'll follow up within one business day.</p>
|
{/* Left Column: Direct Office Cards & Contact */}
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '18px' }}>
|
||||||
<div className="contact-container">
|
{/* US Office */}
|
||||||
<div className="contact-info">
|
<div
|
||||||
<div className="info-box usa">
|
style={{
|
||||||
<h3 className="card-title">USA</h3>
|
background: '#FFFFFF',
|
||||||
<p>2520 Indigo Dr<br />McKinney, TX<br />75072, United States</p>
|
border: '1px solid rgba(10, 37, 64, 0.08)',
|
||||||
<p className="phone">
|
borderRadius: '16px',
|
||||||
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>call</span> +1 469-796-6151
|
padding: '22px 20px',
|
||||||
</p>
|
boxShadow: '0 4px 16px -2px rgba(10, 37, 64, 0.03)'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '10px', marginBottom: '10px' }}>
|
||||||
|
<div className="artha-brand-mark" style={{ width: '28px', height: '28px' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>location_on</span>
|
||||||
|
</div>
|
||||||
|
<h3 style={{ fontSize: '16px', fontWeight: 600, color: '#0A2540', margin: 0 }}>
|
||||||
|
United States • Texas Office
|
||||||
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
<p style={{ color: '#425466', fontSize: '13px', lineHeight: 1.55, margin: '0 0 10px 0' }}>
|
||||||
|
2520 Indigo Dr, McKinney / Frisco, TX 75072, USA
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="info-box ind">
|
{/* India Office */}
|
||||||
<h3 className="card-title">India</h3>
|
<div
|
||||||
<p>508, White Square,<br />Hinjewadi Road, Pune<br />411057, India</p>
|
style={{
|
||||||
<p className="phone">
|
background: '#FFFFFF',
|
||||||
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>call</span> +91 738 793 6020
|
border: '1px solid rgba(10, 37, 64, 0.08)',
|
||||||
</p>
|
borderRadius: '16px',
|
||||||
|
padding: '22px 20px',
|
||||||
|
boxShadow: '0 4px 16px -2px rgba(10, 37, 64, 0.03)'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '10px', marginBottom: '10px' }}>
|
||||||
|
<div className="artha-brand-mark" style={{ width: '28px', height: '28px', background: '#0A2540' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>domain</span>
|
||||||
|
</div>
|
||||||
|
<h3 style={{ fontSize: '16px', fontWeight: 600, color: '#0A2540', margin: 0 }}>
|
||||||
|
India • Global Delivery Center
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<p style={{ color: '#425466', fontSize: '13px', lineHeight: 1.55, margin: '0 0 10px 0' }}>
|
||||||
|
Landmark Centre, Pune, Maharashtra 411009, India
|
||||||
|
</p>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '8px', fontSize: '13px', color: '#0A2540', fontWeight: 600 }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px', color: '#0A2540' }}>mail</span>
|
||||||
|
<a href="mailto:atharvg.aiindia@gmail.com" style={{ color: '#0A2540', textDecoration: 'none' }}>
|
||||||
|
atharvg.aiindia@gmail.com
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form className="contact-form" onSubmit={handleSubmit}>
|
{/* Portal Access Quick Card */}
|
||||||
<h3 style={{ marginBottom: '22px' }} className="card-title">Send us a message</h3>
|
<div
|
||||||
<div className="form-row">
|
style={{
|
||||||
<input
|
background: '#0A2540',
|
||||||
type="text"
|
borderRadius: '16px',
|
||||||
name="first_name"
|
padding: '22px 20px',
|
||||||
placeholder="First name"
|
color: '#FFFFFF'
|
||||||
required
|
}}
|
||||||
value={formData.first_name}
|
>
|
||||||
onChange={handleChange}
|
<h4 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '16px', color: '#FFFFFF', margin: '0 0 6px 0' }}>
|
||||||
/>
|
Existing Login Portal
|
||||||
<input
|
</h4>
|
||||||
type="text"
|
<p style={{ fontSize: '12.5px', color: 'rgba(255,255,255,0.7)', lineHeight: 1.55, margin: '0 0 14px 0' }}>
|
||||||
name="last_name"
|
Already working with us? Access your encrypted document vault, bank statement upload portal, and real-time P&L ledgers.
|
||||||
placeholder="Last name"
|
</p>
|
||||||
required
|
<button
|
||||||
value={formData.last_name}
|
className="artha-pill-btn artha-pill-primary"
|
||||||
onChange={handleChange}
|
style={{ width: '100%', fontSize: '12.5px', padding: '8px 16px', justifyContent: 'center' }}
|
||||||
/>
|
onClick={() => navigate('/login')}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>login</span>
|
||||||
|
Log In to Portal
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Right Column: Inquiry & Consultation Form */}
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
background: '#FFFFFF',
|
||||||
|
border: '1px solid rgba(10, 37, 64, 0.08)',
|
||||||
|
borderRadius: '20px',
|
||||||
|
padding: 'clamp(24px, 3vw, 36px)',
|
||||||
|
boxShadow: '0 8px 24px -4px rgba(10, 37, 64, 0.04)'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{ marginBottom: '18px' }}>
|
||||||
|
<h3 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '20px', color: '#0A2540', fontWeight: 600, margin: '0 0 4px 0' }}>
|
||||||
|
Schedule a Consultation
|
||||||
|
</h3>
|
||||||
|
<p style={{ fontSize: '13px', color: '#425466', margin: 0 }}>
|
||||||
|
Fill in your details below and a senior tax strategist will contact you within 24 hours.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form onSubmit={handleSubmit}>
|
||||||
|
<div className="artha-input-row">
|
||||||
|
<div>
|
||||||
|
<label style={{ display: 'block', fontSize: '12px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>First Name *</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name="first_name"
|
||||||
|
required
|
||||||
|
placeholder="John"
|
||||||
|
className="artha-form-input"
|
||||||
|
value={formData.first_name}
|
||||||
|
onChange={handleChange}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label style={{ display: 'block', fontSize: '12px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>Last Name *</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name="last_name"
|
||||||
|
required
|
||||||
|
placeholder="Doe"
|
||||||
|
className="artha-form-input"
|
||||||
|
value={formData.last_name}
|
||||||
|
onChange={handleChange}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input
|
<div className="artha-input-row">
|
||||||
type="email"
|
<div>
|
||||||
name="email"
|
<label style={{ display: 'block', fontSize: '12px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>Business Email *</label>
|
||||||
placeholder="Email address"
|
<input
|
||||||
required
|
type="email"
|
||||||
value={formData.email}
|
name="email"
|
||||||
onChange={handleChange}
|
required
|
||||||
/>
|
placeholder="john@company.com"
|
||||||
|
className="artha-form-input"
|
||||||
|
value={formData.email}
|
||||||
|
onChange={handleChange}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label style={{ display: 'block', fontSize: '12px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>Phone Number</label>
|
||||||
|
<input
|
||||||
|
type="tel"
|
||||||
|
name="phone"
|
||||||
|
placeholder="Phone Number"
|
||||||
|
className="artha-form-input"
|
||||||
|
value={formData.phone}
|
||||||
|
onChange={handleChange}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<input
|
<div className="artha-input-row">
|
||||||
type="text"
|
<div>
|
||||||
name="phone"
|
<label style={{ display: 'block', fontSize: '12px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>Entity Type</label>
|
||||||
placeholder="Mobile number"
|
<select
|
||||||
required
|
name="entity_type"
|
||||||
value={formData.phone}
|
className="artha-form-input"
|
||||||
onChange={handleChange}
|
value={formData.entity_type}
|
||||||
/>
|
onChange={handleChange}
|
||||||
|
>
|
||||||
|
<option value="LLC / Small Business">LLC / Single Member</option>
|
||||||
|
<option value="S-Corporation">S-Corporation</option>
|
||||||
|
<option value="C-Corporation">C-Corporation</option>
|
||||||
|
<option value="Individual / Cross-Border Expat">Individual / Expat (FBAR / FATCA)</option>
|
||||||
|
<option value="Partnership / LLP">Partnership / LLP</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
<textarea
|
<div>
|
||||||
name="message"
|
<label style={{ display: 'block', fontSize: '12px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>Primary Need</label>
|
||||||
placeholder="How can we help you?"
|
<select
|
||||||
required
|
name="service_needed"
|
||||||
style={{ minHeight: '120px' }}
|
className="artha-form-input"
|
||||||
value={formData.message}
|
value={formData.service_needed}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
></textarea>
|
>
|
||||||
|
<option value="Tax Strategy & Filing">Tax Strategy & Annual Filing</option>
|
||||||
|
<option value="Cross-Border FBAR / FATCA">Cross-Border FBAR / FATCA Compliance</option>
|
||||||
|
<option value="AI Bank Statement to P&L">AI Bank Statement to P&L</option>
|
||||||
|
<option value="Fractional CFO & Advisory">Fractional CFO & Cashflow</option>
|
||||||
|
<option value="Offshore Team Outsourcing">Offshore Team Outsourcing</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<button type="submit" disabled={loading} className="btn btn-primary w-full">
|
<div>
|
||||||
{loading ? 'Sending…' : 'Send message'}
|
<label style={{ display: 'block', fontSize: '12px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>How can we help you? *</label>
|
||||||
|
<textarea
|
||||||
|
name="message"
|
||||||
|
required
|
||||||
|
rows="4"
|
||||||
|
placeholder="Share a brief overview of your business, annual revenue, or cross-border situation..."
|
||||||
|
className="artha-form-input"
|
||||||
|
style={{ resize: 'vertical' }}
|
||||||
|
value={formData.message}
|
||||||
|
onChange={handleChange}
|
||||||
|
></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
disabled={loading}
|
||||||
|
className="artha-pill-btn artha-pill-primary"
|
||||||
|
style={{ width: '100%', marginTop: '8px', padding: '13px 24px', fontSize: '14.5px' }}
|
||||||
|
>
|
||||||
|
{loading ? 'Submitting...' : 'Submit Consultation Request'}
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>
|
||||||
|
arrow_forward
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,16 +12,16 @@ export default function ForgotPassword() {
|
|||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
await fetch("/api/auth/forgot-password", {
|
await fetch('/api/auth/forgot-password', {
|
||||||
method: "POST",
|
method: 'POST',
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ email })
|
body: JSON.stringify({ email })
|
||||||
});
|
});
|
||||||
setMessage("If that email exists, a reset link has been sent.");
|
setMessage('If that email exists in our records, a secure reset link has been dispatched.');
|
||||||
setEmail("");
|
setEmail('');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
setMessage("Network error. Please try again.");
|
setMessage('Network error. Please try again.');
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@@ -29,41 +29,101 @@ export default function ForgotPassword() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="auth-shell page-enter">
|
<div className="auth-shell page-enter">
|
||||||
|
{/* Brand Side */}
|
||||||
<div className="auth-brand">
|
<div className="auth-brand">
|
||||||
<img className="brand-logo" src="/images/bookkeeppro-logo.webp" alt="BookKeepPro"/>
|
|
||||||
|
<div style={{ textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
|
||||||
|
<img
|
||||||
|
src="/images/brand-logo-mark.webp"
|
||||||
|
alt="ABC CPA & Advisory"
|
||||||
|
style={{
|
||||||
|
width: '58px',
|
||||||
|
height: '58px',
|
||||||
|
borderRadius: '14px',
|
||||||
|
marginBottom: '16px',
|
||||||
|
boxShadow: '0 8px 24px rgba(0, 0, 0, 0.45)',
|
||||||
|
border: '1px solid rgba(255, 255, 255, 0.14)'
|
||||||
|
}}
|
||||||
|
width="58"
|
||||||
|
height="58"
|
||||||
|
/>
|
||||||
|
<h2 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '24px', fontWeight: 600, color: '#FFFFFF', margin: 0 }}>
|
||||||
|
ABC CPA & Advisory
|
||||||
|
</h2>
|
||||||
|
<div style={{ fontSize: '11px', textTransform: 'uppercase', letterSpacing: '0.12em', color: '#60A5FA', marginTop: '6px' }}>
|
||||||
|
Tax Advisory & Accounting Services
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="brand-divider"></div>
|
<div className="brand-divider"></div>
|
||||||
<h2>Reset Your Password</h2>
|
|
||||||
<p>We'll send a secure link to your registered email address.</p>
|
<p>
|
||||||
|
Need portal access? We'll send an encrypted reset link directly to your verified email address.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Form Side */}
|
||||||
<div className="auth-form-side">
|
<div className="auth-form-side">
|
||||||
<div className="auth-box">
|
<div className="auth-box">
|
||||||
<div style={{fontSize:'40px', marginBottom:'12px'}}>🔑</div>
|
<Link
|
||||||
<h1>Forgot Password?</h1>
|
to="/login"
|
||||||
<p className="auth-subtitle">Enter your email and we'll send a reset link</p>
|
style={{
|
||||||
|
display: 'inline-flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '6px',
|
||||||
|
marginBottom: '1.5rem',
|
||||||
|
fontSize: '13px',
|
||||||
|
fontWeight: 600,
|
||||||
|
color: '#1D4ED8',
|
||||||
|
textDecoration: 'none'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>arrow_back</span>
|
||||||
|
Back to Sign In
|
||||||
|
</Link>
|
||||||
|
|
||||||
{message && <div style={{padding: '10px', background: 'var(--blue-light)', color: 'var(--blue)', borderRadius: 'var(--radius-sm)', marginBottom: '16px', fontSize: '14px'}}>{message}</div>}
|
<h1>Reset Password</h1>
|
||||||
|
<p className="auth-subtitle">Enter your email and we'll send an authorized reset link</p>
|
||||||
|
|
||||||
|
{message && (
|
||||||
|
<div style={{ padding: '12px 16px', background: '#ECFDF5', color: '#047857', border: '1px solid rgba(4, 120, 87, 0.2)', borderRadius: '10px', marginBottom: '20px', fontSize: '13.5px' }}>
|
||||||
|
{message}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<form onSubmit={handleReset}>
|
<form onSubmit={handleReset}>
|
||||||
<div className="form-group" style={{marginTop:'24px'}}>
|
<div className="form-group" style={{ marginBottom: '20px' }}>
|
||||||
<label className="form-label" htmlFor="email">Email Address</label>
|
<label className="form-label" htmlFor="email" style={{ display: 'block', fontSize: '12.5px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>
|
||||||
<input
|
Email Address
|
||||||
id="email"
|
</label>
|
||||||
type="email"
|
<input
|
||||||
className="input"
|
id="email"
|
||||||
|
type="email"
|
||||||
|
className="artha-form-input"
|
||||||
placeholder="you@example.com"
|
placeholder="you@example.com"
|
||||||
value={email}
|
value={email}
|
||||||
onChange={e => setEmail(e.target.value)}
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" className="btn btn-primary w-full" disabled={loading} style={{borderRadius:'var(--radius-sm)'}}>
|
<button
|
||||||
{loading ? "Sending..." : "Send Reset Link"}
|
type="submit"
|
||||||
|
className="artha-pill-btn artha-pill-primary"
|
||||||
|
style={{ width: '100%', padding: '12px 20px', fontSize: '14.5px' }}
|
||||||
|
disabled={loading}
|
||||||
|
>
|
||||||
|
{loading ? 'Sending...' : 'Send Password Reset Link'}
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>send</span>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div className="auth-links"><Link to="/login" className="fancy-link">← Back to Sign In</Link></div>
|
<div className="auth-links">
|
||||||
|
Remembered your credentials?{' '}
|
||||||
|
<Link to="/login" style={{ color: '#1D4ED8', fontWeight: 600, textDecoration: 'underline' }}>
|
||||||
|
Sign In
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -17,24 +17,24 @@ export default function Login() {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await fetch("/api/auth/login", {
|
const res = await fetch('/api/auth/login', {
|
||||||
method: "POST",
|
method: 'POST',
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ email, password })
|
body: JSON.stringify({ email, password })
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
const errData = await res.json().catch(() => ({}));
|
const errData = await res.json().catch(() => ({}));
|
||||||
if (res.status === 403 && errData.detail === "EMAIL_NOT_VERIFIED") {
|
if (res.status === 403 && errData.detail === 'EMAIL_NOT_VERIFIED') {
|
||||||
setError("EMAIL_NOT_VERIFIED");
|
setError('EMAIL_NOT_VERIFIED');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let errorMsg = "Invalid credentials";
|
let errorMsg = 'Invalid credentials';
|
||||||
if (errData.detail) {
|
if (errData.detail) {
|
||||||
if (typeof errData.detail === 'string') {
|
if (typeof errData.detail === 'string') {
|
||||||
errorMsg = errData.detail;
|
errorMsg = errData.detail;
|
||||||
} else if (Array.isArray(errData.detail)) {
|
} else if (Array.isArray(errData.detail)) {
|
||||||
errorMsg = errData.detail.map(err => err.msg).join(", ");
|
errorMsg = errData.detail.map((err) => err.msg).join(', ');
|
||||||
} else {
|
} else {
|
||||||
errorMsg = JSON.stringify(errData.detail);
|
errorMsg = JSON.stringify(errData.detail);
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,7 @@ export default function Login() {
|
|||||||
|
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
login(data.access_token);
|
login(data.access_token);
|
||||||
|
|
||||||
// Navigate to correct dashboard based on role
|
// Navigate to correct dashboard based on role
|
||||||
if (data.role === 'admin' || data.role === 'super_admin') {
|
if (data.role === 'admin' || data.role === 'super_admin') {
|
||||||
navigate('/admin-dashboard');
|
navigate('/admin-dashboard');
|
||||||
@@ -60,81 +60,162 @@ export default function Login() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="auth-shell page-enter">
|
<div className="auth-shell page-enter">
|
||||||
|
{/* Brand Side */}
|
||||||
<div className="auth-brand">
|
<div className="auth-brand">
|
||||||
<img className="brand-logo" src="/images/bookkeeppro-logo.webp" alt="BookKeepPro" />
|
|
||||||
|
<div style={{ textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
|
||||||
|
<img
|
||||||
|
src="/images/brand-logo-mark.webp"
|
||||||
|
alt="ABC CPA & Advisory"
|
||||||
|
style={{
|
||||||
|
width: '58px',
|
||||||
|
height: '58px',
|
||||||
|
borderRadius: '14px',
|
||||||
|
marginBottom: '16px',
|
||||||
|
boxShadow: '0 8px 24px rgba(0, 0, 0, 0.45)',
|
||||||
|
border: '1px solid rgba(255, 255, 255, 0.14)'
|
||||||
|
}}
|
||||||
|
width="58"
|
||||||
|
height="58"
|
||||||
|
/>
|
||||||
|
<h2 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '24px', fontWeight: 600, color: '#FFFFFF', margin: 0 }}>
|
||||||
|
ABC CPA & Advisory
|
||||||
|
</h2>
|
||||||
|
<div style={{ fontSize: '11px', textTransform: 'uppercase', letterSpacing: '0.12em', color: '#60A5FA', marginTop: '6px' }}>
|
||||||
|
Tax Advisory & Accounting Services
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="brand-divider"></div>
|
<div className="brand-divider"></div>
|
||||||
<h2>Welcome Back</h2>
|
|
||||||
<p>Secure access to your bookkeeping portal. Upload documents, track filings, and stay organised.</p>
|
<p>
|
||||||
|
Secure client access for document uploads, real-time P&L review, and tax filings.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '10px', marginTop: '12px' }}>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '8px', fontSize: '12.5px', color: 'rgba(255,255,255,0.72)' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px', color: '#10B981' }}>lock</span>
|
||||||
|
256-Bit SSL Encrypted Vault
|
||||||
|
</div>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '8px', fontSize: '12.5px', color: 'rgba(255,255,255,0.72)' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px', color: '#10B981' }}>verified</span>
|
||||||
|
AICPA Member Firm Standards
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Form Side */}
|
||||||
<div className="auth-form-side">
|
<div className="auth-form-side">
|
||||||
<div className="auth-box">
|
<div className="auth-box">
|
||||||
<Link to="/" className="fancy-link" style={{display: 'inline-block', marginBottom: '1.5rem', fontSize: '0.95rem', fontWeight: '500'}}>
|
<Link
|
||||||
← Back to Home
|
to="/"
|
||||||
|
style={{
|
||||||
|
display: 'inline-flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '6px',
|
||||||
|
marginBottom: '1.5rem',
|
||||||
|
fontSize: '13px',
|
||||||
|
fontWeight: 600,
|
||||||
|
color: '#1D4ED8',
|
||||||
|
textDecoration: 'none'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>arrow_back</span>
|
||||||
|
Back to Home
|
||||||
</Link>
|
</Link>
|
||||||
<h1>Sign In</h1>
|
|
||||||
<p className="auth-subtitle">Enter your credentials to continue</p>
|
<h1>Client Sign In</h1>
|
||||||
|
<p className="auth-subtitle">Enter your portal credentials to continue</p>
|
||||||
|
|
||||||
{error && (
|
{error && (
|
||||||
<div style={{color: 'var(--error)', marginBottom: '1rem', fontSize: '14px'}}>
|
<div style={{ color: 'var(--error, #DC2626)', marginBottom: '1rem', fontSize: '14px', background: 'rgba(220, 38, 38, 0.08)', padding: '10px 14px', borderRadius: '8px' }}>
|
||||||
{error === 'EMAIL_NOT_VERIFIED' ? (
|
{error === 'EMAIL_NOT_VERIFIED' ? (
|
||||||
<>
|
<>
|
||||||
Your email is not verified. Please check your inbox or{' '}
|
Your email is not verified. Please check your inbox or{' '}
|
||||||
<Link to="/resend-verification" className="fancy-link">resend the verification link</Link>.
|
<Link to="/resend-verification" style={{ color: '#1D4ED8', textDecoration: 'underline' }}>
|
||||||
|
resend the verification link
|
||||||
|
</Link>.
|
||||||
</>
|
</>
|
||||||
) : error}
|
) : (
|
||||||
|
error
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<form onSubmit={handleLogin}>
|
<form onSubmit={handleLogin}>
|
||||||
<div className="form-group">
|
<div className="form-group" style={{ marginBottom: '16px' }}>
|
||||||
<label className="form-label" htmlFor="email">Email Address</label>
|
<label className="form-label" htmlFor="email" style={{ display: 'block', fontSize: '12.5px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>
|
||||||
<input
|
Email Address
|
||||||
id="email"
|
</label>
|
||||||
type="email"
|
<input
|
||||||
className="input"
|
id="email"
|
||||||
placeholder="you@example.com"
|
type="email"
|
||||||
required
|
className="artha-form-input"
|
||||||
|
placeholder="you@example.com"
|
||||||
|
required
|
||||||
value={email}
|
value={email}
|
||||||
onChange={e => setEmail(e.target.value)}
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="form-group">
|
<div className="form-group" style={{ marginBottom: '20px' }}>
|
||||||
<label className="form-label" htmlFor="password">Password</label>
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '6px' }}>
|
||||||
<div className="password-wrap">
|
<label className="form-label" htmlFor="password" style={{ fontSize: '12.5px', fontWeight: 600, color: '#0A2540', margin: 0 }}>
|
||||||
<input
|
Password
|
||||||
id="password"
|
</label>
|
||||||
type={showPassword ? 'text' : 'password'}
|
<Link to="/forgot-password" style={{ fontSize: '12px', color: '#1D4ED8', textDecoration: 'none' }}>
|
||||||
className="input"
|
Forgot password?
|
||||||
placeholder="Your password"
|
</Link>
|
||||||
required
|
</div>
|
||||||
|
|
||||||
|
<div style={{ position: 'relative' }}>
|
||||||
|
<input
|
||||||
|
id="password"
|
||||||
|
type={showPassword ? 'text' : 'password'}
|
||||||
|
className="artha-form-input"
|
||||||
|
style={{ paddingRight: '60px', marginBottom: 0 }}
|
||||||
|
placeholder="Your password"
|
||||||
|
required
|
||||||
value={password}
|
value={password}
|
||||||
onChange={e => setPassword(e.target.value)}
|
onChange={(e) => setPassword(e.target.value)}
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="password-toggle"
|
|
||||||
onClick={() => setShowPassword(!showPassword)}
|
onClick={() => setShowPassword(!showPassword)}
|
||||||
|
style={{
|
||||||
|
position: 'absolute',
|
||||||
|
right: '12px',
|
||||||
|
top: '50%',
|
||||||
|
transform: 'translateY(-50%)',
|
||||||
|
background: 'none',
|
||||||
|
border: 'none',
|
||||||
|
fontSize: '12px',
|
||||||
|
fontWeight: 600,
|
||||||
|
color: '#425466',
|
||||||
|
cursor: 'pointer'
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{showPassword ? 'Hide' : 'Show'}
|
{showPassword ? 'Hide' : 'Show'}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="btn btn-primary w-full"
|
className="artha-pill-btn artha-pill-primary"
|
||||||
style={{borderRadius: 'var(--radius-sm)', marginTop: '4px'}}
|
style={{ width: '100%', padding: '12px 20px', fontSize: '14.5px' }}
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
>
|
>
|
||||||
{loading ? 'Signing in...' : 'Sign In'}
|
{loading ? 'Signing in...' : 'Sign In to Portal'}
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>login</span>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div className="auth-links">
|
<div className="auth-links">
|
||||||
<Link to="/forgot-password" className="fancy-link">Forgot password?</Link><br/>
|
Don't have an account?{' '}
|
||||||
Don't have an account? <Link to="/signup" className="fancy-link">Sign Up</Link>
|
<Link to="/signup" style={{ color: '#1D4ED8', fontWeight: 600, textDecoration: 'underline' }}>
|
||||||
|
Create Account
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -65,73 +65,206 @@ export default function Profile() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const isAdmin = user?.role === 'admin' || user?.role === 'super_admin';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ maxWidth: '680px', margin: '0 auto' }}>
|
<div style={{ maxWidth: '720px', margin: '0 auto' }}>
|
||||||
<button
|
{/* Back Button */}
|
||||||
className="btn btn-secondary btn-sm"
|
<div style={{ marginBottom: '20px' }}>
|
||||||
style={{ marginBottom: '16px', display: 'inline-flex', alignItems: 'center', gap: '4px', borderRadius: 'var(--radius-sm)' }}
|
<button
|
||||||
onClick={() => navigate((user?.role === 'admin' || user?.role === 'super_admin') ? '/admin-dashboard' : '/dashboard')}
|
className="artha-pill-btn artha-pill-outline"
|
||||||
>
|
style={{ padding: '6px 14px', fontSize: '12.5px' }}
|
||||||
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>arrow_back</span>
|
onClick={() => navigate(isAdmin ? '/admin-dashboard' : '/dashboard')}
|
||||||
Back to Dashboard
|
>
|
||||||
</button>
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>arrow_back</span>
|
||||||
<div className="page-heading">
|
Return to {isAdmin ? 'Admin Portal' : 'Client Overview'}
|
||||||
<div>
|
</button>
|
||||||
<h1>My Profile</h1>
|
|
||||||
<p className="page-meta">Update your name, phone number, or password</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="card" style={{ marginBottom: '20px' }}>
|
{/* Hero Card */}
|
||||||
<h3 style={{ marginBottom: '20px', paddingBottom: '12px', borderBottom: '1px solid var(--border)' }} className="card-title">Account Info</h3>
|
<div className="artha-portal-hero" style={{ padding: '24px 28px', marginBottom: '24px' }}>
|
||||||
<div className="form-group">
|
<div style={{ display: 'flex', alignItems: 'center', gap: '16px' }}>
|
||||||
<label className="form-label">Email Address <span style={{ color: 'var(--muted)', fontWeight: 400 }}>(cannot be changed)</span></label>
|
<div
|
||||||
<input type="email" className="input" readOnly value={user?.email || ''} />
|
style={{
|
||||||
</div>
|
width: '56px',
|
||||||
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '16px' }}>
|
height: '56px',
|
||||||
<div className="form-group">
|
borderRadius: '50%',
|
||||||
<label className="form-label">Full Name</label>
|
background: 'linear-gradient(135deg, #1D4ED8 0%, #14B8A6 100%)',
|
||||||
<input type="text" className="input" placeholder="Your full name" value={formData.name} onChange={e => setFormData({ ...formData, name: e.target.value })} />
|
color: '#FFFFFF',
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
fontSize: '22px',
|
||||||
|
fontWeight: 700,
|
||||||
|
flexShrink: 0
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{(user?.name || user?.email || 'U').charAt(0).toUpperCase()}
|
||||||
</div>
|
</div>
|
||||||
<div className="form-group">
|
<div>
|
||||||
<label className="form-label">Phone Number</label>
|
<div className="artha-eyebrow-pill" style={{ marginBottom: '4px' }}>
|
||||||
<input type="tel" className="input" placeholder="+1 (555) 000-0000" value={formData.phone} onChange={e => setFormData({ ...formData, phone: e.target.value })} />
|
<span className="dot"></span>
|
||||||
|
ACCOUNT SETTINGS
|
||||||
|
</div>
|
||||||
|
<h1 style={{ fontSize: '24px', margin: '2px 0 0' }}>{user?.name || 'Account Profile'}</h1>
|
||||||
|
<p style={{ fontSize: '13px', margin: '2px 0 0', color: '#425466' }}>{user?.email}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span className={`artha-status-pill ${isAdmin ? 'artha-status-rejected' : 'artha-status-approved'}`}>
|
||||||
|
{user?.role === 'super_admin' ? 'Super Admin' : user?.role === 'admin' ? 'Staff CPA' : 'Verified Client'}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Account Info Form Card */}
|
||||||
|
<div className="artha-portal-card">
|
||||||
|
<div className="artha-portal-card-header">
|
||||||
|
<h3 className="artha-portal-card-title">
|
||||||
|
<span className="material-symbols-outlined" style={{ color: '#1D4ED8' }}>badge</span>
|
||||||
|
Contact & Identity Information
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>
|
||||||
|
<div>
|
||||||
|
<label style={{ display: 'block', fontSize: '12.5px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>
|
||||||
|
Email Address <span style={{ color: '#425466', fontWeight: 400 }}>(Permanent identifier)</span>
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="email"
|
||||||
|
readOnly
|
||||||
|
value={user?.email || ''}
|
||||||
|
style={{
|
||||||
|
width: '100%',
|
||||||
|
padding: '11px 14px',
|
||||||
|
borderRadius: '12px',
|
||||||
|
border: '1px solid rgba(10, 37, 64,0.1)',
|
||||||
|
background: '#F6F9FC',
|
||||||
|
color: '#425466',
|
||||||
|
fontSize: '13.5px',
|
||||||
|
outline: 'none',
|
||||||
|
cursor: 'not-allowed'
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '14px' }}>
|
||||||
|
<div>
|
||||||
|
<label style={{ display: 'block', fontSize: '12.5px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>
|
||||||
|
Full Legal Name
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
placeholder="First and Last Name"
|
||||||
|
value={formData.name}
|
||||||
|
onChange={e => setFormData({ ...formData, name: e.target.value })}
|
||||||
|
className="artha-form-input"
|
||||||
|
style={{ width: '100%', padding: '11px 14px', fontSize: '13.5px' }}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label style={{ display: 'block', fontSize: '12.5px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>
|
||||||
|
Primary Phone Number
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="tel"
|
||||||
|
placeholder="Phone Number"
|
||||||
|
value={formData.phone}
|
||||||
|
onChange={e => setFormData({ ...formData, phone: e.target.value })}
|
||||||
|
className="artha-form-input"
|
||||||
|
style={{ width: '100%', padding: '11px 14px', fontSize: '13.5px' }}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="card" style={{ marginBottom: '24px' }}>
|
{/* Security & Password Accordion */}
|
||||||
<div className="flex-between" style={{ marginBottom: '4px', cursor: 'pointer' }} onClick={() => setShowPwSection(!showPwSection)}>
|
<div className="artha-portal-card">
|
||||||
<h3 className="card-title">Change Password</h3>
|
<div
|
||||||
<span style={{ color: 'var(--muted)', fontSize: '18px' }}>{showPwSection ? '▼' : '▶'}</span>
|
style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', cursor: 'pointer' }}
|
||||||
|
onClick={() => setShowPwSection(!showPwSection)}
|
||||||
|
>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '10px' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ color: '#1D4ED8' }}>password</span>
|
||||||
|
<div>
|
||||||
|
<h4 style={{ fontSize: '16px', color: '#0A2540', margin: 0, fontWeight: 600 }}>Security & Password</h4>
|
||||||
|
<p style={{ fontSize: '12.5px', color: '#425466', margin: '2px 0 0' }}>
|
||||||
|
Update your account password or review login credentials
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span className="material-symbols-outlined" style={{ color: '#425466', transition: 'transform 0.2s', transform: showPwSection ? 'rotate(180deg)' : 'none' }}>
|
||||||
|
expand_more
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-sm" style={{ marginBottom: 0 }}>Click to expand and update your password</p>
|
|
||||||
|
|
||||||
{showPwSection && (
|
{showPwSection && (
|
||||||
<div style={{ marginTop: '20px', paddingTop: '20px', borderTop: '1px solid var(--border)' }}>
|
<div style={{ marginTop: '18px', paddingTop: '18px', borderTop: '1px solid rgba(10, 37, 64,0.08)', display: 'flex', flexDirection: 'column', gap: '14px' }}>
|
||||||
<div className="form-group">
|
<div>
|
||||||
<label className="form-label">Current Password</label>
|
<label style={{ display: 'block', fontSize: '12px', fontWeight: 600, color: '#0A2540', marginBottom: '4px' }}>
|
||||||
<input type="password" className="input" placeholder="Enter current password" value={pwData.currentPw} onChange={e => setPwData({ ...pwData, currentPw: e.target.value })} />
|
Current Password
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="password"
|
||||||
|
placeholder="Enter current password"
|
||||||
|
value={pwData.currentPw}
|
||||||
|
onChange={e => setPwData({ ...pwData, currentPw: e.target.value })}
|
||||||
|
className="artha-form-input"
|
||||||
|
style={{ width: '100%', padding: '10px 14px', fontSize: '13px' }}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="form-group">
|
|
||||||
<label className="form-label">New Password</label>
|
<div>
|
||||||
<div className="password-wrap">
|
<label style={{ display: 'block', fontSize: '12px', fontWeight: 600, color: '#0A2540', marginBottom: '4px' }}>
|
||||||
<input type={showNewPw ? 'text' : 'password'} className="input" placeholder="At least 8 characters" style={{ paddingRight: '56px' }} value={pwData.newPw} onChange={e => setPwData({ ...pwData, newPw: e.target.value })} />
|
New Password (minimum 8 characters)
|
||||||
<button type="button" className="password-toggle" onClick={() => setShowNewPw(!showNewPw)}>
|
</label>
|
||||||
|
<div style={{ position: 'relative' }}>
|
||||||
|
<input
|
||||||
|
type={showNewPw ? 'text' : 'password'}
|
||||||
|
placeholder="New secure password"
|
||||||
|
value={pwData.newPw}
|
||||||
|
onChange={e => setPwData({ ...pwData, newPw: e.target.value })}
|
||||||
|
className="artha-form-input"
|
||||||
|
style={{ width: '100%', padding: '10px 50px 10px 14px', fontSize: '13px' }}
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => setShowNewPw(!showNewPw)}
|
||||||
|
style={{ position: 'absolute', right: '12px', top: '50%', transform: 'translateY(-50%)', background: 'none', border: 'none', color: '#425466', fontSize: '12px', cursor: 'pointer' }}
|
||||||
|
>
|
||||||
{showNewPw ? 'Hide' : 'Show'}
|
{showNewPw ? 'Hide' : 'Show'}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="form-group">
|
|
||||||
<label className="form-label">Confirm New Password</label>
|
<div>
|
||||||
<input type="password" className="input" placeholder="Repeat new password" value={pwData.confirmPw} onChange={e => setPwData({ ...pwData, confirmPw: e.target.value })} />
|
<label style={{ display: 'block', fontSize: '12px', fontWeight: 600, color: '#0A2540', marginBottom: '4px' }}>
|
||||||
|
Confirm New Password
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="password"
|
||||||
|
placeholder="Repeat new password"
|
||||||
|
value={pwData.confirmPw}
|
||||||
|
onChange={e => setPwData({ ...pwData, confirmPw: e.target.value })}
|
||||||
|
className="artha-form-input"
|
||||||
|
style={{ width: '100%', padding: '10px 14px', fontSize: '13px' }}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button className="btn btn-primary w-full" style={{ borderRadius: 'var(--radius-sm)' }} onClick={handleSave} disabled={loading}>
|
{/* Save Button */}
|
||||||
{loading ? 'Saving...' : 'Save Changes'}
|
<button
|
||||||
|
className="artha-pill-btn artha-pill-primary"
|
||||||
|
style={{ width: '100%', padding: '12px 24px', fontSize: '14px', justifyContent: 'center' }}
|
||||||
|
onClick={handleSave}
|
||||||
|
disabled={loading}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>save</span>
|
||||||
|
{loading ? 'Saving Profile...' : 'Save Profile Changes'}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -12,16 +12,16 @@ export default function ResendVerification() {
|
|||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
await fetch("/api/auth/resend-verification", {
|
await fetch('/api/auth/resend-verification', {
|
||||||
method: "POST",
|
method: 'POST',
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ email })
|
body: JSON.stringify({ email })
|
||||||
});
|
});
|
||||||
setMessage("If that email is registered and unverified, a new link has been sent. Check your inbox.");
|
setMessage('If that email is registered and unverified, a new link has been dispatched.');
|
||||||
setEmail("");
|
setEmail('');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
setMessage("Network error. Please try again.");
|
setMessage('Network error. Please try again.');
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@@ -29,41 +29,100 @@ export default function ResendVerification() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="auth-shell page-enter">
|
<div className="auth-shell page-enter">
|
||||||
|
{/* Brand Side */}
|
||||||
<div className="auth-brand">
|
<div className="auth-brand">
|
||||||
<img className="brand-logo" src="/images/bookkeeppro-logo.webp" alt="BookKeepPro"/>
|
|
||||||
|
<div style={{ textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
|
||||||
|
<img
|
||||||
|
src="/images/brand-logo-mark.webp"
|
||||||
|
alt="ABC CPA & Advisory"
|
||||||
|
style={{
|
||||||
|
width: '58px',
|
||||||
|
height: '58px',
|
||||||
|
borderRadius: '14px',
|
||||||
|
marginBottom: '16px',
|
||||||
|
boxShadow: '0 8px 24px rgba(0, 0, 0, 0.45)',
|
||||||
|
border: '1px solid rgba(255, 255, 255, 0.14)'
|
||||||
|
}}
|
||||||
|
width="58"
|
||||||
|
height="58"
|
||||||
|
/>
|
||||||
|
<h2 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '24px', fontWeight: 600, color: '#FFFFFF', margin: 0 }}>
|
||||||
|
ABC CPA & Advisory
|
||||||
|
</h2>
|
||||||
|
<div style={{ fontSize: '11px', textTransform: 'uppercase', letterSpacing: '0.12em', color: '#60A5FA', marginTop: '6px' }}>
|
||||||
|
Tax Advisory & Accounting Services
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="brand-divider"></div>
|
<div className="brand-divider"></div>
|
||||||
<h2>Verify Your Email</h2>
|
|
||||||
<p>Check your inbox for the verification link. It expires in 24 hours.</p>
|
<p>
|
||||||
|
Need a fresh verification link? Enter your email and we'll send an authorized authorization email.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Form Side */}
|
||||||
<div className="auth-form-side">
|
<div className="auth-form-side">
|
||||||
<div className="auth-box">
|
<div className="auth-box">
|
||||||
<div style={{fontSize:'40px', marginBottom:'12px'}}>📧</div>
|
<Link
|
||||||
<h1>Resend Verification</h1>
|
to="/login"
|
||||||
<p className="auth-subtitle">We'll send a new link to your registered email</p>
|
style={{
|
||||||
|
display: 'inline-flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '6px',
|
||||||
|
marginBottom: '1.5rem',
|
||||||
|
fontSize: '13px',
|
||||||
|
fontWeight: 600,
|
||||||
|
color: '#1D4ED8',
|
||||||
|
textDecoration: 'none'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>arrow_back</span>
|
||||||
|
Back to Sign In
|
||||||
|
</Link>
|
||||||
|
|
||||||
{message && <div style={{padding: '10px', background: 'var(--blue-light)', color: 'var(--blue)', borderRadius: 'var(--radius-sm)', marginBottom: '16px', fontSize: '14px'}}>{message}</div>}
|
<h1>Resend Verification</h1>
|
||||||
|
<p className="auth-subtitle">We'll send an authorized activation link to your email</p>
|
||||||
|
|
||||||
|
{message && (
|
||||||
|
<div style={{ padding: '12px 16px', background: '#ECFDF5', color: '#047857', border: '1px solid rgba(4, 120, 87, 0.2)', borderRadius: '10px', marginBottom: '20px', fontSize: '13.5px' }}>
|
||||||
|
{message}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<form onSubmit={handleResend}>
|
<form onSubmit={handleResend}>
|
||||||
<div className="form-group" style={{marginTop:'24px'}}>
|
<div className="form-group" style={{ marginBottom: '20px' }}>
|
||||||
<label className="form-label" htmlFor="email">Email Address</label>
|
<label className="form-label" htmlFor="email" style={{ display: 'block', fontSize: '12.5px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>
|
||||||
<input
|
Email Address
|
||||||
id="email"
|
</label>
|
||||||
type="email"
|
<input
|
||||||
className="input"
|
id="email"
|
||||||
|
type="email"
|
||||||
|
className="artha-form-input"
|
||||||
placeholder="you@example.com"
|
placeholder="you@example.com"
|
||||||
value={email}
|
value={email}
|
||||||
onChange={e => setEmail(e.target.value)}
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" className="btn btn-primary w-full" disabled={loading} style={{borderRadius:'var(--radius-sm)'}}>
|
<button
|
||||||
{loading ? "Sending..." : "Send Verification Link"}
|
type="submit"
|
||||||
|
className="artha-pill-btn artha-pill-primary"
|
||||||
|
style={{ width: '100%', padding: '12px 20px', fontSize: '14.5px' }}
|
||||||
|
disabled={loading}
|
||||||
|
>
|
||||||
|
{loading ? 'Sending...' : 'Send Verification Link'}
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>send</span>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div className="auth-links"><Link to="/login" className="fancy-link">Back to Sign In</Link></div>
|
<div className="auth-links">
|
||||||
|
<Link to="/login" style={{ color: '#1D4ED8', fontWeight: 600, textDecoration: 'underline' }}>
|
||||||
|
Back to Sign In
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export default function ResetPassword() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!token) {
|
if (!token) {
|
||||||
setError("Invalid or missing reset link. Request a new one.");
|
setError('Invalid or expired reset token. Please request a new link.');
|
||||||
}
|
}
|
||||||
}, [token]);
|
}, [token]);
|
||||||
|
|
||||||
@@ -25,28 +25,28 @@ export default function ResetPassword() {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
setError(null);
|
setError(null);
|
||||||
try {
|
try {
|
||||||
const res = await fetch("/api/auth/reset-password", {
|
const res = await fetch('/api/auth/reset-password', {
|
||||||
method: "POST",
|
method: 'POST',
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ token, new_password: password })
|
body: JSON.stringify({ token, new_password: password })
|
||||||
});
|
});
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
let errorMsg = "Password reset failed";
|
let errorMsg = 'Password reset failed';
|
||||||
if (data.detail) {
|
if (data.detail) {
|
||||||
if (typeof data.detail === 'string') {
|
if (typeof data.detail === 'string') {
|
||||||
errorMsg = data.detail;
|
errorMsg = data.detail;
|
||||||
} else if (Array.isArray(data.detail)) {
|
} else if (Array.isArray(data.detail)) {
|
||||||
errorMsg = data.detail.map(err => err.msg).join(", ");
|
errorMsg = data.detail.map((err) => err.msg).join(', ');
|
||||||
} else {
|
} else {
|
||||||
errorMsg = JSON.stringify(data.detail);
|
errorMsg = JSON.stringify(data.detail);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new Error(errorMsg);
|
throw new Error(errorMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
setMessage("Password reset! Redirecting to sign in...");
|
setMessage('Password successfully updated! Redirecting to sign in...');
|
||||||
setTimeout(() => navigate('/login'), 2000);
|
setTimeout(() => navigate('/login'), 2000);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError(err.message);
|
setError(err.message);
|
||||||
@@ -57,47 +57,126 @@ export default function ResetPassword() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="auth-shell page-enter">
|
<div className="auth-shell page-enter">
|
||||||
|
{/* Brand Side */}
|
||||||
<div className="auth-brand">
|
<div className="auth-brand">
|
||||||
<img className="brand-logo" src="/images/bookkeeppro-logo.webp" alt="BookKeepPro"/>
|
|
||||||
|
<div style={{ textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
|
||||||
|
<img
|
||||||
|
src="/images/brand-logo-mark.webp"
|
||||||
|
alt="ABC CPA & Advisory"
|
||||||
|
style={{
|
||||||
|
width: '58px',
|
||||||
|
height: '58px',
|
||||||
|
borderRadius: '14px',
|
||||||
|
marginBottom: '16px',
|
||||||
|
boxShadow: '0 8px 24px rgba(0, 0, 0, 0.45)',
|
||||||
|
border: '1px solid rgba(255, 255, 255, 0.14)'
|
||||||
|
}}
|
||||||
|
width="58"
|
||||||
|
height="58"
|
||||||
|
/>
|
||||||
|
<h2 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '24px', fontWeight: 600, color: '#FFFFFF', margin: 0 }}>
|
||||||
|
ABC CPA & Advisory
|
||||||
|
</h2>
|
||||||
|
<div style={{ fontSize: '11px', textTransform: 'uppercase', letterSpacing: '0.12em', color: '#60A5FA', marginTop: '6px' }}>
|
||||||
|
Tax Advisory & Accounting Services
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="brand-divider"></div>
|
<div className="brand-divider"></div>
|
||||||
<h2>Choose a New Password</h2>
|
|
||||||
<p>Pick something strong — at least 8 characters with a mix of letters, numbers, and symbols.</p>
|
<p>
|
||||||
|
Choose a robust password to ensure the continued security of your financial and tax documents.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Form Side */}
|
||||||
<div className="auth-form-side">
|
<div className="auth-form-side">
|
||||||
<div className="auth-box">
|
<div className="auth-box">
|
||||||
<div style={{fontSize:'40px', marginBottom:'12px'}}>🔒</div>
|
<Link
|
||||||
<h1>Reset Password</h1>
|
to="/login"
|
||||||
<p className="auth-subtitle">Enter your new password below</p>
|
style={{
|
||||||
|
display: 'inline-flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '6px',
|
||||||
|
marginBottom: '1.5rem',
|
||||||
|
fontSize: '13px',
|
||||||
|
fontWeight: 600,
|
||||||
|
color: '#1D4ED8',
|
||||||
|
textDecoration: 'none'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>arrow_back</span>
|
||||||
|
Back to Sign In
|
||||||
|
</Link>
|
||||||
|
|
||||||
{error && <div style={{color: 'var(--error)', marginBottom: '1rem', fontSize: '14px'}}>{error}</div>}
|
<h1>Create New Password</h1>
|
||||||
{message && <div style={{color: 'var(--green)', marginBottom: '1rem', fontSize: '14px'}}>{message}</div>}
|
<p className="auth-subtitle">Enter your new credentials below</p>
|
||||||
|
|
||||||
|
{error && (
|
||||||
|
<div style={{ color: 'var(--error, #DC2626)', marginBottom: '1rem', fontSize: '14px', background: 'rgba(220, 38, 38, 0.08)', padding: '10px 14px', borderRadius: '8px' }}>
|
||||||
|
{error}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{message && (
|
||||||
|
<div style={{ padding: '12px 16px', background: '#ECFDF5', color: '#047857', border: '1px solid rgba(4, 120, 87, 0.2)', borderRadius: '10px', marginBottom: '20px', fontSize: '13.5px' }}>
|
||||||
|
{message}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<form onSubmit={handleReset}>
|
<form onSubmit={handleReset}>
|
||||||
<div className="form-group" style={{marginTop:'24px'}}>
|
<div className="form-group" style={{ marginBottom: '22px' }}>
|
||||||
<label className="form-label" htmlFor="password">New Password</label>
|
<label className="form-label" htmlFor="password" style={{ display: 'block', fontSize: '12.5px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>
|
||||||
<div className="password-wrap">
|
New Password
|
||||||
<input
|
</label>
|
||||||
id="password"
|
<div style={{ position: 'relative' }}>
|
||||||
type={showPassword ? "text" : "password"}
|
<input
|
||||||
className="input"
|
id="password"
|
||||||
|
type={showPassword ? 'text' : 'password'}
|
||||||
|
className="artha-form-input"
|
||||||
|
style={{ paddingRight: '60px', marginBottom: 0 }}
|
||||||
placeholder="At least 8 characters"
|
placeholder="At least 8 characters"
|
||||||
value={password}
|
value={password}
|
||||||
onChange={e => setPassword(e.target.value)}
|
onChange={(e) => setPassword(e.target.value)}
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<button type="button" className="password-toggle" onClick={() => setShowPassword(!showPassword)}>
|
<button
|
||||||
{showPassword ? "Hide" : "Show"}
|
type="button"
|
||||||
|
onClick={() => setShowPassword(!showPassword)}
|
||||||
|
style={{
|
||||||
|
position: 'absolute',
|
||||||
|
right: '12px',
|
||||||
|
top: '50%',
|
||||||
|
transform: 'translateY(-50%)',
|
||||||
|
background: 'none',
|
||||||
|
border: 'none',
|
||||||
|
fontSize: '12px',
|
||||||
|
fontWeight: 600,
|
||||||
|
color: '#425466',
|
||||||
|
cursor: 'pointer'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{showPassword ? 'Hide' : 'Show'}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" className="btn btn-primary w-full" disabled={loading || !token} style={{borderRadius:'var(--radius-sm)'}}>
|
<button
|
||||||
{loading ? "Resetting..." : "Reset Password"}
|
type="submit"
|
||||||
|
className="artha-pill-btn artha-pill-primary"
|
||||||
|
style={{ width: '100%', padding: '12px 20px', fontSize: '14.5px' }}
|
||||||
|
disabled={loading || !token}
|
||||||
|
>
|
||||||
|
{loading ? 'Resetting...' : 'Save New Password'}
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>lock_reset</span>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div className="auth-links"><Link to="/login" className="fancy-link">Back to Sign In</Link></div>
|
<div className="auth-links">
|
||||||
|
<Link to="/login" style={{ color: '#1D4ED8', fontWeight: 600, textDecoration: 'underline' }}>
|
||||||
|
Return to Sign In
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,76 +1,233 @@
|
|||||||
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
export default function Services() {
|
export default function Services() {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
const servicesList = [
|
||||||
|
{
|
||||||
|
id: 'tax-strategy',
|
||||||
|
category: 'TAX COMPLIANCE & STRATEGY',
|
||||||
|
title: 'Corporate & Individual Tax Strategy',
|
||||||
|
subtitle: 'Proactive entity planning, deductions, and audit-proof filings.',
|
||||||
|
image: '/images/services-1.webp',
|
||||||
|
description:
|
||||||
|
'Managing tax liability requires forward-looking advisory rather than retrospective filing. We analyze your corporate structure (LLC, S-Corp, C-Corp, or Partnership) to uncover qualified business deductions, R&D tax credits, and optimal owner distributions.',
|
||||||
|
bullets: [
|
||||||
|
'Federal & multi-state corporate tax preparation (Forms 1120, 1120-S, 1065)',
|
||||||
|
'Quarterly estimated tax calculations and proactive safe-harbor planning',
|
||||||
|
'State tax nexus audits (economic nexus, sales tax, franchise taxes)',
|
||||||
|
'Depreciation acceleration (Section 179 and bonus depreciation strategies)',
|
||||||
|
'Owner-executive compensation and health/retirement benefit structuring'
|
||||||
|
],
|
||||||
|
icon: 'calculate'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'cross-border',
|
||||||
|
category: 'INTERNATIONAL & CROSS-BORDER',
|
||||||
|
title: 'Cross-Border, Expat & FBAR / FATCA Advisory',
|
||||||
|
subtitle: 'Dual-jurisdiction compliance across US and India tax frameworks.',
|
||||||
|
image: '/images/services-2.webp',
|
||||||
|
description:
|
||||||
|
'International transactions and foreign asset holdings trigger severe IRS disclosure penalties if mishandled. We specialize in cross-border wealth, Indian investments, repatriation of capital, and dual-status tax residency under the US-India Double Tax Avoidance Agreement (DTAA).',
|
||||||
|
bullets: [
|
||||||
|
'FBAR (FinCEN Form 114) for foreign bank, mutual fund, and NRE/NRO accounts',
|
||||||
|
'FATCA (Form 8938) reporting of specified foreign financial assets',
|
||||||
|
'Form 5471 & Form 5472 disclosures for foreign-owned or overseas corporations',
|
||||||
|
'Foreign Tax Credit (Form 1116) and Foreign Earned Income Exclusion (Form 2555)',
|
||||||
|
'Repatriation of funds, Indian real estate sales, and capital gains advisory'
|
||||||
|
],
|
||||||
|
icon: 'public'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'ai-bookkeeping',
|
||||||
|
category: 'INTELLIGENT ACCOUNTING',
|
||||||
|
title: 'Instant P&L from Bank Statements & Bookkeeping',
|
||||||
|
subtitle: 'AI-driven statement ingestion paired with senior CPA oversight.',
|
||||||
|
image: '/images/services-block-3.webp',
|
||||||
|
description:
|
||||||
|
'Say goodbye to month-long turnaround times and messy spreadsheets. Our AI ingestion engine parses bank statements directly into categorized, reconciled general ledgers. Every entry is cross-checked by experienced accountants for pristine, audit-ready books.',
|
||||||
|
bullets: [
|
||||||
|
'Automated ingestion of bank statements (PDF, scanned, and digital feeds)',
|
||||||
|
'Continuous reconciliation of checking, savings, merchant (Stripe/PayPal), and credit cards',
|
||||||
|
'Accrual and cash-basis financial statements (P&L, Balance Sheet, Cash Flow)',
|
||||||
|
'QuickBooks Online & Xero cloud sync with custom chart of accounts',
|
||||||
|
'Audit-ready documentation and digital receipt attachment'
|
||||||
|
],
|
||||||
|
icon: 'receipt_long'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'fractional-cfo',
|
||||||
|
category: 'EXECUTIVE ADVISORY',
|
||||||
|
title: 'Fractional CFO & Cashflow Advisory',
|
||||||
|
subtitle: 'High-level financial leadership to scale revenue and protect margins.',
|
||||||
|
image: '/images/young-business-people-using-computer-in-office.webp',
|
||||||
|
description:
|
||||||
|
'Growth-stage enterprises and founders require senior strategic insights without the overhead of a full-time executive. We guide capital allocation, cashflow forecasting, burn-rate management, and investor reporting so you navigate transitions with confidence.',
|
||||||
|
bullets: [
|
||||||
|
'Dynamic 13-week cash flow projections and scenario modeling',
|
||||||
|
'Burn rate analysis, runway extensions, and working capital optimization',
|
||||||
|
'KPI benchmarking, gross margin analysis, and unit economics',
|
||||||
|
'Board deck preparation and investor-facing financial presentations',
|
||||||
|
'M&A transaction readiness and pre-deal due diligence'
|
||||||
|
],
|
||||||
|
icon: 'trending_up'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'offshore-delivery',
|
||||||
|
category: 'FIRM CAPACITY',
|
||||||
|
title: 'Global Delivery & Offshore Accounting Teams',
|
||||||
|
subtitle: 'Dedicated accounting back-office for US CPA firms and enterprises.',
|
||||||
|
image: '/images/services-3.webp',
|
||||||
|
description:
|
||||||
|
'Address staffing shortages and scale firm capacity seamlessly. Our India offshore center provides qualified Chartered Accountants, cost accountants, and QuickBooks ProAdvisors working in tight synchronization with your onshore workflows.',
|
||||||
|
bullets: [
|
||||||
|
'Dedicated remote bookkeeping, payroll, and tax preparation squads',
|
||||||
|
'Standardized SOPs, dual-tier quality reviews, and strict SLAs',
|
||||||
|
'SOC-2 aligned security protocols and encrypted data transmission',
|
||||||
|
'Timezone advantage allowing overnight processing and faster turnaround',
|
||||||
|
'Flexible engagement models from project-based to full-time dedicated staff'
|
||||||
|
],
|
||||||
|
icon: 'hub'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<div className="artha-services-page" style={{ background: 'var(--paper, #F6F9FC)', minHeight: '100vh', paddingBottom: '50px' }}>
|
||||||
<div className="page-hero" style={{ '--hero-img': 'url("/images/Services-background-image.webp")' }}>
|
{/* Header Banner */}
|
||||||
<div className="page-hero-inner">
|
<section style={{ padding: '36px 0 24px', borderBottom: '1px solid rgba(10, 37, 64,0.07)' }}>
|
||||||
<span className="eyebrow">What we do</span>
|
<div style={{ width: 'min(1280px, 94%)', margin: '0 auto', textAlign: 'center' }}>
|
||||||
<h1>Professional services for firms and businesses</h1>
|
<div className="artha-eyebrow-pill">
|
||||||
|
<span className="dot"></span>
|
||||||
|
PRACTICE AREAS & ADVISORY
|
||||||
|
</div>
|
||||||
|
<h1 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: 'clamp(23px, 2.3vw, 32px)', color: '#0A2540', fontWeight: 600, margin: '10px 0' }}>
|
||||||
|
Comprehensive Tax & Accounting Services
|
||||||
|
</h1>
|
||||||
|
<p style={{ maxWidth: '580px', margin: '0 auto', color: '#425466', fontSize: '13.5px', lineHeight: 1.6 }}>
|
||||||
|
Designed for founders, cross-border families, and modern enterprises seeking rigorous precision, strategic tax reduction, and audit-ready financials.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{/* Services List Blocks with Images */}
|
||||||
|
<div style={{ width: 'min(1280px, 94%)', margin: '40px auto 0', display: 'flex', flexDirection: 'column', gap: '30px' }}>
|
||||||
|
{servicesList.map((svc, idx) => (
|
||||||
|
<div
|
||||||
|
key={svc.id}
|
||||||
|
id={svc.id}
|
||||||
|
className={`reveal reveal-delay-${(idx % 3) + 1}`}
|
||||||
|
style={{
|
||||||
|
background: '#FFFFFF',
|
||||||
|
border: '1px solid rgba(10, 37, 64, 0.08)',
|
||||||
|
borderRadius: '20px',
|
||||||
|
padding: 'clamp(22px, 2.6vw, 34px)',
|
||||||
|
boxShadow: '0 4px 20px -2px rgba(10, 37, 64, 0.04)',
|
||||||
|
display: 'grid',
|
||||||
|
gridTemplateColumns: idx % 2 === 0 ? '1.15fr 0.85fr' : '0.85fr 1.15fr',
|
||||||
|
gap: '34px',
|
||||||
|
alignItems: 'center',
|
||||||
|
transition: 'transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{/* Main Content Column */}
|
||||||
|
<div style={{ order: idx % 2 === 0 ? 1 : 2 }}>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '10px', marginBottom: '10px' }}>
|
||||||
|
<span className="artha-service-pill-tag" style={{ margin: 0 }}>
|
||||||
|
{svc.category}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<h2 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: 'clamp(18px, 1.9vw, 24px)', color: '#0A2540', fontWeight: 600, marginBottom: '6px' }}>
|
||||||
|
{svc.title}
|
||||||
|
</h2>
|
||||||
|
<p style={{ fontStyle: 'italic', color: '#1D4ED8', fontSize: '13.5px', fontWeight: 500, marginBottom: '12px' }}>
|
||||||
|
{svc.subtitle}
|
||||||
|
</p>
|
||||||
|
<p style={{ color: '#425466', fontSize: '13px', lineHeight: 1.6, marginBottom: '18px' }}>
|
||||||
|
{svc.description}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<button
|
||||||
|
className="artha-pill-btn artha-pill-primary"
|
||||||
|
onClick={() => navigate('/contact')}
|
||||||
|
>
|
||||||
|
Inquire About This Service
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>
|
||||||
|
arrow_forward
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Visual & Checklist Column */}
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
order: idx % 2 === 0 ? 2 : 1,
|
||||||
|
background: '#F6F9FC',
|
||||||
|
border: '1px solid rgba(10, 37, 64, 0.08)',
|
||||||
|
borderRadius: '20px',
|
||||||
|
padding: '24px',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
gap: '18px'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{/* Service Visual Thumbnail */}
|
||||||
|
<div style={{ width: '100%', height: '200px', borderRadius: '14px', overflow: 'hidden', boxShadow: '0 4px 12px rgba(10, 37, 64,0.06)' }}>
|
||||||
|
<img
|
||||||
|
src={svc.image}
|
||||||
|
alt={svc.title}
|
||||||
|
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
||||||
|
loading="lazy"
|
||||||
|
width="600"
|
||||||
|
height="400"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '10px' }}>
|
||||||
|
<div className="artha-ticker-icon" style={{ width: '32px', height: '32px', margin: 0 }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>{svc.icon}</span>
|
||||||
|
</div>
|
||||||
|
<h3 style={{ fontSize: '15px', fontWeight: 600, color: '#0A2540', margin: 0 }}>
|
||||||
|
Key Practice Capabilities
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul style={{ listStyle: 'none', padding: 0, margin: 0, display: 'flex', flexDirection: 'column', gap: '10px' }}>
|
||||||
|
{svc.bullets.map((b, bIdx) => (
|
||||||
|
<li key={bIdx} style={{ display: 'flex', alignItems: 'flex-start', gap: '10px', fontSize: '13px', color: '#0A2540', lineHeight: 1.45 }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px', color: '#047857', flexShrink: 0, marginTop: '2px' }}>
|
||||||
|
check_circle
|
||||||
|
</span>
|
||||||
|
<span>{b}</span>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="services-wrapper">
|
{/* Bottom Consultation CTA */}
|
||||||
<div className="service-block reveal">
|
<div className="reveal" style={{ width: 'min(1280px, 94%)', margin: '48px auto 0', textAlign: 'center', background: '#0A2540', borderRadius: '20px', padding: '36px 20px', color: '#FFFFFF' }}>
|
||||||
<div className="service-text">
|
<h2 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: 'clamp(20px, 2.1vw, 27px)', color: '#FFFFFF', marginBottom: '10px' }}>
|
||||||
<span className="eyebrow">Offshore delivery</span>
|
Need a Custom Advisory Engagement?
|
||||||
<h2>For accounting firms and businesses</h2>
|
</h2>
|
||||||
<p>
|
<p style={{ color: 'rgba(255,255,255,0.75)', maxWidth: '520px', margin: '0 auto 22px', fontSize: '13.5px', lineHeight: 1.6 }}>
|
||||||
BookKeepPro India specialises in its offshore delivery model and
|
Schedule a direct 15-minute consultation to review your corporate or cross-border structure with a senior tax strategist.
|
||||||
consists of a strong team of qualified accountants, cost
|
</p>
|
||||||
accountants, tax consultants and payroll experts to ease the
|
<div style={{ display: 'flex', gap: '14px', justifyContent: 'center', flexWrap: 'wrap' }}>
|
||||||
bookkeeping for accounting firms and businesses, globally.
|
<button className="artha-pill-btn artha-pill-primary" onClick={() => navigate('/contact')}>
|
||||||
</p>
|
Schedule Strategy Call
|
||||||
<br />
|
</button>
|
||||||
<p>
|
<button
|
||||||
Our India-based offshore bookkeeping services offer several
|
className="artha-pill-btn artha-pill-outline"
|
||||||
benefits to global accounting firms and businesses.
|
style={{ background: 'transparent', color: '#FFFFFF', borderColor: 'rgba(255,255,255,0.3)' }}
|
||||||
</p>
|
onClick={() => navigate('/login')}
|
||||||
</div>
|
>
|
||||||
<img className="service-img" src="/images/services-3.webp" alt="Accounting Outsourcing" width="600" height="400" loading="lazy" />
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>login</span>
|
||||||
</div>
|
Login Portal
|
||||||
|
</button>
|
||||||
<div className="service-block reverse reveal">
|
|
||||||
<div className="service-text">
|
|
||||||
<span className="eyebrow">Accounting outsourcing</span>
|
|
||||||
<h2>Scale your business with outsourcing</h2>
|
|
||||||
<p>
|
|
||||||
Managing finances and accounting can be a complex and
|
|
||||||
time-consuming task, often diverting your focus away from what
|
|
||||||
truly matters — growing your business.
|
|
||||||
</p>
|
|
||||||
<br />
|
|
||||||
<p>
|
|
||||||
That's where we come in: a bookkeeping team that runs in the
|
|
||||||
background so yours doesn't have to.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<img className="service-img-bl-3" src="/images/services-2.webp" alt="Outsourced Accounting Team" width="600" height="400" loading="lazy" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="service-block reveal">
|
|
||||||
<div className="service-text">
|
|
||||||
<span className="eyebrow">Tax planning</span>
|
|
||||||
<h2>Tax planning and preparation</h2>
|
|
||||||
<p>
|
|
||||||
We help individuals and businesses optimize tax strategy and get
|
|
||||||
returns prepared right and on time. Whether your business is an
|
|
||||||
LLC, S-Corp, or C-Corp, we'll help you:
|
|
||||||
</p>
|
|
||||||
<ol className="list-items">
|
|
||||||
<li>Comply with and leverage changing federal tax law</li>
|
|
||||||
<li>Minimize overall tax liability through strategic planning</li>
|
|
||||||
<li>Determine taxation of owner-provided benefits</li>
|
|
||||||
<li>Leverage year-end tax opportunities</li>
|
|
||||||
<li>Manage multi-state tax exposure based on nexus</li>
|
|
||||||
</ol>
|
|
||||||
<br />
|
|
||||||
<p>
|
|
||||||
By minimizing your tax liability, you maximize your after-tax
|
|
||||||
cash flow — the foundation of a proactive, confident tax plan.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<img className="service-img" src="/images/services-1.webp" alt="Tax Services" width="600" height="400" loading="lazy" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,20 +14,20 @@ export default function Signup() {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await fetch("/api/auth/signup", {
|
const res = await fetch('/api/auth/signup', {
|
||||||
method: "POST",
|
method: 'POST',
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify(formData)
|
body: JSON.stringify(formData)
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
let errorMsg = "Signup failed";
|
let errorMsg = 'Signup failed';
|
||||||
if (data.detail) {
|
if (data.detail) {
|
||||||
if (typeof data.detail === 'string') {
|
if (typeof data.detail === 'string') {
|
||||||
errorMsg = data.detail;
|
errorMsg = data.detail;
|
||||||
} else if (Array.isArray(data.detail)) {
|
} else if (Array.isArray(data.detail)) {
|
||||||
errorMsg = data.detail.map(err => err.msg).join(", ");
|
errorMsg = data.detail.map((err) => err.msg).join(', ');
|
||||||
} else {
|
} else {
|
||||||
errorMsg = JSON.stringify(data.detail);
|
errorMsg = JSON.stringify(data.detail);
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@ export default function Signup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Success, route to login with message
|
// Success, route to login with message
|
||||||
navigate('/login', { state: { message: "Account created successfully. Please log in." }});
|
navigate('/login', { state: { message: 'Account created successfully. Please log in.' } });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError(err.message);
|
setError(err.message);
|
||||||
} finally {
|
} finally {
|
||||||
@@ -46,94 +46,177 @@ export default function Signup() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="auth-shell page-enter">
|
<div className="auth-shell page-enter">
|
||||||
|
{/* Brand Side */}
|
||||||
<div className="auth-brand">
|
<div className="auth-brand">
|
||||||
<img className="brand-logo" src="/images/bookkeeppro-logo.webp" alt="BookKeepPro" />
|
|
||||||
|
<div style={{ textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
|
||||||
|
<img
|
||||||
|
src="/images/brand-logo-mark.webp"
|
||||||
|
alt="ABC CPA & Advisory"
|
||||||
|
style={{
|
||||||
|
width: '58px',
|
||||||
|
height: '58px',
|
||||||
|
borderRadius: '14px',
|
||||||
|
marginBottom: '16px',
|
||||||
|
boxShadow: '0 8px 24px rgba(0, 0, 0, 0.45)',
|
||||||
|
border: '1px solid rgba(255, 255, 255, 0.14)'
|
||||||
|
}}
|
||||||
|
width="58"
|
||||||
|
height="58"
|
||||||
|
/>
|
||||||
|
<h2 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '24px', fontWeight: 600, color: '#FFFFFF', margin: 0 }}>
|
||||||
|
ABC CPA & Advisory
|
||||||
|
</h2>
|
||||||
|
<div style={{ fontSize: '11px', textTransform: 'uppercase', letterSpacing: '0.12em', color: '#60A5FA', marginTop: '6px' }}>
|
||||||
|
Tax Advisory & Accounting Services
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="brand-divider"></div>
|
<div className="brand-divider"></div>
|
||||||
<h2>Join BookKeepPro</h2>
|
|
||||||
<p>Create your account to securely upload documents, track reviews, and stay on top of your filings.</p>
|
<p>
|
||||||
|
Create your client account to upload bank statements, review corporate ledgers, and collaborate directly with our CPAs.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '10px', marginTop: '12px' }}>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '8px', fontSize: '12.5px', color: 'rgba(255,255,255,0.72)' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px', color: '#10B981' }}>lock</span>
|
||||||
|
256-Bit SSL Encrypted Vault
|
||||||
|
</div>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '8px', fontSize: '12.5px', color: 'rgba(255,255,255,0.72)' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px', color: '#10B981' }}>verified</span>
|
||||||
|
AICPA Member Firm Standards
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Form Side */}
|
||||||
<div className="auth-form-side">
|
<div className="auth-form-side">
|
||||||
<div className="auth-box">
|
<div className="auth-box">
|
||||||
<Link to="/" className="fancy-link" style={{display: 'inline-block', marginBottom: '1.5rem', fontSize: '0.95rem', fontWeight: '500'}}>
|
<Link
|
||||||
← Back to Home
|
to="/"
|
||||||
|
style={{
|
||||||
|
display: 'inline-flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '6px',
|
||||||
|
marginBottom: '1.5rem',
|
||||||
|
fontSize: '13px',
|
||||||
|
fontWeight: 600,
|
||||||
|
color: '#1D4ED8',
|
||||||
|
textDecoration: 'none'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>arrow_back</span>
|
||||||
|
Back to Home
|
||||||
</Link>
|
</Link>
|
||||||
<h1>Create Account</h1>
|
|
||||||
<p className="auth-subtitle">It only takes a minute</p>
|
|
||||||
|
|
||||||
{error && <div style={{color: 'var(--error)', marginBottom: '1rem', fontSize: '14px'}}>{error}</div>}
|
<h1>Create Account</h1>
|
||||||
|
<p className="auth-subtitle">It only takes a minute to set up your portal</p>
|
||||||
|
|
||||||
|
{error && (
|
||||||
|
<div style={{ color: 'var(--error, #DC2626)', marginBottom: '1rem', fontSize: '14px', background: 'rgba(220, 38, 38, 0.08)', padding: '10px 14px', borderRadius: '8px' }}>
|
||||||
|
{error}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<form onSubmit={handleSignup} autoComplete="off">
|
<form onSubmit={handleSignup} autoComplete="off">
|
||||||
<div className="form-group">
|
<div className="form-group" style={{ marginBottom: '16px' }}>
|
||||||
<label className="form-label" htmlFor="name">Full Name</label>
|
<label className="form-label" htmlFor="name" style={{ display: 'block', fontSize: '12.5px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>
|
||||||
<input
|
Full Name *
|
||||||
id="name"
|
</label>
|
||||||
type="text"
|
<input
|
||||||
className="input"
|
id="name"
|
||||||
placeholder="Jane Smith"
|
type="text"
|
||||||
required
|
className="artha-form-input"
|
||||||
|
placeholder="Jane Smith"
|
||||||
|
required
|
||||||
value={formData.name}
|
value={formData.name}
|
||||||
onChange={e => setFormData({...formData, name: e.target.value})}
|
onChange={(e) => setFormData({ ...formData, name: e.target.value })}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="form-group">
|
|
||||||
<label className="form-label" htmlFor="email">Email Address</label>
|
<div className="form-group" style={{ marginBottom: '16px' }}>
|
||||||
<input
|
<label className="form-label" htmlFor="email" style={{ display: 'block', fontSize: '12.5px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>
|
||||||
id="email"
|
Email Address *
|
||||||
type="email"
|
</label>
|
||||||
className="input"
|
<input
|
||||||
placeholder="you@example.com"
|
id="email"
|
||||||
required
|
type="email"
|
||||||
|
className="artha-form-input"
|
||||||
|
placeholder="you@example.com"
|
||||||
|
required
|
||||||
value={formData.email}
|
value={formData.email}
|
||||||
onChange={e => setFormData({...formData, email: e.target.value})}
|
onChange={(e) => setFormData({ ...formData, email: e.target.value })}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="form-group">
|
|
||||||
<label className="form-label" htmlFor="phone">Phone Number <span style={{color:'var(--muted)', fontWeight:400}}>(optional)</span></label>
|
<div className="form-group" style={{ marginBottom: '16px' }}>
|
||||||
<input
|
<label className="form-label" htmlFor="phone" style={{ display: 'block', fontSize: '12.5px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>
|
||||||
id="phone"
|
Phone Number <span style={{ color: '#8C9BA5', fontWeight: 400 }}>(optional)</span>
|
||||||
type="tel"
|
</label>
|
||||||
className="input"
|
<input
|
||||||
placeholder="+1 (555) 000-0000"
|
id="phone"
|
||||||
|
type="tel"
|
||||||
|
className="artha-form-input"
|
||||||
|
placeholder="Phone Number"
|
||||||
value={formData.phone}
|
value={formData.phone}
|
||||||
onChange={e => setFormData({...formData, phone: e.target.value})}
|
onChange={(e) => setFormData({ ...formData, phone: e.target.value })}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="form-group">
|
|
||||||
<label className="form-label" htmlFor="password">Password</label>
|
<div className="form-group" style={{ marginBottom: '22px' }}>
|
||||||
<div className="password-wrap">
|
<label className="form-label" htmlFor="password" style={{ display: 'block', fontSize: '12.5px', fontWeight: 600, color: '#0A2540', marginBottom: '6px' }}>
|
||||||
<input
|
Password *
|
||||||
id="password"
|
</label>
|
||||||
type={showPassword ? 'text' : 'password'}
|
<div style={{ position: 'relative' }}>
|
||||||
className="input"
|
<input
|
||||||
placeholder="At least 8 characters"
|
id="password"
|
||||||
required
|
type={showPassword ? 'text' : 'password'}
|
||||||
style={{paddingRight:'56px'}}
|
className="artha-form-input"
|
||||||
|
style={{ paddingRight: '60px', marginBottom: 0 }}
|
||||||
|
placeholder="Create a strong password"
|
||||||
|
required
|
||||||
value={formData.password}
|
value={formData.password}
|
||||||
onChange={e => setFormData({...formData, password: e.target.value})}
|
onChange={(e) => setFormData({ ...formData, password: e.target.value })}
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="password-toggle"
|
|
||||||
onClick={() => setShowPassword(!showPassword)}
|
onClick={() => setShowPassword(!showPassword)}
|
||||||
|
style={{
|
||||||
|
position: 'absolute',
|
||||||
|
right: '12px',
|
||||||
|
top: '50%',
|
||||||
|
transform: 'translateY(-50%)',
|
||||||
|
background: 'none',
|
||||||
|
border: 'none',
|
||||||
|
fontSize: '12px',
|
||||||
|
fontWeight: 600,
|
||||||
|
color: '#425466',
|
||||||
|
cursor: 'pointer'
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{showPassword ? 'Hide' : 'Show'}
|
{showPassword ? 'Hide' : 'Show'}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="btn btn-primary w-full"
|
className="artha-pill-btn artha-pill-primary"
|
||||||
style={{borderRadius: 'var(--radius-sm)'}}
|
style={{ width: '100%', padding: '12px 20px', fontSize: '14.5px' }}
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
>
|
>
|
||||||
{loading ? 'Creating account...' : 'Create Account'}
|
{loading ? 'Creating Account...' : 'Create Client Account'}
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>arrow_forward</span>
|
||||||
</button>
|
</button>
|
||||||
<div className="auth-links">
|
|
||||||
Already have an account? <Link to="/login" className="fancy-link">Sign In</Link>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<div className="auth-links">
|
||||||
|
Already have an account?{' '}
|
||||||
|
<Link to="/login" style={{ color: '#1D4ED8', fontWeight: 600, textDecoration: 'underline' }}>
|
||||||
|
Sign In
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export default function UploadBusiness() {
|
|||||||
const [docs, setDocs] = useState([]);
|
const [docs, setDocs] = useState([]);
|
||||||
const [templates, setTemplates] = useState([]);
|
const [templates, setTemplates] = useState([]);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [isDragOver, setIsDragOver] = useState(false);
|
||||||
const fileInputRefs = useRef({});
|
const fileInputRefs = useRef({});
|
||||||
const extraFileRef = useRef(null);
|
const extraFileRef = useRef(null);
|
||||||
|
|
||||||
@@ -61,7 +62,8 @@ export default function UploadBusiness() {
|
|||||||
const data = await res.json().catch(() => ({}));
|
const data = await res.json().catch(() => ({}));
|
||||||
showToast(data.detail || "Upload failed", "error");
|
showToast(data.detail || "Upload failed", "error");
|
||||||
}
|
}
|
||||||
} catch (err) { console.error(err);
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
showToast("Upload failed due to network error", "error");
|
showToast("Upload failed due to network error", "error");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -70,7 +72,7 @@ export default function UploadBusiness() {
|
|||||||
setConfirmConfig({
|
setConfirmConfig({
|
||||||
isOpen: true,
|
isOpen: true,
|
||||||
title: "Delete Document",
|
title: "Delete Document",
|
||||||
message: "Delete this document?\nThis action cannot be undone.",
|
message: "Are you sure you want to delete this business document?\nThis action cannot be undone.",
|
||||||
isDestructive: true,
|
isDestructive: true,
|
||||||
confirmText: "Delete",
|
confirmText: "Delete",
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
@@ -83,7 +85,8 @@ export default function UploadBusiness() {
|
|||||||
} else {
|
} else {
|
||||||
showToast("Delete failed", "error");
|
showToast("Delete failed", "error");
|
||||||
}
|
}
|
||||||
} catch (err) { console.error(err);
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
showToast("Delete failed", "error");
|
showToast("Delete failed", "error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -99,7 +102,8 @@ export default function UploadBusiness() {
|
|||||||
} else {
|
} else {
|
||||||
showToast("Could not generate view link", "error");
|
showToast("Could not generate view link", "error");
|
||||||
}
|
}
|
||||||
} catch (err) { console.error(err);
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
showToast("Could not generate view link", "error");
|
showToast("Could not generate view link", "error");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -132,16 +136,18 @@ export default function UploadBusiness() {
|
|||||||
body: JSON.stringify({ file_count: docs.length, doc_category: "Business" })
|
body: JSON.stringify({ file_count: docs.length, doc_category: "Business" })
|
||||||
});
|
});
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
showToast("Documents sent for approval", "success");
|
showToast("Business ledgers & statements transmitted to CPA squad", "success");
|
||||||
} else {
|
} else {
|
||||||
showToast("Failed to send for approval", "error");
|
showToast("Failed to transmit for approval", "error");
|
||||||
}
|
}
|
||||||
} catch (err) { console.error(err);
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
showToast("Error sending for approval", "error");
|
showToast("Error sending for approval", "error");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const years = [new Date().getFullYear(), new Date().getFullYear() - 1, new Date().getFullYear() - 2];
|
const currentYear = new Date().getFullYear();
|
||||||
|
const years = [currentYear, currentYear - 1, currentYear - 2];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -149,45 +155,109 @@ export default function UploadBusiness() {
|
|||||||
{...confirmConfig}
|
{...confirmConfig}
|
||||||
onCancel={() => setConfirmConfig(prev => ({ ...prev, isOpen: false }))}
|
onCancel={() => setConfirmConfig(prev => ({ ...prev, isOpen: false }))}
|
||||||
/>
|
/>
|
||||||
<div style={{marginBottom: '16px'}}>
|
|
||||||
<Link to="/dashboard" className="fancy-link" style={{fontSize: '14px', fontWeight: 500}}>← Back to Dashboard</Link>
|
{/* Top Breadcrumb & Header */}
|
||||||
</div>
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: '20px', flexWrap: 'wrap', gap: '14px' }}>
|
||||||
<div className="page-heading">
|
<Link
|
||||||
<div>
|
to="/dashboard"
|
||||||
<h1>Business Documents</h1>
|
className="artha-pill-btn artha-pill-outline"
|
||||||
<p className="page-meta">Upload your business tax documents securely</p>
|
style={{ padding: '6px 14px', fontSize: '12.5px' }}
|
||||||
</div>
|
>
|
||||||
<div style={{display:'flex', flexDirection:'column', alignItems:'flex-end', gap:'4px'}}>
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>arrow_back</span>
|
||||||
<label htmlFor="taxYearSelect" className="form-label" style={{margin:0}}>Tax Year</label>
|
Return to Dashboard
|
||||||
<select id="taxYearSelect"
|
</Link>
|
||||||
className="select-input"
|
|
||||||
style={{width:'auto', padding:'8px 14px'}}
|
{/* Tax Year Selector */}
|
||||||
value={taxYear}
|
<div style={{ display: 'flex', alignItems: 'center', gap: '10px' }}>
|
||||||
onChange={(e) => setTaxYear(e.target.value)}
|
<span style={{ fontSize: '13px', fontWeight: 600, color: '#0A2540' }}>Tax Filing Year:</span>
|
||||||
>
|
<div style={{ display: 'flex', gap: '6px' }}>
|
||||||
{years.map(y => <option key={y} value={y}>{y}</option>)}
|
{years.map(y => (
|
||||||
</select>
|
<button
|
||||||
|
key={y}
|
||||||
|
type="button"
|
||||||
|
className={`artha-pill-btn ${taxYear === y ? 'artha-pill-primary' : 'artha-pill-outline'}`}
|
||||||
|
style={{ padding: '6px 14px', fontSize: '12px' }}
|
||||||
|
onClick={() => setTaxYear(y)}
|
||||||
|
>
|
||||||
|
TY {y}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="card" style={{marginBottom: '20px'}}>
|
{/* Hero Banner */}
|
||||||
<h3 style={{marginBottom: '16px'}} className="card-title">Required Documents</h3>
|
<div className="artha-portal-hero" style={{ padding: '24px 30px' }}>
|
||||||
<div id="docWrapper">
|
<div className="artha-portal-hero-left">
|
||||||
|
<div className="artha-eyebrow-pill" style={{ marginBottom: '8px' }}>
|
||||||
|
<span className="dot"></span>
|
||||||
|
CORPORATE & STATUTORY LEDGERS
|
||||||
|
</div>
|
||||||
|
<h1 style={{ fontSize: '26px' }}>Business Documents & Statement Ingestion</h1>
|
||||||
|
<p style={{ fontSize: '14px' }}>
|
||||||
|
Upload raw bank statements, Form 1120-S / 1065 schedules, payroll summaries, and asset ledgers for Tax Year {taxYear}.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="artha-portal-hero-badges">
|
||||||
|
<div className="artha-portal-badge green">
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>smart_toy</span>
|
||||||
|
<span>AI Statement to P&L Enabled</span>
|
||||||
|
</div>
|
||||||
|
<div className="artha-portal-badge gold">
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>verified</span>
|
||||||
|
<span>{docs.length} File{docs.length === 1 ? '' : 's'} on Record</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Required Documents Section */}
|
||||||
|
<div className="artha-portal-card">
|
||||||
|
<div className="artha-portal-card-header">
|
||||||
|
<div>
|
||||||
|
<h3 className="artha-portal-card-title">
|
||||||
|
<span className="material-symbols-outlined" style={{ color: '#1D4ED8' }}>account_balance</span>
|
||||||
|
Required Business Schedules & Ledgers
|
||||||
|
</h3>
|
||||||
|
<p style={{ fontSize: '13.5px', color: '#425466', margin: '4px 0 0' }}>
|
||||||
|
Standard corporate returns and verification documentation for Form 1120, 1120-S, and 1065 partnerships.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<div className="empty-state">Loading templates...</div>
|
<div style={{ padding: '36px', textAlign: 'center', color: '#425466' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '28px', animation: 'spin 1s infinite' }}>sync</span>
|
||||||
|
<p style={{ marginTop: '8px', fontSize: '13.5px' }}>Loading business requirements for TY {taxYear}...</p>
|
||||||
|
</div>
|
||||||
) : templates.length === 0 ? (
|
) : templates.length === 0 ? (
|
||||||
<div className="empty-state">No required documents for this tax year.</div>
|
<div style={{ padding: '36px', textAlign: 'center', color: '#425466', background: '#F6F9FC', borderRadius: '14px' }}>
|
||||||
|
No statutory templates assigned for this business tax year yet. You can upload custom ledgers in the section below.
|
||||||
|
</div>
|
||||||
) : templates.map((dt, i) => {
|
) : templates.map((dt, i) => {
|
||||||
const uploaded = docs.filter(d => d.doc_type === dt.name);
|
const uploaded = docs.filter(d => d.doc_type === dt.name);
|
||||||
const latestDoc = uploaded[0] || null;
|
const latestDoc = uploaded[0] || null;
|
||||||
const isRejected = latestDoc?.review_status === 'rejected';
|
const isRejected = latestDoc?.review_status === 'rejected';
|
||||||
const isApproved = latestDoc?.review_status === 'approved';
|
const isApproved = latestDoc?.review_status === 'approved';
|
||||||
const isFiled = latestDoc?.review_status === 'filed';
|
const isFiled = latestDoc?.review_status === 'filed';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="doc-slot fade-up"
|
key={i}
|
||||||
key={i}
|
style={{
|
||||||
style={{ animationDelay: `${i * 0.04}s`, borderLeft: isRejected ? '3px solid #dc3545' : isApproved || isFiled ? '3px solid #2c7a5b' : 'none' }}
|
background: isRejected ? '#FFF9F9' : '#FFFFFF',
|
||||||
|
border: isRejected ? '1px solid rgba(220,38,38,0.3)' : '1px solid rgba(10,37,64,0.08)',
|
||||||
|
borderLeft: isRejected ? '4px solid #DC2626' : isApproved || isFiled ? '4px solid #047857' : '4px solid rgba(10,37,64,0.15)',
|
||||||
|
borderRadius: '14px',
|
||||||
|
padding: '16px 20px',
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
gap: '16px',
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
transition: 'all 0.2s ease'
|
||||||
|
}}
|
||||||
onDragOver={(e) => e.preventDefault()}
|
onDragOver={(e) => e.preventDefault()}
|
||||||
onDrop={(e) => {
|
onDrop={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -200,42 +270,60 @@ export default function UploadBusiness() {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="doc-slot-info">
|
<div style={{ flex: 1, minWidth: '240px' }}>
|
||||||
<div className="doc-slot-name">{i+1}. {dt.name}</div>
|
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
||||||
<div className="doc-slot-status">
|
<span style={{ fontSize: '14.5px', fontWeight: 600, color: '#0A2540' }}>
|
||||||
|
{i + 1}. {dt.name}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ marginTop: '6px' }}>
|
||||||
{isRejected ? (
|
{isRejected ? (
|
||||||
<div>
|
<div>
|
||||||
<span style={{display:'inline-flex', alignItems:'center', gap:'5px', background:'#fdecea', color:'#c0392b', padding:'3px 10px', borderRadius:'20px', fontSize:'12px', fontWeight:700}}>
|
<span className="artha-status-pill artha-status-rejected">
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'13px'}}>cancel</span> REJECTED
|
<span className="material-symbols-outlined" style={{ fontSize: '13px' }}>cancel</span>
|
||||||
|
Rejected by CPA
|
||||||
</span>
|
</span>
|
||||||
{latestDoc.review_note && (
|
{latestDoc.review_note && (
|
||||||
<div style={{fontSize:'12px', color:'#c0392b', marginTop:'5px', fontStyle:'italic', maxWidth:'260px'}}>
|
<div style={{ fontSize: '12px', color: '#DC2626', marginTop: '4px', fontStyle: 'italic' }}>
|
||||||
⚠️ Reason: "{latestDoc.review_note}"
|
Reason: “{latestDoc.review_note}”
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div style={{fontSize:'11px', color:'var(--muted)', marginTop:'3px'}}>Please correct and re-upload below.</div>
|
|
||||||
</div>
|
</div>
|
||||||
) : isApproved ? (
|
) : isApproved ? (
|
||||||
<span style={{display:'inline-flex', alignItems:'center', gap:'5px', background:'#edf7f2', color:'#2c7a5b', padding:'3px 10px', borderRadius:'20px', fontSize:'12px', fontWeight:700}}>
|
<span className="artha-status-pill artha-status-approved">
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'13px'}}>check_circle</span> APPROVED
|
<span className="material-symbols-outlined" style={{ fontSize: '13px' }}>check_circle</span>
|
||||||
|
Verified & Approved
|
||||||
</span>
|
</span>
|
||||||
) : isFiled ? (
|
) : isFiled ? (
|
||||||
<span style={{display:'inline-flex', alignItems:'center', gap:'5px', background:'#edf7f2', color:'#2c7a5b', padding:'3px 10px', borderRadius:'20px', fontSize:'12px', fontWeight:700}}>
|
<span className="artha-status-pill artha-status-approved">
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'13px'}}>inventory_2</span> FILED
|
<span className="material-symbols-outlined" style={{ fontSize: '13px' }}>inventory_2</span>
|
||||||
|
Filed with IRS
|
||||||
</span>
|
</span>
|
||||||
) : uploaded.length ? (
|
) : uploaded.length ? (
|
||||||
<span className="pill-pending"><span className="material-symbols-outlined">pending</span> Pending Review</span>
|
<span className="artha-status-pill artha-status-pending">
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '13px' }}>hourglass_top</span>
|
||||||
|
Under CPA Review
|
||||||
|
</span>
|
||||||
) : dt.download ? (
|
) : dt.download ? (
|
||||||
<a href={dt.download} target="_blank" rel="noopener noreferrer" className="btn-link" style={{ fontSize: '14px', color: 'var(--emerald)', textDecoration: 'underline' }}>View Template</a>
|
<a
|
||||||
|
href={dt.download}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
style={{ fontSize: '12.5px', color: '#1D4ED8', textDecoration: 'underline', fontWeight: 500 }}
|
||||||
|
>
|
||||||
|
Download Blank Template →
|
||||||
|
</a>
|
||||||
) : (
|
) : (
|
||||||
"Missing"
|
<span style={{ fontSize: '12px', color: '#425466' }}>Pending business upload</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="doc-slot-actions">
|
|
||||||
<input
|
<div style={{ display: 'flex', alignItems: 'center', gap: '8px', flexWrap: 'wrap' }}>
|
||||||
type="file"
|
<input
|
||||||
hidden
|
type="file"
|
||||||
|
hidden
|
||||||
accept=".pdf,.jpg,.jpeg,.png,.webp,.doc,.docx,.xls,.xlsx,.zip"
|
accept=".pdf,.jpg,.jpeg,.png,.webp,.doc,.docx,.xls,.xlsx,.zip"
|
||||||
ref={el => fileInputRefs.current[dt.name] = el}
|
ref={el => fileInputRefs.current[dt.name] = el}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
@@ -245,31 +333,50 @@ export default function UploadBusiness() {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<div style={{display: 'flex', gap: '8px', alignItems: 'center', flexWrap:'wrap'}}>
|
|
||||||
{dt.download && (
|
{dt.download && (
|
||||||
<a href={dt.download} target="_blank" rel="noreferrer" className="btn btn-secondary btn-sm" style={{borderRadius: 'var(--radius-pill)', padding: '4px 12px', display: 'flex', alignItems: 'center', gap: '4px'}}>
|
<a
|
||||||
<span className="material-symbols-outlined" style={{fontSize: '16px'}}>download</span> Template
|
href={dt.download}
|
||||||
</a>
|
target="_blank"
|
||||||
)}
|
rel="noreferrer"
|
||||||
{/* Show Upload button if no doc OR doc is rejected (re-upload allowed) */}
|
className="artha-pill-btn artha-pill-outline"
|
||||||
{(!uploaded.length || isRejected) && (
|
style={{ padding: '6px 12px', fontSize: '12px' }}
|
||||||
<button
|
>
|
||||||
className={`btn btn-sm ${isRejected ? 'btn-primary' : 'btn-upload-pill'}`}
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>download</span>
|
||||||
style={isRejected ? {background:'#2c7a5b', borderColor:'#2c7a5b', color:'#fff', borderRadius:'var(--radius-pill)'} : {}}
|
Template
|
||||||
onClick={() => fileInputRefs.current[dt.name].click()}
|
</a>
|
||||||
>
|
)}
|
||||||
{isRejected ? '🔄 Re-upload' : 'Upload'}
|
|
||||||
</button>
|
{(!uploaded.length || isRejected) && (
|
||||||
)}
|
<button
|
||||||
</div>
|
className="artha-pill-btn artha-pill-primary"
|
||||||
|
style={{ padding: '6px 14px', fontSize: '12px' }}
|
||||||
|
onClick={() => fileInputRefs.current[dt.name].click()}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>upload</span>
|
||||||
|
{isRejected ? 'Re-upload Schedule' : 'Upload Schedule'}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
|
||||||
{uploaded.map(doc => (
|
{uploaded.map(doc => (
|
||||||
<div key={doc.id} style={{display:'flex', flexDirection:'column', gap:'8px', alignItems:'flex-end', marginTop:'4px'}}>
|
<div key={doc.id} style={{ display: 'flex', gap: '6px' }}>
|
||||||
<div style={{display:'flex', gap:'8px'}}>
|
<button
|
||||||
<button className="btn btn-secondary btn-xs" style={{borderRadius:'var(--radius-sm)'}} onClick={() => viewDoc(doc.storage_key)}>View</button>
|
className="artha-pill-btn artha-pill-outline"
|
||||||
{!isApproved && !isFiled && (
|
style={{ padding: '5px 10px', fontSize: '11.5px' }}
|
||||||
<button className="btn btn-danger btn-xs" style={{borderRadius:'var(--radius-sm)'}} onClick={() => deleteDoc(doc.id)}>Delete</button>
|
onClick={() => viewDoc(doc.storage_key)}
|
||||||
)}
|
>
|
||||||
</div>
|
<span className="material-symbols-outlined" style={{ fontSize: '14px' }}>visibility</span>
|
||||||
|
View
|
||||||
|
</button>
|
||||||
|
{!isApproved && !isFiled && (
|
||||||
|
<button
|
||||||
|
className="artha-pill-btn artha-pill-outline"
|
||||||
|
style={{ padding: '5px 10px', fontSize: '11.5px', color: '#DC2626', borderColor: 'rgba(220,38,38,0.3)' }}
|
||||||
|
onClick={() => deleteDoc(doc.id)}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '14px' }}>delete</span>
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
@@ -279,83 +386,152 @@ export default function UploadBusiness() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="card">
|
{/* Additional Business Documents & Bank Statements Dropzone */}
|
||||||
<div className="flex-between" style={{marginBottom: '16px'}}>
|
<div className="artha-portal-card">
|
||||||
|
<div className="artha-portal-card-header">
|
||||||
<div>
|
<div>
|
||||||
<h3 className="card-title">Additional Documents</h3>
|
<h3 className="artha-portal-card-title">
|
||||||
<p className="text-sm" style={{marginTop:'2px'}}>Upload any supplementary business documents</p>
|
<span className="material-symbols-outlined" style={{ color: '#1D4ED8' }}>receipt_long</span>
|
||||||
|
Bank Statements, Ledgers & Receipts Vault
|
||||||
|
</h3>
|
||||||
|
<p style={{ fontSize: '13.5px', color: '#425466', margin: '4px 0 0' }}>
|
||||||
|
Upload raw PDF checking statements, credit card logs, or payroll reports for automated reconciliation.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<label
|
|
||||||
className="btn btn-secondary btn-sm"
|
<label
|
||||||
style={{borderRadius:'var(--radius-sm)', cursor:'pointer'}}
|
className="artha-pill-btn artha-pill-primary"
|
||||||
tabIndex={0}
|
style={{ padding: '7px 16px', fontSize: '12.5px', cursor: 'pointer' }}
|
||||||
onKeyDown={(e) => {
|
|
||||||
if (e.key === 'Enter' || e.key === ' ') {
|
|
||||||
e.preventDefault();
|
|
||||||
extraFileRef.current?.click();
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
+ Choose Files
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>add</span>
|
||||||
<input type="file" multiple hidden accept=".pdf,.jpg,.jpeg,.png,.webp,.doc,.docx,.xls,.xlsx,.zip" onChange={handleExtraUpload} />
|
Browse & Add Ledgers
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
multiple
|
||||||
|
hidden
|
||||||
|
accept=".pdf,.jpg,.jpeg,.png,.webp,.doc,.docx,.xls,.xlsx,.zip"
|
||||||
|
onChange={handleExtraUpload}
|
||||||
|
/>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
{/* Drag Area */}
|
||||||
className="drop-area"
|
<div
|
||||||
style={{ border:'2px dashed #cfc7ad', borderRadius:'var(--radius-md)', padding:'28px 20px', textAlign:'center', cursor:'pointer', background:'var(--card)' }}
|
className={`artha-dropzone ${isDragOver ? 'is-dragover' : ''}`}
|
||||||
onClick={() => extraFileRef.current?.click()}
|
onClick={() => extraFileRef.current?.click()}
|
||||||
tabIndex={0}
|
onDragEnter={(e) => { e.preventDefault(); setIsDragOver(true); }}
|
||||||
onKeyDown={(e) => {
|
onDragOver={(e) => { e.preventDefault(); setIsDragOver(true); }}
|
||||||
if (e.key === 'Enter' || e.key === ' ') {
|
onDragLeave={() => setIsDragOver(false)}
|
||||||
e.preventDefault();
|
|
||||||
extraFileRef.current?.click();
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
onDragOver={(e) => e.preventDefault()}
|
|
||||||
onDrop={(e) => {
|
onDrop={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
setIsDragOver(false);
|
||||||
if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {
|
if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {
|
||||||
const fakeEvent = { target: { files: e.dataTransfer.files } };
|
const fakeEvent = { target: { files: e.dataTransfer.files } };
|
||||||
handleExtraUpload(fakeEvent);
|
handleExtraUpload(fakeEvent);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="da-icon"><span className="material-symbols-outlined" style={{color: 'var(--brass)', fontSize: '32px'}}>folder</span></div>
|
<div
|
||||||
<div className="da-title" style={{fontWeight: 600, color: 'var(--navy)', fontSize: '14px'}}>Drag & drop files here</div>
|
style={{
|
||||||
<div className="da-hint" style={{fontSize: '12px', color: 'var(--muted)'}}>or click to browse · PDF, JPG, PNG, WEBP, DOC, EXCEL · Max 10MB</div>
|
width: '52px',
|
||||||
|
height: '52px',
|
||||||
|
borderRadius: '50%',
|
||||||
|
background: 'rgba(29, 78, 216, 0.08)',
|
||||||
|
color: '#1D4ED8',
|
||||||
|
display: 'inline-flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
marginBottom: '12px'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '28px' }}>cloud_upload</span>
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '15px', fontWeight: 600, color: '#0A2540', marginBottom: '4px' }}>
|
||||||
|
Drag and drop business ledgers & bank statements here
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '12.5px', color: '#425466' }}>
|
||||||
|
PDF, Excel (XLS/XLSX), CSV, PNG, JPG, ZIP • Max 10MB per file
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="file" multiple hidden ref={extraFileRef} onChange={handleExtraUpload} />
|
<input type="file" multiple hidden ref={extraFileRef} onChange={handleExtraUpload} />
|
||||||
|
|
||||||
<div className="upload-track mt-12">
|
{/* Uploaded Extra Documents Tracker */}
|
||||||
{docs.filter(d => d.doc_type.startsWith("other")).map(doc => (
|
{docs.filter(d => d.doc_type.startsWith("other")).length > 0 && (
|
||||||
<div key={doc.id} style={{marginBottom:'6px'}}>
|
<div style={{ marginTop: '20px', display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
||||||
<div className="upload-track-item" style={{display:'flex', alignItems:'center', gap:'10px', padding:'8px 12px', borderRadius:'var(--radius-sm)', background:'var(--paper)', fontSize:'13px'}}>
|
<h5 style={{ fontSize: '12.5px', textTransform: 'uppercase', letterSpacing: '0.06em', color: '#425466', margin: '0 0 6px' }}>
|
||||||
<span className="material-symbols-outlined" style={{color:'var(--green)', fontSize:'18px'}}>check_circle</span>
|
Uploaded Supplementary Ledgers ({docs.filter(d => d.doc_type.startsWith("other")).length}):
|
||||||
<div className="uti-name" style={{flex:1}}>{doc.filename}</div>
|
</h5>
|
||||||
<button className="btn btn-secondary btn-sm" style={{padding:'4px'}} onClick={() => viewDoc(doc.storage_key)}>
|
{docs.filter(d => d.doc_type.startsWith("other")).map(doc => (
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'16px'}}>visibility</span>
|
<div
|
||||||
</button>
|
key={doc.id}
|
||||||
<button className="btn btn-danger btn-sm" style={{padding:'4px'}} onClick={() => deleteDoc(doc.id)}>
|
style={{
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'16px'}}>delete</span>
|
display: 'flex',
|
||||||
</button>
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
padding: '10px 16px',
|
||||||
|
borderRadius: '12px',
|
||||||
|
background: '#F6F9FC',
|
||||||
|
border: '1px solid rgba(10, 37, 64, 0.07)',
|
||||||
|
fontSize: '13px'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '10px', minWidth: 0, flex: 1 }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ color: '#047857', fontSize: '18px' }}>check_circle</span>
|
||||||
|
<span style={{ fontWeight: 500, color: '#0A2540', wordBreak: 'break-all' }}>{doc.filename}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ display: 'flex', gap: '6px' }}>
|
||||||
|
<button
|
||||||
|
className="artha-pill-btn artha-pill-outline"
|
||||||
|
style={{ padding: '4px 10px', fontSize: '11px' }}
|
||||||
|
onClick={() => viewDoc(doc.storage_key)}
|
||||||
|
>
|
||||||
|
View
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
className="artha-pill-btn artha-pill-outline"
|
||||||
|
style={{ padding: '4px 10px', fontSize: '11px', color: '#DC2626', borderColor: 'rgba(220,38,38,0.25)' }}
|
||||||
|
onClick={() => deleteDoc(doc.id)}
|
||||||
|
>
|
||||||
|
Delete
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
))}
|
||||||
))}
|
</div>
|
||||||
</div>
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="card mt-20" style={{marginTop: '20px'}}>
|
{/* Completion & Submit Banner */}
|
||||||
<div style={{display:'flex', alignItems:'center', justifyContent:'space-between', flexWrap:'wrap', gap:'16px'}}>
|
<div
|
||||||
<div>
|
className="artha-portal-card"
|
||||||
<h3 style={{marginBottom:'4px'}} className="card-title">Finished Uploading?</h3>
|
style={{
|
||||||
<p className="text-sm" style={{margin:0}}>Send your business documents for review.</p>
|
background: '#0A2540',
|
||||||
</div>
|
color: '#FFFFFF',
|
||||||
<button className="btn btn-primary" onClick={notifyComplete}>
|
display: 'flex',
|
||||||
<span className="material-symbols-outlined">send</span>
|
alignItems: 'center',
|
||||||
Send for Approval
|
justifyContent: 'space-between',
|
||||||
</button>
|
flexWrap: 'wrap',
|
||||||
|
gap: '18px'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<h3 style={{ fontSize: '18px', color: '#FFFFFF', margin: '0 0 4px', fontFamily: 'var(--font-display)' }}>
|
||||||
|
Finished Uploading Business Records?
|
||||||
|
</h3>
|
||||||
|
<p style={{ fontSize: '13px', color: 'rgba(255,255,255,0.7)', margin: 0 }}>
|
||||||
|
Notify your advisory team that all corporate schedules and bank statements have been uploaded for TY {taxYear}.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
className="artha-pill-btn artha-pill-primary"
|
||||||
|
style={{ background: '#1D4ED8', borderColor: '#1D4ED8', padding: '10px 22px' }}
|
||||||
|
onClick={notifyComplete}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>send</span>
|
||||||
|
Transmit for CPA Processing
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export default function UploadPersonal() {
|
|||||||
const [docs, setDocs] = useState([]);
|
const [docs, setDocs] = useState([]);
|
||||||
const [templates, setTemplates] = useState([]);
|
const [templates, setTemplates] = useState([]);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [isDragOver, setIsDragOver] = useState(false);
|
||||||
const fileInputRefs = useRef({});
|
const fileInputRefs = useRef({});
|
||||||
const extraFileRef = useRef(null);
|
const extraFileRef = useRef(null);
|
||||||
|
|
||||||
@@ -63,7 +64,8 @@ export default function UploadPersonal() {
|
|||||||
const data = await res.json().catch(() => ({}));
|
const data = await res.json().catch(() => ({}));
|
||||||
showToast(data.detail || "Upload failed", "error");
|
showToast(data.detail || "Upload failed", "error");
|
||||||
}
|
}
|
||||||
} catch (err) { console.error(err);
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
showToast("Upload failed due to network error", "error");
|
showToast("Upload failed due to network error", "error");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -72,7 +74,7 @@ export default function UploadPersonal() {
|
|||||||
setConfirmConfig({
|
setConfirmConfig({
|
||||||
isOpen: true,
|
isOpen: true,
|
||||||
title: "Delete Document",
|
title: "Delete Document",
|
||||||
message: "Delete this document?\nThis action cannot be undone.",
|
message: "Are you sure you want to delete this document?\nThis action cannot be undone.",
|
||||||
isDestructive: true,
|
isDestructive: true,
|
||||||
confirmText: "Delete",
|
confirmText: "Delete",
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
@@ -85,7 +87,8 @@ export default function UploadPersonal() {
|
|||||||
} else {
|
} else {
|
||||||
showToast("Delete failed", "error");
|
showToast("Delete failed", "error");
|
||||||
}
|
}
|
||||||
} catch (err) { console.error(err);
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
showToast("Delete failed", "error");
|
showToast("Delete failed", "error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -101,7 +104,8 @@ export default function UploadPersonal() {
|
|||||||
} else {
|
} else {
|
||||||
showToast("Could not generate view link", "error");
|
showToast("Could not generate view link", "error");
|
||||||
}
|
}
|
||||||
} catch (err) { console.error(err);
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
showToast("Could not generate view link", "error");
|
showToast("Could not generate view link", "error");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -134,16 +138,18 @@ export default function UploadPersonal() {
|
|||||||
body: JSON.stringify({ file_count: docs.length, doc_category: "Personal" })
|
body: JSON.stringify({ file_count: docs.length, doc_category: "Personal" })
|
||||||
});
|
});
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
showToast("Documents sent for approval", "success");
|
showToast("Personal documents transmitted to CPA review squad", "success");
|
||||||
} else {
|
} else {
|
||||||
showToast("Failed to send for approval", "error");
|
showToast("Failed to transmit for approval", "error");
|
||||||
}
|
}
|
||||||
} catch (err) { console.error(err);
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
showToast("Error sending for approval", "error");
|
showToast("Error sending for approval", "error");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const years = [new Date().getFullYear(), new Date().getFullYear() - 1, new Date().getFullYear() - 2];
|
const currentYear = new Date().getFullYear();
|
||||||
|
const years = [currentYear, currentYear - 1, currentYear - 2];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -151,45 +157,109 @@ export default function UploadPersonal() {
|
|||||||
{...confirmConfig}
|
{...confirmConfig}
|
||||||
onCancel={() => setConfirmConfig(prev => ({ ...prev, isOpen: false }))}
|
onCancel={() => setConfirmConfig(prev => ({ ...prev, isOpen: false }))}
|
||||||
/>
|
/>
|
||||||
<div style={{marginBottom: '16px'}}>
|
|
||||||
<Link to="/dashboard" className="fancy-link" style={{fontSize: '14px', fontWeight: 500}}>← Back to Dashboard</Link>
|
{/* Top Breadcrumb & Header */}
|
||||||
</div>
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: '20px', flexWrap: 'wrap', gap: '14px' }}>
|
||||||
<div className="page-heading">
|
<Link
|
||||||
<div>
|
to="/dashboard"
|
||||||
<h1>Personal Documents</h1>
|
className="artha-pill-btn artha-pill-outline"
|
||||||
<p className="page-meta">Upload your personal tax documents securely</p>
|
style={{ padding: '6px 14px', fontSize: '12.5px' }}
|
||||||
</div>
|
>
|
||||||
<div style={{display:'flex', flexDirection:'column', alignItems:'flex-end', gap:'4px'}}>
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>arrow_back</span>
|
||||||
<label htmlFor="taxYearSelect" className="form-label" style={{margin:0}}>Tax Year</label>
|
Return to Dashboard
|
||||||
<select id="taxYearSelect"
|
</Link>
|
||||||
className="select-input"
|
|
||||||
style={{width:'auto', padding:'8px 14px'}}
|
{/* Tax Year Selector */}
|
||||||
value={taxYear}
|
<div style={{ display: 'flex', alignItems: 'center', gap: '10px' }}>
|
||||||
onChange={(e) => setTaxYear(e.target.value)}
|
<span style={{ fontSize: '13px', fontWeight: 600, color: '#0A2540' }}>Tax Filing Year:</span>
|
||||||
>
|
<div style={{ display: 'flex', gap: '6px' }}>
|
||||||
{years.map(y => <option key={y} value={y}>{y}</option>)}
|
{years.map(y => (
|
||||||
</select>
|
<button
|
||||||
|
key={y}
|
||||||
|
type="button"
|
||||||
|
className={`artha-pill-btn ${taxYear === y ? 'artha-pill-primary' : 'artha-pill-outline'}`}
|
||||||
|
style={{ padding: '6px 14px', fontSize: '12px' }}
|
||||||
|
onClick={() => setTaxYear(y)}
|
||||||
|
>
|
||||||
|
TY {y}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="card" style={{marginBottom: '20px'}}>
|
{/* Hero Banner */}
|
||||||
<h3 style={{marginBottom: '16px'}} className="card-title">Required Documents</h3>
|
<div className="artha-portal-hero" style={{ padding: '24px 30px' }}>
|
||||||
<div id="docWrapper">
|
<div className="artha-portal-hero-left">
|
||||||
|
<div className="artha-eyebrow-pill" style={{ marginBottom: '8px' }}>
|
||||||
|
<span className="dot"></span>
|
||||||
|
INDIVIDUAL & FAMILY COMPLIANCE
|
||||||
|
</div>
|
||||||
|
<h1 style={{ fontSize: '26px' }}>Personal Tax Documents Vault</h1>
|
||||||
|
<p style={{ fontSize: '14px' }}>
|
||||||
|
Upload government forms (W-2, 1099, K-1), identification, mortgage interest statements, and overseas accounts (FBAR / FATCA) for Tax Year {taxYear}.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="artha-portal-hero-badges">
|
||||||
|
<div className="artha-portal-badge green">
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>verified</span>
|
||||||
|
<span>{docs.length} Document{docs.length === 1 ? '' : 's'} on Record</span>
|
||||||
|
</div>
|
||||||
|
<div className="artha-portal-badge">
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>lock</span>
|
||||||
|
<span>256-Bit Encrypted</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Required Documents Section */}
|
||||||
|
<div className="artha-portal-card">
|
||||||
|
<div className="artha-portal-card-header">
|
||||||
|
<div>
|
||||||
|
<h3 className="artha-portal-card-title">
|
||||||
|
<span className="material-symbols-outlined" style={{ color: '#1D4ED8' }}>checklist</span>
|
||||||
|
Required Statutory Forms & Schedules
|
||||||
|
</h3>
|
||||||
|
<p style={{ fontSize: '13.5px', color: '#425466', margin: '4px 0 0' }}>
|
||||||
|
Standard filings required by the IRS and State Revenue departments for individual returns.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<div className="empty-state">Loading templates...</div>
|
<div style={{ padding: '36px', textAlign: 'center', color: '#425466' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '28px', animation: 'spin 1s infinite' }}>sync</span>
|
||||||
|
<p style={{ marginTop: '8px', fontSize: '13.5px' }}>Loading tax requirements for TY {taxYear}...</p>
|
||||||
|
</div>
|
||||||
) : templates.length === 0 ? (
|
) : templates.length === 0 ? (
|
||||||
<div className="empty-state">No required documents for this tax year.</div>
|
<div style={{ padding: '36px', textAlign: 'center', color: '#425466', background: '#F6F9FC', borderRadius: '14px' }}>
|
||||||
|
No statutory templates assigned for this tax year yet. You can upload files in the section below.
|
||||||
|
</div>
|
||||||
) : templates.map((dt, i) => {
|
) : templates.map((dt, i) => {
|
||||||
const uploaded = docs.filter(d => d.doc_type === dt.name);
|
const uploaded = docs.filter(d => d.doc_type === dt.name);
|
||||||
const latestDoc = uploaded[0] || null;
|
const latestDoc = uploaded[0] || null;
|
||||||
const isRejected = latestDoc?.review_status === 'rejected';
|
const isRejected = latestDoc?.review_status === 'rejected';
|
||||||
const isApproved = latestDoc?.review_status === 'approved';
|
const isApproved = latestDoc?.review_status === 'approved';
|
||||||
const isFiled = latestDoc?.review_status === 'filed';
|
const isFiled = latestDoc?.review_status === 'filed';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="doc-slot fade-up"
|
key={i}
|
||||||
key={i}
|
style={{
|
||||||
style={{ animationDelay: `${i * 0.04}s`, borderLeft: isRejected ? '3px solid #dc3545' : isApproved || isFiled ? '3px solid #2c7a5b' : 'none' }}
|
background: isRejected ? '#FFF9F9' : '#FFFFFF',
|
||||||
|
border: isRejected ? '1px solid rgba(220,38,38,0.3)' : '1px solid rgba(10,37,64,0.08)',
|
||||||
|
borderLeft: isRejected ? '4px solid #DC2626' : isApproved || isFiled ? '4px solid #047857' : '4px solid rgba(10,37,64,0.15)',
|
||||||
|
borderRadius: '14px',
|
||||||
|
padding: '16px 20px',
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
gap: '16px',
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
transition: 'all 0.2s ease'
|
||||||
|
}}
|
||||||
onDragOver={(e) => e.preventDefault()}
|
onDragOver={(e) => e.preventDefault()}
|
||||||
onDrop={(e) => {
|
onDrop={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -202,42 +272,60 @@ export default function UploadPersonal() {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="doc-slot-info">
|
<div style={{ flex: 1, minWidth: '240px' }}>
|
||||||
<div className="doc-slot-name">{i+1}. {dt.name}</div>
|
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
||||||
<div className="doc-slot-status">
|
<span style={{ fontSize: '14.5px', fontWeight: 600, color: '#0A2540' }}>
|
||||||
|
{i + 1}. {dt.name}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ marginTop: '6px' }}>
|
||||||
{isRejected ? (
|
{isRejected ? (
|
||||||
<div>
|
<div>
|
||||||
<span style={{display:'inline-flex', alignItems:'center', gap:'5px', background:'#fdecea', color:'#c0392b', padding:'3px 10px', borderRadius:'20px', fontSize:'12px', fontWeight:700}}>
|
<span className="artha-status-pill artha-status-rejected">
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'13px'}}>cancel</span> REJECTED
|
<span className="material-symbols-outlined" style={{ fontSize: '13px' }}>cancel</span>
|
||||||
|
Rejected by CPA
|
||||||
</span>
|
</span>
|
||||||
{latestDoc.review_note && (
|
{latestDoc.review_note && (
|
||||||
<div style={{fontSize:'12px', color:'#c0392b', marginTop:'5px', fontStyle:'italic', maxWidth:'260px'}}>
|
<div style={{ fontSize: '12px', color: '#DC2626', marginTop: '4px', fontStyle: 'italic' }}>
|
||||||
⚠️ Reason: "{latestDoc.review_note}"
|
Reason: “{latestDoc.review_note}”
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div style={{fontSize:'11px', color:'var(--muted)', marginTop:'3px'}}>Please correct and re-upload below.</div>
|
|
||||||
</div>
|
</div>
|
||||||
) : isApproved ? (
|
) : isApproved ? (
|
||||||
<span style={{display:'inline-flex', alignItems:'center', gap:'5px', background:'#edf7f2', color:'#2c7a5b', padding:'3px 10px', borderRadius:'20px', fontSize:'12px', fontWeight:700}}>
|
<span className="artha-status-pill artha-status-approved">
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'13px'}}>check_circle</span> APPROVED
|
<span className="material-symbols-outlined" style={{ fontSize: '13px' }}>check_circle</span>
|
||||||
|
Verified & Approved
|
||||||
</span>
|
</span>
|
||||||
) : isFiled ? (
|
) : isFiled ? (
|
||||||
<span style={{display:'inline-flex', alignItems:'center', gap:'5px', background:'#edf7f2', color:'#2c7a5b', padding:'3px 10px', borderRadius:'20px', fontSize:'12px', fontWeight:700}}>
|
<span className="artha-status-pill artha-status-approved">
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'13px'}}>inventory_2</span> FILED
|
<span className="material-symbols-outlined" style={{ fontSize: '13px' }}>inventory_2</span>
|
||||||
|
Filed with IRS
|
||||||
</span>
|
</span>
|
||||||
) : uploaded.length ? (
|
) : uploaded.length ? (
|
||||||
<span className="pill-pending"><span className="material-symbols-outlined">pending</span> Pending Review</span>
|
<span className="artha-status-pill artha-status-pending">
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '13px' }}>hourglass_top</span>
|
||||||
|
Under CPA Review
|
||||||
|
</span>
|
||||||
) : dt.download ? (
|
) : dt.download ? (
|
||||||
<a href={dt.download} target="_blank" rel="noopener noreferrer" className="btn-link" style={{ fontSize: '14px', color: 'var(--emerald)', textDecoration: 'underline' }}>View Template</a>
|
<a
|
||||||
|
href={dt.download}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
style={{ fontSize: '12.5px', color: '#1D4ED8', textDecoration: 'underline', fontWeight: 500 }}
|
||||||
|
>
|
||||||
|
Download Blank Template PDF →
|
||||||
|
</a>
|
||||||
) : (
|
) : (
|
||||||
"Missing"
|
<span style={{ fontSize: '12px', color: '#425466' }}>Pending client upload</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="doc-slot-actions">
|
|
||||||
<input
|
<div style={{ display: 'flex', alignItems: 'center', gap: '8px', flexWrap: 'wrap' }}>
|
||||||
type="file"
|
<input
|
||||||
hidden
|
type="file"
|
||||||
|
hidden
|
||||||
accept=".pdf,.jpg,.jpeg,.png,.webp,.doc,.docx,.xls,.xlsx,.zip"
|
accept=".pdf,.jpg,.jpeg,.png,.webp,.doc,.docx,.xls,.xlsx,.zip"
|
||||||
ref={el => fileInputRefs.current[dt.name] = el}
|
ref={el => fileInputRefs.current[dt.name] = el}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
@@ -247,31 +335,50 @@ export default function UploadPersonal() {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<div style={{display: 'flex', gap: '8px', alignItems: 'center', flexWrap:'wrap'}}>
|
|
||||||
{dt.download && (
|
{dt.download && (
|
||||||
<a href={dt.download} target="_blank" rel="noreferrer" className="btn btn-secondary btn-sm" style={{borderRadius: 'var(--radius-pill)', padding: '4px 12px', display: 'flex', alignItems: 'center', gap: '4px'}}>
|
<a
|
||||||
<span className="material-symbols-outlined" style={{fontSize: '16px'}}>download</span> Template
|
href={dt.download}
|
||||||
</a>
|
target="_blank"
|
||||||
)}
|
rel="noreferrer"
|
||||||
{/* Show Upload button if no doc OR doc is rejected (re-upload allowed) */}
|
className="artha-pill-btn artha-pill-outline"
|
||||||
{(!uploaded.length || isRejected) && (
|
style={{ padding: '6px 12px', fontSize: '12px' }}
|
||||||
<button
|
>
|
||||||
className={`btn btn-sm ${isRejected ? 'btn-primary' : 'btn-upload-pill'}`}
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>download</span>
|
||||||
style={isRejected ? {background:'#2c7a5b', borderColor:'#2c7a5b', color:'#fff', borderRadius:'var(--radius-pill)'} : {}}
|
Template
|
||||||
onClick={() => fileInputRefs.current[dt.name].click()}
|
</a>
|
||||||
>
|
)}
|
||||||
{isRejected ? '🔄 Re-upload' : 'Upload'}
|
|
||||||
</button>
|
{(!uploaded.length || isRejected) && (
|
||||||
)}
|
<button
|
||||||
</div>
|
className="artha-pill-btn artha-pill-primary"
|
||||||
|
style={{ padding: '6px 14px', fontSize: '12px' }}
|
||||||
|
onClick={() => fileInputRefs.current[dt.name].click()}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>upload</span>
|
||||||
|
{isRejected ? 'Re-upload Form' : 'Upload Form'}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
|
||||||
{uploaded.map(doc => (
|
{uploaded.map(doc => (
|
||||||
<div key={doc.id} style={{display:'flex', flexDirection:'column', gap:'8px', alignItems:'flex-end', marginTop:'4px'}}>
|
<div key={doc.id} style={{ display: 'flex', gap: '6px' }}>
|
||||||
<div style={{display:'flex', gap:'8px'}}>
|
<button
|
||||||
<button className="btn btn-secondary btn-xs" style={{borderRadius:'var(--radius-sm)'}} onClick={() => viewDoc(doc.storage_key)}>View</button>
|
className="artha-pill-btn artha-pill-outline"
|
||||||
{!isApproved && !isFiled && (
|
style={{ padding: '5px 10px', fontSize: '11.5px' }}
|
||||||
<button className="btn btn-danger btn-xs" style={{borderRadius:'var(--radius-sm)'}} onClick={() => deleteDoc(doc.id)}>Delete</button>
|
onClick={() => viewDoc(doc.storage_key)}
|
||||||
)}
|
>
|
||||||
</div>
|
<span className="material-symbols-outlined" style={{ fontSize: '14px' }}>visibility</span>
|
||||||
|
View
|
||||||
|
</button>
|
||||||
|
{!isApproved && !isFiled && (
|
||||||
|
<button
|
||||||
|
className="artha-pill-btn artha-pill-outline"
|
||||||
|
style={{ padding: '5px 10px', fontSize: '11.5px', color: '#DC2626', borderColor: 'rgba(220,38,38,0.3)' }}
|
||||||
|
onClick={() => deleteDoc(doc.id)}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '14px' }}>delete</span>
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
@@ -281,83 +388,152 @@ export default function UploadPersonal() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="card">
|
{/* Additional Documents Drag & Drop Vault */}
|
||||||
<div className="flex-between" style={{marginBottom: '16px'}}>
|
<div className="artha-portal-card">
|
||||||
|
<div className="artha-portal-card-header">
|
||||||
<div>
|
<div>
|
||||||
<h3 className="card-title">Additional Documents</h3>
|
<h3 className="artha-portal-card-title">
|
||||||
<p className="text-sm" style={{marginTop:'2px'}}>Upload any supplementary personal documents</p>
|
<span className="material-symbols-outlined" style={{ color: '#1D4ED8' }}>cloud_upload</span>
|
||||||
|
Supplementary Personal Files & Receipts
|
||||||
|
</h3>
|
||||||
|
<p style={{ fontSize: '13.5px', color: '#425466', margin: '4px 0 0' }}>
|
||||||
|
Drag and drop any extra statements, medical expenses, foreign disclosures, or receipts.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<label
|
|
||||||
className="btn btn-secondary btn-sm"
|
<label
|
||||||
style={{borderRadius:'var(--radius-sm)', cursor:'pointer'}}
|
className="artha-pill-btn artha-pill-primary"
|
||||||
tabIndex={0}
|
style={{ padding: '7px 16px', fontSize: '12.5px', cursor: 'pointer' }}
|
||||||
onKeyDown={(e) => {
|
|
||||||
if (e.key === 'Enter' || e.key === ' ') {
|
|
||||||
e.preventDefault();
|
|
||||||
extraFileRef.current?.click();
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
+ Choose Files
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>add</span>
|
||||||
<input type="file" multiple hidden accept=".pdf,.jpg,.jpeg,.png,.webp,.doc,.docx,.xls,.xlsx,.zip" onChange={handleExtraUpload} />
|
Browse & Add Files
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
multiple
|
||||||
|
hidden
|
||||||
|
accept=".pdf,.jpg,.jpeg,.png,.webp,.doc,.docx,.xls,.xlsx,.zip"
|
||||||
|
onChange={handleExtraUpload}
|
||||||
|
/>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
{/* Drag Area */}
|
||||||
className="drop-area"
|
<div
|
||||||
style={{ border:'2px dashed #cfc7ad', borderRadius:'var(--radius-md)', padding:'28px 20px', textAlign:'center', cursor:'pointer', background:'var(--card)' }}
|
className={`artha-dropzone ${isDragOver ? 'is-dragover' : ''}`}
|
||||||
onClick={() => extraFileRef.current?.click()}
|
onClick={() => extraFileRef.current?.click()}
|
||||||
tabIndex={0}
|
onDragEnter={(e) => { e.preventDefault(); setIsDragOver(true); }}
|
||||||
onKeyDown={(e) => {
|
onDragOver={(e) => { e.preventDefault(); setIsDragOver(true); }}
|
||||||
if (e.key === 'Enter' || e.key === ' ') {
|
onDragLeave={() => setIsDragOver(false)}
|
||||||
e.preventDefault();
|
|
||||||
extraFileRef.current?.click();
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
onDragOver={(e) => e.preventDefault()}
|
|
||||||
onDrop={(e) => {
|
onDrop={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
setIsDragOver(false);
|
||||||
if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {
|
if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {
|
||||||
const fakeEvent = { target: { files: e.dataTransfer.files } };
|
const fakeEvent = { target: { files: e.dataTransfer.files } };
|
||||||
handleExtraUpload(fakeEvent);
|
handleExtraUpload(fakeEvent);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="da-icon"><span className="material-symbols-outlined" style={{color: 'var(--brass)', fontSize: '32px'}}>folder</span></div>
|
<div
|
||||||
<div className="da-title" style={{fontWeight: 600, color: 'var(--navy)', fontSize: '14px'}}>Drag & drop files here</div>
|
style={{
|
||||||
<div className="da-hint" style={{fontSize: '12px', color: 'var(--muted)'}}>or click to browse · PDF, JPG, PNG, WEBP, DOC, DOCX · Max 10MB</div>
|
width: '52px',
|
||||||
|
height: '52px',
|
||||||
|
borderRadius: '50%',
|
||||||
|
background: 'rgba(29, 78, 216, 0.08)',
|
||||||
|
color: '#1D4ED8',
|
||||||
|
display: 'inline-flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
marginBottom: '12px'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '28px' }}>upload_file</span>
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '15px', fontWeight: 600, color: '#0A2540', marginBottom: '4px' }}>
|
||||||
|
Drag and drop files here, or click to browse
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '12.5px', color: '#425466' }}>
|
||||||
|
Supported formats: PDF, PNG, JPG, WEBP, DOCX, XLSX, ZIP • Max 10MB per file
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="file" multiple hidden ref={extraFileRef} onChange={handleExtraUpload} />
|
<input type="file" multiple hidden ref={extraFileRef} onChange={handleExtraUpload} />
|
||||||
|
|
||||||
<div className="upload-track mt-12">
|
{/* Uploaded Extra Documents Tracker */}
|
||||||
{docs.filter(d => d.doc_type.startsWith("other")).map(doc => (
|
{docs.filter(d => d.doc_type.startsWith("other")).length > 0 && (
|
||||||
<div key={doc.id} style={{marginBottom:'6px'}}>
|
<div style={{ marginTop: '20px', display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
||||||
<div className="upload-track-item" style={{display:'flex', alignItems:'center', gap:'10px', padding:'8px 12px', borderRadius:'var(--radius-sm)', background:'var(--paper)', fontSize:'13px'}}>
|
<h5 style={{ fontSize: '12.5px', textTransform: 'uppercase', letterSpacing: '0.06em', color: '#425466', margin: '0 0 6px' }}>
|
||||||
<span className="material-symbols-outlined" style={{color:'var(--green)', fontSize:'18px'}}>check_circle</span>
|
Uploaded Supplemental Documents ({docs.filter(d => d.doc_type.startsWith("other")).length}):
|
||||||
<div className="uti-name" style={{flex:1}}>{doc.filename}</div>
|
</h5>
|
||||||
<button className="btn btn-secondary btn-sm" style={{padding:'4px'}} onClick={() => viewDoc(doc.storage_key)}>
|
{docs.filter(d => d.doc_type.startsWith("other")).map(doc => (
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'16px'}}>visibility</span>
|
<div
|
||||||
</button>
|
key={doc.id}
|
||||||
<button className="btn btn-danger btn-sm" style={{padding:'4px'}} onClick={() => deleteDoc(doc.id)}>
|
style={{
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'16px'}}>delete</span>
|
display: 'flex',
|
||||||
</button>
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
padding: '10px 16px',
|
||||||
|
borderRadius: '12px',
|
||||||
|
background: '#F6F9FC',
|
||||||
|
border: '1px solid rgba(10, 37, 64, 0.07)',
|
||||||
|
fontSize: '13px'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', gap: '10px', minWidth: 0, flex: 1 }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ color: '#047857', fontSize: '18px' }}>check_circle</span>
|
||||||
|
<span style={{ fontWeight: 500, color: '#0A2540', wordBreak: 'break-all' }}>{doc.filename}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ display: 'flex', gap: '6px' }}>
|
||||||
|
<button
|
||||||
|
className="artha-pill-btn artha-pill-outline"
|
||||||
|
style={{ padding: '4px 10px', fontSize: '11px' }}
|
||||||
|
onClick={() => viewDoc(doc.storage_key)}
|
||||||
|
>
|
||||||
|
View
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
className="artha-pill-btn artha-pill-outline"
|
||||||
|
style={{ padding: '4px 10px', fontSize: '11px', color: '#DC2626', borderColor: 'rgba(220,38,38,0.25)' }}
|
||||||
|
onClick={() => deleteDoc(doc.id)}
|
||||||
|
>
|
||||||
|
Delete
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
))}
|
||||||
))}
|
</div>
|
||||||
</div>
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="card mt-20" style={{marginTop: '20px'}}>
|
{/* Completion & Submit Banner */}
|
||||||
<div style={{display:'flex', alignItems:'center', justifyContent:'space-between', flexWrap:'wrap', gap:'16px'}}>
|
<div
|
||||||
<div>
|
className="artha-portal-card"
|
||||||
<h3 style={{marginBottom:'4px'}} className="card-title">Finished Uploading?</h3>
|
style={{
|
||||||
<p className="text-sm" style={{margin:0}}>Send your personal documents for review.</p>
|
background: '#0A2540',
|
||||||
</div>
|
color: '#FFFFFF',
|
||||||
<button className="btn btn-primary" onClick={notifyComplete}>
|
display: 'flex',
|
||||||
<span className="material-symbols-outlined">send</span>
|
alignItems: 'center',
|
||||||
Send for Approval
|
justifyContent: 'space-between',
|
||||||
</button>
|
flexWrap: 'wrap',
|
||||||
|
gap: '18px'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<h3 style={{ fontSize: '18px', color: '#FFFFFF', margin: '0 0 4px', fontFamily: 'var(--font-display)' }}>
|
||||||
|
Finished Uploading Personal Records?
|
||||||
|
</h3>
|
||||||
|
<p style={{ fontSize: '13px', color: 'rgba(255,255,255,0.7)', margin: 0 }}>
|
||||||
|
Notify your advisory team that all W-2s, 1099s, and foreign assets have been uploaded for TY {taxYear}.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
className="artha-pill-btn artha-pill-primary"
|
||||||
|
style={{ background: '#1D4ED8', borderColor: '#1D4ED8', padding: '10px 22px' }}
|
||||||
|
onClick={notifyComplete}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>send</span>
|
||||||
|
Transmit for CPA Processing
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import React, { useState, useEffect, useCallback } from 'react';
|
|||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import { useAuth } from '../context/AuthContext';
|
import { useAuth } from '../context/AuthContext';
|
||||||
import { useToast } from '../context/ToastContext';
|
import { useToast } from '../context/ToastContext';
|
||||||
|
import CountUp from '../components/CountUp';
|
||||||
|
|
||||||
export default function UserDashboard() {
|
export default function UserDashboard() {
|
||||||
const { user, authFetch } = useAuth();
|
const { user, authFetch } = useAuth();
|
||||||
@@ -18,10 +19,6 @@ export default function UserDashboard() {
|
|||||||
// Reject comment panel for admin docs: { docId, note }
|
// Reject comment panel for admin docs: { docId, note }
|
||||||
const [rejectPanel, setRejectPanel] = useState(null);
|
const [rejectPanel, setRejectPanel] = useState(null);
|
||||||
|
|
||||||
|
|
||||||
// ── declare callbacks BEFORE the effects that reference them ──
|
|
||||||
|
|
||||||
|
|
||||||
const checkEngagement = useCallback(async () => {
|
const checkEngagement = useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
const res = await authFetch("/api/auth/me");
|
const res = await authFetch("/api/auth/me");
|
||||||
@@ -39,7 +36,6 @@ export default function UserDashboard() {
|
|||||||
if (tpls && tpls.length > 0) {
|
if (tpls && tpls.length > 0) {
|
||||||
setEngagementLink(tpls[0].download);
|
setEngagementLink(tpls[0].download);
|
||||||
} else {
|
} else {
|
||||||
// Fallback static link if no template is defined
|
|
||||||
setEngagementLink("/Engagement_Letter_Template.pdf");
|
setEngagementLink("/Engagement_Letter_Template.pdf");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -106,7 +102,8 @@ export default function UserDashboard() {
|
|||||||
} else {
|
} else {
|
||||||
setEngagementChecked(false);
|
setEngagementChecked(false);
|
||||||
}
|
}
|
||||||
} catch (err) { console.error(err);
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
setEngagementChecked(false);
|
setEngagementChecked(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -120,12 +117,12 @@ export default function UserDashboard() {
|
|||||||
} else {
|
} else {
|
||||||
showToast("Could not generate view link", "error");
|
showToast("Could not generate view link", "error");
|
||||||
}
|
}
|
||||||
} catch (err) { console.error(err);
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
showToast("Could not generate view link", "error");
|
showToast("Could not generate view link", "error");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const downloadDoc = async (storageKey, originalFilename) => {
|
const downloadDoc = async (storageKey, originalFilename) => {
|
||||||
try {
|
try {
|
||||||
const res = await authFetch(`/api/upload/view-url?key=${encodeURIComponent(storageKey)}`);
|
const res = await authFetch(`/api/upload/view-url?key=${encodeURIComponent(storageKey)}`);
|
||||||
@@ -166,7 +163,8 @@ export default function UserDashboard() {
|
|||||||
} else {
|
} else {
|
||||||
showToast("Failed to submit response", "error");
|
showToast("Failed to submit response", "error");
|
||||||
}
|
}
|
||||||
} catch (err) { console.error(err);
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
showToast("Network error", "error");
|
showToast("Network error", "error");
|
||||||
} finally {
|
} finally {
|
||||||
setDocLoading(false);
|
setDocLoading(false);
|
||||||
@@ -177,190 +175,531 @@ export default function UserDashboard() {
|
|||||||
setRejectPanel({ docId, note: '' });
|
setRejectPanel({ docId, note: '' });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// ── Derived Numbers (Constraint 1) ─────────────────────────
|
||||||
|
const totalDeliverables = adminDocs.length;
|
||||||
|
const approvedDocs = adminDocs.filter(d => d.review_status === 'approved').length;
|
||||||
|
const pendingReviewDocs = adminDocs.filter(d => d.review_status === 'sent_for_approval' || d.review_status === 'pending' || !d.review_status).length;
|
||||||
|
const percentApproved = totalDeliverables > 0 ? Math.round((approvedDocs / totalDeliverables) * 100) : 0;
|
||||||
|
|
||||||
|
// Next deadline calculation
|
||||||
|
const upcomingDeadlines = deadlines.filter(d => typeof d.days_left === 'number');
|
||||||
|
const minDeadline = upcomingDeadlines.length > 0
|
||||||
|
? upcomingDeadlines.reduce((min, d) => d.days_left < min.days_left ? d : min, upcomingDeadlines[0])
|
||||||
|
: null;
|
||||||
|
const isAnyOverdue = deadlines.some(d => d.is_overdue || d.days_left < 0);
|
||||||
|
|
||||||
|
// SVG Progress Ring calculations (radius 38, perimeter = 2 * PI * 38 = 238.76)
|
||||||
|
const ringRadius = 38;
|
||||||
|
const ringCircumference = 2 * Math.PI * ringRadius;
|
||||||
|
const strokeDashoffset = totalDeliverables > 0
|
||||||
|
? ringCircumference - (percentApproved / 100) * ringCircumference
|
||||||
|
: ringCircumference;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '20px' }}>
|
||||||
<div className="page-heading">
|
{/* ================= 1. EXECUTIVE AURORA HERO ================= */}
|
||||||
|
<section className="dash-hero dash-rise" style={{ '--i': 0 }}>
|
||||||
<div>
|
<div>
|
||||||
<h1>Welcome, {user?.name || user?.email?.split('@')[0]}</h1>
|
<div className="dash-hero-eyebrow">
|
||||||
<p className="page-meta">Here is your dashboard overview</p>
|
<span className="material-symbols-outlined" style={{ fontSize: '14px' }}>shield</span>
|
||||||
</div>
|
CLIENT ADVISORY VAULT
|
||||||
</div>
|
</div>
|
||||||
|
<h1 className="dash-hero-title">Welcome, {user?.name || user?.email?.split('@')[0]}</h1>
|
||||||
|
<p className="dash-hero-sub">
|
||||||
|
Secure workspace for document exchange, verified tax filings, and AI ledger reconciliation.
|
||||||
|
</p>
|
||||||
|
|
||||||
{/* Action Required: Deadline Warning Banner */}
|
<div className="dash-hero-badges">
|
||||||
{deadlines && deadlines.length > 0 && deadlines.some(d => d.days_left <= 7) && (
|
<div className="dash-glass-pill">
|
||||||
<div className="card fade-up" style={{
|
<span className="material-symbols-outlined">verified</span>
|
||||||
background: 'rgba(230, 81, 0, 0.08)',
|
<span>Active Client Vault</span>
|
||||||
border: '1px solid rgba(230, 81, 0, 0.35)',
|
</div>
|
||||||
borderRadius: 'var(--radius-sm)',
|
<div className="dash-glass-pill">
|
||||||
padding: '16px 20px',
|
<span className="material-symbols-outlined">calendar_today</span>
|
||||||
marginBottom: '20px',
|
<span>TY {new Date().getFullYear()}</span>
|
||||||
display: 'flex',
|
</div>
|
||||||
alignItems: 'center',
|
<div className="dash-glass-pill">
|
||||||
gap: '16px'
|
<span className="material-symbols-outlined">lock</span>
|
||||||
}}>
|
<span>Secure Client Portal</span>
|
||||||
<span className="material-symbols-outlined" style={{fontSize: '32px', color: '#e65100'}}>warning</span>
|
|
||||||
<div style={{flex: 1}}>
|
|
||||||
<div style={{fontWeight: 700, color: '#e65100', fontSize: '15px'}}>Action Required: Upcoming Filing Deadlines</div>
|
|
||||||
<div style={{fontSize: '13px', color: 'var(--navy)', marginTop: '4px'}}>
|
|
||||||
{deadlines.filter(d => d.days_left <= 7).map((d, idx) => (
|
|
||||||
<span key={idx} style={{marginRight: '16px', display: 'inline-block'}}>
|
|
||||||
<strong>{d.doc_type?.toUpperCase()}</strong>: {d.is_overdue ? (
|
|
||||||
<span style={{color: '#c0392b', fontWeight: 600}}>Overdue by {Math.abs(d.days_left)} day(s)</span>
|
|
||||||
) : (
|
|
||||||
<span>Due in {d.days_left} day(s) ({new Date(d.deadline_date).toLocaleDateString()})</span>
|
|
||||||
)}
|
|
||||||
</span>
|
|
||||||
))}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Right: SVG Progress Ring */}
|
||||||
|
<div className="dash-progress-ring-wrap">
|
||||||
|
<svg className="dash-progress-ring-svg" viewBox="0 0 96 96">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="userRingGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||||
|
<stop offset="0%" stopColor="#3B82F6" />
|
||||||
|
<stop offset="100%" stopColor="#14B8A6" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<circle
|
||||||
|
className="dash-progress-ring-track"
|
||||||
|
cx="48"
|
||||||
|
cy="48"
|
||||||
|
r={ringRadius}
|
||||||
|
strokeWidth="7"
|
||||||
|
fill="none"
|
||||||
|
/>
|
||||||
|
{totalDeliverables > 0 && (
|
||||||
|
<circle
|
||||||
|
className="dash-progress-ring-bar"
|
||||||
|
cx="48"
|
||||||
|
cy="48"
|
||||||
|
r={ringRadius}
|
||||||
|
strokeWidth="7"
|
||||||
|
fill="none"
|
||||||
|
stroke="url(#userRingGrad)"
|
||||||
|
strokeDasharray={ringCircumference}
|
||||||
|
strokeDashoffset={strokeDashoffset}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</svg>
|
||||||
|
<div style={{
|
||||||
|
position: 'absolute',
|
||||||
|
marginTop: '26px',
|
||||||
|
fontFamily: 'var(--font-mono, monospace)',
|
||||||
|
fontSize: '18px',
|
||||||
|
fontWeight: 700,
|
||||||
|
color: '#FFFFFF'
|
||||||
|
}}>
|
||||||
|
{totalDeliverables === 0 ? '-' : <CountUp value={percentApproved} suffix="%" />}
|
||||||
|
</div>
|
||||||
|
<div className="dash-progress-caption">
|
||||||
|
{totalDeliverables === 0 ? 'No deliverables yet' : 'Deliverables approved'}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{/* ================= 2. KPI STRIP ================= */}
|
||||||
|
<section className="dash-kpis dash-rise" style={{ '--i': 1 }}>
|
||||||
|
{/* Deliverables */}
|
||||||
|
<div className="dash-card dash-kpi-card">
|
||||||
|
<div className="dash-kpi-bar dash-kpi-bar--blue" />
|
||||||
|
<div className="dash-kpi-top">
|
||||||
|
<span className="dash-kpi-label">Deliverables</span>
|
||||||
|
<div className="dash-chip dash-chip--blue">
|
||||||
|
<span className="material-symbols-outlined">folder_open</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="dash-kpi-value">
|
||||||
|
<CountUp value={totalDeliverables} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Needs your review */}
|
||||||
|
<div className="dash-card dash-kpi-card">
|
||||||
|
<div className="dash-kpi-bar dash-kpi-bar--amber" />
|
||||||
|
<div className="dash-kpi-top">
|
||||||
|
<span className="dash-kpi-label">Needs your review</span>
|
||||||
|
<div className="dash-chip dash-chip--amber">
|
||||||
|
<span className="material-symbols-outlined">pending_actions</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="dash-kpi-value">
|
||||||
|
<CountUp value={pendingReviewDocs} />
|
||||||
|
{pendingReviewDocs > 0 && <span className="dash-pulse-dot" title="Action pending" />}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Approved */}
|
||||||
|
<div className="dash-card dash-kpi-card">
|
||||||
|
<div className="dash-kpi-bar dash-kpi-bar--green" />
|
||||||
|
<div className="dash-kpi-top">
|
||||||
|
<span className="dash-kpi-label">Approved</span>
|
||||||
|
<div className="dash-chip dash-chip--green">
|
||||||
|
<span className="material-symbols-outlined">task_alt</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="dash-kpi-value">
|
||||||
|
<CountUp value={approvedDocs} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Next deadline */}
|
||||||
|
<div className="dash-card dash-kpi-card">
|
||||||
|
<div className={`dash-kpi-bar ${isAnyOverdue ? 'dash-kpi-bar--red' : 'dash-kpi-bar--blue'}`} />
|
||||||
|
<div className="dash-kpi-top">
|
||||||
|
<span className="dash-kpi-label">Next deadline</span>
|
||||||
|
<div className={`dash-chip ${isAnyOverdue ? 'dash-chip--red' : 'dash-chip--blue'}`}>
|
||||||
|
<span className="material-symbols-outlined">event</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="dash-kpi-value" style={{ color: isAnyOverdue ? '#DC2626' : 'var(--ink, #0A2540)', fontSize: minDeadline ? '24px' : '30px' }}>
|
||||||
|
{!minDeadline ? (
|
||||||
|
'None'
|
||||||
|
) : minDeadline.is_overdue || minDeadline.days_left < 0 ? (
|
||||||
|
<span style={{ color: '#DC2626' }}>Overdue</span>
|
||||||
|
) : (
|
||||||
|
`${minDeadline.days_left}d`
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{/* ================= 3. URGENT FILING DEADLINES BANNER ================= */}
|
||||||
|
{deadlines && deadlines.some(d => d.days_left <= 7) && (
|
||||||
|
<section className={`dash-alert ${deadlines.some(d => d.is_overdue || d.days_left < 0) ? 'dash-alert--overdue' : ''} dash-rise`} style={{ '--i': 2 }}>
|
||||||
|
<div className="dash-alert-left">
|
||||||
|
<div className={`dash-chip ${deadlines.some(d => d.is_overdue || d.days_left < 0) ? 'dash-chip--red' : 'dash-chip--amber'}`}>
|
||||||
|
<span className="material-symbols-outlined">alarm</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div style={{ fontWeight: 700, color: '#0A2540', fontSize: '14.5px', marginBottom: '3px' }}>
|
||||||
|
Action Required: Upcoming Statutory Tax Deadlines
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '13px', color: '#425466' }}>
|
||||||
|
{deadlines.filter(d => d.days_left <= 7).map((d, idx) => (
|
||||||
|
<span key={idx} style={{ marginRight: '16px', display: 'inline-block' }}>
|
||||||
|
<strong>{d.doc_type?.toUpperCase()}</strong>:{' '}
|
||||||
|
{d.is_overdue || d.days_left < 0 ? (
|
||||||
|
<span style={{ color: '#DC2626', fontWeight: 600 }}>Overdue by {Math.abs(d.days_left)} day(s)</span>
|
||||||
|
) : (
|
||||||
|
<span>Due in {d.days_left} day(s) ({new Date(d.deadline_date).toLocaleDateString()})</span>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="card fade-up">
|
{/* ================= 4. ENGAGEMENT LETTER MODULE ================= */}
|
||||||
<div style={{display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', flexWrap: 'wrap', gap: '16px', marginBottom: '16px'}}>
|
<section className="dash-card dash-rise" style={{ '--i': 3, padding: '24px 26px' }}>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '16px', flexWrap: 'wrap', marginBottom: '18px' }}>
|
||||||
<div>
|
<div>
|
||||||
<h3 style={{margin: 0, marginBottom: '4px'}}>Engagement Letter</h3>
|
<h3 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '18px', color: '#0A2540', margin: '0 0 4px', display: 'flex', alignItems: 'center', gap: '8px' }}>
|
||||||
<p className="text-sm">Please review and acknowledge the engagement letter before uploading documents.</p>
|
<span className="material-symbols-outlined" style={{ color: '#1D4ED8', fontSize: '20px' }}>handshake</span>
|
||||||
|
Professional Engagement Letter
|
||||||
|
</h3>
|
||||||
|
<p style={{ fontSize: '13px', color: '#425466', margin: 0 }}>
|
||||||
|
Annual terms of engagement & professional representation for Tax Year {new Date().getFullYear()}.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{engagementLink && (
|
|
||||||
<a
|
|
||||||
href={engagementLink}
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
className="btn btn-secondary btn-sm"
|
|
||||||
style={{display: 'flex', alignItems: 'center', gap: '6px', borderRadius: 'var(--radius-pill)'}}
|
|
||||||
>
|
|
||||||
<span className="material-symbols-outlined" style={{fontSize: '18px'}}>download</span>
|
|
||||||
Download PDF
|
|
||||||
</a>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<label style={{
|
|
||||||
display: 'flex', alignItems: 'center', gap: '12px', padding: '16px',
|
|
||||||
background: 'var(--bg)', borderRadius: 'var(--radius-sm)', border: '1px solid var(--border)',
|
|
||||||
cursor: engagementDisabled ? 'not-allowed' : 'pointer'
|
|
||||||
}}>
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
checked={engagementChecked}
|
|
||||||
disabled={engagementDisabled}
|
|
||||||
onChange={handleEngagementChange}
|
|
||||||
style={{width:'20px', height:'20px', cursor: engagementDisabled ? 'not-allowed' : 'pointer'}}
|
|
||||||
/>
|
|
||||||
<div>
|
|
||||||
<div style={{fontWeight: 600, color: 'var(--navy)'}}>I acknowledge the Engagement Letter</div>
|
|
||||||
<div style={{fontSize: '13px', color: 'var(--muted)', marginTop: '2px'}}>By checking this, you agree to our terms of service for the current tax year.</div>
|
|
||||||
</div>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style={{display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(280px, 1fr))', gap: '20px', marginTop: '20px'}}>
|
<div style={{ display: 'flex', alignItems: 'center', gap: '10px' }}>
|
||||||
<div className="card fade-up" style={{animationDelay: '0.1s'}}>
|
{engagementDisabled ? (
|
||||||
<div style={{display:'flex', alignItems:'center', gap:'12px', marginBottom: '12px'}}>
|
<span className="dash-pill dash-pill--approved">
|
||||||
<span className="material-symbols-outlined" style={{color:'var(--accent)', fontSize:'28px'}}>description</span>
|
Acknowledged & Verified
|
||||||
<h3 style={{margin:0}}>Personal Documents</h3>
|
</span>
|
||||||
|
) : (
|
||||||
|
<span className="dash-pill dash-pill--pending">
|
||||||
|
Action Required
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{engagementLink && (
|
||||||
|
<a
|
||||||
|
href={engagementLink}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="artha-pill-btn artha-pill-outline"
|
||||||
|
style={{ padding: '6px 14px', fontSize: '12px' }}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '15px' }}>download</span>
|
||||||
|
Download PDF
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<p className="text-sm text-muted" style={{marginBottom: '20px', minHeight: '40px'}}>Upload your W-2s, 1099s, IDs, and other individual tax forms.</p>
|
</div>
|
||||||
|
|
||||||
|
<div style={{ background: '#F8FAFC', border: '1px solid #E2E8F0', borderRadius: '14px', padding: '16px 18px' }}>
|
||||||
|
<label style={{ display: 'flex', alignItems: 'center', gap: '14px', cursor: engagementDisabled ? 'default' : 'pointer' }}>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
checked={engagementChecked}
|
||||||
|
disabled={engagementDisabled}
|
||||||
|
onChange={handleEngagementChange}
|
||||||
|
style={{ width: '18px', height: '18px', accentColor: '#1D4ED8', cursor: engagementDisabled ? 'default' : 'pointer' }}
|
||||||
|
/>
|
||||||
|
<div style={{ flex: 1 }}>
|
||||||
|
<div style={{ fontWeight: 600, color: '#0A2540', fontSize: '13.5px' }}>
|
||||||
|
I acknowledge and accept the ABC CPA Engagement Agreement
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: '12px', color: '#425466', marginTop: '2px' }}>
|
||||||
|
Authorizes our advisory team to prepare filings, represent your accounts, and maintain confidential financial ledgers.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className={`dash-chip ${engagementChecked ? 'dash-chip--green' : 'dash-chip--amber'}`} style={{ width: '32px', height: '32px', borderRadius: '50%' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>
|
||||||
|
{engagementChecked ? 'done' : 'hourglass_top'}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{/* ================= 5. PRACTICE VAULT ACTION HUB ================= */}
|
||||||
|
<section className="dash-vault-grid dash-rise" style={{ '--i': 4 }}>
|
||||||
|
{/* Personal Docs Card */}
|
||||||
|
<div className="dash-card dash-vault-card">
|
||||||
|
<div>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: '16px' }}>
|
||||||
|
<div className="dash-vault-tile dash-vault-tile--brand">
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '26px' }}>person</span>
|
||||||
|
</div>
|
||||||
|
<span className="dash-pill dash-pill--info">FORM 1040 / W-2</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '19px', color: '#0A2540', margin: '0 0 6px' }}>
|
||||||
|
Personal Tax Documents
|
||||||
|
</h3>
|
||||||
|
<p style={{ fontSize: '13px', color: '#425466', margin: '0 0 14px', lineHeight: 1.5 }}>
|
||||||
|
Upload wage statements, 1099 contracts, government IDs, foreign bank disclosures (FBAR), and itemized deduction records.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul className="dash-vault-list">
|
||||||
|
<li>
|
||||||
|
<span className="material-symbols-outlined check-icon">check_circle</span>
|
||||||
|
W-2s, 1099-NEC, 1099-INT/DIV & K-1 Pass-Throughs
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span className="material-symbols-outlined check-icon">check_circle</span>
|
||||||
|
FinCEN 114 (FBAR) & Form 8938 Foreign Assets
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span className="material-symbols-outlined check-icon">check_circle</span>
|
||||||
|
Mortgage 1098 & Charitable Deduction Receipts
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
className="btn btn-primary w-full"
|
className="artha-pill-btn artha-pill-primary dash-focusable"
|
||||||
|
style={{ width: '100%', justifyContent: 'center' }}
|
||||||
disabled={!engagementChecked}
|
disabled={!engagementChecked}
|
||||||
onClick={() => navigate('/upload-personal')}
|
onClick={() => navigate('/upload-personal')}
|
||||||
>
|
>
|
||||||
Go to Personal Upload
|
Access Personal Vault
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>arrow_forward</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="card fade-up" style={{animationDelay: '0.2s'}}>
|
{/* Business Docs Card */}
|
||||||
<div style={{display:'flex', alignItems:'center', gap:'12px', marginBottom: '12px'}}>
|
<div className="dash-card dash-vault-card dash-vault-card--business">
|
||||||
<span className="material-symbols-outlined" style={{color:'var(--orange)', fontSize:'28px'}}>business</span>
|
<div>
|
||||||
<h3 style={{margin:0}}>Business Documents</h3>
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: '16px' }}>
|
||||||
|
<div className="dash-vault-tile dash-vault-tile--success">
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '26px' }}>business_center</span>
|
||||||
|
</div>
|
||||||
|
<span className="dash-pill dash-pill--approved">1120-S / LLC / P&L</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '19px', color: '#0A2540', margin: '0 0 6px' }}>
|
||||||
|
Business & Entity Documents
|
||||||
|
</h3>
|
||||||
|
<p style={{ fontSize: '13px', color: '#425466', margin: '0 0 14px', lineHeight: 1.5 }}>
|
||||||
|
Upload bank statements for AI reconciliation, payroll summaries, corporate agreements, and asset depreciation logs.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul className="dash-vault-list">
|
||||||
|
<li>
|
||||||
|
<span className="material-symbols-outlined check-icon">check_circle</span>
|
||||||
|
Instant AI Ingestion from Bank Statements (PDF/Image)
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span className="material-symbols-outlined check-icon">check_circle</span>
|
||||||
|
Form 1120, 1120-S & 1065 Partnership Filings
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span className="material-symbols-outlined check-icon">check_circle</span>
|
||||||
|
Balance Sheet, Trial Balance & QuickBooks Ledgers
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-sm text-muted" style={{marginBottom: '20px', minHeight: '40px'}}>Upload corporate documents, bookkeeping ledgers, and business receipts.</p>
|
|
||||||
<button
|
<button
|
||||||
className="btn btn-primary w-full"
|
className="artha-pill-btn artha-pill-dark dash-focusable"
|
||||||
|
style={{ width: '100%', justifyContent: 'center' }}
|
||||||
disabled={!engagementChecked}
|
disabled={!engagementChecked}
|
||||||
onClick={() => navigate('/upload-business')}
|
onClick={() => navigate('/upload-business')}
|
||||||
>
|
>
|
||||||
Go to Business Upload
|
Access Business Vault
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '16px' }}>arrow_forward</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
<div className="card fade-up" style={{animationDelay: '0.3s', marginTop: '20px'}}>
|
{/* ================= 6. AI ASSISTANT CARD (VIOLET) ================= */}
|
||||||
<h3 style={{marginBottom: '16px'}}>Admin Returns / Documents</h3>
|
<section className="dash-ai dash-rise" style={{ '--i': 5 }}>
|
||||||
<p className="text-sm" style={{marginBottom: '16px'}}>Documents and tax returns finalized by the admin.</p>
|
<div className="dash-ai-left">
|
||||||
|
<div className="dash-chip dash-chip--violet" style={{ width: '44px', height: '44px' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '24px' }}>auto_awesome</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div style={{ fontWeight: 700, color: 'var(--ink, #0A2540)', fontSize: '15.5px' }}>
|
||||||
|
Ask the AI assistant
|
||||||
|
</div>
|
||||||
|
<div style={{ color: '#425466', fontSize: '13px', marginTop: '2px' }}>
|
||||||
|
Get quick answers about your documents and filings.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
className="dash-ai-btn dash-focusable"
|
||||||
|
onClick={() => document.querySelector('.chatbot-fab')?.click()}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '17px' }}>forum</span>
|
||||||
|
Open Assistant
|
||||||
|
</button>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{/* ================= 7. CERTIFIED DELIVERABLES TABLE ================= */}
|
||||||
|
<section className="dash-card dash-rise" style={{ '--i': 6, padding: '24px 26px' }}>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '16px', flexWrap: 'wrap', marginBottom: '16px' }}>
|
||||||
|
<div>
|
||||||
|
<h3 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '18px', color: '#0A2540', margin: '0 0 4px', display: 'flex', alignItems: 'center', gap: '8px' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ color: '#1D4ED8', fontSize: '20px' }}>inventory_2</span>
|
||||||
|
Final Tax Returns & CPA Deliverables
|
||||||
|
</h3>
|
||||||
|
<p style={{ fontSize: '13px', color: '#425466', margin: 0 }}>
|
||||||
|
Official tax filings, audit defense packages, and reconciled P&L statements finalized by your advisory partner.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{ fontSize: '12px', color: '#425466', fontFamily: 'var(--font-mono, monospace)', fontWeight: 600 }}>
|
||||||
|
{adminDocs.length} deliverable{adminDocs.length === 1 ? '' : 's'} available
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{loadingDocs ? (
|
{loadingDocs ? (
|
||||||
<div className="empty-state">Loading documents...</div>
|
<div className="dash-table-wrap">
|
||||||
) : adminDocs.length === 0 ? (
|
<table className="dash-table">
|
||||||
<div className="empty-state">No documents have been provided by the admin yet.</div>
|
|
||||||
) : (
|
|
||||||
<div className="table-responsive">
|
|
||||||
<table className="admin-table">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Document Name</th>
|
<th>Document Label & File</th>
|
||||||
<th>Date Provided</th>
|
<th>Date Prepared</th>
|
||||||
<th>Status</th>
|
<th>Status & Client Action</th>
|
||||||
<th>Actions</th>
|
<th style={{ textAlign: 'right' }}>Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{[1, 2, 3, 4].map(n => (
|
||||||
|
<tr key={n}>
|
||||||
|
<td><div className="dash-skeleton" style={{ height: '18px', width: '65%' }} /></td>
|
||||||
|
<td><div className="dash-skeleton" style={{ height: '16px', width: '50%' }} /></td>
|
||||||
|
<td><div className="dash-skeleton" style={{ height: '22px', width: '90px' }} /></td>
|
||||||
|
<td style={{ textAlign: 'right' }}><div className="dash-skeleton" style={{ height: '28px', width: '80px', display: 'inline-block' }} /></td>
|
||||||
|
</tr>
|
||||||
|
))}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
) : adminDocs.length === 0 ? (
|
||||||
|
<div className="dash-empty-state">
|
||||||
|
<div className="dash-empty-icon">
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '28px' }}>folder_open</span>
|
||||||
|
</div>
|
||||||
|
<h4 style={{ fontSize: '16px', color: '#0A2540', margin: 0 }}>No Deliverables Published Yet</h4>
|
||||||
|
<p style={{ fontSize: '13px', color: '#425466', maxWidth: '440px', margin: 0 }}>
|
||||||
|
Once our CPAs review your statements and prepare final returns, they will appear here for your review and approval.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="dash-table-wrap">
|
||||||
|
<table className="dash-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Document Label & File</th>
|
||||||
|
<th>Date Prepared</th>
|
||||||
|
<th>Status & Client Action</th>
|
||||||
|
<th style={{ textAlign: 'right' }}>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{adminDocs.map(doc => (
|
{adminDocs.map(doc => (
|
||||||
<React.Fragment key={doc.id}>
|
<React.Fragment key={doc.id}>
|
||||||
<tr key={doc.id}>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div style={{fontWeight: 500, color: 'var(--navy)'}}>{doc.doc_label}</div>
|
<div style={{ display: 'flex', alignItems: 'center', gap: '10px' }}>
|
||||||
<div className="text-sm text-muted">{doc.filename}</div>
|
<div className="dash-chip dash-chip--blue" style={{ width: '32px', height: '32px' }}>
|
||||||
</td>
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>
|
||||||
<td>{new Date(doc.created_at).toLocaleDateString()}</td>
|
picture_as_pdf
|
||||||
<td>
|
|
||||||
{doc.review_status ? (
|
|
||||||
<div>
|
|
||||||
<span className={`badge ${doc.review_status === 'approved' ? 'badge-green' : doc.review_status === 'rejected' ? 'badge-red' : doc.review_status === 'sent_for_approval' ? 'badge-blue' : 'badge-yellow'}`} style={{fontWeight:700}}>
|
|
||||||
{doc.review_status.replace(/_/g, ' ').toUpperCase()}
|
|
||||||
</span>
|
</span>
|
||||||
{doc.review_status === 'rejected' && doc.review_note && (
|
</div>
|
||||||
<div style={{fontSize:'12px', color:'#c0392b', fontStyle:'italic', marginTop:'4px'}}>
|
<div>
|
||||||
Reason: "{doc.review_note}"
|
<div style={{ fontWeight: 600, color: '#0A2540', fontSize: '13.5px' }}>{doc.doc_label}</div>
|
||||||
|
<div style={{ fontSize: '11.5px', color: '#425466' }}>{doc.filename}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span style={{ fontSize: '12.5px', color: '#425466' }}>
|
||||||
|
{new Date(doc.created_at).toLocaleDateString(undefined, { year: 'numeric', month: 'short', day: 'numeric' })}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{doc.review_status === 'approved' ? (
|
||||||
|
<span className="dash-pill dash-pill--approved">
|
||||||
|
Approved by Client
|
||||||
|
</span>
|
||||||
|
) : doc.review_status === 'rejected' ? (
|
||||||
|
<div>
|
||||||
|
<span className="dash-pill dash-pill--rejected">
|
||||||
|
Revision Requested
|
||||||
|
</span>
|
||||||
|
{doc.review_note && (
|
||||||
|
<div style={{ fontSize: '11.5px', color: '#DC2626', marginTop: '4px', fontStyle: 'italic' }}>
|
||||||
|
Note: “{doc.review_note}”
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{doc.review_status === 'sent_for_approval' && doc.review_note && (
|
</div>
|
||||||
<div style={{fontSize:'12px', color:'var(--blue)', fontStyle:'italic', marginTop:'4px'}}>
|
) : doc.review_status === 'sent_for_approval' ? (
|
||||||
Note from Admin: "{doc.review_note}"
|
<div>
|
||||||
|
<span className="dash-pill dash-pill--pending">
|
||||||
|
Pending Client Approval
|
||||||
|
</span>
|
||||||
|
{doc.review_note && (
|
||||||
|
<div style={{ fontSize: '11.5px', color: '#92600A', marginTop: '4px', fontStyle: 'italic' }}>
|
||||||
|
CPA Note: “{doc.review_note}”
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<span className="badge badge-yellow">PENDING</span>
|
<span className="dash-pill dash-pill--pending">
|
||||||
|
Pending Review
|
||||||
|
</span>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div style={{display:'flex', gap:'8px', flexWrap:'wrap', alignItems:'center'}}>
|
<div style={{ display: 'flex', gap: '6px', justifyContent: 'flex-end', flexWrap: 'wrap' }}>
|
||||||
<button className="btn btn-secondary btn-sm" onClick={() => viewDoc(doc.storage_key)}>View</button>
|
<button
|
||||||
<button className="btn btn-secondary btn-sm" onClick={() => downloadDoc(doc.storage_key, doc.filename)} style={{display:'flex', alignItems:'center', gap:'4px'}}><span className="material-symbols-outlined" style={{fontSize:'16px'}}>download</span></button>
|
className="dash-table-action-btn"
|
||||||
{(doc.review_status === 'sent_for_approval' || doc.review_status === 'pending' || !doc.review_status) && (
|
title="View Document"
|
||||||
|
onClick={() => viewDoc(doc.storage_key)}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>visibility</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
className="dash-table-action-btn"
|
||||||
|
title="Download Document"
|
||||||
|
onClick={() => downloadDoc(doc.storage_key, doc.filename)}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>download</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{doc.review_status === 'sent_for_approval' && (
|
||||||
<>
|
<>
|
||||||
<button
|
<button
|
||||||
className="btn btn-primary btn-sm"
|
className="artha-pill-btn artha-pill-primary"
|
||||||
style={{background:'#2c7a5b', borderColor:'#2c7a5b', display:'inline-flex', alignItems:'center', gap:'4px'}}
|
style={{ padding: '5px 12px', fontSize: '12px' }}
|
||||||
onClick={() => respondDoc(doc.id, true)}
|
onClick={() => respondDoc(doc.id, true)}
|
||||||
disabled={docLoading}
|
disabled={docLoading}
|
||||||
>
|
>
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'15px'}}>check_circle</span>
|
<span className="material-symbols-outlined" style={{ fontSize: '14px' }}>check</span>
|
||||||
Approve
|
Approve
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
className="btn btn-danger btn-sm"
|
className="artha-pill-btn artha-pill-outline"
|
||||||
style={{display:'inline-flex', alignItems:'center', gap:'4px'}}
|
style={{ padding: '5px 10px', fontSize: '12px', color: '#DC2626', borderColor: 'rgba(220,38,38,0.3)' }}
|
||||||
onClick={() => openUserRejectPanel(doc.id)}
|
onClick={() => openUserRejectPanel(doc.id)}
|
||||||
disabled={docLoading}
|
disabled={docLoading}
|
||||||
>
|
>
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'15px'}}>cancel</span>
|
<span className="material-symbols-outlined" style={{ fontSize: '14px' }}>close</span>
|
||||||
Reject
|
Request Changes
|
||||||
</button>
|
</button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@@ -368,55 +707,56 @@ export default function UserDashboard() {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{/* Inline Reject Panel */}
|
{/* Inline Reject Feedback Panel */}
|
||||||
{rejectPanel?.docId === doc.id && (
|
{rejectPanel?.docId === doc.id && (
|
||||||
<tr key={`reject-${doc.id}`}>
|
<tr key={`reject-${doc.id}`}>
|
||||||
<td colSpan={4} style={{padding:'0'}}>
|
<td colSpan={4} style={{ padding: '0' }}>
|
||||||
<div style={{
|
<div
|
||||||
padding: '14px 16px',
|
style={{
|
||||||
background: 'rgba(220,53,69,0.05)',
|
padding: '18px 22px',
|
||||||
border: '1px solid rgba(220,53,69,0.25)',
|
background: '#FFF8F8',
|
||||||
borderTop: 'none',
|
borderTop: '1px solid rgba(220, 38, 38, 0.2)',
|
||||||
display: 'flex',
|
borderBottom: '1px solid rgba(220, 38, 38, 0.2)',
|
||||||
flexDirection: 'column',
|
display: 'flex',
|
||||||
gap: '10px'
|
flexDirection: 'column',
|
||||||
}}>
|
gap: '12px'
|
||||||
<div style={{fontWeight:600, fontSize:'13px', color:'#c0392b', display:'flex', alignItems:'center', gap:'6px'}}>
|
}}
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'16px'}}>feedback</span>
|
>
|
||||||
Reason for Rejection (optional)
|
<div style={{ fontWeight: 600, fontSize: '13px', color: '#DC2626', display: 'flex', alignItems: 'center', gap: '8px' }}>
|
||||||
|
<span className="material-symbols-outlined" style={{ fontSize: '18px' }}>edit_note</span>
|
||||||
|
Specify Revisions Needed for CPA Review
|
||||||
</div>
|
</div>
|
||||||
<textarea
|
<textarea
|
||||||
rows={3}
|
rows={3}
|
||||||
placeholder="Tell the admin why you are rejecting this document..."
|
placeholder="Please explain the discrepancy, missing deduction, or change requested..."
|
||||||
value={rejectPanel.note}
|
value={rejectPanel.note}
|
||||||
onChange={e => setRejectPanel(prev => ({...prev, note: e.target.value}))}
|
onChange={e => setRejectPanel(prev => ({ ...prev, note: e.target.value }))}
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
padding: '10px 12px',
|
padding: '12px 14px',
|
||||||
border: '1px solid rgba(220,53,69,0.35)',
|
border: '1px solid rgba(220, 38, 38, 0.3)',
|
||||||
borderRadius: 'var(--radius-sm)',
|
borderRadius: '12px',
|
||||||
fontSize: '13px',
|
fontSize: '13px',
|
||||||
resize: 'vertical',
|
|
||||||
outline: 'none',
|
outline: 'none',
|
||||||
fontFamily: 'inherit',
|
fontFamily: 'inherit',
|
||||||
background: 'white',
|
background: '#FFFFFF'
|
||||||
boxSizing: 'border-box'
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<div style={{display:'flex', gap:'8px', justifyContent:'flex-end'}}>
|
<div style={{ display: 'flex', gap: '10px', justifyContent: 'flex-end' }}>
|
||||||
<button
|
<button
|
||||||
className="btn btn-secondary btn-sm"
|
className="artha-pill-btn artha-pill-outline"
|
||||||
style={{borderRadius:'var(--radius-sm)'}}
|
style={{ padding: '6px 14px', fontSize: '12px' }}
|
||||||
onClick={() => setRejectPanel(null)}
|
onClick={() => setRejectPanel(null)}
|
||||||
>Cancel</button>
|
>
|
||||||
|
Cancel
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
className="btn btn-danger btn-sm"
|
className="artha-pill-btn artha-pill-dark"
|
||||||
style={{borderRadius:'var(--radius-sm)'}}
|
style={{ padding: '6px 16px', fontSize: '12px', background: '#DC2626', borderColor: '#DC2626' }}
|
||||||
disabled={docLoading}
|
disabled={docLoading}
|
||||||
onClick={() => respondDoc(doc.id, false, rejectPanel.note)}
|
onClick={() => respondDoc(doc.id, false, rejectPanel.note)}
|
||||||
>
|
>
|
||||||
<span className="material-symbols-outlined" style={{fontSize:'15px', verticalAlign:'middle', marginRight:'4px'}}>block</span>
|
Submit Revision Request
|
||||||
Confirm Rejection
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -429,7 +769,8 @@ export default function UserDashboard() {
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { useSearchParams, Link } from 'react-router-dom';
|
|||||||
export default function VerifyEmail() {
|
export default function VerifyEmail() {
|
||||||
const [searchParams] = useSearchParams();
|
const [searchParams] = useSearchParams();
|
||||||
const token = searchParams.get('token');
|
const token = searchParams.get('token');
|
||||||
|
|
||||||
const [status, setStatus] = useState('verifying'); // verifying, success, failed, invalid
|
const [status, setStatus] = useState('verifying'); // verifying, success, failed, invalid
|
||||||
const [message, setMessage] = useState('');
|
const [message, setMessage] = useState('');
|
||||||
|
|
||||||
@@ -19,16 +19,17 @@ export default function VerifyEmail() {
|
|||||||
const res = await fetch(`/api/auth/verify-email?token=${encodeURIComponent(token)}`);
|
const res = await fetch(`/api/auth/verify-email?token=${encodeURIComponent(token)}`);
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
|
|
||||||
if (res.ok && (data.message === "verified" || data.message === "already_verified")) {
|
if (res.ok && (data.message === 'verified' || data.message === 'already_verified')) {
|
||||||
setStatus('success');
|
setStatus('success');
|
||||||
setMessage(data.message === "already_verified" ? "Already Verified" : "Email Verified!");
|
setMessage(data.message === 'already_verified' ? 'Already Verified' : 'Email Verified!');
|
||||||
} else {
|
} else {
|
||||||
setStatus('failed');
|
setStatus('failed');
|
||||||
setMessage(data.detail || "This link is invalid or has expired.");
|
setMessage(data.detail || 'This link is invalid or has expired.');
|
||||||
}
|
}
|
||||||
} catch (err) { console.error(err);
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
setStatus('failed');
|
setStatus('failed');
|
||||||
setMessage("Could not connect to the server. Please try again later.");
|
setMessage('Could not connect to the server. Please try again later.');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -37,34 +38,62 @@ export default function VerifyEmail() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="auth-shell page-enter">
|
<div className="auth-shell page-enter">
|
||||||
|
{/* Brand Side */}
|
||||||
<div className="auth-brand">
|
<div className="auth-brand">
|
||||||
<img className="brand-logo" src="/images/bookkeeppro-logo.webp" alt="BookKeepPro"/>
|
|
||||||
|
<div style={{ textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
|
||||||
|
<img
|
||||||
|
src="/images/brand-logo-mark.webp"
|
||||||
|
alt="ABC CPA & Advisory"
|
||||||
|
style={{
|
||||||
|
width: '58px',
|
||||||
|
height: '58px',
|
||||||
|
borderRadius: '14px',
|
||||||
|
marginBottom: '16px',
|
||||||
|
boxShadow: '0 8px 24px rgba(0, 0, 0, 0.45)',
|
||||||
|
border: '1px solid rgba(255, 255, 255, 0.14)'
|
||||||
|
}}
|
||||||
|
width="58"
|
||||||
|
height="58"
|
||||||
|
/>
|
||||||
|
<h2 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '24px', fontWeight: 600, color: '#FFFFFF', margin: 0 }}>
|
||||||
|
ABC CPA & Advisory
|
||||||
|
</h2>
|
||||||
|
<div style={{ fontSize: '11px', textTransform: 'uppercase', letterSpacing: '0.12em', color: '#60A5FA', marginTop: '6px' }}>
|
||||||
|
Tax Advisory & Accounting Services
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="brand-divider"></div>
|
<div className="brand-divider"></div>
|
||||||
<h2>Almost There</h2>
|
|
||||||
<p>We're verifying your email address right now.</p>
|
<p>
|
||||||
|
Verifying your secure portal identity to protect client confidentiality and tax documents.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Form Side */}
|
||||||
<div className="auth-form-side">
|
<div className="auth-form-side">
|
||||||
<div className="auth-box text-center">
|
<div className="auth-box" style={{ textAlign: 'center' }}>
|
||||||
|
|
||||||
{status === 'verifying' && (
|
{status === 'verifying' && (
|
||||||
<>
|
<>
|
||||||
<div style={{fontSize:'48px', marginBottom:'16px'}}>
|
<div style={{ fontSize: '48px', marginBottom: '16px', color: '#047857' }}>
|
||||||
<span className="material-symbols-outlined">pending</span>
|
<span className="material-symbols-outlined" style={{ fontSize: '48px' }}>pending</span>
|
||||||
</div>
|
</div>
|
||||||
<h2>Verifying your email...</h2>
|
<h1>Verifying your email...</h1>
|
||||||
<p className="auth-subtitle">Please wait a moment.</p>
|
<p className="auth-subtitle">Please wait a moment while we authorize your credentials.</p>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{status === 'invalid' && (
|
{status === 'invalid' && (
|
||||||
<>
|
<>
|
||||||
<div style={{fontSize:'48px', marginBottom:'16px'}}>
|
<div style={{ fontSize: '48px', marginBottom: '16px', color: 'var(--error, #DC2626)' }}>
|
||||||
<span className="material-symbols-outlined">cancel</span>
|
<span className="material-symbols-outlined" style={{ fontSize: '48px' }}>cancel</span>
|
||||||
</div>
|
</div>
|
||||||
<h2>Invalid Link</h2>
|
<h1>Invalid Link</h1>
|
||||||
<p className="auth-subtitle">This verification link is missing a token.<br/>Please use the link from your email.</p>
|
<p className="auth-subtitle">
|
||||||
<Link to="/login" className="btn btn-primary" style={{borderRadius:'var(--radius-sm)', marginTop:'24px', display:'inline-flex'}}>
|
This verification link is missing a token.<br />Please use the link from your registration email.
|
||||||
|
</p>
|
||||||
|
<Link to="/login" className="artha-pill-btn artha-pill-primary" style={{ marginTop: '20px' }}>
|
||||||
Go to Sign In
|
Go to Sign In
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
@@ -72,34 +101,33 @@ export default function VerifyEmail() {
|
|||||||
|
|
||||||
{status === 'success' && (
|
{status === 'success' && (
|
||||||
<>
|
<>
|
||||||
<div style={{fontSize:'48px', marginBottom:'16px', color:'var(--green)'}}>
|
<div style={{ fontSize: '48px', marginBottom: '16px', color: '#047857' }}>
|
||||||
<span className="material-symbols-outlined">check_circle</span>
|
<span className="material-symbols-outlined" style={{ fontSize: '48px' }}>check_circle</span>
|
||||||
</div>
|
</div>
|
||||||
<h2>{message}</h2>
|
<h1>{message}</h1>
|
||||||
<p className="auth-subtitle">
|
<p className="auth-subtitle">
|
||||||
{message === "Already Verified"
|
{message === 'Already Verified'
|
||||||
? "Your email is already verified. You can sign in below."
|
? 'Your email is already verified. You can sign in below.'
|
||||||
: "Your email has been verified. You can now sign in to your account."}
|
: 'Your email has been verified. You can now access your login portal.'}
|
||||||
</p>
|
</p>
|
||||||
<Link to="/login" className="btn btn-primary" style={{borderRadius:'var(--radius-sm)', marginTop:'24px', display:'inline-flex'}}>
|
<Link to="/login" className="artha-pill-btn artha-pill-primary" style={{ marginTop: '20px' }}>
|
||||||
Sign In
|
Sign In to Portal
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{status === 'failed' && (
|
{status === 'failed' && (
|
||||||
<>
|
<>
|
||||||
<div style={{fontSize:'48px', marginBottom:'16px', color:'var(--error)'}}>
|
<div style={{ fontSize: '48px', marginBottom: '16px', color: 'var(--error, #DC2626)' }}>
|
||||||
<span className="material-symbols-outlined">cancel</span>
|
<span className="material-symbols-outlined" style={{ fontSize: '48px' }}>cancel</span>
|
||||||
</div>
|
</div>
|
||||||
<h2>Verification Failed</h2>
|
<h1>Verification Failed</h1>
|
||||||
<p className="auth-subtitle">{message}</p>
|
<p className="auth-subtitle">{message}</p>
|
||||||
<Link to="/resend-verification" className="btn btn-primary" style={{borderRadius:'var(--radius-sm)', marginTop:'24px', display:'inline-flex'}}>
|
<Link to="/resend-verification" className="artha-pill-btn artha-pill-primary" style={{ marginTop: '20px' }}>
|
||||||
Request New Link
|
Request New Link
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
// Dynamic-UI runtime (tiny, dependency-free, CSP-safe: only classList + CSSOM property writes).
|
// Dynamic-UI runtime (tiny, dependency-free, CSP-safe: only classList + CSSOM property writes).
|
||||||
// - html.motion : opts in to scroll-reveal hiding (never set for reduced-motion users)
|
// - html.motion : opts in to scroll-reveal hiding (never set for reduced-motion users)
|
||||||
// - html[data-scrolled]: navbar / header react after 24px of scroll
|
// - html[data-scrolled]: navbar / header react after 24px of scroll
|
||||||
// - --scroll : 0..1 page progress, drives the brass progress rule
|
// - --scroll : 0..1 page progress, drives the brass progress rule
|
||||||
// - --mx / --my : pointer position inside cards, drives the hover spotlight
|
// - --mx / --my : pointer position inside cards, drives the hover spotlight
|
||||||
const SPOT = '.stat-card, .user-card, .service-card, .card';
|
const SPOT = '.stat-card, .user-card, .service-card, .card, .artha-portal-card, .artha-vault-card, .artha-ticker-card';
|
||||||
|
|
||||||
export function initMotion() {
|
export function initMotion() {
|
||||||
if (typeof window === 'undefined') return;
|
if (typeof window === 'undefined') return;
|
||||||
|
|||||||
@@ -17,4 +17,31 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
preview: {
|
||||||
|
port: 5173,
|
||||||
|
host: true,
|
||||||
|
proxy: {
|
||||||
|
'/api': {
|
||||||
|
target: 'http://127.0.0.1:8000',
|
||||||
|
changeOrigin: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
build: {
|
||||||
|
sourcemap: false,
|
||||||
|
rollupOptions: {
|
||||||
|
output: {
|
||||||
|
manualChunks(id) {
|
||||||
|
if (
|
||||||
|
id.includes('node_modules/react/') ||
|
||||||
|
id.includes('node_modules/react-dom/') ||
|
||||||
|
id.includes('node_modules/react-router-dom/') ||
|
||||||
|
id.includes('node_modules/react-router/')
|
||||||
|
) {
|
||||||
|
return 'vendor';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ server {
|
|||||||
add_header X-XSS-Protection "1; mode=block" always;
|
add_header X-XSS-Protection "1; mode=block" always;
|
||||||
add_header X-Content-Type-Options "nosniff" always;
|
add_header X-Content-Type-Options "nosniff" always;
|
||||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||||
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline' 'unsafe-eval'" always;
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com data:; img-src 'self' data: blob: https:; connect-src 'self' https:; object-src 'none'; base-uri 'self';" always;
|
||||||
# Redirect all HTTP traffic to HTTPS (uncomment when SSL certs are generated)
|
# Redirect all HTTP traffic to HTTPS (uncomment when SSL certs are generated)
|
||||||
# location / {
|
# location / {
|
||||||
# return 301 https://$host$request_uri;
|
# return 301 https://$host$request_uri;
|
||||||
@@ -57,6 +57,10 @@ server {
|
|||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
expires 7d;
|
expires 7d;
|
||||||
}
|
}
|
||||||
|
location = /favicon.png {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
expires 7d;
|
||||||
|
}
|
||||||
location = /icons.svg {
|
location = /icons.svg {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
expires 7d;
|
expires 7d;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ from app.models import (
|
|||||||
ChatMessage as DBChatMessage,
|
ChatMessage as DBChatMessage,
|
||||||
)
|
)
|
||||||
from app.db import get_db
|
from app.db import get_db
|
||||||
from app.auth.security import get_current_user, require_admin
|
from app.auth.security import get_current_user, require_admin, assert_admin_can_access
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -282,6 +282,7 @@ def admin_bulk_action(
|
|||||||
user = db.query(User).filter(User.id == payload.user_id).first()
|
user = db.query(User).filter(User.id == payload.user_id).first()
|
||||||
if not user:
|
if not user:
|
||||||
raise HTTPException(status_code=404, detail="User not found")
|
raise HTTPException(status_code=404, detail="User not found")
|
||||||
|
assert_admin_can_access(current_user, user)
|
||||||
|
|
||||||
action_parts = payload.action.split("_")
|
action_parts = payload.action.split("_")
|
||||||
if len(action_parts) != 2 or action_parts[0] not in ("approve", "reject") \
|
if len(action_parts) != 2 or action_parts[0] not in ("approve", "reject") \
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from app.models import AdminDocument, User, UserRole, FilingDeadline
|
|||||||
from app.db import get_db
|
from app.db import get_db
|
||||||
from app.utils.emailer import send_email
|
from app.utils.emailer import send_email
|
||||||
from app import crud
|
from app import crud
|
||||||
from app.auth.security import get_current_user, require_admin
|
from app.auth.security import get_current_user, require_admin, assert_admin_can_access
|
||||||
from app.schemas import SubmitReviewRequest, NotifyUserRequest, AdminDocResponseRequest
|
from app.schemas import SubmitReviewRequest, NotifyUserRequest, AdminDocResponseRequest
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@@ -32,6 +32,7 @@ async def submit_review(
|
|||||||
user = crud.get_user_by_id(db, payload.user_id)
|
user = crud.get_user_by_id(db, payload.user_id)
|
||||||
if not user:
|
if not user:
|
||||||
raise HTTPException(status_code=404, detail="User not found")
|
raise HTTPException(status_code=404, detail="User not found")
|
||||||
|
assert_admin_can_access(current_user, user)
|
||||||
|
|
||||||
email_sent = await send_email(
|
email_sent = await send_email(
|
||||||
to=user.email,
|
to=user.email,
|
||||||
@@ -68,6 +69,7 @@ async def notify_user_review(
|
|||||||
user = crud.get_user_by_id(db, payload.user_id)
|
user = crud.get_user_by_id(db, payload.user_id)
|
||||||
if not user:
|
if not user:
|
||||||
raise HTTPException(status_code=404, detail="User not found")
|
raise HTTPException(status_code=404, detail="User not found")
|
||||||
|
assert_admin_can_access(current_user, user)
|
||||||
|
|
||||||
approved_html = "".join(f"<li>{item}</li>" for item in payload.approved) or "<li>None</li>"
|
approved_html = "".join(f"<li>{item}</li>" for item in payload.approved) or "<li>None</li>"
|
||||||
rejected_html = "".join(f"<li>{item}</li>" for item in payload.rejected) or "<li>None</li>"
|
rejected_html = "".join(f"<li>{item}</li>" for item in payload.rejected) or "<li>None</li>"
|
||||||
@@ -146,6 +148,15 @@ async def admin_doc_response(
|
|||||||
f"belonging to user {doc.user_id}"
|
f"belonging to user {doc.user_id}"
|
||||||
)
|
)
|
||||||
raise HTTPException(status_code=403, detail="Not authorized")
|
raise HTTPException(status_code=403, detail="Not authorized")
|
||||||
|
|
||||||
|
if doc.review_status != "sent_for_approval":
|
||||||
|
raise HTTPException(
|
||||||
|
status_code=400,
|
||||||
|
detail="Document is not ready for client review. Status must be 'sent_for_approval'."
|
||||||
|
)
|
||||||
|
|
||||||
|
if payload.status not in ("approved", "rejected"):
|
||||||
|
raise HTTPException(status_code=400, detail="Status must be 'approved' or 'rejected'")
|
||||||
|
|
||||||
doc.review_status = payload.status
|
doc.review_status = payload.status
|
||||||
doc.reviewed_at = datetime.utcnow()
|
doc.reviewed_at = datetime.utcnow()
|
||||||
@@ -249,10 +260,20 @@ def update_document_status(
|
|||||||
if doc_kind not in model_map:
|
if doc_kind not in model_map:
|
||||||
raise HTTPException(status_code=400, detail="Invalid doc_kind")
|
raise HTTPException(status_code=400, detail="Invalid doc_kind")
|
||||||
|
|
||||||
|
ALLOWED_STATUSES = {"approved", "rejected", "pending", "sent_for_approval", "uploaded", "filed"}
|
||||||
|
if payload.status not in ALLOWED_STATUSES:
|
||||||
|
raise HTTPException(
|
||||||
|
status_code=400,
|
||||||
|
detail=f"Invalid status '{payload.status}'. Must be one of: {', '.join(sorted(ALLOWED_STATUSES))}"
|
||||||
|
)
|
||||||
|
|
||||||
doc = db.query(model_map[doc_kind]).filter_by(id=doc_id).first()
|
doc = db.query(model_map[doc_kind]).filter_by(id=doc_id).first()
|
||||||
if not doc:
|
if not doc:
|
||||||
raise HTTPException(status_code=404, detail="Document not found")
|
raise HTTPException(status_code=404, detail="Document not found")
|
||||||
|
|
||||||
|
target_user = crud.get_user_by_id(db, doc.user_id)
|
||||||
|
assert_admin_can_access(current_user, target_user)
|
||||||
|
|
||||||
doc.review_status = payload.status
|
doc.review_status = payload.status
|
||||||
if payload.note is not None:
|
if payload.note is not None:
|
||||||
doc.review_note = payload.note
|
doc.review_note = payload.note
|
||||||
@@ -313,7 +334,10 @@ def get_filing_deadlines(
|
|||||||
is_admin = current_user.role in ("admin", "super_admin") or (
|
is_admin = current_user.role in ("admin", "super_admin") or (
|
||||||
hasattr(current_user.role, "value") and current_user.role.value in ("admin", "super_admin")
|
hasattr(current_user.role, "value") and current_user.role.value in ("admin", "super_admin")
|
||||||
)
|
)
|
||||||
if not is_admin and current_user.id != user_id:
|
if is_admin:
|
||||||
|
target_user = crud.get_user_by_id(db, user_id)
|
||||||
|
assert_admin_can_access(current_user, target_user)
|
||||||
|
elif current_user.id != user_id:
|
||||||
raise HTTPException(status_code=403, detail="Not authorized to view these deadlines")
|
raise HTTPException(status_code=403, detail="Not authorized to view these deadlines")
|
||||||
|
|
||||||
from app.models import FilingDeadline
|
from app.models import FilingDeadline
|
||||||
@@ -360,6 +384,9 @@ async def send_return_for_approval(
|
|||||||
if not doc:
|
if not doc:
|
||||||
raise HTTPException(status_code=404, detail="Document not found")
|
raise HTTPException(status_code=404, detail="Document not found")
|
||||||
|
|
||||||
|
client = crud.get_user_by_id(db, doc.user_id)
|
||||||
|
assert_admin_can_access(current_user, client)
|
||||||
|
|
||||||
doc.review_status = "sent_for_approval"
|
doc.review_status = "sent_for_approval"
|
||||||
if payload.note:
|
if payload.note:
|
||||||
doc.review_note = payload.note
|
doc.review_note = payload.note
|
||||||
@@ -388,7 +415,6 @@ async def send_return_for_approval(
|
|||||||
db.add(event)
|
db.add(event)
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
client = db.query(User).filter_by(id=doc.user_id).first()
|
|
||||||
if client:
|
if client:
|
||||||
note_html = f"<p><em>{payload.note}</em></p>" if payload.note else ""
|
note_html = f"<p><em>{payload.note}</em></p>" if payload.note else ""
|
||||||
background.add_task(
|
background.add_task(
|
||||||
@@ -428,6 +454,11 @@ async def mark_filing_complete(
|
|||||||
_=Depends(require_admin),
|
_=Depends(require_admin),
|
||||||
):
|
):
|
||||||
"""Admin marks all approved docs for a user/year as 'filed'. Sends confirmation email."""
|
"""Admin marks all approved docs for a user/year as 'filed'. Sends confirmation email."""
|
||||||
|
client = crud.get_user_by_id(db, payload.user_id)
|
||||||
|
if not client:
|
||||||
|
raise HTTPException(status_code=404, detail="User not found")
|
||||||
|
assert_admin_can_access(current_user, client)
|
||||||
|
|
||||||
from app.models import PersonalDocument, BusinessDocument
|
from app.models import PersonalDocument, BusinessDocument
|
||||||
|
|
||||||
personal_docs = db.query(PersonalDocument).filter(
|
personal_docs = db.query(PersonalDocument).filter(
|
||||||
@@ -455,8 +486,6 @@ async def mark_filing_complete(
|
|||||||
target=f"user:{payload.user_id}",
|
target=f"user:{payload.user_id}",
|
||||||
detail=f"tax_year:{payload.tax_year} personal:{len(personal_docs)} business:{len(business_docs)}",
|
detail=f"tax_year:{payload.tax_year} personal:{len(personal_docs)} business:{len(business_docs)}",
|
||||||
)
|
)
|
||||||
|
|
||||||
client = crud.get_user_by_id(db, payload.user_id)
|
|
||||||
if client:
|
if client:
|
||||||
note_html = f"<p><em>{payload.note}</em></p>" if payload.note else ""
|
note_html = f"<p><em>{payload.note}</em></p>" if payload.note else ""
|
||||||
background.add_task(
|
background.add_task(
|
||||||
|
|||||||
@@ -161,8 +161,37 @@ async def upload_to_storage(file: UploadFile) -> str:
|
|||||||
detail=f"File type not allowed or could not be verified. Allowed: PDF, JPG, PNG, WEBP, DOC, DOCX, XLS, XLSX."
|
detail=f"File type not allowed or could not be verified. Allowed: PDF, JPG, PNG, WEBP, DOC, DOCX, XLS, XLSX."
|
||||||
)
|
)
|
||||||
|
|
||||||
ext = os.path.splitext(file.filename or "file")[1].lower()
|
MIME_TO_EXT = {
|
||||||
object_key = f"{uuid.uuid4().hex}{ext}"
|
"application/pdf": ".pdf",
|
||||||
|
"image/jpeg": ".jpg",
|
||||||
|
"image/png": ".png",
|
||||||
|
"image/webp": ".webp",
|
||||||
|
"application/msword": ".doc",
|
||||||
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": ".docx",
|
||||||
|
"application/vnd.ms-excel": ".xls",
|
||||||
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ".xlsx",
|
||||||
|
"application/zip": ".zip",
|
||||||
|
"application/x-zip-compressed": ".zip",
|
||||||
|
}
|
||||||
|
|
||||||
|
SAFE_EXT_BY_MIME = {
|
||||||
|
"application/pdf": {".pdf"},
|
||||||
|
"image/jpeg": {".jpg", ".jpeg"},
|
||||||
|
"image/png": {".png"},
|
||||||
|
"image/webp": {".webp"},
|
||||||
|
"application/msword": {".doc"},
|
||||||
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": {".docx"},
|
||||||
|
"application/vnd.ms-excel": {".xls"},
|
||||||
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {".xlsx"},
|
||||||
|
"application/zip": {".zip"},
|
||||||
|
"application/x-zip-compressed": {".zip"},
|
||||||
|
}
|
||||||
|
|
||||||
|
safe_ext = MIME_TO_EXT.get(sniffed_mime, ".bin")
|
||||||
|
if ext in SAFE_EXT_BY_MIME.get(sniffed_mime, set()):
|
||||||
|
safe_ext = ext
|
||||||
|
|
||||||
|
object_key = f"{uuid.uuid4().hex}{safe_ext}"
|
||||||
file_path = UPLOAD_DIR / object_key
|
file_path = UPLOAD_DIR / object_key
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -220,7 +249,11 @@ def stream_file(storage_key: str, token: str = Query(...)):
|
|||||||
if not file_path.exists():
|
if not file_path.exists():
|
||||||
raise HTTPException(status_code=404, detail="File not found")
|
raise HTTPException(status_code=404, detail="File not found")
|
||||||
|
|
||||||
return FileResponse(file_path)
|
headers = {
|
||||||
|
"Content-Disposition": f'attachment; filename="{Path(storage_key).name}"',
|
||||||
|
"X-Content-Type-Options": "nosniff",
|
||||||
|
}
|
||||||
|
return FileResponse(file_path, headers=headers)
|
||||||
|
|
||||||
|
|
||||||
# ─────────────────────────────────────────────
|
# ─────────────────────────────────────────────
|
||||||
@@ -355,6 +388,8 @@ def list_admin_documents(
|
|||||||
if current_user.role in [UserRole.admin, UserRole.super_admin]:
|
if current_user.role in [UserRole.admin, UserRole.super_admin]:
|
||||||
if not user_id:
|
if not user_id:
|
||||||
raise HTTPException(status_code=400, detail="user_id is required for admin")
|
raise HTTPException(status_code=400, detail="user_id is required for admin")
|
||||||
|
target_user = crud.get_user_by_id(db, user_id)
|
||||||
|
assert_admin_can_access(current_user, target_user)
|
||||||
docs = (
|
docs = (
|
||||||
db.query(AdminDocument)
|
db.query(AdminDocument)
|
||||||
.filter(AdminDocument.user_id == user_id, AdminDocument.deleted_at == None)
|
.filter(AdminDocument.user_id == user_id, AdminDocument.deleted_at == None)
|
||||||
@@ -408,15 +443,7 @@ def delete_admin_document(
|
|||||||
raise HTTPException(status_code=404, detail="Document not found")
|
raise HTTPException(status_code=404, detail="Document not found")
|
||||||
|
|
||||||
target_user = db.query(User).filter(User.id == doc.user_id).first()
|
target_user = db.query(User).filter(User.id == doc.user_id).first()
|
||||||
if not target_user:
|
assert_admin_can_access(current_user, target_user)
|
||||||
raise HTTPException(status_code=404, detail="Target user not found")
|
|
||||||
|
|
||||||
# Scope restriction: standard admins can only delete documents for base users
|
|
||||||
if current_user.role == UserRole.admin and target_user.role != UserRole.user:
|
|
||||||
raise HTTPException(
|
|
||||||
status_code=403,
|
|
||||||
detail="Standard admins can only manage documents for standard users"
|
|
||||||
)
|
|
||||||
|
|
||||||
if doc.review_status == "approved":
|
if doc.review_status == "approved":
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
@@ -425,10 +452,12 @@ def delete_admin_document(
|
|||||||
)
|
)
|
||||||
|
|
||||||
logger.info(f"Admin {current_user.id} deleting admin document {doc_id}")
|
logger.info(f"Admin {current_user.id} deleting admin document {doc_id}")
|
||||||
delete_from_storage(doc.storage_key)
|
storage_key = doc.storage_key
|
||||||
doc.deleted_at = datetime.utcnow()
|
doc.deleted_at = datetime.utcnow()
|
||||||
db.commit()
|
db.commit()
|
||||||
crud.log_action(db, "delete_admin_doc", user_id=current_user.id, target=f"admin_doc:{doc_id}")
|
crud.log_action(db, "delete_admin_doc", user_id=current_user.id, target=f"admin_doc:{doc_id}")
|
||||||
|
if storage_key:
|
||||||
|
delete_from_storage(storage_key)
|
||||||
return {"deleted": True}
|
return {"deleted": True}
|
||||||
|
|
||||||
|
|
||||||
@@ -789,6 +818,9 @@ async def set_personal_review_status(
|
|||||||
if not doc:
|
if not doc:
|
||||||
raise HTTPException(status_code=404, detail="Document not found")
|
raise HTTPException(status_code=404, detail="Document not found")
|
||||||
|
|
||||||
|
target_user = crud.get_user_by_id(db, doc.user_id)
|
||||||
|
assert_admin_can_access(current_user, target_user)
|
||||||
|
|
||||||
prev_status = doc.review_status
|
prev_status = doc.review_status
|
||||||
doc.review_status = payload.status
|
doc.review_status = payload.status
|
||||||
doc.review_note = payload.note
|
doc.review_note = payload.note
|
||||||
@@ -853,6 +885,9 @@ async def set_business_review_status(
|
|||||||
if not doc:
|
if not doc:
|
||||||
raise HTTPException(status_code=404, detail="Document not found")
|
raise HTTPException(status_code=404, detail="Document not found")
|
||||||
|
|
||||||
|
target_user = crud.get_user_by_id(db, doc.user_id)
|
||||||
|
assert_admin_can_access(current_user, target_user)
|
||||||
|
|
||||||
prev_status = doc.review_status
|
prev_status = doc.review_status
|
||||||
doc.review_status = payload.status
|
doc.review_status = payload.status
|
||||||
doc.review_note = payload.note
|
doc.review_note = payload.note
|
||||||
@@ -915,6 +950,9 @@ def update_personal_extracted_data(
|
|||||||
doc = db.query(PersonalDocument).filter_by(id=doc_id).first()
|
doc = db.query(PersonalDocument).filter_by(id=doc_id).first()
|
||||||
if not doc:
|
if not doc:
|
||||||
raise HTTPException(status_code=404, detail="Document not found")
|
raise HTTPException(status_code=404, detail="Document not found")
|
||||||
|
|
||||||
|
target_user = crud.get_user_by_id(db, doc.user_id)
|
||||||
|
assert_admin_can_access(current_user, target_user)
|
||||||
|
|
||||||
doc.extracted_data = payload.extracted_data
|
doc.extracted_data = payload.extracted_data
|
||||||
db.commit()
|
db.commit()
|
||||||
@@ -935,6 +973,9 @@ def update_business_extracted_data(
|
|||||||
doc = db.query(BusinessDocument).filter_by(id=doc_id).first()
|
doc = db.query(BusinessDocument).filter_by(id=doc_id).first()
|
||||||
if not doc:
|
if not doc:
|
||||||
raise HTTPException(status_code=404, detail="Document not found")
|
raise HTTPException(status_code=404, detail="Document not found")
|
||||||
|
|
||||||
|
target_user = crud.get_user_by_id(db, doc.user_id)
|
||||||
|
assert_admin_can_access(current_user, target_user)
|
||||||
|
|
||||||
doc.extracted_data = payload.extracted_data
|
doc.extracted_data = payload.extracted_data
|
||||||
db.commit()
|
db.commit()
|
||||||
@@ -1073,21 +1114,29 @@ def delete_user_completely(
|
|||||||
|
|
||||||
logger.info(f"Admin {current_user.id} deleting user {user_id}")
|
logger.info(f"Admin {current_user.id} deleting user {user_id}")
|
||||||
|
|
||||||
try:
|
keys_to_delete = []
|
||||||
for doc in db.query(AdminDocument).filter(AdminDocument.user_id == user_id).all():
|
|
||||||
delete_from_storage(doc.storage_key)
|
|
||||||
db.delete(doc)
|
|
||||||
|
|
||||||
for doc in db.query(AdminDocument).filter(AdminDocument.uploaded_by == user_id).all():
|
try:
|
||||||
delete_from_storage(doc.storage_key)
|
# If deleted user is an admin who uploaded documents for other clients, disassociate them rather than deleting client deliverables!
|
||||||
|
db.query(AdminDocument).filter(
|
||||||
|
AdminDocument.uploaded_by == user_id,
|
||||||
|
AdminDocument.user_id != user_id
|
||||||
|
).update({AdminDocument.uploaded_by: None}, synchronize_session=False)
|
||||||
|
|
||||||
|
# Admin documents belonging to this user
|
||||||
|
for doc in db.query(AdminDocument).filter(AdminDocument.user_id == user_id).all():
|
||||||
|
if doc.storage_key:
|
||||||
|
keys_to_delete.append(doc.storage_key)
|
||||||
db.delete(doc)
|
db.delete(doc)
|
||||||
|
|
||||||
for doc in db.query(PersonalDocument).filter(PersonalDocument.user_id == user_id).all():
|
for doc in db.query(PersonalDocument).filter(PersonalDocument.user_id == user_id).all():
|
||||||
delete_from_storage(doc.storage_key)
|
if doc.storage_key:
|
||||||
|
keys_to_delete.append(doc.storage_key)
|
||||||
db.delete(doc)
|
db.delete(doc)
|
||||||
|
|
||||||
for doc in db.query(BusinessDocument).filter(BusinessDocument.user_id == user_id).all():
|
for doc in db.query(BusinessDocument).filter(BusinessDocument.user_id == user_id).all():
|
||||||
delete_from_storage(doc.storage_key)
|
if doc.storage_key:
|
||||||
|
keys_to_delete.append(doc.storage_key)
|
||||||
db.delete(doc)
|
db.delete(doc)
|
||||||
|
|
||||||
# Clean up legacy uploaded_files rows to avoid FK constraint errors on db.delete(user)
|
# Clean up legacy uploaded_files rows to avoid FK constraint errors on db.delete(user)
|
||||||
@@ -1133,6 +1182,10 @@ def delete_user_completely(
|
|||||||
|
|
||||||
db.delete(user)
|
db.delete(user)
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
|
# Delete physical files ONLY after successful DB commit
|
||||||
|
for k in keys_to_delete:
|
||||||
|
delete_from_storage(k)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
db.rollback()
|
db.rollback()
|
||||||
logger.error(f"User deletion failed for {user_id}: {e}")
|
logger.error(f"User deletion failed for {user_id}: {e}")
|
||||||
@@ -1345,11 +1398,11 @@ def delete_template(
|
|||||||
except (IndexError, AttributeError):
|
except (IndexError, AttributeError):
|
||||||
key_to_delete = None
|
key_to_delete = None
|
||||||
|
|
||||||
if key_to_delete:
|
|
||||||
delete_from_storage(key_to_delete)
|
|
||||||
|
|
||||||
db.delete(record)
|
db.delete(record)
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
|
if key_to_delete:
|
||||||
|
delete_from_storage(key_to_delete)
|
||||||
return {"deleted": True}
|
return {"deleted": True}
|
||||||
|
|
||||||
from fastapi.responses import StreamingResponse
|
from fastapi.responses import StreamingResponse
|
||||||
@@ -1372,10 +1425,7 @@ def export_user_documents_excel(
|
|||||||
from openpyxl.styles import Font, PatternFill, Alignment
|
from openpyxl.styles import Font, PatternFill, Alignment
|
||||||
|
|
||||||
user = db.query(User).filter(User.id == user_id).first()
|
user = db.query(User).filter(User.id == user_id).first()
|
||||||
if not user:
|
assert_admin_can_access(current_user, user)
|
||||||
raise HTTPException(status_code=404, detail="User not found")
|
|
||||||
if current_user.role == UserRole.admin and user.role != UserRole.user:
|
|
||||||
raise HTTPException(status_code=403, detail="Admins can only export documents for regular user accounts")
|
|
||||||
|
|
||||||
personal_docs = db.query(PersonalDocument).filter(
|
personal_docs = db.query(PersonalDocument).filter(
|
||||||
PersonalDocument.user_id == user_id, PersonalDocument.deleted_at == None
|
PersonalDocument.user_id == user_id, PersonalDocument.deleted_at == None
|
||||||
|
|||||||