/* CSS Variables */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #1e40af;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-900: #111827;
    
    /* Prevent horizontal scrolling */
    --max-content-width: 100vw;
}

/* Root and universal box-sizing for better browser consistency */
html {
    /* Prevent horizontal scrolling at root level */
    overflow-x: hidden;
    width: 100%;
    height: 100%;
}

/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
    /* Prevent horizontal overflow */
    max-width: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    /* Prevent horizontal scroll */
    overflow-x: hidden;
    width: 100vw;
    position: relative;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* App Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.app-logo {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.app-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.refresh-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.refresh-btn:hover {
    background: #e5e7eb;
    color: #3b82f6;
}

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

.refresh-icon {
    width: 18px;
    height: 18px;
}

.refresh-btn.spinning .refresh-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Main Content */
.main-content {
    padding-top: 80px; /* Increased to account for top bar height */
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 8px));
    min-height: 100vh;
    width: 100vw;
    max-width: 100%;
    overflow-x: hidden;
}

/* Month Navigation */
.month-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.month-nav-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.month-nav-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
    transform: scale(1.05);
}

.month-nav-btn svg {
    width: 16px;
    height: 16px;
}

.month-title-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.month-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    min-width: 180px;
    width: 180px;
    text-align: center;
}

#current-month {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    width: 180px;
    text-align: center;
}

.month-settings-btn {
    background: none;
    border: none;
    padding: 0.375rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.month-settings-btn:hover {
    background-color: #f3f4f6;
    color: #3b82f6;
    opacity: 1;
    transform: scale(1.1);
}

.month-settings-btn svg {
    width: 16px;
    height: 16px;
}

/* Month Settings Panel */
.month-settings-panel {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s ease;
    max-height: 0;
}

.month-settings-panel:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
    max-height: 2000px;
}

.settings-panel-content {
    padding: 1.5rem;
}

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

.settings-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

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

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

.settings-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f9fafb;
}

.settings-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 1rem 0;
}

.settings-section-title svg {
    color: #3b82f6;
}

/* Starting Balance Input */
.balance-input-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.balance-input-container input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.balance-input-container input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.save-btn {
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.save-btn:hover {
    background: #2563eb;
}

/* Balance Alert */
.balance-alert {
    padding: 1rem;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.balance-alert.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.balance-alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.balance-alert.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.balance-alert-content {
    margin-bottom: 0.75rem;
}

.balance-alert-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.alert-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-btn.primary {
    background: #3b82f6;
    color: white;
}

.alert-btn.primary:hover {
    background: #2563eb;
}

.alert-btn.secondary {
    background: #f3f4f6;
    color: #374151;
}

.alert-btn.secondary:hover {
    background: #e5e7eb;
}

/* Overview Stats */
.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-item {
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.stat-value.positive {
    color: #16a34a;
}

.stat-value.negative {
    color: #dc2626;
}

/* Month Insights */
.month-insights {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.insight-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 14px;
}

.insight-item .insight-icon {
    margin-right: 0.75rem;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.insight-item.positive {
    background: #f0fdf4;
    color: #166534;
}

.insight-item.negative {
    background: #fef2f2;
    color: #991b1b;
}

.insight-item.neutral {
    background: #f8fafc;
    color: #374151;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn svg {
    flex-shrink: 0;
}

/* Mobile Responsive for Settings Panel */
@media (max-width: 768px) {
    .settings-panel-content {
        padding: 1rem;
    }
    
    .month-title-container {
        gap: 0.25rem;
    }
    
    #current-month {
        font-size: 16px;
        width: 140px;
    }
    
    .balance-input-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .balance-input-container input {
        width: 100%;
    }
    
    .overview-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Help Banner */
.help-banner {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 14px;
    color: #1e40af;
}

/* Balance Card */
.balance-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
}

.balance-input {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    width: 120px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.balance-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.section-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Enhanced Cards */
.filters-card,
.chart-card,
.table-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    transition: box-shadow 0.2s ease;
}

.chart-card {
    padding: 1.25rem;
}

.table-card {
    padding: 1.25rem;
    margin-top: 1rem;
}

.chart-card:hover,
.table-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Filter Styles */
.filter-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.filter-select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Chart Titles */
.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem 0;
}

/* Table Styles */
.table-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem 0;
}

.table-header {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.table-header th {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* Profile Styles */
.profile-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.profile-initials {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.profile-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 2rem 0;
}

.profile-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 300px;
    margin: 0 auto;
}

.profile-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 10px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.profile-option:hover {
    background: #f3f4f6;
}

.option-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    color: #3b82f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.option-icon svg {
    width: 20px;
    height: 20px;
}

.option-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.option-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* Transaction Section Styles */
.section-content {
    padding: 0;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    max-width: 100vw;
    overflow-x: visible; /* Allow content to be visible */
    box-sizing: border-box;
}

.budget-controls {
    background: white;
    border-radius: 0px;
    padding: 1rem;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100vw;
    overflow-x: visible; /* Allow content to be visible */
    box-sizing: border-box;
}

.control-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.control-group input {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    width: 120px;
    text-align: right;
}

.month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 1rem;
    width: 100%;
    max-width: 100vw;
    overflow-x: visible;
    box-sizing: border-box;
}

