/* Professional Goals Dashboard Shared Styles - Fiacore Design */

/* CSS Variable for consistent row height */
:root {
    --monthly-row: 120px;
}

/* Monthly Performance Cards - CSS Grid Layout with Fixed Height and Scrolling */
#monthly-cards {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    grid-auto-rows: var(--monthly-row) !important;
    gap: 6px !important; /* Professional spacing between cards */
    height: calc(3 * var(--monthly-row) + 2 * 6px + 2 * 12px) !important; /* Exact height for 3 rows + gaps + padding */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-gutter: stable !important;
    padding: 12px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    align-content: start !important;
    /* Custom scrollbar styling */
    scrollbar-width: thin !important;
    scrollbar-color: rgba(59, 130, 246, 0.5) rgba(255, 255, 255, 0.1) !important;
}

/* Force compact sizing for cards inside monthly grid to prevent clipping */
#monthly-cards .professional-stat-card {
    height: var(--monthly-row) !important;
    padding: 6px !important; /* Reduced padding for better fit */
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    border: none !important; /* Remove any borders that might create white lines */
    margin: 0 !important; /* Remove any margins */
    overflow: hidden !important; /* Prevent bleed - consistent with grid items */
}

/* Optimize internal elements for compact cards */
#monthly-cards .stat-icon {
    width: 20px !important; /* Slightly smaller icon */
    height: 20px !important;
    margin: 0 auto 3px auto !important;
    border: none !important; /* Remove any icon borders */
}

#monthly-cards .stat-value {
    font-size: 0.8rem !important; /* Slightly smaller font */
    font-weight: 700 !important;
    margin: 1px 0 !important; /* Reduced margins */
    line-height: 1 !important;
}

#monthly-cards .stat-label {
    font-size: 0.65rem !important; /* Smaller font */
    margin: 1px 0 !important;
    line-height: 1 !important;
    color: var(--color-text-secondary) !important;
}

#monthly-cards .stat-detail {
    font-size: 0.65rem !important; /* Smaller font */
    margin: 0 !important;
    line-height: 1 !important;
    font-weight: 600 !important;
}

/* Webkit scrollbar styling for better visibility */
#monthly-cards::-webkit-scrollbar {
    width: 8px;
}

#monthly-cards::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#monthly-cards::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
}

#monthly-cards::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* Grid card items */
.monthly-grid-card {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important; /* Back to hidden to prevent bleed */
    border: none !important; /* Remove any borders */
    margin: 0 !important;
    padding: 0 !important;
}

/* Override any monthly-mini-card borders within monthly cards grid */
#monthly-cards .monthly-mini-card {
    border: none !important;
    background: inherit !important; /* Use parent background to eliminate seams */
    box-shadow: none !important;
}

/* Mobile responsive styles for investment cards */
@media (max-width: 768px) {
    .investment-card {
        min-height: 250px !important;
        padding: 12px !important;
    }
    
    .investment-card .card-body {
        padding: 12px !important;
    }
    
    .investment-card .progress-circle {
        width: 100px !important;
        height: 100px !important;
    }
    
    .investment-card .stat-value {
        font-size: 1.1rem !important;
    }
}

/* Responsive grid columns */
@media (max-width: 1200px) {
    #monthly-cards { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 768px) {
    #monthly-cards { grid-template-columns: repeat(3, 1fr) !important; }
}

.monthly-mini-card {
    height: 115px !important; /* Much taller height so content fits properly */
    border-radius: 8px;
    padding: 12px;
    background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-bg-secondary) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-sizing: border-box;
    display: flex;
    flex-direction: column; /* VERTICAL layout - icon at top, text below */
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.monthly-mini-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
}

.monthly-mini-card .stat-icon {
    width: 30px !important; /* Even larger icon */
    height: 30px !important;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px auto; /* Center and add more bottom margin */
}

.monthly-mini-card .stat-icon i {
    font-size: 14px !important; /* Much larger icon font size */
}

