/* Custom CSS for BudgetBetter */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-bg: #f8f9fa;
}

/* Mobile Camera Styles */
#cameraVideo {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#cameraSection {
    position: relative;
}

#cameraSection .alert {
    font-size: 0.875rem;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    #uploadReceiptModal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    #cameraVideo {
        max-height: 60vh;
        object-fit: cover;
    }
    
    #toggleCameraBtn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .camera-controls {
        position: sticky;
        bottom: 0;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(10px);
        padding: 1rem;
        border-radius: 8px 8px 0 0;
        margin: 0 -1rem -1rem -1rem;
    }
    
    .camera-capture-btn {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        font-size: 1.5rem;
        border: 3px solid white;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    
    #receiptPreview img {
        max-height: 50vh;
    }
}

/* Custom Modal Styles */
#customAlertModal .modal-header,
#customConfirmModal .modal-header {
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

#customAlertModal .modal-footer,
#customConfirmModal .modal-footer {
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

/* Alert type styling */
.alert-modal.success .modal-header {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-modal.danger .modal-header {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-modal.warning .modal-header {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.alert-modal.info .modal-header {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* Toast Styles */
.custom-toast {
    min-width: 300px;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.custom-toast.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
}

.custom-toast.danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left: 4px solid #dc3545;
}

.custom-toast.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
}

.custom-toast.info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-left: 4px solid #17a2b8;
}

.toast-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal animations */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: scale(0.9) translateY(-50px);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* Responsive modal adjustments */
@media (max-width: 576px) {
    #customAlertModal .modal-dialog,
    #customConfirmModal .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    border: none;
}

/* Summary Cards */
.summary-card {
    text-align: center;
    padding: 2rem 1rem;
}

.summary-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.summary-card .amount {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.summary-card .label {
    color: white;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-card .breakdown {
    margin-top: 0.5rem;
}

.summary-card .breakdown small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
}

.income-card {
    background: linear-gradient(135deg, var(--success-color), #155724);
    color: white;
}

.expense-card {
    background: linear-gradient(135deg, var(--danger-color), #721c24);
    color: white;
}

.savings-card {
    background: linear-gradient(135deg, var(--info-color), #055160);
    color: white;
}

.bills-card {
    background: linear-gradient(135deg, var(--warning-color), #664d03);
    color: white;
}

.planned-card {
    background: linear-gradient(135deg, #6f42c1, #495057);
    color: white;
}

/* Notification Styles */
.notification-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #f8f9ff;
    border-left: 4px solid #007bff;
}

.notification-title {
    font-size: 1rem;
    color: #333;
}

.notification-message {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.notification-actions button {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-item:hover .notification-actions button {
    opacity: 1;
}

.notification-dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-dropdown-item:hover {
    background-color: #f8f9fa;
}

.notification-dropdown-item.unread {
    background-color: #f8f9ff;
}

.notification-dropdown-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.notification-dropdown-message {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

/* Tables */
.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

/* Status badges */
.status-paid {
    background-color: var(--success-color);
}

.status-pending {
    background-color: var(--warning-color);
}

.status-overdue {
    background-color: var(--danger-color);
}

/* Bill frequency badges */
.freq-monthly {
    background-color: #17a2b8;
}

.freq-weekly {
    background-color: #6f42c1;
}

.freq-biweekly {
    background-color: #e83e8c;
}

.freq-bimonthly {
    background-color: #795548;
}

.freq-quarterly {
    background-color: #fd7e14;
}

.freq-annual {
    background-color: #20c997;
}

.freq-once {
    background-color: #6c757d;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 6px;
    border: 2px solid #e9ecef;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Modals */
.modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

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

.modal-body {
    padding: 2rem;
}

/* List groups */
.list-group-item {
    border: none;
    border-radius: 0;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

/* Transaction items */
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.transaction-income {
    color: var(--success-color);
}

.transaction-expense {
    color: var(--danger-color);
}

/* Bill items */
.bill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bill-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.bill-meta {
    font-size: 0.85rem;
    color: #6c757d;
}

.bill-amount {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Charts container */
.chart-container {
    position: relative;
    height: 400px;
    margin: 2rem 0;
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile-first responsive design */
@media (max-width: 576px) {
    /* Dashboard 2x2 grid for mobile */
    .dashboard-grid .col-md-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 0.25rem !important;
    }
    
    /* Compact summary cards for mobile */
    .summary-card {
        padding: 1rem 0.5rem !important;
        min-height: 140px;
    }
    
    .summary-card .icon {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .summary-card .amount {
        font-size: 1.2rem !important;
        line-height: 1.2;
    }
    
    .summary-card .label {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem;
        line-height: 1.1;
    }
    
    .summary-card .breakdown {
        margin-top: 0.25rem !important;
    }
    
    .summary-card .breakdown small {
        font-size: 0.65rem !important;
        line-height: 1.1;
    }
    
    /* Compact container spacing */
    .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* Mobile table improvements */
    .table-responsive {
        border-radius: 0.375rem;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    }
    
    .table-responsive table {
        margin-bottom: 0;
        min-width: 600px; /* Allow horizontal scroll for detail preservation */
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem !important;
        font-size: 0.8rem !important;
        vertical-align: middle;
    }
    
    /* Mobile table headers - make them stickier */
    .table thead th {
        background-color: var(--bs-primary) !important;
        color: white !important;
        font-weight: 600;
        position: sticky;
        top: 0;
        z-index: 10;
        border: none !important;
    }
    
    /* Better mobile card layouts */
    .card {
        margin-bottom: 0.5rem;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
    }
    
    .card-header {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.9rem !important;
        font-weight: 600;
    }
    
    .card-body {
        padding: 0.75rem !important;
    }
    
    /* Mobile buttons */
    .btn {
        font-size: 0.85rem !important;
        padding: 0.375rem 0.75rem !important;
    }
    
    .btn-sm {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    /* Mobile form controls */
    .form-control,
    .form-select {
        font-size: 0.9rem !important;
        padding: 0.375rem 0.75rem !important;
    }
    
    /* Mobile badges and labels */
    .badge {
        font-size: 0.7rem !important;
    }
}

/* Tablet responsive adjustments */
@media (max-width: 768px) and (min-width: 577px) {
    .summary-card .amount {
        font-size: 1.5rem;
    }
    
    .summary-card .icon {
        font-size: 2rem;
    }
    
    .summary-card {
        padding: 1.5rem 1rem;
    }
}
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Custom scrollbar for better UX */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Receipt specific styles */
.receipt-preview {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    background-color: #f8f9fa;
}

.receipt-thumbnail {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.receipt-thumbnail:hover {
    transform: scale(1.05);
}

.ocr-processing {
    position: relative;
}

.ocr-processing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #007bff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.confidence-high {
    background-color: var(--success-color) !important;
}

.confidence-medium {
    background-color: var(--warning-color) !important;
}

.confidence-low {
    background-color: var(--danger-color) !important;
}

.items-list {
    font-size: 0.9rem;
}

.items-list > div {
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

.items-list > div:last-child {
    border-bottom: none;
}

/* OCR results styling */
.ocr-results-container {
    max-height: 400px;
    overflow-y: auto;
}

.ocr-text-preview {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.extracted-data-table td {
    padding: 0.5rem;
    border-top: 1px solid #dee2e6;
}

.extracted-data-table td:first-child {
    font-weight: 600;
    background-color: #f8f9fa;
    width: 30%;
}

/* Status indicators */
.status-processed {
    background-color: var(--success-color);
}

.status-pending {
    background-color: var(--warning-color);
}

.status-error {
    background-color: var(--danger-color);
}

/* File upload drag and drop styling */
.file-drop-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.file-drop-area:hover,
.file-drop-area.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

.file-drop-area i {
    font-size: 2rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Receipt processing indicators */
.processing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.processing-indicator .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Fix for transaction cards text color */
.card.bg-success h5,
.card.bg-danger h5,
.card.bg-info h5,
.card.bg-warning h5,
.card.bg-primary h5,
.card.bg-secondary h5 {
    color: white !important;
}

.card.bg-success h3,
.card.bg-danger h3,
.card.bg-info h3,
.card.bg-warning h3,
.card.bg-primary h3,
.card.bg-secondary h3 {
    color: white !important;
}

/* Enhanced Mobile Table Responsiveness */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .table {
        font-size: 0.85rem;
        margin-bottom: 0;
    }
    
    .table th {
        font-size: 0.8rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 0.6rem 0.4rem;
        white-space: nowrap;
        background-color: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .table td {
        padding: 0.6rem 0.4rem;
        vertical-align: middle;
        border-top: 1px solid #dee2e6;
    }
    
    /* Improved table column widths for mobile */
    .table th:first-child,
    .table td:first-child {
        min-width: 120px;
    }
    
    .table th:nth-child(2),
    .table td:nth-child(2) {
        min-width: 100px;
    }
    
    .table th:last-child,
    .table td:last-child {
        min-width: 80px;
        text-align: right;
    }
    
    /* Better wrapping for long text in table cells */
    .table td {
        word-wrap: break-word;
        word-break: break-word;
        max-width: 150px;
        overflow-wrap: break-word;
    }
    
    /* Action buttons in tables */
    .table .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        margin: 0.1rem;
    }
    
    /* Table pagination */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 1rem;
    }
    
    .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Mobile Typography and Spacing Optimizations */
@media (max-width: 576px) {
    /* Headings optimization */
    h1 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 0.65rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    h5 {
        font-size: 1rem;
        margin-bottom: 0.4rem;
        line-height: 1.3;
    }
    
    /* Body text optimization */
    body {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Card text optimization */
    .card-body {
        padding: 0.75rem;
    }
    
    .card-text {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }
    
    /* Button optimizations */
    .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        border-radius: 4px;
    }
    
    .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
    
    /* Form control optimizations */
    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
        border-radius: 4px;
    }
    
    .form-label {
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 0.3rem;
    }
    
    /* Alert optimizations */
    .alert {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
        border-radius: 4px;
    }
    
    /* List group optimizations */
    .list-group-item {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    /* Badge optimizations */
    .badge {
        font-size: 0.7rem;
        padding: 0.25em 0.5em;
    }
    
    /* Spacing utilities adjustment */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Reduce excessive spacing */
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .mb-3 {
        margin-bottom: 0.75rem !important;
    }
    
    .mt-4 {
        margin-top: 1rem !important;
    }
    
    .mt-3 {
        margin-top: 0.75rem !important;
    }
    
    /* Progress bar optimizations */
    .progress {
        height: 0.75rem;
        font-size: 0.7rem;
    }
    
    /* Modal optimizations */
    .modal-dialog {
        margin: 1rem 0.5rem;
        max-width: calc(100vw - 1rem);
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 0.75rem;
    }
}

/* Bill Calendar Mobile Responsiveness */
@media (max-width: 576px) {
    /* Calendar grid adjustments for portrait phones */
    .calendar-grid .row {
        margin-bottom: 0.25rem !important;
    }
    
    .calendar-grid .col {
        padding: 0.125rem !important;
        flex: 0 0 14.28% !important;
        max-width: 14.28% !important;
    }
    
    .calendar-day {
        min-height: 60px !important;
        padding: 2px !important;
        font-size: 0.7rem;
    }
    
    .calendar-day.empty {
        min-height: 40px !important;
    }
    
    .day-number {
        font-size: 0.75rem !important;
        font-weight: 600;
        margin-bottom: 1px;
    }
    
    .bill-item {
        font-size: 0.55rem !important;
        line-height: 1 !important;
        padding: 0 1px !important;
        margin-bottom: 0 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .bills-preview {
        max-height: 30px;
        overflow: hidden;
    }
    
    .day-total {
        font-size: 0.6rem !important;
        bottom: 1px !important;
        right: 2px !important;
    }
    
    .more-bills {
        font-size: 0.5rem !important;
        line-height: 1;
    }
    
    /* Calendar header adjustments */
    .calendar-header h4 {
        font-size: 1.1rem !important;
    }
    
    .calendar-header .btn-group .btn {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Days of week header */
    .calendar-grid .row:first-child .col strong {
        font-size: 0.7rem !important;
    }
    
    /* Calendar legend adjustments */
    .calendar-legend {
        font-size: 0.65rem !important;
    }
    
    .calendar-legend .d-flex {
        margin-bottom: 0.15rem !important;
    }
    
    /* Bill calendar specific modal adjustments */
    #dayDetailsModal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }
    
    #dayDetailsModal .bills-list .card {
        margin-bottom: 0.5rem !important;
    }
    
    #dayDetailsModal .card-body {
        padding: 0.5rem !important;
    }
    
    #dayDetailsModal h6 {
        font-size: 0.9rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    #dayDetailsModal h5 {
        font-size: 1rem !important;
    }
    
    #dayDetailsModal .btn-sm {
        padding: 0.2rem 0.4rem !important;
        font-size: 0.7rem !important;
    }
}

/* Landscape phone adjustments for calendar */
@media (max-width: 768px) and (orientation: landscape) {
    .calendar-day {
        min-height: 50px !important;
        padding: 2px !important;
    }
    
    .day-number {
        font-size: 0.8rem !important;
    }
    
    .bill-item {
        font-size: 0.6rem !important;
    }
}

/* Improve text-muted readability - lighter grey closer to white */
.text-muted {
    color: #adb5bd !important; /* Much lighter grey, closer to white */
}

/* Better contrast for small text elements */
.small.text-muted,
small.text-muted {
    color: #ced4da !important; /* Even lighter for small text */
}

/* Landing Page Styles */
.min-vh-75 {
    min-height: 75vh;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6610f2 100%);
}

.bg-purple {
    background-color: #6f42c1;
}

/* Fix text contrast on landing page */
#landing-section .text-muted {
    color: #495057 !important; /* Much darker grey for better readability */
}

#landing-section .lead.text-muted {
    color: #6c757d !important; /* Darker for lead text */
}

#landing-section .bg-light .text-muted {
    color: #495057 !important; /* Ensure dark text on light backgrounds */
}

/* Fix small text readability on landing page */
#landing-section .small.text-muted,
#landing-section small.text-muted {
    color: #6c757d !important; /* Darker for better contrast */
}

/* Fix feature card text readability */
#landing-section .card .text-muted {
    color: #6c757d !important; /* Darker grey for feature descriptions */
}

#landing-section .card .small {
    color: #495057 !important; /* Dark text for small elements */
}

#landing-section .fw-bold.small {
    color: #212529 !important; /* Very dark for bold small text */
}

/* Feature cards hover effect */
#landing-section .card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#landing-section .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* Landing page responsiveness */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    #landing-section .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    #landing-section .rounded-4 {
        border-radius: 1rem !important;
    }
}

/* Navigation styles for auth states */
.auth-required {
    transition: opacity 0.3s ease;
}

/* Hero section animation */
#landing-section .hero-animation {
    animation: fadeInUp 1s ease-out;
}

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

/* Notification click navigation animations */
@keyframes highlightFade {
    0% {
        background-color: rgba(255, 193, 7, 0.3);
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
        transform: scale(1.02);
    }
    50% {
        background-color: rgba(255, 193, 7, 0.2);
        box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
        transform: scale(1.01);
    }
    100% {
        background-color: transparent;
        box-shadow: none;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 10px rgba(13, 110, 253, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.highlight-animation {
    animation: highlightFade 3s ease-in-out;
    position: relative;
    z-index: 10;
}

.pulse-animation {
    animation: pulse 1s ease-in-out 3;
    position: relative;
    z-index: 10;
}

/* Make notification items clickable */
.notification-item {
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Envelope Budgeting Styles */
.envelope-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.envelope-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.envelope-card.allocation-mode {
    border: 2px dashed #007bff;
}

.envelope-card.selected {
    background-color: rgba(0, 123, 255, 0.1);
    border-color: #007bff;
}

.envelope-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.05);
    font-size: 24px;
}

.envelope-amounts {
    font-size: 14px;
}

.allocation-selector {
    border-top: 1px solid #dee2e6;
    padding-top: 10px;
}

.envelope-card .dropdown-toggle::after {
    display: none;
}

.envelope-card .btn-link {
    color: #6c757d;
    text-decoration: none;
    padding: 0.25rem;
}

.envelope-card .btn-link:hover {
    color: #495057;
}

/* Envelope status colors */
.envelope-empty {
    background: linear-gradient(135deg, #fff 0%, #fee5e5 100%);
}

.envelope-low {
    background: linear-gradient(135deg, #fff 0%, #fff3cd 100%);
}

.envelope-medium {
    background: linear-gradient(135deg, #fff 0%, #d1ecf1 100%);
}

.envelope-good {
    background: linear-gradient(135deg, #fff 0%, #d4edda 100%);
}

/* Footer Styling - Ensure footer is always visible */
footer {
    margin-top: 3rem !important;
    position: relative;
    z-index: 1;
    width: 100% !important;
    clear: both;
    height: auto !important; /* Override any inline height styles */
    min-height: 200px !important; /* Force minimum height */
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
    flex-shrink: 0 !important; /* Prevent flex shrinking */
}

footer .container {
    width: 100% !important;
    max-width: none !important;
}

footer * {
    visibility: visible !important;
}

/* Ensure footer is visible on all pages */
#landing-section .min-vh-75 {
    min-height: calc(100vh - 400px) !important; /* Account for navbar and footer */
}