.month-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.month-title-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#current-month {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    text-align: center;
    min-width: 140px;
}

.month-nav-btn {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-nav-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.month-nav-btn svg {
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.month-settings-btn {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-settings-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.month-settings-btn svg {
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.month-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
    text-align: right;
}

.month-expenses,
.month-balance-eom {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 14px;
    justify-content: flex-end;
}

.month-stats .stat-label {
    color: #6b7280;
    font-weight: 500;
    font-size: 12px;
}

.month-stats .stat-value {
    font-weight: 600;
    font-size: 14px;
}

.month-expenses .stat-value {
    color: #dc2626;
}

.month-balance-eom .stat-value.positive {
    color: #16a34a;
}

.month-balance-eom .stat-value.negative {
    color: #dc2626;
}

.month-balance-eom .stat-value.neutral {
    color: #6b7280;
}

/* Days Container */
.days-container {
    /* Let days flow naturally without separate scrolling */
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Week Header */
.week-header {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    margin: 4px 0 0 0;
    padding: 0 1rem;
}

.week-info {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f9fafb;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    display: inline-block;
}

/* Remove unused scrollbar styles for days-container */

/* Day Cards */
.day-card {
    background: white;
    border-radius: 0px;
    margin-bottom: 1px;
    transition: all 0.2s ease;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
    width: 100%;
    max-width: calc(100vw - 1rem);
    margin: 0 auto;
}

.day-card.expanded {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.day-card.expanded .day-header {
    background-color: #f8fafc;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.day-header:hover {
    background-color: #f9fafb;
}

.day-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.day-name {
    font-weight: 500;
    font-size: 15px;
    color: #1f2937;
    white-space: nowrap;
}

.transaction-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    transition: opacity 0.2s ease;
}

.day-card.expanded .transaction-pills {
    opacity: 0;
    pointer-events: none;
}

.transaction-pill {
    background: transparent;
    border-radius: 20px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.transaction-pill.positive {
    color: #16a34a;
}

.transaction-pill.negative {
    color: #dc2626;
}

.day-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.day-total {
    font-size: 14px;
    font-weight: 600;
}

.day-total.negative {
    color: #dc2626;
}

.day-total.positive {
    color: #16a34a;
}

.day-total.neutral {
    color: #6b7280;
}

.add-btn {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.add-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
    transform: scale(1.05);
}

.add-btn svg {
    width: 16px;
    height: 16px;
}

/* Day Content */
.day-content {
    display: none;
    border-top: 1px solid #f3f4f6;
}

.day-content.expanded {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.expenses-list {
    padding: 8px 16px;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.expense-item:last-child {
    margin-bottom: 0;
}

.expense-item:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
    transform: translateX(2px);
}

.expense-merchant {
    color: #374151;
    font-weight: 400;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expense-amount {
    font-weight: 600;
    margin-left: 8px;
}

.expense-amount.negative {
    color: #dc2626;
}

.expense-amount.positive {
    color: #16a34a;
}

.no-expenses {
    text-align: center;
    padding: 16px;
    color: #9ca3af;
    font-size: 14px;
    font-style: italic;
}

/* Day Footer */
.day-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-top: 1px solid #f3f4f6;
    background: #fafbfc;
    font-size: 13px;
}

.running-balance-label {
    color: #6b7280;
    font-weight: 500;
}

.running-balance {
    font-weight: 600;
    font-size: 14px;
}

.running-balance.negative {
    color: #dc2626;
}

.running-balance.positive {
    color: #16a34a;
}

.running-balance.neutral {
    color: #6b7280;
}

/* App Sections - Enhanced */
.app-section {
    display: none;
}

.app-section.active {
    display: block;
}

/* Bottom Navigation - Enhanced with better padding */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 8px));
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    min-height: calc(65px + env(safe-area-inset-bottom, 8px));
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 120px;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    text-decoration: none;
    outline: none;
}

.nav-item.active {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
}

.nav-item:hover {
    color: #3b82f6;
    background-color: #f8fafc;
    border-radius: 8px;
}

.nav-item:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 0.25rem;
    stroke-width: 2;
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

/* Insights Charts */
.chart-container {
    position: relative;
    height: 300px;
}

canvas {
    max-height: 300px;
}

/* Insights Table */
#insights-table-body tr {
    border-bottom: 1px solid #f3f4f6;
}

#insights-table-body tr:hover {
    background-color: #f9fafb;
}

#insights-table-body td {
    padding: 0.75rem 1rem;
}

