* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #06d6a0;
    --background-color: #ffffff;
    --text-color: #1e293b;
    --light-gray: #f8fafc;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Navigation */
.navbar {
    background: var(--background-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu .fas {
  color: #007bff;
  transition: color 0.2s;
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}




/* Hero Section */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dashboard-preview {
    width: 400px;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.preview-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
}

.preview-dots {
    display: flex;
    gap: 0.5rem;
}

.preview-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.preview-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: calc(100% - 60px);
    color: white;
    text-align: center;
}

.preview-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Features Section */
.features {
    padding: 6rem 2rem;
    background: var(--light-gray);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--secondary-color);
}

/* CTA Section */
.cta {
    padding: 6rem 2rem;
    text-align: center;
    background: var(--primary-color);
    color: white;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta .btn {
    background: white;
    color: var(--primary-color);
}

.cta .btn:hover {
    background: var(--light-gray);
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-header {
    margin-bottom: 3rem;
}

.dashboard-header h1 {
    font-size: 2.0rem;
    margin-bottom: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.income {
    background: #dcfce7;
    color: #16a34a;
}

.stat-icon.expense {
    background: #fef2f2;
    color: #dc2626;
}

.stat-icon.savings {
    background: #dbeafe;
    color: #2563eb;
}

.stat-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.dashboard-actions {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.dashboard-actions h2 {
    margin-bottom: 1.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Page Headers */
.page-header {
    text-align: center;
    padding: 4rem 0 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 1rem;
        gap: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .dashboard-preview {
        width: 100%;
        max-width: 300px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}


/* Auth Styles */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.auth-header p {
    color: var(--secondary-color);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert ul {
    margin: 0;
    padding-left: 1rem;
}

.alert li {
    margin-bottom: 0.25rem;
}


/* Transaction Styles */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.transaction-count {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.transactions-table th {
    background: var(--light-gray);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.transactions-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.transactions-table tr:hover {
    background: #f8fafc;
}

/* Transaction Type Badges */
.type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.type-badge.income {
    background: #dcfce7;
    color: #16a34a;
}

.type-badge.expense {
    background: #fef2f2;
    color: #dc2626;
}

/* Amount Styles */
.amount {
    font-weight: 700;
    font-size: 1.1rem;
}

.amount.income {
    color: #16a34a;
}

.amount.expense {
    color: #dc2626;
}

/* Category Tags */
.category-tag-b {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    color: rgb(5, 5, 5);
    font-weight: 500;
}

/* Date Styles */
.date {
    font-weight: 500;
    color: var(--text-color);
}

.description {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Form Styles */
.transaction-form {
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--secondary-color);
}

.empty-state i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--light-gray);
}

.card-header h3 {
    margin: 0;
    color: var(--text-color);
}

.card-body {
    padding: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .action-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .transactions-table {
        font-size: 0.875rem;
    }
    
    .transactions-table th,
    .transactions-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Budget Styles */
.budget-form {
    max-width: 100%;
}

.budgets-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.budgets-table th {
    background: var(--light-gray);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.budgets-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.budgets-table tr:hover {
    background: #f8fafc;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
}

/* Responsive */
@media (max-width: 768px) {
    .budgets-table {
        font-size: 0.875rem;
    }
    
    .budgets-table th,
    .budgets-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .progress-text {
        font-size: 0.7rem;
    }
}



/* Form Element Height Fix */
.form-group input,
.form-group select {
    height: 48px; /* Same height for all inputs */
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Ensure all buttons have consistent height too */
.btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Specific fix for the category dropdown in transactions and budgets */
#category,
#category_id,
#type {
    height: 48px;
    appearance: none; /* Remove default browser styling */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

/* Fix for date inputs */
input[type="date"],
input[type="month"] {
    height: 48px;
}

/* Fix for number inputs */
input[type="number"] {
    height: 48px;
}

/* Make sure form rows align properly */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: end; /* Align bottom of form elements */
}

/* Responsive fix */
@media (max-width: 768px) {
    .form-group input,
    .form-group select {
        height: 44px; /* Slightly smaller on mobile */
        font-size: 0.9rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Specific fix for transaction forms */
.transaction-form .form-group input,
.transaction-form .form-group select {
    height: 48px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

/* Specific fix for budget forms */
.budget-form .form-group input,
.budget-form .form-group select {
    height: 48px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}




/* Categories Styles */
.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #666;
}

.category-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-meta {
    font-size: 0.875rem;
}

.category-actions {
    display: flex;
    gap: 0.5rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
}

.close {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--secondary-color);
}

.close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 1.5rem;
}

.text-muted {
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .category-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .category-actions {
        align-self: flex-end;
    }
}


/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Responsive Charts */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}


/* Filter Form Styles */
.filter-form {
    max-width: 100%;
}

.filter-count {
    color: var(--secondary-color);
    font-weight: 500;
    margin-left: auto;
}

/* Enhanced Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* Responsive Filter Form */
@media (max-width: 768px) {
    .filter-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-count {
        margin-left: 0;
        text-align: center;
    }
}

   /* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0.5rem 0;
}

/* Desktop hover */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.dropdown-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border: none;
    width: 100%;
    text-align: left;
    background: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.dropdown-menu .nav-link:hover {
    background: #f5f5f5;
    color: inherit;
}

/* Mobile Improvements */

/* Mobile Navigation Improvements */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    
    .nav-menu {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .nav-link.primary {
        padding: 0.5rem 1rem;
    }
    
    /* Mobile dropdown improvements */
    .dropdown-menu {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        border-radius: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 300px;
        overflow-y: auto;
    }
    
 .user-menu {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 2px solid var(--border-color);
    }
}

/* Enhanced Mobile Tables */
@media (max-width: 768px) {
    .table-responsive {
        border: 1px solid var(--border-color);
        border-radius: 8px;
        margin: 1rem 0;
    }
    
    .transactions-table,
    .budgets-table {
        min-width: 600px; /* Allow horizontal scroll for complex tables */
    }
    
    .transactions-table th,
    .transactions-table td,
    .budgets-table th,
    .budgets-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Stack table actions vertically */
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-sm {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        min-height: auto;
    }
}

/* Enhanced Mobile Forms */
@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group select {
        height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn {
        min-height: 44px; /* Better touch targets */
        padding: 0.75rem 1.5rem;
    }
    
    /* Single column for all forms */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-full {
        width: 100%;
    }
}

/* Enhanced Mobile Layout */
@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
        gap: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .dashboard-container {
        padding: 1rem;
    }
    
    .page-header {
        padding: 2rem 1rem 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    /* Stack stats grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    /* Single column for features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
}

/* Touch-Friendly Improvements */
@media (max-width: 768px) {
    /* Better touch targets */
    .nav-link,
    .btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Increase tap target size */
    .action-buttons .btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Better form touch targets */
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
    }
    
    /* Prevent text size adjustment */
    html {
        -webkit-text-size-adjust: 100%;
    }
}

/* Mobile Utility Classes */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    /* Hide less important elements on mobile */
    .description {
        max-width: 120px;
    }
    
    /* Compact transaction items for mobile */
    .transaction-item-mobile {
        display: flex;
        justify-content: between;
        align-items: center;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }
}

/* Safe area insets for modern phones */
@supports(padding: max(0px)) {
    .navbar,
    .footer {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

/* Enhanced Mobile Action Bars */
@media (max-width: 480px) {
    .action-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1rem 0;
    }
    
    .action-bar .btn {
        width: 100%;
        justify-content: center;
    }
    
    .filter-count {
        text-align: center;
        margin: 0.5rem 0 0 0;
    }
    
    /* Stack action buttons */
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}


/* Hide text on mobile icons */
@media (max-width: 768px) {
    .desktop-text {
        display: none;
    }
    
    .desktop-only {
        display: none;
    }
    
    .nav-link i {
        min-width: 20px;
        text-align: center;
    }
}





/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        gap: 0;
        transition: left 0.3s ease;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu .nav-link {
        padding: 1rem 0;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.1rem;
    }
    
    .nav-menu .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Mobile Dropdown Styles */
    .dropdown {
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--light-gray);
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
        margin-left: 1rem;
        border-left: 2px solid var(--primary-color);
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 500px;
        padding: 0.5rem 0;
    }
    
    .dropdown-menu .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #e2e8f0;
        font-size: 1rem;
    }
    
    .dropdown-toggle::after {
        content: '▸';
        margin-left: auto;
        transition: transform 0.3s ease;
    }
    
    .dropdown.active .dropdown-toggle::after {
        transform: rotate(90deg);
    }
    
    .user-menu {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 2px solid var(--border-color);
    }
    
    .nav-link.primary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Hide desktop-only elements on mobile */
    .desktop-only {
        display: none;
    }
}

/* Ensure dropdown works on desktop */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}






/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    width: 100%;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
}

.dropdown-toggle .fa-chevron-down {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0.5rem 0;
}

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

.dropdown-menu .nav-link {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    width: 100%;
    text-align: left;
    color: var(--text-color);
}

.dropdown-menu .nav-link:hover {
    background: #f5f5f5;
}
/* Mobile Dropdown Styles */
@media (max-width: 768px) {
    .dropdown {
        border-bottom: 1px solid var(--border-color);
        position: relative;
    }
    
    .dropdown-toggle {
        padding: 1rem 0;
        justify-content: space-between;
        align-items: center;
    }
    
    .dropdown-menu {
        position: static !important;
        opacity: 1;
        visibility: visible;
        transform: none !important;
        box-shadow: none;
        background: var(--light-gray);
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
        margin: 0;
        width: 100%;
        left: 0 !important;
        top: auto !important;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 500px;
        padding: 0.5rem 0;
        border-top: 1px solid var(--border-color);
    }
    
    .dropdown.active .dropdown-toggle .fa-chevron-down {
        transform: rotate(180deg);
    }
    
    .dropdown-menu .nav-link {
        padding: 0.75rem 1rem 0.75rem 2rem;
        border-bottom: 1px solid #e2e8f0;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    
    .dropdown-menu .nav-link:last-child {
        border-bottom: none;
    }
    
    .dropdown-menu .nav-link i {
        width: 20px;
        text-align: center;
        font-size: 0.9rem;
    }
    
    /* Remove the colored debug backgrounds */
    .dropdown {
        background: transparent;
    }
    
    .dropdown-menu {
        background: var(--light-gray);
    }
    
    .dropdown.active {
        background: transparent;
    }
    
    .dropdown.active .dropdown-menu {
        background: var(--light-gray);
    }
}



/* Contact/Auth Page Styles */
.auth-container-contact {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: transparent !important;
}
