html, body { 
    height: 100%; 
    overflow: hidden; 
    -webkit-tap-highlight-color: transparent; 
    
    /* 🔴 இதான் புதுசு: Text Selection-ஐ தடுக்கும் */
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

/* 🟢 முக்கியம்: Input & Textarea-வில் மட்டும் Select பண்ண விடனும் */
input, textarea {
    user-select: text !important;
    -webkit-user-select: text !important;
}


#app-view { 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
}

.view-content { 
    padding-bottom: 120px; 
} 

.no-scrollbar::-webkit-scrollbar { 
    display: none; 
}

/* Glassmorphism */
.glass { 
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(12px); 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
}

.dark .glass { 
    background: rgba(15, 23, 42, 0.85); 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}

/* PRIVACY BLUR LOGIC */
body.privacy-active .sensitive-data {
    filter: blur(8px);
    transition: filter 0.3s ease;
    user-select: none;
}

/* Calendar Styles */
.calendar-day { 
    aspect-ratio: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 12px; 
    font-size: 12px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.2s; 
}

.calendar-day:hover { background-color: #f3f4f6; }
.dark .calendar-day:hover { background-color: #334155; }

.calendar-day.active { 
    background-color: #6366f1; 
    color: white; 
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4); 
}

.calendar-day.today { 
    border: 2px solid #6366f1; 
    color: #6366f1; 
}

/* FIXED: Icons Dark Mode Visibility */
.cat-icon-box { 
    position: relative; 
    z-index: 1; 
    overflow: hidden; 
    transition: all 0.3s; 
}

.dark .cat-icon-box { 
    border: 1px solid rgba(255,255,255,0.2); 
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15); 
    background-color: #1e293b !important; /* Force dark card bg */
    color: #e2e8f0 !important; /* Force light icon */
}

/* Toggle Switch */
.toggle-checkbox:checked { 
    right: 0; 
    border-color: #6366f1; 
}
.toggle-checkbox:checked + .toggle-label { 
    background-color: #6366f1; 
}

/* Toast Animation */
#toast-notification { 
    transform: translateY(-150%); 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
#toast-notification.show { 
    transform: translateY(20px); 
}

/* Pro Badge Shine Animation */
.pro-shine { 
    position: relative; 
    overflow: hidden; 
}
.pro-shine::after { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: -100%; 
    width: 100%; 
    height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
    animation: shine 3s infinite; 
}

@keyframes shine { 
    100% { left: 100%; } 
}

/* Loading Screen Animation Helpers */
.crown-float {
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}


/* --- BUDGET EXPAND ANIMATION --- */
.budget-split-view {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.budget-split-view.open {
    max-height: 200px; /* Enough space for 2 rows */
    opacity: 1;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0,0,0,0.1);
}

.dark .budget-split-view.open {
    border-top: 1px dashed rgba(255,255,255,0.1);
}

.chevron-icon {
    transition: transform 0.3s ease;
}

.chevron-icon.rotate {
    transform: rotate(180deg);
}



/* --- AI INSIGHTS BUTTON & MODAL --- */

/* 1. Magic Button Animation */
.ai-btn-gradient {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    background-size: 200% 200%;
    animation: gradientMove 3s ease infinite;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.ai-btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 3s infinite;
}

/* 2. AI Modal Styling */
.ai-card {
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent),
                white;
    border: 1px solid rgba(99, 102, 241, 0.1);
}
.dark .ai-card {
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent),
                #1e293b;
    border: 1px solid rgba(255,255,255,0.05);
}

/* 3. Blur Effect for Non-Pro Users */
.blur-content {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    z-index: 10;
    border-radius: 1rem;
}
.dark .lock-overlay {
    background: rgba(15, 23, 42, 0.7);
}


/* --- CALENDAR ANIMATIONS (Paste at bottom of style.css) --- */

/* Slide Out to Left (When clicking Next) */
.slide-out-left {
    animation: slideOutLeft 0.2s forwards ease-in;
}

/* Slide In from Right (When clicking Next) */
.slide-in-right {
    animation: slideInRight 0.2s forwards ease-out;
}

/* Slide Out to Right (When clicking Prev) */
.slide-out-right {
    animation: slideOutRight 0.2s forwards ease-in;
}

/* Slide In from Left (When clicking Prev) */
.slide-in-left {
    animation: slideInLeft 0.2s forwards ease-out;
}

@keyframes slideOutLeft {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-20px); opacity: 0; }
}

@keyframes slideInRight {
    0% { transform: translateX(20px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(20px); opacity: 0; }
}

@keyframes slideInLeft {
    0% { transform: translateX(-20px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}


/* Prediction Chart Container */
.prediction-chart-container {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
    border-radius: 24px;
    padding: 15px;
    margin-top: 15px;
}

/* Plan Cards Pulse */
.plan-card-active {
    border: 2px solid #6366f1 !important;
    background-color: rgba(99, 102, 241, 0.05);
}

.benefit-tag {
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 800;
    text-transform: uppercase;
}




/* style.css (Bottom) */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.animate-stagger {
    animation: staggerFadeUp 0.5s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes staggerFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Tooltip Styling */
#chartjs-tooltip {
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: 8px !important;
    color: white !important;
    font-size: 10px !important;
    padding: 4px 8px !important;
    font-weight: bold;
}





/* Pulse Card Glow Effect */
#pulse-icon.fa-arrow-trend-up {
    filter: drop-shadow(0 0 5px rgba(244, 63, 94, 0.5)); /* Red Glow for High Spend */
}

#pulse-icon.fa-shield-heart {
    filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.5)); /* Green Glow for Safe */
}

/* Modal Quote Background Animation */
.bg-gradient-to-r {
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
}