/* Context Menu */
#context-menu {
    z-index: 1000;
    border: 1px solid #d1d5db;
}

#context-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#context-menu li {
    border-bottom: 1px solid #f3f4f6;
}

#context-menu li:last-child {
    border-bottom: none;
}

/* Loading Overlay */
#loading {
    z-index: 1000;
}

/* Edit Modal */
#edit-modal {
    z-index: 1001;
}

#edit-modal:not(.hidden) {
    display: flex !important;
}

#edit-modal .bg-white {
    max-height: 90vh;
    overflow-y: auto;
}

/* Autocomplete styling */
#edit-modal input[list] {
    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 8px center;
    background-size: 12px;
    padding-right: 30px;
}

#edit-modal input[list]:focus {
    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="%233b82f6" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
}

/* Datalist styling for browsers that support it */
datalist {
    display: none;
}

/* Improve form field styling */
#edit-form input[type="text"],
#edit-form input[type="number"],
#edit-form textarea {
    transition: border-color 0.2s, box-shadow 0.2s;
}

#edit-form input[type="text"]:focus,
#edit-form input[type="number"]:focus,
#edit-form textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Placeholder styling */
#edit-form input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Form labels */
#edit-form label {
    color: #374151;
    font-weight: 500;
}

/* Modal buttons hover effects */
#edit-form button[type="submit"] {
    transition: background-color 0.2s;
}

#edit-form button[type="submit"]:hover {
    background-color: #2563eb;
}

#edit-form button[type="button"] {
    transition: background-color 0.2s;
}

#edit-form button[type="button"]:hover {
    background-color: #d1d5db;
}

#delete-transaction {
    transition: background-color 0.2s;
}

