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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #334155;
}

/* Auth Page Styles */
.container {
    display: flex;
    min-height: 100vh;
}

.left-section {
    flex: 1;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #195abb 100%);
    color: white;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.left-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.left-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.left-section ul {
    list-style: none;
}

.left-section li {
    margin: 1rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.left-section li::before {
    content: '•';
    color: #10b981;
    position: absolute;
    left: 0;
    font-size: 1.5rem;
}

.right-section {
    flex: 1;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 500px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: #64748b;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: #10b981;
    border-bottom-color: #10b981;
}

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

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

.form-group label {
    font-weight: 500;
    color: #374151;
}

.form-group input, .form-group select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group small {
    color: #6b7280;
    font-size: 0.875rem;
}

.btn-primary {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.btn-google {
    background: white;
    border: 1px solid #d1d5db;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #4285f4;
    font-weight: 500;
}

.btn-google:hover {
    background: #f8fafc;
    border-color: #4285f4;
}

.btn-google i {
    color: #4285f4;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
}

.divider {
    text-align: center;
    color: #6b7280;
    position: relative;
    margin: 1rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
    z-index: -1;
}

.divider {
    background: #f8fafc;
    padding: 0 1rem;
}

.terms {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.hidden {
    display: none !important;
}

/* Mobile Navigation Styles */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #64748b;
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}

.sidebar-header {
    margin-bottom: 2rem;
}

.sidebar-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #10b981;
    margin-bottom: 0.25rem;
}

.sidebar-header p {
    color: #6b7280;
    font-size: 0.875rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #10b981;
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-menu-toggle:hover {
    background: #f0fdf4;
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.profile-dropdown {
    position: relative;
}

#profile-icon {
    font-size: 2rem;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s;
}

#profile-icon:hover {
    color: #10b981;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    z-index: 1000;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #374151;
    transition: background-color 0.2s;
}

.dropdown-menu a:hover {
    background-color: #f3f4f6;
}

.page-content {
    padding: 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #6b7280;
}

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

.category-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.category-list {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 1rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.category-item:last-child {
    border-bottom: none;
}

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

.category-icon {
    font-size: 1.25rem;
}

.category-name {
    font-weight: 500;
}

.category-type {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.category-type.income {
    background: #d1fae5;
    color: #065f46;
}

.category-type.expense {
    background: #fee2e2;
    color: #991b1b;
}

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

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    color: #6b7280;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f3f4f6;
    color: #374151;
}

.btn-icon.delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

.empty-state {
    text-align: center;
    color: #6b7280;
    padding: 2rem;
    font-style: italic;
}

.icon-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.icon-option {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.icon-option:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.icon-option.selected {
    border-color: #10b981;
    background: #10b981;
    color: white;
}

.text-success {
    color: #10b981;
}

.text-danger {
    color: #ef4444;
}

/* Confirmation Modal Styles */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.confirmation-modal.show {
    display: flex;
}

.confirmation-modal .modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.confirmation-modal h3 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.confirmation-modal p {
    margin-bottom: 2rem;
    color: #6b7280;
    line-height: 1.5;
}

.confirmation-modal .modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirmation-modal .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.confirmation-modal .btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.confirmation-modal .btn-cancel:hover {
    background: #e5e7eb;
}

.confirmation-modal .btn-danger {
    background: #ef4444;
    color: white;
}

.confirmation-modal .btn-danger:hover {
    background: #dc2626;
}

.sidebar.collapsed {
    width: 70px;
    padding: 2rem 0.5rem;
}

.sidebar.collapsed .logo span,
.sidebar.collapsed .logo small {
    display: none;
}

.sidebar.collapsed .nav-menu a {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .nav-menu a span {
    display: none;
}

.sidebar.collapsed .sign-out {
    text-align: center;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .sign-out span {
    display: none;
}

.sidebar .logo {
    margin-bottom: 2rem;
}

.sidebar .logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: #10b981;
}

.sidebar .logo small {
    display: block;
    color: #6b7280;
    font-size: 0.875rem;
}

.nav-menu {
    list-style: none;
    margin-bottom: 0.5rem;
}

.sidebar-bottom {
    margin-top: auto;
}

.collapse-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #64748b;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.collapse-btn:hover {
    background: #f1f5f9;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #64748b;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-menu a:hover, .nav-menu a.active {
    background: #10b981;
    color: white;
}

.nav-menu {
    list-style: none;
    margin-bottom: 0.5rem;
}

.sign-out {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    text-align: left;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.sign-out:hover {
    background: #f1f5f9;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.main-content header {
    margin-bottom: 2rem;
}

.main-content h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.main-content header p {
    color: #6b7280;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.stat-card h3 {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.amount {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
}

.amount.income {
    color: #10b981;
}

.amount.expense {
    color: #ef4444;
}

.chart-section, .chart-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
    max-width: 350px;
    height: 300px;
}

.chart-card canvas {
    max-width: 100% !important;
    max-height: 200px !important;
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #64748b;
    border-radius: 6px;
}

.mobile-menu-toggle:hover {
    background: #f1f5f9;
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        position: relative;
    }
    
    .sidebar-header {
        margin-bottom: 0;
    }
    
    .mobile-menu-toggle {
        display: block !important;
    }
    
    .nav-menu {
        display: none !important;
        position: fixed;
        top: auto;
        left: 1rem;
        right: 1rem;
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        padding: 0.75rem;
        z-index: 1000;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-menu.mobile-open {
        display: flex !important;
    }
    
    .nav-menu li {
        margin: 0;
        width: 100%;
    }
    
    .mobile-user-profile {
        background: #f0fdf4;
        border-radius: 8px;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .mobile-user-info {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.5rem;
        color: #10b981;
        font-weight: 600;
    }
    
    .mobile-user-info i {
        font-size: 1.5rem;
    }
    
    .mobile-menu-divider {
        height: 1px;
        background: #e2e8f0;
        margin: 0.5rem 0;
    }
    
    .top-header {
        padding-bottom: 0;
        border-bottom: none;
        margin-bottom: 1rem;
    }
    
    .top-header h1 {
        font-size: 1.5rem;
    }
    
    .user-profile {
        display: none;
    }
    
    .nav-menu a {
        padding: 1rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        min-height: 48px;
        text-decoration: none;
        color: #64748b;
        transition: all 0.2s;
    }
    
    .nav-menu a:hover, .nav-menu a.active {
        background: #10b981;
        color: white;
    }
    
    #mobile-sign-out {
        color: #ef4444 !important;
    }
    
    #mobile-sign-out:hover {
        background: #fee2e2 !important;
        color: #dc2626 !important;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-card {
        max-width: 100%;
        height: 250px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.transactions-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.transaction-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
}

.transaction-details {
    flex: 1;
}

.transaction-details h4 {
    margin-bottom: 0.25rem;
}

.transaction-details small {
    color: #6b7280;
}

.transaction-amount {
    font-weight: bold;
}

.transaction-amount.income {
    color: #10b981;
}

.transaction-amount.expense {
    color: #ef4444;
}

.transaction-item {
    cursor: pointer;
    transition: background-color 0.2s;
}

.transaction-item:hover {
    background-color: #f8fafc;
}

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

.btn-view, .btn-edit, .btn-delete {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: bold;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-view {
    color: #059669;
}

.btn-view:hover {
    background: #d1fae5;
}

.btn-edit {
    color: #0369a1;
}

.btn-edit:hover {
    background: #e0f2fe;
}

.btn-delete {
    color: #dc2626;
}

.btn-delete:hover {
    background: #fef2f2;
}

.detail-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.detail-item:last-child {
    border-bottom: none;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem;
}

.close-btn:hover {
    color: #374151;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-actions button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.settings-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-section h2 {
    margin-bottom: 1.5rem;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Settings Input Groups */
.settings-section .input-group {
    margin-bottom: 1.5rem;
}

.settings-section .input-group:last-of-type {
    margin-bottom: 0;
}

.settings-section label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.settings-section .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.settings-section .input-icon {
    position: absolute;
    left: 1rem;
    color: #9ca3af;
    font-size: 1rem;
    z-index: 1;
}

.settings-section .readonly-icon {
    position: absolute;
    right: 1rem;
    color: #d1d5db;
    font-size: 0.875rem;
}

.settings-section input,
.settings-section select {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #fafafa;
}

.settings-section input:focus,
.settings-section select:focus {
    outline: none;
    border-color: #10b981;
    background: white;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.settings-section input[readonly] {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
    padding-right: 3rem;
}

.settings-section select {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
}

.settings-section .input-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.5rem;
    display: block;
}

/* Checkbox Styling */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    position: relative;
    appearance: none;
    padding: 0;
}

.checkbox-group input[type="checkbox"]:checked {
    background: #10b981;
    border-color: #10b981;
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
    color: #374151;
}

.checkbox-group label i {
    color: #10b981;
    font-size: 1rem;
}

/* Button Styling */
.settings-section .btn-secondary {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    border: 2px solid #d1d5db;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-top: 1rem;
}

.settings-section .btn-secondary:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.settings-section .btn-secondary i {
    font-size: 1rem;
}

.danger-zone {
    border-color: #fecaca;
    background: #fef2f2;
}

.danger-zone h2 {
    color: #dc2626;
}

.summary-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.summary-item h3 {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.percentage {
    font-size: 2rem;
    font-weight: bold;
    color: #10b981;
}

/* Filter Section Styles */
.filter-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.search-bar {
    position: relative;
    margin-bottom: 1rem;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
}

.search-bar input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s;
}

.search-bar input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.filter-controls select {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-controls select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.btn-reset {
    padding: 0.875rem 1.5rem;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-reset:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.btn-reset i {
    font-size: 0.875rem;
}

/* Mobile First Approach */
@media (max-width: 480px) {
    /* Filter Section Mobile */
    .filter-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .search-bar {
        margin-bottom: 0.75rem;
    }
    
    .search-bar input {
        padding: 1rem 1rem 1rem 3rem;
        font-size: 1rem;
        border-radius: 12px;
    }
    
    .filter-controls {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .filter-controls select {
        padding: 1rem;
        font-size: 1rem;
        border-radius: 12px;
        min-height: 48px;
    }
    
    .btn-reset {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-radius: 12px;
        min-height: 48px;
    }
    
    /* App Layout Mobile */
    .app-layout {
        flex-direction: column;
        min-height: 100vh;
    }
    
    .sidebar {
        width: 100%;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        position: sticky;
        top: 0;
        background: white;
        z-index: 100;
    }
    
    .sidebar-header {
        margin-bottom: 0;
    }
    
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0;
    }
    
    .sidebar .logo {
        margin-bottom: 0;
        text-align: left;
    }
    
    .sidebar .logo span {
        font-size: 1.25rem;
    }
    
    .sidebar .logo small {
        font-size: 0.8rem;
    }
    
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
        color: #64748b;
        border-radius: 6px;
    }
    
    .mobile-menu-toggle:hover {
        background: #f1f5f9;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: auto;
        left: 1rem;
        right: 1rem;
        bottom: auto;
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        padding: 0.75rem;
        gap: 0.25rem;
        z-index: 1000;
        max-height: 70vh;
        overflow-y: auto;
        margin-top: 1rem;
    }
    
    .nav-menu.mobile-open {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0;
        width: 100%;
    }
    
    .nav-menu a {
        padding: 1rem;
        font-size: 1rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        min-height: 48px;
    }
    
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    .main-content {
        padding: 1rem;
        flex: 1;
    }
    
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .top-header h1 {
        font-size: 1.5rem;
    }
    
    .page-content > p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    /* Section Header Mobile */
    .section-header,
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .section-header h2,
    .page-header h2 {
        font-size: 1.25rem;
        margin: 0;
    }
    
    .page-header p {
        font-size: 0.9rem;
        color: #6b7280;
        margin: 0;
    }
    
    .btn-primary,
    .btn.btn-primary {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        min-height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    /* Stats Grid Mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    /* Categories Grid Mobile */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-section h3 {
        font-size: 1.1rem;
    }
    
    /* Charts Mobile */
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .chart-section,
    .chart-card {
        max-width: 100%;
        padding: 1rem;
    }
    
    /* Transactions Section Mobile */
    .transactions-section {
        padding: 1rem;
        border-radius: 12px;
        background: white;
        border: 1px solid #e2e8f0;
    }
    
    .transaction-item {
        padding: 1rem 0;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        align-items: center;
        gap: 1rem;
        min-height: 70px;
    }
    
    .transaction-item:last-child {
        border-bottom: none;
    }
    
    .transaction-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        flex-shrink: 0;
    }
    
    .transaction-details {
        flex: 1;
        min-width: 0;
    }
    
    .transaction-details h4 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .transaction-details small {
        font-size: 0.875rem;
        color: #6b7280;
    }
    
    .transaction-amount {
        font-size: 1rem;
        font-weight: 600;
        flex-shrink: 0;
    }
    
    .transaction-actions {
        display: flex;
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    .btn-view, .btn-edit, .btn-delete {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* No Data State */
    .no-data {
        text-align: center;
        padding: 3rem 1rem;
        color: #6b7280;
        font-size: 1rem;
    }
    
    /* Touch-friendly interactions */
    .btn-primary, .btn-secondary, .btn-danger {
        min-height: 48px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Improved scrolling */
    .main-content {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
    }
    
    /* Better typography */
    body {
        -webkit-text-size-adjust: 100%;
        font-size: 16px;
    }
    
    /* Smooth menu transitions */
    .nav-menu {
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle {
        transition: all 0.2s ease;
    }
    
    .mobile-menu-toggle:active {
        transform: scale(0.95);
        background: #e2e8f0;
    }
}

@media (max-width: 768px) and (min-width: 481px) {
    /* Tablet styles */
    .app-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 1rem 1.5rem;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .nav-menu {
        display: flex !important;
        justify-content: center;
        gap: 1rem;
        position: static;
        background: none;
        border: none;
        box-shadow: none;
        padding: 0;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .nav-menu li {
        margin: 0;
        width: auto;
    }
    
    .nav-menu a {
        padding: 0.75rem 1rem;
        min-height: 44px;
    }
    
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .section-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .btn-primary {
        width: auto;
        min-width: 200px;
    }
}

/* Landscape phone orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .left-section {
        min-height: 50vh;
        padding: 1.5rem;
    }
    
    .left-section h1 {
        font-size: 1.8rem;
    }
    
    .modal {
        align-items: center;
    }
    
    .modal-content {
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .sidebar {
        position: relative;
    }
    
    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.5rem;
    }
    
    .nav-menu.mobile-open {
        position: static;
        background: none;
        border: none;
        box-shadow: none;
        padding: 0;
    }
}