.monthly-mini-card .stat-value {
    font-size: 16px !important; /* Even larger font for profit amount */
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.1;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-mini-card .stat-label {
    font-weight: 500;
    color: var(--color-text-secondary);
    font-size: 13px !important; /* Even larger font for month */
    margin-bottom: 6px;
    line-height: 1.1;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-mini-card .stat-detail {
    font-size: 12px !important; /* Even larger font for percentage */
    opacity: 0.9;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:root {
    --primary: var(--color-primary, #3B82F6);
    --primary-light: var(--color-primary-light, #93C5FD);
    --primary-lighter: #DBEAFE;
    --primary-dark: var(--color-primary-dark, #2563EB);
    --light-bg: var(--color-bg-secondary, #F8FAFC);
    --border-light: var(--color-border-light, #E2E8F0);
    --text-secondary: var(--color-text-secondary, #64748B);
    --success-professional: #059669;
    --warning-professional: var(--color-primary, #3b82f6);
    --danger-professional: #dc2626;
    --neutral-professional: var(--color-text-secondary, #64748b);
}

/* Base Animation Classes */
.animated-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.animated-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    border-color: var(--primary-light);
}

/* Investment Dashboard Enhanced Hover */
.investment-dashboard .animated-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.goal-progress-circle {
    transition: stroke-dashoffset 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Consolidated Progress Circle Classes */
.progress-circle {
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Achievement Progress Circle - Enhanced Centering with Live Animation */
.achievement-progress-circle,
.transition-stroke-2s-cubic {
    transition: stroke-dashoffset 2.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: progressPulse 3s ease-in-out infinite;
}

/* Live Progress Animation */
@keyframes progressPulse {
    0% { 
        filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.3));
        stroke-width: 6;
    }
    50% { 
        filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.6));
        stroke-width: 7;
    }
    100% { 
        filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.3));
        stroke-width: 6;
    }
}

/* Enhanced Progress Ring with Live Animation */
.progress-ring .achievement-progress-circle {
    animation: progressPulse 3s ease-in-out infinite, rotateProgress 8s linear infinite;
    stroke: url(#achievementGradient) !important;
}

@keyframes rotateProgress {
    0% { transform: rotate(-90deg); }
    100% { transform: rotate(270deg); }
}

.transform-rotate-90-center {
    transform: rotate(-90deg);
    transform-origin: center;
}

/* Progress Ring Container - Perfect Centering */
.progress-ring {
    display: block !important;
    margin: 0 auto !important;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.metric-counter {
    animation: none;
}

/* countUp, slideInLeft, slideInRight keyframes in core-animations.css */

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.filter-card {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}


.status-badge {
    transition: all 0.3s ease;
}

.goal-card:hover .status-badge {
    transform: none;
}


/* Professional Statistics Cards Styling */
.professional-stat-card {
    background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-bg-secondary) 100%) !important;
    border: 2px solid rgba(59, 130, 246, 0.25) !important;
    border-radius: 12px !important;
    padding: 0.8rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    transition: all 0.3s ease !important;
    min-height: 140px !important;
    height: 180px !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Goals Overview Cards - Special Styling (Larger cards for Savings/Investment Goals) */
[data-summary-card="savings_goals_card"] .professional-stat-card,
[data-summary-card="investment_goals_card"] .professional-stat-card {
    height: 420px !important;
    min-height: 420px !important;
    padding: 2rem !important;
    background: var(--color-bg-card) !important;
    border: 1px solid var(--color-border-light) !important;
    border-radius: 16px !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    display: flex !important;
}

/* Ensure mobile cards also respect height and override any conflicting rules */
@media (max-width: 1199px) {
    [data-summary-card="savings_goals_card"] .professional-stat-card,
    [data-summary-card="investment_goals_card"] .professional-stat-card {
        height: 420px !important;
        min-height: 420px !important;
        padding: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    [data-summary-card="savings_goals_card"] .professional-stat-card,
    [data-summary-card="investment_goals_card"] .professional-stat-card {
        height: 420px !important;
        min-height: 420px !important;
        padding: 1rem !important;
    }
}

.professional-stat-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25) !important;
    border-color: rgba(59, 130, 246, 0.45) !important;
    background: linear-gradient(135deg, var(--color-bg-card) 0%, #dbeafe 100%) !important;
}

.professional-stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.25) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.professional-stat-card .stat-icon i {
    font-size: 1.5rem !important;
    color: var(--primary) !important;
}

.professional-stat-card .stat-value {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.15rem !important;
    color: var(--color-primary) !important;
    text-align: center !important;
    line-height: 1.1 !important;
}

.professional-stat-card .stat-label {
    font-weight: 600 !important;
    color: var(--color-text-secondary) !important;
    font-size: 0.8rem !important;
    margin-bottom: 0.3rem !important;
    text-align: center !important;
    line-height: 1.1 !important;
    max-height: 45px !important;
    overflow: visible !important;
}

/* Compact toggle styling for stat cards */
.professional-stat-card .toggle-container {
    display: inline-block !important;
    margin-left: 6px !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.professional-stat-card .toggle-label {
    display: inline-block !important;
    margin: 0 !important;
    padding: 2px 6px !important;
    font-size: 0.7rem !important;
    line-height: 1 !important;
}

.professional-stat-card .toggle-text {
    font-size: 0.7rem !important;
    line-height: 1 !important;
}

.professional-stat-card .stat-detail {
    font-size: 0.8rem !important;
    color: var(--color-text-secondary) !important;
    opacity: 0.8;
    text-align: center !important;
    line-height: 1.2 !important;
}

/* Responsive card heights for consistent sizing across all screens */
@media (max-width: 768px) {
    .professional-stat-card {
        height: 180px !important;
        padding: 0.7rem !important;
    }
    
    /* Goals Overview cards - override height for mobile */
    [data-summary-card="savings_goals_card"] .professional-stat-card,
    [data-summary-card="investment_goals_card"] .professional-stat-card {
        height: auto !important;
        min-height: 380px !important;
        padding: 1.5rem !important;
    }
    
    .professional-stat-card .stat-value {
        font-size: 1.3rem !important;
    }
    
    .professional-stat-card .stat-icon {
        width: 35px;
        height: 35px;
        margin-bottom: 0.4rem;
    }
    
    .professional-stat-card .stat-icon i {
        font-size: 1.3rem !important;
    }
}

@media (max-width: 576px) {
    .professional-stat-card {
        height: 180px !important;
        padding: 0.6rem !important;
    }
    
    /* Goals Overview cards - override height for small screens */
    [data-summary-card="savings_goals_card"] .professional-stat-card,
    [data-summary-card="investment_goals_card"] .professional-stat-card {
        height: auto !important;
        min-height: 360px !important;
        padding: 1.25rem !important;
    }
    
    .professional-stat-card .stat-value {
        font-size: 1.2rem !important;
    }
    
    .professional-stat-card .stat-label {
        font-size: 0.75rem !important;
    }
    
    .professional-stat-card .stat-detail {
        font-size: 0.75rem !important;
    }
}

/* Enhanced Achievement Metric Cards - Better spacing and visibility */
.achievement-metric-card {
    margin-bottom: 1rem !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.12) !important;
}

.achievement-metric-card:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.45) !important;
}


/* Professional Header */
.professional-header {
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-border-light) 100%) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 16px !important;
}

/* Light Transparent Blue Button Design */
.btn.btn-primary.btn-enhanced {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 10px;
    font-size: 0.95rem;
    background: rgba(59, 130, 246, 0.12) !important;
    color: var(--color-primary-dark) !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.15) !important;
    transition: all 0.2s ease-in-out;
}

.btn.btn-primary.btn-enhanced:hover {
    background: rgba(59, 130, 246, 0.20) !important;
    border-color: rgba(59, 130, 246, 0.50) !important;
    color: #1e3a8a !important;
    transform: translateY(-1px);
}

.btn.btn-primary.btn-enhanced:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.20) !important;
}