#delete-transaction:hover {
    background-color: #dc2626;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .top-bar {
        padding: 12px 16px;
    }
    
    .app-name {
        font-size: 16px;
    }

    .main-content {
        padding-top: 70px; /* Adjust for smaller top bar on mobile */
    }

    .month-header {
        padding: 0 0.75rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .month-left {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        justify-content: center;
    }

    .month-title-container {
        gap: 0.25rem;
    }

    #current-month {
        font-size: 18px;
        min-width: 120px;
    }

    .month-nav-btn {
        padding: 0.375rem;
    }

    .month-nav-btn svg {
        width: 14px;
        height: 14px;
    }

    .month-settings-btn {
        padding: 0.375rem;
    }

    .month-settings-btn svg {
        width: 14px;
        height: 14px;
    }

    .month-stats {
        align-items: flex-end;
        gap: 0.125rem;
        text-align: right;
        align-self: flex-end;
    }

    .month-expenses,
    .month-balance-eom {
        justify-content: flex-end;
        font-size: 13px;
    }

    .month-stats .stat-label {
        font-size: 11px;
    }

    .month-stats .stat-value {
        font-size: 13px;
    }

    .week-header {
        padding: 0 0.75rem; /* Slightly reduce padding on mobile */
        align-items: baseline;
    }

    .week-info {
        font-size: 10px;
    }

    .month-title {
        font-size: 16px;
        min-width: 120px;
    }

    .section-title {
        font-size: 20px;
    }

    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .grid-container {
        margin: 0 -0.5rem;
    }

    .budget-grid {
        grid-template-columns: 60px repeat(7, 100px);
        width: 100%;
        overflow-x: auto;
    }

    .day-header {
        font-size: 0.8rem;
        padding: 0.375rem 1rem;
    }

    .transaction-cell {
        min-height: 50px;
        padding: 0.375rem;
    }

    .amount {
        font-size: 0.8rem;
    }

    .merchant {
        font-size: 0.7rem;
    }

    .row-label {
        font-size: 0.75rem;
        padding: 0.375rem;
    }

    .day-total,
    .balance-row {
        font-size: 0.8rem;
        padding: 0.375rem;
    }

    /* Modal adjustments for mobile */
    #edit-modal .w-96 {
        width: 90vw;
        max-width: 350px;
    }

    /* Chart container mobile adjustments */
    .chart-container {
        height: 250px;
    }

    canvas {
        max-height: 250px;
    }

    /* Bottom nav mobile adjustments */
    .nav-item {
        padding: 0.25rem;
    }

    .nav-icon {
        width: 20px;
        height: 20px;
    }

    .nav-label {
        font-size: 0.7rem;
    }

    /* Stat cards mobile */
    .stat-value {
        font-size: 16px;
    }

    .stat-label {
        font-size: 11px;
    }

    /* Profile mobile */
    .profile-card {
        padding: 1.5rem;
    }

    .profile-avatar {
        width: 64px;
        height: 64px;
    }

    .profile-initials {
        font-size: 20px;
    }

    .profile-name {
        font-size: 18px;
    }
    
    /* Sidebar mobile adjustments */
    .sidebar-drawer {
        width: 280px;
    }
    
    /* Enhanced mobile compatibility for all browsers */
    .main-content {
        width: 100vw;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .days-container {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .day-card {
        width: 100%;
        max-width: calc(100vw - 1.5rem); /* Account for side padding */
        margin: 0 auto;
    }
    
    /* Ensure no elements exceed viewport width */
    .section-content,
    .budget-controls {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Fix webkit-specific scaling issues */
    input, textarea, select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Prevent text from being too small in any browser */
    body {
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
}

/* PWA Specific Styles */
.pwa-mode {
    /* Additional padding for devices with notches */
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.pwa-mode .bottom-nav {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 8px));
}

.pwa-mode .app-header {
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
}

/* Additional styles for forms and other elements */
#edit-form input[type="text"],
#edit-form input[type="number"],
#edit-form textarea {
    transition: border-color 0.2s, box-shadow 0.2s;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    }

#edit-form input[type="text"]:focus,
#edit-form input[type="number"]:focus,
#edit-form textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

#edit-form button[type="submit"] {
    transition: background-color 0.2s;
}

#edit-form button[type="submit"]:hover {
    background-color: #2563eb;
}

#edit-form button[type="button"] {
    transition: background-color 0.2s;
}

#edit-form button[type="button"]:hover {
    background-color: #d1d5db;
}

