:root {
    --primary-color: #4763E4;
    --secondary-color: #6C757D;
    --success-color: #28A745;
    --info-color: #17A2B8;
    --warning-color: #FFC107;
    --danger-color: #DC3545;
    --light-color: #F8F9FA;
    --dark-color: #343A40;
    --primary-gradient: linear-gradient(45deg, #4763E4, #6384FF);
    --success-gradient: linear-gradient(45deg, #28A745, #34CE57);
    --bs-primary: #4e73df;
    --bs-secondary: #858796;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
    background-color: #f8f9fc;
    position: relative;
}

/* Modified main-wrapper to handle mobile scrolling */
.main-wrapper {
    min-height: calc(100vh - 72px - 40px); /* Adjusted for navbar and footer */
    padding-bottom: 40px; /* Space for footer */
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--bs-primary) transparent;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.main-wrapper::-webkit-scrollbar {
    width: 6px;
}

.main-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.main-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--bs-primary);
    border-radius: 3px;
}

.navbar {
    height: 72px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-link {
    color: var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    font-size: 0.65rem;
    padding: 0.25rem 0.45rem;
    animation: pulse 2s infinite;
}

.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-card {
    background: var(--primary-gradient);
    color: white;
    border-radius: 16px;
    padding: 1.5rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(71, 99, 228, 0.3);
    transform-origin: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 6px 20px rgba(71, 99, 228, 0.4);
}

.stat-card .card-body {
    padding: 0;
}

.stat-card .card-title {
    font-size: 1rem;
    opacity: 0.9;
}

.stat-card .card-text {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0.75rem 0;
}

.stat-card small {
    opacity: 0.8;
}

.stat-card i {
    font-size: 1rem;
    opacity: 0.5;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
}

.profile-summary {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.quick-action-btn {
    border: 1px solid #e3e6f0;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.quick-action-btn:hover {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

.activity-item {
    padding: 1rem 1.5rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.activity-item:hover {
    border-left-color: var(--bs-primary);
    background-color: rgba(78, 115, 223, 0.05);
}

.activity-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
}

.activity-item:last-child::after {
    display: none;
}

/* Updated footer styles for static positioning */
.footer {
    height: 40px;
    padding: 10px 0;
    position: relative; /* Changed from fixed to relative */
    width: 100%;
    background: transparent; /* Removed background */
    box-shadow: none; /* Removed shadow */
}

.footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Additional mobile responsiveness fixes */
@media (max-width: 768px) {
    .main-wrapper {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Ensure content doesn't get cut off at the bottom */
    .row {
        margin-bottom: 1rem;
    }
}

/* Fix for iOS momentum scrolling */
@supports (-webkit-overflow-scrolling: touch) {
    .main-wrapper {
        -webkit-overflow-scrolling: touch;
    }
}

.filter-menu {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1000;
    min-width: 160px;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
}

.filter-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filter-item:hover {
    background-color: rgba(71, 99, 228, 0.05);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(78, 115, 223, 0.05);
}

.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.modal .btn {
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
}

.modal .btn-primary {
    background: var(--bs-primary);
    border: none;
}

.modal .btn-secondary {
    background: #f8f9fa;
    border: none;
    color: #333;
}

.modal .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Add/modify these styles in your CSS */
.filter-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    /* Position it 5px below the button */
    z-index: 1000;
    min-width: 160px;
    background: white;
    padding: 0.5rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Add this to ensure proper positioning context */
.filter-button-container {
    position: relative;
}

/* Style for filter items */
.filter-item {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-item:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

.filter-item.active {
    background-color: rgba(78, 115, 223, 0.1);
    color: var(--bs-primary);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 1rem;
    }

    .profile-summary {
        padding: 1rem !important;
    }

    .quick-action-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Add these new classes to your CSS */
.stat-card.total-scans {
    background: linear-gradient(45deg, #4e73df, #6384FF);
    box-shadow: 0 4px 15px rgba(78, 115, 223, 0.3);
}

.stat-card.connections {
    background: linear-gradient(45deg, #36b9cc, #4dd4e7);
    box-shadow: 0 4px 15px rgba(54, 185, 204, 0.3);
}

.stat-card.active-cards {
    background: linear-gradient(45deg, #1cc88a, #2ddfb1);
    box-shadow: 0 4px 15px rgba(28, 200, 138, 0.3);
}

.stat-card.referral-points {
    background: linear-gradient(45deg, #f6c23e, #ffd25f);
    box-shadow: 0 4px 15px rgba(246, 194, 62, 0.3);
}

/* Optional: Add hover effects */
.stat-card.total-scans:hover {
    box-shadow: 0 8px 25px rgba(78, 115, 223, 0.4);
}

.stat-card.connections:hover {
    box-shadow: 0 8px 25px rgba(54, 185, 204, 0.4);
}

.stat-card.active-cards:hover {
    box-shadow: 0 8px 25px rgba(28, 200, 138, 0.4);
}

.stat-card.referral-points:hover {
    box-shadow: 0 8px 25px rgba(246, 194, 62, 0.4);
}