/* Neon Glow for Pulse Dot */
.neon-dot-green {
    background-color: #10b981; /* Emerald 500 */
    box-shadow: 0 0 10px #10b981;
}

.neon-dot-red {
    background-color: #f43f5e; /* Rose 500 */
    box-shadow: 0 0 10px #f43f5e;
}

.neon-dot-gray {
    background-color: #9ca3af;
    box-shadow: 0 0 5px #9ca3af;
}







/* --- REFERRAL CARD PREMIUM STYLES --- */

/* 1. Animated Gradient Background */
#referral-stats-card {
    background-size: 200% 200%;
    animation: gradientMove 6s ease infinite;
}

/* 2. Shine Effect on Hover */
#referral-stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; /* Start outside left */
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent
    );
    transition: none; /* Reset for animation loop */
}

#referral-stats-card:hover::before {
    left: 100%; /* Move to right */
    transition: left 0.7s ease-in-out;
}

/* 3. Glass Badge for Expiry Date */
#referral-stats-card .backdrop-blur-md {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 4. Onboarding Input Focus Glow (Name & Referral Code) */
#ob-name:focus, #ob-ref-code:focus {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2); /* Soft Indigo Glow */
    transform: translateY(-2px);
}











/* --- REFERRAL CARD PREMIUM STYLES --- */

/* 1. Animated Gradient Background */
#referral-stats-card {
    background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    background-size: 200% 200%;
    animation: gradientMove 6s ease infinite;
    position: relative;
    overflow: hidden;
}

/* 2. Shine Effect on Hover */
#referral-stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent
    );
    transition: none;
}

#referral-stats-card:hover::before {
    left: 100%;
    transition: left 0.7s ease-in-out;
}

/* 3. Glass Badge */
.glass-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}
















/* --- SQUAD DASHBOARD STYLES --- */
.status-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-pending { background: rgba(156, 163, 175, 0.2); color: #9ca3af; } /* Gray */
.status-ongoing { background: rgba(245, 158, 11, 0.2); color: #fbbf24; } /* Orange */
.status-completed { background: rgba(16, 185, 129, 0.2); color: #34d399; } /* Green */

.pro-progress-bar {
    transition: width 1s ease-in-out;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

















/* Premium Page Animations */

.crown-float {
    animation: crownFloat 3s ease-in-out infinite;
}

@keyframes crownFloat {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.animate-pulse-slow {
    animation: pulseSlow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseSlow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Smooth Card Transitions */
.plan-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}




/* Legal Content Styles */
#legal-content ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 10px;
}

#legal-content li {
    margin-bottom: 8px;
}

#legal-content h4 {
    font-weight: 800;
    color: #1e293b; /* slate-800 */
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 16px;
}

.dark #legal-content h4 {
    color: #fff;
}







/* --- NEW CLEAN THEME & ANIMATIONS --- */

/* 1. Background - Matches Loading Page (Clean) */
body {
    background-color: #ffffff; /* Pure White */
    color: #1e1b4b; /* Dark Indigo Text */
}

/* 2. Floating 3D Image Animation */
@keyframes floatImg {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}
.animate-float {
    animation: floatImg 4s ease-in-out infinite;
}

/* 3. Smooth Bottom Sheet Animation */
#login-sheet {
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); /* "Spring" feel illama smooth ah varum */
    will-change: transform;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1); /* Soft shadow */
}

/* 4. Modern Button (Indigo Gradient) */
.primary-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    transition: all 0.3s ease;
}
.primary-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.3);
}

/* Header Compact Mode (Logo moves up smoothly) */
.header-compact {
    transform: translateY(-10px) scale(0.85);
}
 0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -30px) scale(1.1); }
}

/* 3. Updated Glass Button (To pop on Indigo) */
.glass-btn {
    background: rgba(255, 255, 255, 0.15); /* More transparent */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); /* Soft shadow */
    border-radius: 16px;
    transition: all 0.3s ease;
}

.glass-btn:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.98);
}
e: transform;
}

.header-compact {
    transform: translateY(-5px) scale(0.85);
}










/* Modal Pop Animation */
@keyframes modalPop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.animate-modal-pop {
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}






/* --- PRO CARD ACCORDION ANIMATION --- */
.pro-card-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pro-card-content.expanded {
    max-height: 500px; /* Enough space for friends list */
    opacity: 1;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.pro-chevron {
    transition: transform 0.3s ease;
}

.pro-chevron.rotate {
    transform: rotate(180deg);
}














/* ==========================================
   🚀 IMPORT BACKUP PAGE PREMIUM STYLES
   ========================================== */

/* 1. Drag & Drop Zone Animation */
.upload-zone {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, transparent, rgba(99, 102, 241, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.upload-zone:hover::before {
    transform: translateX(100%);
}

/* When User Drags a File Over It */
.upload-zone.dragover {
    border-color: #6366f1 !important; /* Primary Color */
    background-color: rgba(99, 102, 241, 0.1) !important;
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
}

/* 2. Success Tick Pop Animation */
.success-tick-glow {
    position: relative;
    box-shadow: 0 0 50px rgba(16, 185, 129, 0.4); /* Emerald Glow */
    animation: successPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.success-tick-glow::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid #10b981;
    animation: rippleRing 1.5s infinite ease-out;
}

@keyframes successPop {
    0% { transform: scale(0.3) rotate(-15deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes rippleRing {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* 3. Stage Transitions */
.stage-enter {
    animation: fadeSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== LOGOUT MODAL FIX =====
   Tailwind hidden = display:none !important
   இதை override பண்ண .show class use பண்றோம் */
#logoutModal.show {
    display: flex !important;
}