/* Utility classes for Tailwind-like functionality */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.space-x-2 > * + * {
    margin-left: 0.5rem;
}

.space-x-3 > * + * {
    margin-left: 0.75rem;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.text-blue-600 {
    color: #2563eb;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.font-medium {
    font-weight: 500;
}

.grid {
    display: grid;
}

.gap-4 {
    gap: 1rem;
}

.gap-3 {
    gap: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.text-red-600 {
    color: #dc2626;
}

.text-green-600 {
    color: #16a34a;
}

.text-purple-600 {
    color: #9333ea;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
    }

@media (min-width: 768px) {
    .md\\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .md\\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .lg\\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.overflow-x-auto {
    overflow-x: auto;
}

.w-full {
        width: 100%;
    }

.table-auto {
    table-layout: auto;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
    }

.container {
    width: 100%;
    max-width: 1200px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Additional utility styles */
.hidden {
    display: none !important;
}

/* Context Menu */
#context-menu {
    z-index: 1000;
    border: 1px solid #d1d5db;
}

#context-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#context-menu li {
    border-bottom: 1px solid #f3f4f6;
}

#context-menu li:last-child {
    border-bottom: none;
}

/* Loading Overlay */
#loading {
    z-index: 1000;
}

/* Edit Modal */
#edit-modal {
    z-index: 1001;
}

#edit-modal .bg-white {
    max-height: 90vh;
    overflow-y: auto;
}

/* Hover effects */
.transaction-cell:hover {
    /* box-shadow: inset 0 0 0 2px #dbeafe; */ /* Removed inset shadow */
}

/* Focus styles for accessibility */
.transaction-cell:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

/* Notification System */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 2000;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

.notification-success {
    background-color: #10b981;
}

.notification-error {
    background-color: #ef4444;
}

.notification-warning {
    background-color: #f59e0b;
}

