body {
    background-color: #f8f9fa;
    font-family: 'Inter', sans-serif;
}

.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.btn-primary:hover {
    background-color: #4338ca;
    border-color: #4338ca;
}

.table th {
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.login-card {
    max-width: 400px;
    margin: 0 auto;
    margin-top: 100px;
}

.stat-card {
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* ========================================
   MOBILE-FIRST ENHANCEMENTS
   ======================================== */

/* Horizontal scrolling wrapper for stat cards */
.scrolling-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-left: -15px;
    margin-right: -15px;
    padding-left: 15px;
    padding-right: 15px;
}

.scrolling-wrapper > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

/* Hide scrollbar but keep functionality */
.scrolling-wrapper::-webkit-scrollbar {
    display: none;
}

.scrolling-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Floating Action Button (FAB) */
.fab-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    z-index: 1000;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fab-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.5);
}

.fab-btn:active {
    transform: scale(0.95);
}

/* Bottom navigation bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.25rem 0;
}

.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.bottom-nav a.active,
.bottom-nav a:hover {
    color: #4f46e5;
}

.bottom-nav a i {
    font-size: 1.4rem;
    margin-bottom: 0.15rem;
}

.bottom-nav a small {
    font-size: 0.65rem;
    font-weight: 500;
    line-height: 1;
}

/* Expense mobile item */
.expense-mobile-item {
    transition: background-color 0.2s;
}

.expense-mobile-item:active {
    background-color: #f9fafb;
}

/* Expense card mobile - Instagram style */
.expense-card-mobile {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease;
}

.expense-card-mobile:active {
    background-color: #fafafa;
}

.expense-card-mobile:last-child {
    border-bottom: none;
}

.expense-card-mobile .btn-light {
    background-color: #f9fafb;
    transition: all 0.2s ease;
}

.expense-card-mobile .btn-light:hover,
.expense-card-mobile .btn-light:active {
    background-color: #f3f4f6;
    transform: scale(0.95);
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    /* Add bottom padding to body when bottom nav is visible */
    body {
        padding-bottom: 56px;
    }
    
    /* Touch-friendly form controls (minimum 48px for accessibility) */
    .form-control,
    .form-select,
    .btn {
        min-height: 48px;
        font-size: 16px; /* Prevent iOS zoom on focus */
    }
    
    /* Larger touch targets for checkboxes and radio buttons */
    .form-check-input {
        width: 1.5em;
        height: 1.5em;
        margin-top: 0.1em;
    }
    
    .form-check-label {
        padding-left: 0.5rem;
    }
    
    /* Full-width buttons on mobile */
    .btn-mobile-block {
        width: 100%;
        display: block;
        margin-bottom: 0.5rem;
    }
    
    /* Stat cards in horizontal scroll */
    .scrolling-wrapper .stat-card-col {
        flex: 0 0 auto;
        width: 75%;
        max-width: 280px;
    }
    
    /* Better spacing for mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Improve table readability on mobile */
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Stack action buttons vertically on mobile */
    .card-body .d-flex.gap-2:has(.btn) {
        flex-direction: column;
    }
    
    .card-body .d-flex.gap-2:has(.btn) .btn {
        width: 100%;
    }
    
    /* Hide desktop filter on mobile, show icon version */
    .filter-desktop {
        display: none;
    }
    
    /* Collapsible filter */
    .filter-collapse {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Desktop: hide mobile-only elements */
@media (min-width: 769px) {
    .fab-btn,
    .bottom-nav {
        display: none !important;
    }
    
    .filter-mobile {
        display: none;
    }
}