.btn.btn-primary.btn-enhanced:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25) !important;
}

/* Professional Goal Card Styling */
.professional-goal-card {
    transition: all 0.3s ease !important;
}

.professional-goal-card:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-bg-secondary) 100%) !important;
}

/* Professional Chart Container Styling */
.professional-chart-container {
    border: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.professional-chart-container:hover {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    transform: none;
}

.professional-chart-container .card-header {
    background: transparent;
    border: 0;
    padding: 1rem 1.5rem;
}

.professional-chart-container .card-header h5 {
    margin-bottom: 0;
    font-weight: bold;
    color: var(--color-text-primary);
}

/* Professional Spacing */
.section-spacing-professional {
    margin-bottom: 2.5rem;
}

/* Scoped Section Titles for Savings Dashboard */
.savings-section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-primary);
    letter-spacing: -0.01em;
}

.savings-section-separator {
    width: 85%;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 auto 2rem auto;
}

/* Scoped Section Titles for Investment Dashboard */
.investment-section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-primary);
    letter-spacing: -0.01em;
}

.investment-section-separator {
    width: 85%;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 auto 2rem auto;
}

/* Achievement Progress Container - Better responsive layout */
@media (min-width: 992px) {
    .investment-dashboard .col-lg-5 {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .investment-dashboard .achievement-metric-card {
        margin-bottom: 1.5rem !important;
    }
}

@media (max-width: 991px) {
    .investment-dashboard .achievement-metric-card {
        margin-bottom: 1rem !important;
    }
}

/* Hero Banner Base Styling - Fixed Spacing */
.hero-banner-base {
    position: relative;
    background: linear-gradient(135deg, #EEF2FF 0%, #F1F5F9 100%) !important;
    padding: 3.5rem 2rem;
    margin-bottom: 2rem;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    min-height: 140px !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.hero-banner-base::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../images/mesh-gradient.svg") no-repeat center center;
    background-size: cover;
    opacity: 0.3;
    z-index: 1;
}

.hero-content-base {
    position: relative;
    z-index: 2;
    padding: 0 !important;
}

.hero-title-base {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: #059669 !important;
    margin-bottom: 0.5rem;
}

.hero-subtitle-base {
    font-size: 1.1rem;
    color: #047857;
    margin-bottom: 0;
    line-height: 1.5;
}

.hero-badge-base {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--color-primary) !important;
    border: 2px solid rgba(59, 130, 246, 0.3) !important;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.hero-badge-base:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

/* Fresh Button Styling - Clean Implementation */
.btn-gradient-hero,
.btn-outline-hero {
    width: 180px !important;
    height: 44px !important;
    padding: 0 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
    vertical-align: top !important;
    margin-right: 0.75rem !important;
}

/* Responsive button sizing */
@media (min-width: 992px) {
    .btn-gradient-hero,
    .btn-outline-hero {
        width: 190px !important;
        margin-right: 0.75rem !important;
    }
}

@media (max-width: 991px) {
    .btn-gradient-hero,
    .btn-outline-hero {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 0.75rem;
    }
}

.btn-gradient-hero {
    background: linear-gradient(135deg, var(--color-primary), #6366F1) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25) !important;
}

.btn-gradient-hero:hover {
    background: linear-gradient(135deg, #2563eb, #5048e5) !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3) !important;
}

/* Dark Mode - Subtle styling for Add Transaction button */
[data-theme="dark"] .btn-gradient-hero {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
    color: #60A5FA !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="dark"] .btn-gradient-hero:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(99, 102, 241, 0.2) 100%) !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
    color: #93C5FD !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-1px) !important;
}

.btn-outline-hero {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
    backdrop-filter: blur(8px) !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15) !important;
}

.btn-outline-hero:hover {
    background: var(--color-primary) !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25) !important;
}

/* ===== SIDE PANEL FILTER SYSTEM - 2025 Industry Standard ===== */
.filter-side-panel {
    position: fixed;
    left: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: var(--color-bg-primary, #ffffff);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 1050;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.filter-side-panel.open {
    left: 0;
}

.filter-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1049;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.filter-panel-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.filter-panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary, #1f2937);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-panel-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--color-text-muted, #6b7280);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.filter-panel-close:hover {
    background: var(--color-bg-secondary, #f3f4f6);
    color: var(--color-text-primary, #1f2937);
}

.filter-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.filter-section input[type="date"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--color-bg-primary, #ffffff);
    color: var(--color-text-primary, #1f2937);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-section input[type="date"]:focus {
    outline: none;
    border-color: var(--color-primary, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-quick-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.filter-preset-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--color-bg-secondary, #f3f4f6);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 20px;
    color: var(--color-text-secondary, #4b5563);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-preset-btn:hover {
    background: var(--color-primary, #3b82f6);
    color: white;
    border-color: var(--color-primary, #3b82f6);
}

.filter-preset-btn.active {
    background: var(--color-primary, #3b82f6);
    color: white;
    border-color: var(--color-primary, #3b82f6);
}

.filter-panel-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border, #e5e7eb);
    display: flex;
    gap: 0.75rem;
    background: var(--color-bg-secondary, #f9fafb);
}

.filter-panel-footer .btn {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
}

/* Settings Dropdown */
.settings-dropdown-container {
    position: relative;
}

.settings-dropdown-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--color-primary, #3b82f6);
    border-radius: 8px;
    color: var(--color-primary, #3b82f6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-dropdown-btn:hover {
    background: var(--color-primary, #3b82f6);
    color: white;
}

.settings-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: var(--color-bg-primary, #ffffff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.settings-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.settings-dropdown-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.75px;
    background: var(--color-bg-secondary, #f9fafb);
}

.settings-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    border-bottom: 1px solid var(--color-border-light, #f3f4f6);
    gap: 1rem;
}

.settings-dropdown-item:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.settings-dropdown-item label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary, #1f2937);
    margin: 0;
    white-space: nowrap;
}

.settings-dropdown-item .d-flex {
    background: var(--color-bg-secondary, #f3f4f6);
    padding: 0.375rem 0.625rem;
    border-radius: 20px;
}

/* Divider before settings gear */
.filter-summary-bar .settings-dropdown-container::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    width: 1px;
    background: var(--color-border, #e5e7eb);
}

.settings-dropdown-container {
    position: relative;
    padding-left: 0.75rem;
}

/* Compact Filter Summary Bar */
.filter-summary-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg-secondary, #f9fafb);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 100;
}

.filter-summary-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-primary, #3b82f6);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-summary-toggle:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.filter-summary-chips {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--color-text-secondary, #4b5563);
}

.filter-summary-chip i {
    color: var(--color-primary, #3b82f6);
    font-size: 0.75rem;
}

/* ===== MOBILE RESPONSIVE - Side Panel & Filter Summary ===== */
@media (max-width: 768px) {
    .filter-side-panel {
        width: 100%;
        left: -100%;
    }
    
    .filter-summary-bar {
        flex-wrap: wrap;
        padding: 0.625rem 0.75rem;
        gap: 0.625rem;
    }
    
    .filter-summary-toggle {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .filter-summary-chips {
        flex: 1;
        min-width: 0;
        justify-content: flex-start;
    }
    
    .filter-summary-chip {
        padding: 0.3rem 0.625rem;
        font-size: 0.75rem;
    }
    
    .settings-dropdown-container {
        flex-shrink: 0;
    }
    
    .settings-dropdown-btn {
        width: 38px;
        height: 38px;
    }
    
    .settings-dropdown-menu {
        right: -10px;
        min-width: 220px;
    }
}

@media (max-width: 480px) {
    .filter-summary-bar {
        padding: 0.5rem;
    }
    
    .filter-summary-chips {
        display: none;
    }
    
    .filter-panel-header {
        padding: 1rem;
    }
    
    .filter-panel-body {
        padding: 1rem;
    }
    
    .filter-quick-presets {
        gap: 0.375rem;
    }
    
    .filter-preset-btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
}

/* Borrowings Table Styling - Blue Headers and Usernames, Bold Amounts */
.people-table thead th,
.transaction-analysis-table thead th,
table.people-breakdown thead th,
.borrowings-container table thead th {
    color: var(--color-primary) !important;
    font-weight: 600 !important;
}

.people-table tbody td:first-child,
.transaction-analysis-table tbody td:first-child,
table.people-breakdown tbody td:first-child,
.borrowings-container table tbody tr td:first-child {
    color: var(--color-primary) !important;
    font-weight: 500 !important;
}

.people-table tbody td:nth-child(2),
.people-table tbody td:nth-child(3),
.transaction-analysis-table tbody td:nth-child(2),
.transaction-analysis-table tbody td:nth-child(3),
table.people-breakdown tbody td:nth-child(2),
table.people-breakdown tbody td:nth-child(3) {
    font-weight: 700 !important;
}

.borrowings-container table tbody tr td.amount-cell {
    font-weight: 700 !important;
}

/* Investment-specific Styling */
.investment-card {
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
    transition: all 0.3s ease;
    background: white !important;
    min-height: 280px !important;
    cursor: pointer;
    border-radius: 12px !important;
    -webkit-tap-highlight-color: transparent !important; /* Remove oval tap highlight on mobile */
    -webkit-user-select: none !important; /* Prevent text selection on tap hold */
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Remove internal separators for investment cards */
.investment-card .card-header {
    border-bottom: 0 !important;
    background: transparent !important;
}

.investment-card .card-footer {
    border-top: 0 !important;
    background: transparent !important;
}

.investment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid rgba(59, 130, 246, 0.3) !important; /* Enhanced but thin border on hover */
}

.investment-card:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    border: 1px solid rgba(59, 130, 246, 0.4) !important; /* Enhanced but thin border on active */
    transition: all 0.15s ease;
}

.investment-card.clicked {
    animation: cardClickEffect 0.3s ease-in-out;
}

/* Achievement Badge Styling */
.achievement-badge {
    position: relative;
    padding: 8px 12px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: var(--color-primary);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.achievement-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.achievement-badge:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.4);
    transition: all 0.1s ease;
}

.achievement-badge.bg-warning {
    border-color: var(--color-primary);
    background: var(--color-primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.achievement-badge.bg-warning:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.achievement-badge.bg-info {
    border-color: var(--color-primary);
    background: var(--color-primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.achievement-badge.bg-info:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.achievement-badge.bg-success {
    border-color: var(--color-income);
    background: var(--color-income);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.achievement-badge.bg-success:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

/* Hover and Interactive Effects */
.hover-lift:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1) !important;
}

.hover-lift:hover .rounded-circle {
    transform: scale(1.1);
}

.hover-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.hover-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hover-card:hover .metric-counter {
    transform: none;
    transition: none;
}

.hover-card:hover .rounded-circle {
    transform: none;
    transition: none;
}

.hover-card:active {
    transform: translateY(-4px) scale(0.98);
    transition: all 0.15s ease;
}

.performance-cell {
    transition: all 0.3s ease;
    cursor: pointer;
}

.performance-cell:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10;
    position: relative;
}

/* Progress and Animation Effects */
.goal-achievement-bar {
    transition: width 2s ease-in-out;
    animation: progressFill 2s ease-in-out;
}

.progress-container:hover .progress-text {
    transform: scale(1.1) !important;
    color: #7c3aed !important;
}

.progress-container:hover .animated-progress {
    filter: drop-shadow(0 0 15px rgba(124, 58, 237, 0.8)) !important;
}

/* Investment Analytics Card Styling */
.investment-analytics-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.investment-analytics-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.metric-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid transparent !important;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

.metric-card:hover .metric-icon > div {
    transform: scale(1.05) rotate(5deg);
}

.metric-card:hover h4 {
    transform: scale(1.02);
}

.metric-icon > div {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-card h4 {
    transition: transform 0.3s ease;
}

.indicator-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.indicator-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.indicator-item:hover .indicator-icon > div {
    transform: scale(1.1);
}

.chart-container {
    transition: all 0.3s ease;
}

.chart-container:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Click Effects - Removed oval ripple effect as requested by user */

/* Additional Animations and Effects */
.metric-animation {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
    transform: translateX(-100%);
    animation: metricScan 3s ease-in-out infinite;
}

.analytics-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Icon Styling Fixes */
.metric-icon .rounded-circle,
.metric-card .rounded-circle {
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.metric-icon .rounded-circle::before,
.metric-icon .rounded-circle::after,
.metric-card .rounded-circle::before,
.metric-card .rounded-circle::after {
    content: none !important;
    display: none !important;
}

.metric-icon i,
.metric-card i {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.metric-card[style*="background: linear-gradient"] .rounded-circle[style*="background: linear-gradient"] {
    background-image: inherit !important;
}

/* Getting Started Section Styling */
.getting-started-steps .step-item {
    transition: all 0.3s ease;
    opacity: 0.7;
}

.getting-started-steps .step-item.active {
    opacity: 1;
}

.getting-started-steps .step-item.completed {
    opacity: 1;
}

.getting-started-steps .step-item.pending {
    opacity: 0.5;
}

.getting-started-steps .step-icon {
    transition: all 0.3s ease;
}

.getting-started-steps .step-item:hover .step-icon {
    transform: scale(1.1);
}

.getting-started-progress .progress-bar {
    transition: width 2.5s ease-in-out;
    background: linear-gradient(135deg, var(--color-primary), #6366F1) !important;
    animation: progressBarPulse 3s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Live Progress Bar Animation */
@keyframes progressBarPulse {
    0% { 
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
        filter: brightness(1);
    }
    50% { 
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5);
        filter: brightness(1.1);
    }
    100% { 
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
        filter: brightness(1);
    }
}

/* progressFill and pulseRed keyframes in core-animations.css */
/* progressGlow kept - unique to goals */
@keyframes progressGlow {
    0% { filter: drop-shadow(0 0 5px rgba(124, 58, 237, 0.3)); }
    100% { filter: drop-shadow(0 0 10px rgba(124, 58, 237, 0.6)); }
}

@keyframes celebration {
    0% { filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6)) scale(1); transform: rotate(0deg); }
    50% { filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.8)) scale(1.05); transform: rotate(180deg); }
    100% { filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6)) scale(1); transform: rotate(360deg); }
}

@keyframes cardClickEffect {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(3px) scale(0.96); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
    100% { transform: translateY(-1px) scale(1.02); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
}

@keyframes metricScan {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* pulse keyframes in core-animations.css */

/* INVESTMENT CARD GUTTER ELIMINATION - HIGHEST SPECIFICITY RULES */
/* These rules specifically target the investment card metrics to eliminate horizontal lines */

/* Target the specific row structure in investment cards with maximum specificity */
.investment-dashboard .card.investment-card .row.g-3,
.investment-dashboard .investment-card .row.g-3,
.investment-dashboard .card .row.g-3.mb-3,
.investment-dashboard .row.g-3.mb-3,
div.investment-dashboard .row.g-3 {
    row-gap: 0 !important;
    column-gap: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Target col-6 elements in investment cards */
.investment-dashboard .card.investment-card .col-6,
.investment-dashboard .investment-card .col-6,
.investment-dashboard .card .row.g-3 .col-6,
.investment-dashboard .row.g-3 .col-6,
div.investment-dashboard .col-6 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Ensure professional-stat-card-small has proper individual card styling */
.investment-dashboard .professional-stat-card-small,
.investment-dashboard .col-6 .professional-stat-card-small,
div.investment-dashboard .professional-stat-card-small {
    background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-bg-secondary) 100%) !important;
    border: 2px solid rgba(59, 130, 246, 0.25) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    margin: 0.25rem !important;
    padding: 1rem !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 80px !important;
}

.investment-dashboard .professional-stat-card-small:hover,
.investment-dashboard .col-6 .professional-stat-card-small:hover,
div.investment-dashboard .professional-stat-card-small:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    background: linear-gradient(135deg, var(--color-bg-card) 0%, #dbeafe 100%) !important;
}

/* Remove any pseudo-elements that might create lines */
.investment-dashboard .row.g-3::before,
.investment-dashboard .row.g-3::after,
.investment-dashboard .card .row::before,
.investment-dashboard .card .row::after,
div.investment-dashboard .row::before,
div.investment-dashboard .row::after {
    content: none !important;
    display: none !important;
}

/* Remove any borders from Bootstrap grid system */
.investment-dashboard .row.g-3 > *,
.investment-dashboard .card .row > *,
div.investment-dashboard .row > * {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    outline: none !important;
}

/* Remove any horizontal lines or separators that might appear */
.investment-dashboard .card .row.g-3:before,
.investment-dashboard .card .row.g-3:after,
.investment-dashboard .row.g-3:before,
.investment-dashboard .row.g-3:after,
div.investment-dashboard .row:before,
div.investment-dashboard .row:after {
    content: "" !important;
    display: none !important;
    height: 0 !important;
    width: 0 !important;
    border: none !important;
    background: none !important;
}

/* Ensure consistent spacing between individual metric cards */
.investment-dashboard .row.g-3.mb-3 {
    gap: 0.5rem !important;
    display: flex !important;
    flex-wrap: nowrap !important;
}

/* Professional Section Titles and Separators */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--primary) !important;
    margin-bottom: 1rem;
    text-align: center;
}

.section-separator {
    width: 85%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--border-light) 20%, var(--primary-light) 50%, var(--border-light) 80%, transparent 100%);
    margin: 0 auto 2.5rem auto;
    border-radius: 2px;
}

/* Enhanced Section Spacing */
.mb-6 {
    margin-bottom: 3rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

/* Search Container Styling */
.search-container {
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.search-input {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid var(--border-light) !important;
    border-radius: 12px !important;
    padding: 1rem 3rem 1rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    backdrop-filter: blur(10px) !important;
}

.search-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 8px 24px rgba(59, 130, 246, 0.12) !important;
    outline: none !important;
    background: rgba(255, 255, 255, 1) !important;
    transform: translateY(-2px) !important;
}

.search-input::placeholder {
    color: #9ca3af !important;
    font-weight: 400 !important;
}

.search-icon-container {
    display: none;
}

/* Hide People Involved scrollbar on large screens */
@media (min-width: 992px) {
    .people-involved-table {
        overflow-x: hidden !important;
    }
    .people-involved-table::-webkit-scrollbar {
        display: none;
    }
    .people-involved-table {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* No Results Styling */
.no-results-container {
    padding: 2rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    border: 2px dashed var(--border-light);
    max-width: 400px;
    margin: 0 auto;
}

.no-results-container .btn-enhanced {
    transform: translateY(0);
    transition: all 0.3s ease;
}

.no-results-container .btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

/* Font Size Utilities */
.font-size-3rem {
    font-size: 3rem !important;
}

.opacity-05 {
    opacity: 0.5 !important;
}

/* Utility Classes for Inline Style Elimination */

/* Container and Layout Utilities */
.container-95 {
    width: 95% !important;
    max-width: 95% !important;
}

.row-gap-2rem {
    row-gap: 2rem !important;
}

.mb-6-3rem {
    margin-bottom: 3rem !important;
}

/* Border Radius Utilities */
.border-radius-12 {
    border-radius: 12px !important;
}

.border-radius-16 {
    border-radius: 16px !important;
}

/* Height Utilities */
.height-200 {
    height: 200px !important;
}

.height-240 {
    height: 240px !important;
}

.height-300 {
    height: 300px !important;
}

.height-350 {
    height: 350px !important;
}

.height-150 {
    height: 150px !important;
}

/* Color Utilities */
.color-text-primary {
    color: var(--color-text-primary) !important;
}

.color-primary-blue {
    color: var(--color-primary) !important;
}

.color-purple {
    color: #a855f7 !important;
}

/* Removed color classes for progress bars as requested */

/* Font Size Utilities */
.font-size-15 {
    font-size: 1.5rem !important;
}

.font-size-12 {
    font-size: 1.2rem !important;
}

.font-size-4rem {
    font-size: 4rem !important;
}

/* Cursor Utilities */
.cursor-pointer {
    cursor: pointer !important;
}

/* Transform Utilities */
.transform-rotate-90 {
    transform: rotate(-90deg) !important;
}

/* Transition Utilities */
.transition-stroke-2s {
    transition: stroke-dashoffset 2s ease-in-out !important;
}

.transition-all-3s {
    transition: all 0.3s ease !important;
}

/* Background Gradient Utilities */
.bg-gradient-white-light {
    background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-bg-secondary) 100%) !important;
}

.bg-gradient-primary-purple {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
}

.bg-gradient-achievement-current {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%) !important;
    border-left: 4px solid #22c55e !important;
}

.bg-gradient-achievement-target {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%) !important;
    border-left: 4px solid var(--color-primary) !important;
}

.bg-gradient-achievement-remaining {
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.1) 0%, rgba(245, 101, 101, 0.05) 100%) !important;
    border-left: 4px solid #f56565 !important;
}

.bg-gradient-achievement-time {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(168, 85, 247, 0.05) 100%) !important;
    border-left: 4px solid #a855f7 !important;
}

.bg-gradient-ai-insights {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%) !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
}

.bg-gradient-success-green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
}

.bg-gradient-danger-red {
    background: linear-gradient(135deg, var(--color-expense) 0%, #dc2626 100%) !important;
}

.bg-gradient-primary-blue-dark {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1d4ed8 100%) !important;
}

.bg-gradient-purple-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.bg-gradient-pink-red {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.bg-gradient-blue-cyan {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

.bg-gradient-pink-yellow {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%) !important;
}

/* Specialized Background Colors */
.bg-light-blue {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
}

.bg-light-green {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
}

.bg-light-yellow {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%) !important;
}

.bg-light-green-metrics {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%) !important;
}

.bg-light-orange-metrics {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
}

.bg-info-alert {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
}

/* Professional Stat Card Small Variant */
.professional-stat-card-small {
    background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-bg-secondary) 100%) !important;
    border: 2px solid rgba(59, 130, 246, 0.25) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    min-height: 60px !important;
    max-height: 70px !important;
    height: 65px !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 0.5rem !important;
}