.notification-info {
    background-color: #3b82f6;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Additional essential utility classes */
.fixed {
    position: fixed;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.bg-black {
    background-color: rgba(0, 0, 0, 1);
}

.bg-opacity-50 {
    background-color: rgba(0, 0, 0, 0.5);
}

.bg-white {
    background-color: white;
}

.justify-center {
    justify-content: center;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.p-6 {
    padding: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.w-96 {
    width: 24rem;
}

.w-48 {
    width: 12rem;
}

.cursor-pointer {
    cursor: pointer;
}

.hover\\:bg-gray-100:hover {
    background-color: #f3f4f6;
}

.hover\\:bg-gray-300:hover {
    background-color: #d1d5db;
}

.hover\\:bg-blue-600:hover {
    background-color: #2563eb;
}

.text-lg {
    font-size: 1.125rem;
}

.font-bold {
    font-weight: 700;
}

.text-sm {
    font-size: 0.875rem;
}

.border {
    border-width: 1px;
    border-color: #d1d5db;
}

.rounded {
    border-radius: 0.25rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.space-x-2 > * + * {
    margin-left: 0.5rem;
}

.justify-end {
    justify-content: flex-end;
}

.bg-gray-200 {
    background-color: #e5e7eb;
}

.bg-blue-500 {
    background-color: #3b82f6;
}

.text-white {
    color: white;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.rounded-full {
    border-radius: 9999px;
}

.h-12 {
    height: 3rem;
}

.w-12 {
    width: 3rem;
}

.border-4 {
    border-width: 4px;
}

.border-white {
    border-color: white;
}

.border-t-transparent {
    border-top-color: transparent;
}

/* Select Button */
.select-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.select-btn:hover {
    background: #e5e7eb;
    color: #3b82f6;
}

.select-btn.active {
    background: #3b82f6;
    color: white;
}

.select-btn.active .select-label {
    content: 'Cancel';
}

.body.selection-mode .select-btn .select-label::after {
    content: ' (Cancel)';
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Batch Actions Panel */
.batch-panel {
    position: fixed;
    bottom: calc(65px + env(safe-area-inset-bottom, 8px));
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.batch-panel:not(.hidden) {
    transform: translateY(0);
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.selected-count {
    font-size: 14px;
    font-weight: 600;
    color: #3b82f6;
}

.select-all-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.select-all-btn:hover {
    background: #f3f4f6;
}

.batch-buttons {
    display: flex;
    gap: 8px;
    justify-content: space-around;
}

.batch-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border: none;
    background: #f9fafb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    min-width: 60px;
}

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

.batch-delete-btn {
    color: #dc2626;
}

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

/* Selection Mode Styles */
.selection-mode .expense-item,
.selection-mode .transaction-pill {
    position: relative;
    padding-left: 40px;
}

.selection-mode .expense-item::before,
.selection-mode .transaction-pill::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: white;
    transition: all 0.2s ease;
}

.selection-mode .expense-item.selected::before,
.selection-mode .transaction-pill.selected::before {
    background: #3b82f6;
    border-color: #3b82f6;
}

.selection-mode .expense-item.selected::after,
.selection-mode .transaction-pill.selected::after {
    content: '✓';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.selection-mode .expense-item.selected,
.selection-mode .transaction-pill.selected {
    background-color: #eff6ff;
    border-color: #3b82f6;
}

/* Hide transaction pills in selection mode to avoid confusion */
.selection-mode .transaction-pills {
    display: none;
}

/* Day header adjustments for selection mode */
.selection-mode .day-header {
    position: relative;
}

/* Remove the non-clickable pseudo-element approach */

/* Day selection circle */
.day-select-circle {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(-50%) scale(0);
    z-index: 10;
}

.day-select-circle.visible {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.day-select-circle.selected {
    background: #3b82f6;
    border-color: #3b82f6;
}

.day-select-circle.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.day-select-circle:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

/* Animate day content to make space for selection circle */
.selection-mode .day-left {
    transform: translateX(40px);
    transition: transform 0.3s ease;
}

.selection-mode .day-right {
    transition: transform 0.3s ease;
}

/* Authentication Styles */
.auth-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

/* Auth Modal Overlay for welcome modal */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal-overlay.show {
    opacity: 1;
}

.auth-modal {
    background: white;
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.auth-modal-overlay.show .auth-modal {
    transform: scale(1);
}

.modal-header {
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid #f3f4f6;
}

.modal-body {
    padding: 1.5rem 2rem;
}

.modal-footer {
    padding: 1rem 2rem 2rem 2rem;
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 14px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.auth-container {
    background: white;
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90vw;
    animation: slideInUp 0.4s ease;
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.app-logo-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: bold;
    margin: 0 auto 2rem auto;
}

.auth-container h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.auth-container p {
    color: #6b7280;
    margin: 0 0 2rem 0;
}

.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.social-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.google-btn:hover {
    border-color: #4285F4;
}

.apple-btn:hover {
    border-color: #000;
}

.facebook-btn:hover {
    border-color: #1877F2;
}

.auth-footer {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.4;
}

/* User Profile Header */
.user-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
}

.user-info {
    flex: 1;
}

.user-info h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #1f2937;
}

.user-info p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
}

.provider-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #eff6ff;
    color: #3b82f6;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background: #dc2626;
}

/* Mobile responsiveness for auth */
@media (max-width: 768px) {
    .auth-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .app-logo-large {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .auth-container h1 {
        font-size: 20px;
    }
    
    .social-btn {
        padding: 0.625rem 1.25rem;
        font-size: 14px;
    }
    
    .user-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .user-info {
        text-align: center;
    }
    
    .logout-btn {
        width: 100%;
    }
}

/* Welcome Modal Styles */
.welcome-modal {
    max-width: 500px !important;
    text-align: center;
}

.welcome-modal .modal-header h2 {
    color: var(--primary-color);
    margin-bottom: 0;
    font-size: 1.8rem;
}

.welcome-modal .modal-body {
    padding: 2rem 1.5rem;
}

.welcome-avatar {
    margin: 0 auto 1.5rem auto;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(92, 107, 192, 0.3);
}

.welcome-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-modal h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.welcome-modal p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.welcome-modal ul {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    background: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.welcome-modal ul li {
    color: var(--text-color);
    padding: 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    border-bottom: 1px solid var(--border-color);
}

.welcome-modal ul li:last-child {
    border-bottom: none;
}

.welcome-modal .modal-footer {
    padding-top: 2rem;
}

.welcome-modal .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    border: none;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    min-width: 200px;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
}

.welcome-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(92, 107, 192, 0.4);
    background: linear-gradient(135deg, #4f46e5, #5b21b6);
}

/* Welcome Modal Animations */
.welcome-modal {
    transform: scale(0.8) translateY(-30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-modal-overlay.show .welcome-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Dark mode adjustments for welcome modal */
[data-theme="dark"] .welcome-modal ul {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .welcome-modal ul li {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Hamburger Menu & Sidebar Styles */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-right: 12px;
    transition: all 0.3s ease;
    /* Ensure visibility */
    opacity: 1;
    visibility: visible;
}

.hamburger-menu span {
    width: 16px;
    height: 2px;
    background: #374151; /* Use a more visible color */
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger-menu:hover span {
    background: #3b82f6;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Top Bar Updates */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.app-icon {
    margin-right: 8px;
    color: #3b82f6;
}

.app-name {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Drawer */
.sidebar-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: white;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Allow scrolling if content overflows */
}

.sidebar-drawer.active {
    transform: translateX(0);
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0; /* Prevent shrinking */
}

.user-profile {
    display: flex;
    align-items: center;
    flex: 1;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #1f2937;
}

.user-email {
    font-size: 14px;
    color: #6b7280;
}

.sidebar-close {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0; /* Prevent shrinking */
}

.sidebar-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.sidebar-close svg {
    width: 20px;
    height: 20px;
}

/* Sidebar Content */
.sidebar-content {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto; /* Allow content to scroll if needed */
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
}

.sidebar-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 16px;
}

.sidebar-item:hover {
    background: #f3f4f6;
    color: #3b82f6;
}

.sidebar-item svg {
    margin-right: 12px;
    flex-shrink: 0;
}

.sidebar-item span {
    flex: 1;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar-drawer {
        width: 280px;
    }
    
    .top-bar {
        padding: 12px 16px;
    }
    
    .app-name {
        font-size: 16px;
    }
}

/* Insights Table */
#insights-table-body tr {
    border-bottom: 1px solid #f3f4f6;
}

#insights-table-body tr:hover {
    background-color: #f9fafb;
}

#insights-table-body td {
    padding: 0.75rem 1rem;
}

/* Categories List */
.categories-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

.categories-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

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

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-item:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.category-name {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
}

.category-right {
    text-align: right;
}

.category-amount {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.125rem;
}

.category-percentage {
    font-size: 0.875rem;
    color: #6b7280;
}

.category-item.actual {
    border-left: 4px solid #10b981;
}

.category-item.estimate {
    border-left: 4px solid #f59e0b;
    background: #fefbf3;
}

.category-item.estimate:hover {
    background: #fef3c7;
}

.category-item.estimate .category-icon {
    background: #fef3c7;
}

.category-item.estimate .category-name::after {
    content: " (Est.)";
    font-size: 0.75rem;
    color: #d97706;
    font-weight: normal;
}

/* Start Section Styles */
.welcome-header {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    margin-bottom: 1.5rem;
    color: white;
}

.welcome-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Status Cards */
.status-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .status-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.status-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease;
}

.status-card:hover {
    transform: translateY(-2px);
}

.status-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.status-content {
    flex: 1;
}

.status-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.status-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.status-trend {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Onboarding Styles */
.onboarding-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.onboarding-step {
    display: none;
    padding: 2rem;
}

.onboarding-step.active {
    display: block;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.step-progress {
    margin-bottom: 1.5rem;
}

.progress-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.3s ease;
}

.dot.active {
    background: #3b82f6;
    transform: scale(1.2);
}

.dot.completed {
    background: #10b981;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.step-subtitle {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 400;
}

/* Form Styles */
.quick-debt-form,
.optional-fields {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.field-label {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.debt-input {
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    background: #f9fafb;
    transition: all 0.2s ease;
    min-height: 56px; /* Thumb-friendly touch target */
}

.debt-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.amount-input-container,
.percentage-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol,
.percentage-symbol {
    position: absolute;
    left: 1rem;
    font-weight: 600;
    color: #6b7280;
    pointer-events: none;
}

.percentage-symbol {
    right: 1rem;
    left: auto;
}

.amount-input {
    padding-left: 2.5rem;
}

.percentage-input {
    padding-right: 2.5rem;
}

/* Buttons */
.continue-btn,
.skip-btn,
.finish-btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 56px; /* Thumb-friendly */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.continue-btn,
.finish-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.continue-btn:hover,
.finish-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.continue-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.skip-btn {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.skip-btn:hover {
    background: #e5e7eb;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.button-group .skip-btn,
.button-group .continue-btn {
    flex: 1;
}

/* Completion Summary */
.completion-summary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quick-win-card {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.win-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.win-content {
    flex: 1;
}

.win-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.win-description {
    font-size: 0.875rem;
    opacity: 0.9;
}

.payoff-preview {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
}

.preview-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.preview-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.preview-stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.next-actions {
    background: #fefefe;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 1.5rem;
}

.actions-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.action-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.action-text {
    font-size: 0.875rem;
    color: #4b5563;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.quick-action-btn {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 120px;
}

.quick-action-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.quick-action-btn .action-icon {
    font-size: 2rem;
}

.quick-action-btn .action-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

/* Debt List */
.debt-list-container {
    margin-top: 1.5rem;
}

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

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.add-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.add-btn:hover {
    background: #2563eb;
}

.debts-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .welcome-header {
        padding: 1.5rem 1rem;
    }
    
    .welcome-title {
        font-size: 1.75rem;
    }
    
    .onboarding-step {
        padding: 1.5rem;
    }
    
    .step-title {
        font-size: 1.25rem;
    }
    
    .debt-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .preview-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        text-align: left;
    }
    
    .button-group {
        flex-direction: column;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .status-card,
    .onboarding-container,
    .quick-action-btn {
        background: #1f2937;
        border-color: #374151;
    }
    
    .status-amount,
    .step-title,
    .section-title {
        color: #f9fafb;
    }
    
    .status-label,
    .step-subtitle,
    .field-label {
        color: #d1d5db;
    }
    
    .debt-input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .debt-input:focus {
        background: #4b5563;
        border-color: #3b82f6;
    }
}

/* Debt Cards */
.debt-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.debt-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

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

.debt-nickname {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.debt-balance {
    font-size: 1.25rem;
    font-weight: 700;
    color: #dc2626;
}

.debt-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.debt-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.debt-due {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.debt-due.urgent {
    color: #dc2626;
    font-weight: 700;
}

.debt-minimum {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 600;
}

.day-right .add-btn {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.day-right .add-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
    transform: scale(1.05);
}

.day-right .add-btn svg {
    width: 16px;
    height: 16px;
}

.start-add-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.start-add-btn:hover {
    background: #2563eb;
}

/* Final override to ensure transaction add buttons use ghost style */
.days-container .add-btn,
.day-card .add-btn,
.day-right .add-btn {
    background: none !important;
    color: #6b7280 !important;
    border: none !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    padding: 0 !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.days-container .add-btn:hover,
.day-card .add-btn:hover,
.day-right .add-btn:hover {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
    transform: scale(1.05) !important;
    cursor: pointer !important;
}

/* Make SVG inside add buttons non-interactive so clicks go to the button */
.days-container .add-btn svg,
.day-card .add-btn svg,
.day-right .add-btn svg {
    pointer-events: none !important;
}

.days-container .add-btn svg *,
.day-card .add-btn svg *,
.day-right .add-btn svg * {
    pointer-events: none !important;
}