FinMK / frontend /src /pages /VoiceAssistant.css
Kumar
Refactor: Exclude PDF and CSV files from Git to fix HF push error
24e6f5b
/* ============================================================
VOICE ASSISTANT β€” ADVANCED UI/UX
============================================================ */
.va-wrapper {
--va-primary: #9d4edd;
--va-primary-glow: rgba(157, 78, 221, 0.5);
--va-secondary: #00f5d4;
--va-secondary-glow: rgba(0, 245, 212, 0.4);
--va-accent: #f72585;
--va-bg-dark: #02040a;
--va-surface: rgba(10, 15, 30, 0.5);
/* extra glass transparency */
--va-surface-2: rgba(20, 28, 55, 0.5);
--va-border: rgba(255, 255, 255, 0.08);
/* bolder glass edge */
--va-border-glow: rgba(157, 78, 221, 0.2);
--va-text: #f1f5f9;
--va-muted: #64748b;
--va-font: 'Outfit', 'Inter', -apple-system, sans-serif;
font-family: var(--va-font);
background: var(--va-bg-dark);
color: var(--va-text);
min-height: 100vh;
display: flex;
flex-direction: column;
position: relative;
overflow: hidden;
-webkit-font-smoothing: antialiased;
}
/* ── PREMIUM ANIMATED MESH BACKGROUND ─────────────────────────────── */
.va-background-effects {
position: fixed;
inset: 0;
z-index: 0;
pointer-events: none;
background-color: #030614;
background-image:
radial-gradient(circle at 10% 20%, rgba(56, 18, 114, 0.45) 0%, transparent 40%),
radial-gradient(circle at 90% 80%, rgba(0, 115, 120, 0.35) 0%, transparent 40%),
radial-gradient(circle at 50% 50%, rgba(136, 17, 86, 0.2) 0%, transparent 50%),
radial-gradient(circle at 80% 10%, rgba(29, 78, 216, 0.3) 0%, transparent 40%);
filter: blur(80px);
/* Deep blend for a smooth canvas */
animation: bg-mesh 18s ease-in-out infinite alternate;
}
@keyframes bg-mesh {
0% {
transform: scale(1) translate(0, 0);
}
50% {
transform: scale(1.1) translate(-2%, 3%);
}
100% {
transform: scale(1.05) translate(2%, -2%);
}
}
.va-grid-overlay {
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
background-size: 60px 60px;
z-index: 1;
/* Sits above the blurred mesh */
mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.3) 100%);
-webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.3) 100%);
}
/* ── HEADER ─────────────────────────────────── */
.va-header {
position: relative;
z-index: 100;
padding: 0.85rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
background: rgba(4, 6, 15, 0.85);
backdrop-filter: blur(20px);
border-bottom: 1px solid var(--va-border);
flex-shrink: 0;
}
.va-back-btn {
background: rgba(255, 255, 255, 0.05);
border: 1px solid var(--va-border);
color: var(--va-text);
width: 38px;
height: 38px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.25s ease;
flex-shrink: 0;
}
.va-back-btn:hover {
background: rgba(255, 255, 255, 0.1);
border-color: var(--va-secondary);
color: var(--va-secondary);
transform: translateX(-2px);
}
.va-logo {
display: flex;
align-items: center;
gap: 0.75rem;
}
.va-logo-icon-wrap {
background: linear-gradient(135deg, var(--va-primary), var(--va-secondary));
width: 36px;
height: 36px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
color: white;
box-shadow: 0 4px 14px var(--va-primary-glow);
animation: va-logo-pulse 3s ease-in-out infinite;
}
@keyframes va-logo-pulse {
0%,
100% {
box-shadow: 0 4px 14px var(--va-primary-glow);
}
50% {
box-shadow: 0 4px 28px var(--va-primary-glow), 0 0 40px rgba(0, 245, 212, 0.2);
}
}
.va-title {
margin: 0;
font-size: 1.15rem;
font-weight: 800;
letter-spacing: -0.02em;
line-height: 1;
}
.va-subtitle {
margin: 0;
font-size: 0.72rem;
color: var(--va-muted);
margin-top: 2px;
}
.va-gradient-text {
background: linear-gradient(90deg, var(--va-secondary), var(--va-primary));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.va-header-center {
flex: 1;
display: flex;
justify-content: center;
}
.va-session-pills {
display: flex;
gap: 0.6rem;
}
.va-pill {
display: flex;
align-items: center;
gap: 0.35rem;
padding: 0.3rem 0.75rem;
background: rgba(255, 255, 255, 0.04);
border: 1px solid var(--va-border);
border-radius: 99px;
font-size: 0.75rem;
color: var(--va-muted);
font-weight: 600;
font-family: 'Courier New', monospace;
}
.va-pill-dot {
width: 7px;
height: 7px;
border-radius: 50%;
animation: va-blink 2s ease infinite;
}
@keyframes va-blink {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.3;
}
}
.va-header-actions {
display: flex;
align-items: center;
gap: 0.75rem;
}
.va-model-select {
background: rgba(20, 28, 55, 0.8);
color: white;
border: 1px solid rgba(255, 255, 255, 0.1);
padding: 0.4rem 0.75rem;
border-radius: 8px;
outline: none;
font-size: 0.82rem;
cursor: pointer;
font-family: var(--va-font);
}
.va-status-badge {
display: flex;
align-items: center;
gap: 7px;
padding: 0.35rem 0.85rem;
background: rgba(0, 245, 212, 0.08);
border: 1px solid rgba(0, 245, 212, 0.2);
border-radius: 99px;
font-size: 0.8rem;
font-weight: 600;
color: var(--va-secondary);
}
.va-status-dot {
width: 7px;
height: 7px;
background: var(--va-secondary);
border-radius: 50%;
box-shadow: 0 0 8px var(--va-secondary-glow);
animation: va-blink 2s ease infinite;
}
/* ── BODY LAYOUT ─────────────────────────────── */
.va-body {
position: relative;
z-index: 1;
flex: 1;
display: grid;
grid-template-columns: 1fr 340px;
/* Center + Right panel */
gap: 0;
overflow: hidden;
height: calc(100vh - 72px);
/* strict height to force internal scroll */
}
/* ── SHARED PANEL STYLES ─────────────────────── */
.va-panel-card {
background: var(--va-surface);
backdrop-filter: blur(20px);
border: 1px solid var(--va-border);
border-radius: 16px;
overflow: hidden;
display: flex;
flex-direction: column;
}
.va-panel-header {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.85rem 1rem;
border-bottom: 1px solid var(--va-border);
font-size: 0.8rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--va-muted);
flex-shrink: 0;
}
/* ── CENTER PANEL ────────────────────────────── */
.va-center {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 2rem 1.5rem 1.5rem;
gap: 1.5rem;
overflow-y: auto;
}
/* Orb Section */
.va-orb-section {
display: flex;
flex-direction: column;
align-items: center;
gap: 1.25rem;
width: 100%;
max-width: 420px;
}
.va-assistant-visualizer {
position: relative;
width: 220px;
height: 220px;
display: flex;
align-items: center;
justify-content: center;
}
.va-ai-orb {
position: relative;
width: 140px;
height: 140px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: all 0.4s ease;
z-index: 2;
}
.va-orb-core {
width: 100%;
height: 100%;
border-radius: 50%;
z-index: 5;
transition: all 0.5s ease;
}
.va-orb-ring {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 50%;
border: 2px solid transparent;
z-index: 1;
opacity: 0;
transition: all 0.3s ease;
}
/* Idle */
.va-orb-idle .va-orb-core {
background: radial-gradient(circle at 35% 35%, #2d1b4e, #09080f);
box-shadow: 0 0 30px rgba(157, 78, 221, 0.2),
inset -8px -8px 20px rgba(0, 0, 0, 0.5),
inset 3px 3px 10px rgba(157, 78, 221, 0.1);
animation: va-breathe 4s ease-in-out infinite;
}
.va-orb-idle .va-ring-1 {
width: 160px;
height: 160px;
border-color: rgba(157, 78, 221, 0.12);
opacity: 1;
}
.va-orb-idle .va-ring-2 {
width: 185px;
height: 185px;
border-color: rgba(157, 78, 221, 0.06);
opacity: 1;
}
@keyframes va-breathe {
0%,
100% {
transform: scale(1);
box-shadow: 0 0 30px rgba(157, 78, 221, 0.2);
}
50% {
transform: scale(1.04);
box-shadow: 0 0 50px rgba(157, 78, 221, 0.35);
}
}
/* Listening */
.va-orb-listening .va-orb-core {
background: radial-gradient(circle at 35% 35%, #00e5c8, #00b4d8);
box-shadow: 0 0 70px var(--va-secondary-glow),
inset -8px -8px 20px rgba(0, 0, 0, 0.3);
animation: va-listen-pulse 1.4s ease-out infinite;
}
.va-orb-listening .va-orb-ring {
border-color: var(--va-secondary);
animation: va-ripple 1.6s linear infinite;
opacity: 1;
}
.va-orb-listening .va-ring-1 {
width: 160px;
height: 160px;
animation-delay: 0s;
}
.va-orb-listening .va-ring-2 {
width: 185px;
height: 185px;
animation-delay: 0.5s;
}
.va-orb-listening .va-ring-3 {
width: 210px;
height: 210px;
animation-delay: 1s;
}
@keyframes va-listen-pulse {
0%,
100% {
transform: scale(1);
}
50% {
transform: scale(1.08);
}
}
/* Processing */
.va-orb-processing .va-orb-core {
background: radial-gradient(circle at 35% 35%, #f72585, #9d4edd);
box-shadow: 0 0 60px rgba(247, 37, 133, 0.5),
inset -8px -8px 20px rgba(0, 0, 0, 0.3);
animation: va-spin-scale 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.va-orb-processing .va-ring-1 {
width: 165px;
height: 165px;
border-top-color: #f72585;
border-bottom-color: var(--va-primary);
opacity: 1;
animation: va-spin 1s linear infinite;
}
.va-orb-processing .va-ring-2 {
width: 190px;
height: 190px;
border-left-color: rgba(247, 37, 133, 0.4);
opacity: 1;
animation: va-spin 1.5s linear infinite reverse;
}
@keyframes va-spin {
100% {
transform: translate(-50%, -50%) rotate(360deg);
}
}
@keyframes va-spin-scale {
0%,
100% {
transform: scale(0.96);
}
50% {
transform: scale(1.04);
}
}
/* Speaking */
.va-orb-speaking .va-orb-core {
background: radial-gradient(circle at 35% 35%, var(--va-primary), var(--va-secondary));
box-shadow: 0 0 70px var(--va-primary-glow),
0 0 30px var(--va-secondary-glow),
inset -8px -8px 20px rgba(0, 0, 0, 0.3);
animation: va-speak-bounce 0.5s ease-in-out infinite alternate;
}
.va-orb-speaking .va-ring-1,
.va-orb-speaking .va-ring-2,
.va-orb-speaking .va-ring-3 {
border-color: rgba(157, 78, 221, 0.4);
opacity: 1;
animation: va-speak-wave 1.4s ease-out infinite;
}
.va-orb-speaking .va-ring-1 {
width: 160px;
height: 160px;
animation-delay: 0s;
}
.va-orb-speaking .va-ring-2 {
width: 185px;
height: 185px;
animation-delay: 0.4s;
}
.va-orb-speaking .va-ring-3 {
width: 210px;
height: 210px;
animation-delay: 0.8s;
}
@keyframes va-speak-bounce {
0% {
transform: scale(1);
}
100% {
transform: scale(1.12);
}
}
@keyframes va-speak-wave {
0% {
transform: translate(-50%, -50%) scale(1);
opacity: 0.7;
}
100% {
transform: translate(-50%, -50%) scale(1.5);
opacity: 0;
}
}
@keyframes va-ripple {
0% {
transform: translate(-50%, -50%) scale(1);
opacity: 0.7;
}
100% {
transform: translate(-50%, -50%) scale(1.8);
opacity: 0;
}
}
/* Status Row */
.va-status-row {
display: flex;
align-items: center;
gap: 8px;
}
.va-live-dot {
width: 9px;
height: 9px;
border-radius: 50%;
transition: all 0.4s ease;
}
.va-status-label {
font-size: 1rem;
font-weight: 700;
letter-spacing: 0.01em;
transition: color 0.4s ease;
}
/* Transcript */
.va-transcript-box {
width: 100%;
min-height: 72px;
background: rgba(0, 0, 0, 0.25);
border: 1px solid rgba(255, 255, 255, 0.05);
border-radius: 16px;
padding: 1.25rem 1.5rem;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
backdrop-filter: blur(10px);
}
.va-transcript-text {
margin: 0;
font-size: 1rem;
font-style: italic;
line-height: 1.5;
display: flex;
align-items: flex-start;
gap: 0.4rem;
animation: va-fade-in 0.3s ease;
}
.va-ai-speech {
color: #c084fc;
}
.va-user-speech {
color: var(--va-secondary);
}
.va-placeholder-text {
margin: 0;
font-size: 0.9rem;
color: var(--va-muted);
}
.va-thinking-dots {
display: flex;
gap: 6px;
align-items: center;
}
.va-thinking-dots span {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--va-primary);
animation: va-dot-pulse 1.4s ease-in-out infinite;
}
.va-thinking-dots span:nth-child(2) {
animation-delay: 0.2s;
}
.va-thinking-dots span:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes va-dot-pulse {
0%,
80%,
100% {
opacity: 0.2;
transform: scale(0.8);
}
40% {
opacity: 1;
transform: scale(1.1);
}
}
@keyframes va-fade-in {
from {
opacity: 0;
transform: translateY(5px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Controls */
.va-controls {
display: flex;
gap: 1rem;
align-items: center;
justify-content: center;
}
.va-control-btn {
width: 58px;
height: 58px;
border-radius: 50%;
border: none;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
backdrop-filter: blur(10px);
}
.va-mic-btn {
width: 72px;
height: 72px;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
border: 1.5px solid rgba(255, 255, 255, 0.18);
color: white;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.va-mic-btn:hover:not(:disabled) {
transform: scale(1.1) translateY(-3px);
background: rgba(255, 255, 255, 0.18);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.va-mic-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.va-mic-btn.va-listening {
background: rgba(247, 37, 133, 0.18);
border-color: #f72585;
color: #f72585;
box-shadow: 0 0 30px rgba(247, 37, 133, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
animation: va-mic-pulse 1.5s ease-in-out infinite;
}
@keyframes va-mic-pulse {
0%,
100% {
box-shadow: 0 0 20px rgba(247, 37, 133, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
}
50% {
box-shadow: 0 0 40px rgba(247, 37, 133, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);
}
}
.va-mic-btn.va-processing {
animation: va-process-spin 2s linear infinite;
border-color: #f72585;
}
@keyframes va-process-spin {
0% {
border-top-color: #f72585;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: transparent;
}
25% {
border-top-color: transparent;
border-right-color: var(--va-primary);
border-bottom-color: transparent;
border-left-color: transparent;
}
50% {
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: var(--va-secondary);
border-left-color: transparent;
}
75% {
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: #f59e0b;
}
100% {
border-top-color: #f72585;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: transparent;
}
}
.va-stop-btn {
background: rgba(255, 149, 0, 0.1);
border: 1.5px solid rgba(255, 149, 0, 0.4);
color: #ff9500;
}
.va-stop-btn:hover {
background: rgba(255, 149, 0, 0.2);
transform: scale(1.08) translateY(-2px);
box-shadow: 0 8px 20px rgba(255, 149, 0, 0.3);
}
.va-clear-btn {
background: rgba(100, 116, 139, 0.1);
border: 1.5px solid rgba(100, 116, 139, 0.2);
color: var(--va-muted);
}
.va-clear-btn:hover {
background: rgba(239, 68, 68, 0.1);
border-color: rgba(239, 68, 68, 0.3);
color: #ef4444;
transform: scale(1.08) translateY(-2px);
}
.va-mic-hint {
margin: 0;
font-size: 0.75rem;
color: var(--va-muted);
text-align: center;
opacity: 0.7;
}
/* Waveform */
.va-waveform {
display: flex;
align-items: center;
justify-content: center;
gap: 3px;
height: 40px;
width: 100%;
max-width: 380px;
}
.va-wave-bar {
width: 3px;
height: 6px;
border-radius: 2px;
background: rgba(255, 255, 255, 0.1);
border-radius: 99px;
transition: all 0.3s ease;
}
.va-wave-active .va-wave-bar {
background: var(--va-secondary);
animation: va-wave 1.2s ease-in-out infinite alternate;
}
.va-wave-speaking .va-wave-bar {
background: var(--va-primary);
animation: va-wave 0.6s ease-in-out infinite alternate;
}
@keyframes va-wave {
0% {
height: 4px;
opacity: 0.5;
}
100% {
height: 32px;
opacity: 1;
}
}
/* ── RIGHT PANEL ─────────────────────────────── */
.va-right-panel {
border-left: 1px solid var(--va-border);
display: flex;
flex-direction: column;
gap: 1rem;
padding: 1.25rem;
overflow-y: auto;
background: rgba(4, 6, 15, 0.4);
}
.va-log-card {
flex: 1 1 auto;
min-height: 0;
max-height: 60vh;
/* Fixed max height so it won't push down layout */
display: flex;
flex-direction: column;
}
.va-log-count {
margin-left: auto;
background: rgba(245, 158, 11, 0.15);
color: #f59e0b;
border-radius: 99px;
padding: 0.1rem 0.5rem;
font-size: 0.7rem;
font-weight: 700;
}
.va-log-body {
flex: 1;
overflow-y: auto;
padding: 0.75rem;
display: flex;
flex-direction: column;
gap: 0.6rem;
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.06) transparent;
}
/* Custom Webkit scrollbar for log body */
.va-log-body::-webkit-scrollbar {
width: 6px;
}
.va-log-body::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.02);
border-radius: 10px;
}
.va-log-body::-webkit-scrollbar-thumb {
background: rgba(157, 78, 221, 0.3);
border-radius: 10px;
}
.va-log-body::-webkit-scrollbar-thumb:hover {
background: rgba(157, 78, 221, 0.6);
}
.va-log-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 2rem;
color: #334155;
text-align: center;
}
.va-log-empty p {
font-size: 0.78rem;
margin: 0;
}
.va-log-entry {
border-radius: 10px;
padding: 0.65rem 0.75rem;
animation: va-fade-in 0.3s ease;
}
.va-log-entry.user {
background: rgba(0, 245, 212, 0.06);
border: 1px solid rgba(0, 245, 212, 0.12);
}
.va-log-entry.ai {
background: rgba(157, 78, 221, 0.06);
border: 1px solid rgba(157, 78, 221, 0.12);
}
.va-log-meta {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.3rem;
}
.va-log-role {
font-size: 0.68rem;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--va-muted);
}
.va-log-entry.user .va-log-role {
color: var(--va-secondary);
}
.va-log-entry.ai .va-log-role {
color: var(--va-primary);
}
.va-log-time {
font-size: 0.65rem;
color: #334155;
font-family: monospace;
}
.va-log-text {
margin: 0;
font-size: 0.78rem;
color: rgba(241, 245, 249, 0.75);
line-height: 1.45;
}
/* Stats Card */
.va-stats-card {
flex-shrink: 0;
}
.va-stats-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1px;
background: var(--va-border);
border-radius: 0 0 14px 14px;
overflow: hidden;
}
.va-stat-item {
background: rgba(10, 14, 30, 0.6);
padding: 0.85rem;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.25rem;
}
.va-stat-val {
font-size: 1.1rem;
font-weight: 800;
letter-spacing: -0.02em;
font-family: 'Courier New', monospace;
}
.va-stat-lbl {
font-size: 0.65rem;
color: var(--va-muted);
text-transform: uppercase;
letter-spacing: 0.06em;
font-weight: 600;
}
/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 1100px) {
.va-body {
grid-template-columns: 240px 1fr 260px;
}
}
@media (max-width: 860px) {
.va-body {
grid-template-columns: 1fr;
grid-template-rows: auto 1fr auto;
overflow-y: auto;
}
.va-left-panel,
.va-right-panel {
border: none;
border-bottom: 1px solid var(--va-border);
}
.va-left-panel {
order: 2;
}
.va-center {
order: 1;
}
.va-right-panel {
order: 3;
}
.va-header-center {
display: none;
}
}