.professional-stat-card-small:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    background: linear-gradient(135deg, var(--color-bg-card) 0%, #dbeafe 100%) !important;
}

/* Compact text sizing for small cards */
.professional-stat-card-small .goal-card-amount-text {
    font-size: 1rem !important;
    margin-bottom: 0.2rem !important;
    line-height: 1.1 !important;
}

.professional-stat-card-small small {
    font-size: 0.7rem !important;
    line-height: 1 !important;
}

/* Remove any potential horizontal lines in investment cards */
.investment-card .row {
    border: none !important;
    margin: 0 !important;
}

.investment-card .col-6 {
    border: none !important;
    border-right: none !important;
}

/* Professional Achievement Badge System */
.achievement-system {
    text-align: center;
    padding: 1rem 0;
}

.achievement-badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.achievement-badge {
    position: relative;
    width: 180px;
    height: 120px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.achievement-badge:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.achievement-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0.6;
    animation: rotate-glow 3s linear infinite;
}

@keyframes rotate-glow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.achievement-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.achievement-icon-main {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.achievement-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.achievement-subtitle {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.achievement-tier-indicator {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.achievement-progress-bar {
    max-width: 300px;
    margin: 0 auto;
}

.achievement-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.achievement-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.achievement-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

/* shimmer keyframes in core-animations.css */

.achievement-progress-text {
    margin-top: 0.5rem;
}

/* Responsive Grid Fixes for Layout Issues */
@media (max-width: 1400px) {
    .col-lg-6.col-xl-6 {
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin-bottom: 1.5rem;
    }
}

/* Responsive Achievement System */
@media (max-width: 768px) {
    .achievement-badge {
        width: 150px;
        height: 100px;
    }
    
    .achievement-icon-main {
        font-size: 2rem;
    }
    
    .achievement-title {
        font-size: 1rem;
    }
    
    .achievement-subtitle {
        font-size: 0.7rem;
    }
    
    /* Mobile responsive grid fixes */
    .row .col-lg-6 {
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin-bottom: 1.5rem;
    }
}

.investment-card .col-6 {
    border-left: none !important;
    border-top: none !important;
    border-bottom: none !important;
}

.investment-card .row::before,
.investment-card .row::after {
    display: none !important;
}

/* Ensure no Bootstrap grid lines appear */
.investment-card .row > * {
    border: none !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

/* Remove any Bootstrap column borders */
.investment-card [class*="col-"] {
    border: none !important;
    box-shadow: none !important;
}

.investment-card [class*="col-"]:not(:last-child) {
    border-right: none !important;
}

/* Badge Utilities */
.badge-low-priority {
    background-color: var(--color-text-secondary) !important;
    color: var(--color-bg-card) !important;
    opacity: 1 !important;
}

/* Border Color Utilities */
.border-primary-light {
    border: 2px solid rgba(59, 130, 246, 0.2) !important;
}

/* Overflow Utilities */
.overflow-hidden {
    overflow: hidden !important;
}

/* Opacity Utilities */
.opacity-05 {
    opacity: 0.5 !important;
}

/* Position Utilities */
.position-relative {
    position: relative !important;
}

/* Legend Item Utilities */
.legend-color-box {
    width: 20px !important;
    height: 12px !important;
}

.legend-color-green {
    background-color: #22c55e !important;
}

.legend-color-red {
    background-color: var(--color-expense) !important;
}

.legend-color-blue {
    background-color: var(--color-primary) !important;
}

/* Additional Gradient Utilities for Investment Dashboard */
.bg-gradient-info-cyan {
    background: linear-gradient(135deg, var(--color-primary) 0%, #06b6d4 100%) !important;
}

.bg-gradient-green-cyan {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important;
}

.bg-light-purple {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%) !important;
}

/* Position and Height Utilities */
.height-150-relative {
    height: 150px !important;
    position: relative !important;
}

.height-200-relative {
    height: 200px !important;
    position: relative !important;
}

.height-280-relative {
    height: 280px !important;
    position: relative !important;
}

.height-300-relative {
    height: 300px !important;
    position: relative !important;
}

.height-350-relative {
    height: 350px !important;
    position: relative !important;
}

/* Color Utilities */
.color-purple-primary {
    color: #9c27b0 !important;
}

/* Transition and Cursor Utilities */
.transition-all-cursor {
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

/* Circle Indicator Utilities */
.circle-indicator-12 {
    width: 12px !important;
    height: 12px !important;
}

.circle-bg-success-gradient {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
}

.circle-bg-danger-gradient {
    background: linear-gradient(135deg, var(--color-expense) 0%, #dc2626 100%) !important;
}

.circle-bg-primary-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1d4ed8 100%) !important;
}

/* SVG Gradient Stop Utilities */
.svg-stop-success-start {
    stop-color: var(--color-income) !important;
    stop-opacity: 1 !important;
}

.svg-stop-success-mid {
    stop-color: #059669 !important;
    stop-opacity: 1 !important;
}

.svg-stop-success-end {
    stop-color: #047857 !important;
    stop-opacity: 1 !important;
}

/* Additional Background Gradient Utilities */
.bg-gradient-purple-blue-dark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.bg-gradient-blue-cyan-light {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

.bg-light-orange {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
}

/* Priority Indicator Bar Classes */
.priority-high-bar {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(220, 38, 38, 0.3) 100%);
    height: 2px;
}

.priority-medium-bar {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(5, 150, 105, 0.3) 100%);
    height: 2px;
}

.priority-low-bar {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.2) 0%, rgba(75, 85, 99, 0.2) 100%);
    height: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-spacing-professional {
        margin-bottom: 2rem;
    }
    
    .hero-banner-base {
        padding: 2rem 1.5rem;
        min-height: 120px;
    }
    
    .hero-title-base {
        font-size: 1.75rem;
    }
    
    .hero-subtitle-base {
        font-size: 0.95rem;
    }
    
    .hero-badge-base {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    .btn-gradient-hero,
    .btn-outline-hero {
        width: 100% !important;
        height: 44px !important;
        margin-bottom: 0.75rem;
        font-size: 0.85rem !important;
    }
    
    .btn-gradient-hero {
        margin-right: 0;
    }
    
    /* Investment Dashboard Mobile Responsive */
    .analytics-card {
        height: auto !important;
        min-height: 85px;
    }
    
    .chart-area {
        height: 220px !important;
    }
    
    .performance-heatmap {
        overflow-x: auto;
    }
    
    .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .performance-month-card {
        min-height: 100px !important;
        margin-bottom: 0.75rem !important;
    }
    
    .monthly-performance-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)) !important;
        gap: 0.5rem !important;
    }
    
    .performance-cell {
        width: 100% !important;
        min-width: 80px !important;
        height: 80px !important;
        font-size: 0.7rem !important;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-body.p-5 {
        padding: 2rem !important;
    }
    
    .metric-counter {
        font-size: 1.5rem;
    }

    .investment-analytics-card .card-header h4 {
        font-size: 1.25rem;
    }

    .metric-card {
        margin-bottom: 1rem;
    }

    .metric-icon {
        margin-bottom: 1rem;
    }

    .chart-placeholder {
        margin-bottom: 2rem;
    }

    .indicator-item {
        margin-bottom: 0.75rem;
    }

    .performance-indicators {
        margin-top: 1rem;
    }

    .col-lg-3.col-md-6.col-sm-6 {
        margin-bottom: 1rem;
    }

    .metric-card {
        min-height: 160px;
    }

    .investment-analytics-card {
        margin: 0 15px;
    }

    .container-fluid.px-0 {
        padding: 0 10px;
    }

    .chart-container {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-banner-base {
        padding: 1.5rem 1rem;
        min-height: 100px;
    }
    
    .hero-title-base {
        font-size: 1.5rem;
    }
    
    .hero-subtitle-base {
        font-size: 0.95rem;
    }
    
    .chart-area {
        height: 200px !important;
    }
    
    .analytics-card {
        padding: 0.75rem !important;
    }
    
    .performance-cell {
        width: 100% !important;
        min-width: 70px !important;
        height: 70px !important;
        font-size: 0.6rem !important;
    }
    
    .monthly-performance-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)) !important;
        gap: 0.4rem !important;
    }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body.p-5 {
        padding: 1.5rem !important;
    }
    
    .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .investment-analytics-card .card-header h4 {
        font-size: 1.1rem;
    }

    .metric-card {
        padding: 1rem !important;
        min-height: 140px;
    }

    .metric-icon > div {
        width: 45px !important;
        height: 45px !important;
    }

    .metric-card h4 {
        font-size: 1.25rem !important;
    }
}

/* Professional Card Background Gradient */
.card-bg-gradient {
    background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--color-bg-secondary) 100%) !important;
}

/* ====================================
   UNIVERSAL BUTTON STYLING
   Consistent 32x32px icon buttons across all pages
   ==================================== */

/* Universal Icon Button - Matches Loans Dashboard Design */
.btn-icon-universal {
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    padding: 0 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.btn-icon-universal i {
    font-size: 12px !important;
}

.btn-icon-universal:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

/* Primary Outline Button (Edit style) */
.btn-icon-universal.btn-outline-primary {
    border: 1px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
    background: white !important;
}

.btn-icon-universal.btn-outline-primary:hover {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: white !important;
}

/* Delete Button Style (matches global-delete-btn) */
.btn-icon-universal.btn-delete,
.global-delete-btn {
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    background: none !important;
    border: none !important;
    color: #dc3545 !important;
    padding: 0 !important;
    transition: all 0.2s ease !important;
}

.btn-icon-universal.btn-delete:hover,
.global-delete-btn:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

/* Close/Cancel Button - Blue X only (no black circle) */
.btn-close-custom {
    background: none !important;
    border: none !important;
    color: #2196f3 !important;
    font-size: 24px !important;
    opacity: 1 !important;
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-close-custom:hover {
    color: #1976d2 !important;
    background: none !important;
}