/* ==============================================
   CATEGORY-SPECIFIC ENHANCEMENTS
   ============================================== */
.category-suggestion {
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-suggestion:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.category-suggestion.active {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.category-stats-card {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.category-empty-state {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius-lg);
    padding: 3rem 2rem;
    text-align: center;
}

.category-icon-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-lg);
}

.category-delete-confirm {
    border: 3px solid var(--danger-color);
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, rgba(185, 28, 28, 0.05) 100%);
}

/* Animation for category creation success */
@keyframes categoryCreated {
    0% {
        transform: scale(0.8) rotate(-5deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.05) rotate(2deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.category-created {
    animation: categoryCreated 0.6s ease-out;
}

/* Improved form validation styling */
.is-invalid {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.invalid-feedback {
    color: var(--danger-color);
    font-weight: 500;
    margin-top: 0.5rem;
}

.valid-feedback {
    color: var(--success-color);
    font-weight: 500;
    margin-top: 0.5rem;
}

.is-valid {
    border-color: var(--success-color) !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1) !important;
}

/* Enhanced confirm delete modal */
.confirm-delete-input:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.confirm-delete-match {
    border-color: var(--success-color) !important;
    background-color: rgba(5, 150, 105, 0.05);
}

.confirm-delete-error {
    border-color: var(--danger-color) !important;
    background-color: rgba(220, 38, 38, 0.05);
}

/* ==============================================
   FONTS & GLOBAL STYLES
   ============================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #1e3a5f;
    --primary-hover: #152b47;
    --secondary-color: #4a9b8e;
    --secondary-hover: #3a7d72;
    --success-color: #059669;
    --warning-color: #f59e0b;
    --danger-color: #dc2626;
    --info-color: #4a9b8e;
    --dark-color: #1f2937;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 0.75rem;
    --border-radius-sm: 0.5rem;
    --border-radius-lg: 1rem;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3a5f 0%, #4a9b8e 100%);
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

.main-content {
    padding-top: 80px;
    min-height: 100vh;
}

/* ==============================================
   ENHANCED NAVBAR STYLING
   ============================================== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    border: none;
    padding: 0.5rem 0;
    z-index: 1050 !important;
    transition: all 0.3s ease;
    min-height: auto;
}

.navbar-brand {
    color: white !important;
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.navbar-brand:hover {
    color: #f1f5f9 !important;
    transform: translateY(-1px);
}

/* Logo styling */
.navbar-logo {
    height: 100px !important;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease;
    border-radius: var(--border-radius-sm);
    margin: 0 0.25rem;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-nav .nav-item .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* ==============================================
   GOALS NAV LINK - PRIMARY CTA STYLING
   ============================================== */
.nav-link-goals {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(5, 150, 105, 0.4) 100%) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    color: white !important;
    font-weight: 600 !important;
    position: relative;
    overflow: hidden;
}

.nav-link-goals::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-link-goals:hover::before {
    left: 100%;
}

.nav-link-goals:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.5) 0%, rgba(5, 150, 105, 0.6) 100%) !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.nav-link-goals.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.6) 0%, rgba(5, 150, 105, 0.7) 100%) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Pulse animation for Goals badge */
@keyframes goalsPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

.goals-badge {
    animation: goalsPulse 2s ease-in-out infinite;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    font-size: 0.65rem !important;
    padding: 0.2rem 0.45rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Mobile bottom nav Goals styling */
.mobile-goals-link {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.3) 100%) !important;
    border-radius: 12px !important;
    margin: 0 2px;
}

.mobile-goals-link.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.4) 0%, rgba(5, 150, 105, 0.5) 100%) !important;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Enhanced dropdown styling */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    color: var(--gray-700) !important;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    border-radius: var(--border-radius-sm);
    margin: 0 0.25rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white !important;
    transform: translateX(2px);
}

.dropdown-item:focus {
    background-color: var(--primary-color);
    color: white !important;
    outline: 2px solid var(--primary-hover);
    outline-offset: -2px;
}

/* Special styling for advanced analytics item in dropdown */
.dropdown-item.advanced-feature {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 1px solid rgba(79, 70, 229, 0.2);
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
}

.dropdown-item.advanced-feature:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-color: var(--primary-hover);
    transform: translateX(4px);
}

.dropdown-item.advanced-feature strong {
    display: block;
    margin-bottom: 0.125rem;
}

.dropdown-item.advanced-feature small {
    font-size: 0.75rem;
    opacity: 0.8;
}

.dropdown-item.advanced-feature:hover small,
.dropdown-item.advanced-feature:hover strong {
    color: white !important;
}

/* ==============================================
   FOOTER STYLING
   ============================================== */
.footer {
    margin-top: auto;
    padding: 2rem 0 1rem;
}

.footer .card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer small {
    color: rgba(255, 255, 255, 0.9);
}

/* ==============================================
   LOADING OVERLAY
   ============================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================== */
.visually-hidden-focusable:focus {
    position: absolute !important;
    width: auto !important;
    height: auto !important;
    padding: 0.5rem 1rem !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: nowrap !important;
    border-radius: var(--border-radius) !important;
    background: var(--primary-color) !important;
    color: white !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    box-shadow: var(--shadow-lg) !important;
}

/* Focus indicators */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus,
.dropdown-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .navbar {
        background: #000 !important;
    }
    
    .navbar-nav .nav-link {
        color: #fff !important;
        border: 1px solid #fff;
    }
    
    .btn {
        border: 2px solid currentColor !important;
    }
    
    .card {
        border: 2px solid var(--gray-800) !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hover-lift:hover {
        transform: none;
    }
    
    .navbar-nav .nav-link:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* ==============================================
   CONTAINER & LAYOUT
   ============================================== */
.container,
.container-fluid {
    padding-top: 0;
    padding-bottom: 0;
}

/* ==============================================
   CARD STYLING
   ============================================== */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

.card-header h5,
.card-header h6 {
    margin: 0;
    color: var(--gray-800);
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--gray-800);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ==============================================
   BUTTON STYLING
   ============================================== */
.btn {
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--gray-600) 0%, var(--gray-700) 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-800) 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--secondary-hover) 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--secondary-hover) 0%, var(--success-color) 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #0284c7 100%);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #0284c7 0%, var(--info-color) 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #ea580c 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ea580c 0%, var(--warning-color) 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #b91c1c 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, var(--danger-color) 100%);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid var(--gray-500);
    color: var(--gray-700);
}

.btn-outline-secondary:hover {
    background: var(--gray-500);
    color: white;
}

.btn-outline-info {
    background: transparent;
    border: 2px solid var(--info-color);
    color: var(--info-color);
}

.btn-outline-info:hover {
    background: var(--info-color);
    color: white;
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

/* ==============================================
   ENHANCED TABLE STYLING
   ============================================== */
.table {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.table thead th {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-bottom: 2px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-800);
    padding: 1rem;
    border-top: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(79, 70, 229, 0.05);
    transform: scale(1.01);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Enhanced sortable headers */
.sortable-header a {
    position: relative;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

.sortable-header a:hover {
    background-color: rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.sortable-header a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Transaction row enhancements */
.transaction-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.transaction-row:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
    background-color: rgba(79, 70, 229, 0.05);
}

.transaction-row:hover .btn-group {
    opacity: 1;
    transform: translateX(0);
}

.transaction-row .btn-group {
    opacity: 0.7;
    transform: translateX(-5px);
    transition: all 0.2s ease;
}

/* Amount display styling */
.amount-display {
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid transparent;
}

.amount-display.text-success {
    background: rgba(5, 150, 105, 0.1);
    border-color: rgba(5, 150, 105, 0.2);
}

.amount-display.text-danger {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.2);
}

/* Category badge enhancements */
.category-badge {
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    cursor: default;
}

.category-badge:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

/* Responsive table enhancements */
@media (max-width: 768px) {
    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
    }

    .table-responsive thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .table-responsive tr {
        border: 1px solid var(--gray-200);
        border-radius: var(--border-radius);
        margin-bottom: 1rem;
        padding: 1rem;
        background: white;
        box-shadow: var(--shadow-sm);
    }

    .table-responsive td {
        border: none;
        padding: 0.75rem 0 !important;
        position: relative;
        padding-left: 45% !important;
        text-align: left !important;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .table-responsive td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 40%;
        text-align: left;
        font-weight: 600;
        color: var(--gray-700);
        padding-right: 1rem;
    }

    .table-responsive td:first-child {
        border-top: none;
        padding-top: 0 !important;
    }

    .table-responsive td:last-child {
        padding-bottom: 0 !important;
    }

    .transaction-row:hover {
        transform: none;
    }

    .transaction-row .btn-group {
        opacity: 1;
        transform: none;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }

    .transaction-row .btn-group .btn {
        flex: 0 0 auto;
        width: auto;
        margin-bottom: 0;
    }

    .amount-display {
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    /* Make category badges larger on mobile */
    .category-badge {
        font-size: 0.85rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Responsive table for tablet */
@media (min-width: 769px) and (max-width: 991.98px) {
    .table {
        font-size: 0.9rem;
    }
    
    .table td,
    .table th {
        padding: 0.75rem 0.5rem;
    }
    
    .amount-display {
        font-size: 0.95rem;
    }
}

/* Column toggle functionality */
.column-toggle-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    min-width: 200px;
    z-index: 1000;
}

.column-toggle-menu .form-check {
    margin-bottom: 0.5rem;
}

/* Enhanced loading states */
.table-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.table-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    z-index: 999;
}

/* Table action buttons */
.table .btn-group .btn {
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.table .btn-group .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.table .btn-group .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.table .btn-group .btn:not(:first-child):not(:last-child) {
    border-radius: 0;
}

/* Enhanced pagination */
.pagination {
    gap: 0.25rem;
}

.pagination .page-link {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.pagination .page-item.disabled .page-link {
    color: var(--gray-400);
    background-color: var(--gray-100);
    border-color: var(--gray-200);
}

/* Table summary and count display */
.table-summary {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    padding: 1rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 500;
    color: var(--gray-700);
}

/* Empty state styling */
.table-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-500);
}

.table-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Quick actions toolbar */
.table-toolbar {
    background: var(--gray-50);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-toolbar .btn-group {
    flex-shrink: 0;
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .table thead th {
        background: #000;
        color: #fff;
        border-color: #fff;
    }
    
    .table tbody td {
        border-color: #000;
    }
    
    .table-hover tbody tr:hover {
        background-color: #333;
        color: #fff;
    }
    
    .category-badge {
        border: 2px solid currentColor;
    }
}

/* ==============================================
   ENHANCED FORM STYLING
   ============================================== */
.form-control,
.form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
    background: white;
}

.form-control.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border-width: 2px;
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.form-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Enhanced validation styling */
.form-control.is-valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94-.94-.94L1.36 6.1l-.94.94.94.94z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 5.8 4.4 4.4m0-4.4-4.4 4.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--success-color);
    font-weight: 500;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--danger-color);
    font-weight: 500;
}

/* Enhanced input groups */
.input-group .form-control {
    border-right: none;
}

.input-group .form-control:focus {
    z-index: 3;
    border-right: 2px solid var(--primary-color);
}

.input-group-text {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-left: none;
    color: var(--gray-600);
    font-weight: 500;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
    color: var(--primary-color);
}

/* Breadcrumb styling */
.breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.breadcrumb-item {
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--gray-500);
    font-weight: 600;
}

.breadcrumb-item.active {
    color: var(--gray-700);
    font-weight: 600;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-hover);
}

/* Required field indicator */
.required-field::after {
    content: " *";
    color: var(--danger-color);
    font-weight: 600;
}

/* Enhanced fieldset styling */
fieldset {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--gray-50);
}

fieldset legend {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    padding: 0 0.5rem;
    font-size: 0.9rem;
}

/* Enhanced select styling */
.form-select {
    background-image: none;
    padding-right: 2.5rem;
}

.form-select:focus {
    background-image: none;
}

/* Enhanced checkbox and radio styling */
.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.125em;
    border: 2px solid var(--gray-300);
    border-radius: 0.25em;
    background-color: #fff;
    transition: all 0.15s ease-in-out;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

.form-check-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-left: 0.5rem;
}

/* Enhanced switch styling */
.form-switch .form-check-input {
    width: 2.5em;
    border-radius: 2em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%2855, 65, 81, 0.75%29'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* Form floating labels */
.form-floating > label {
    color: var(--gray-600);
    font-weight: 500;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Error summary styling */
.validation-summary-errors {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(185, 28, 28, 0.1) 100%);
    border: 1px solid var(--danger-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.validation-summary-errors ul {
    margin-bottom: 0;
    list-style: none;
    padding-left: 0;
}

.validation-summary-errors li {
    color: var(--danger-color);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.validation-summary-errors li::before {
    content: "⚠ ";
    margin-right: 0.5rem;
}

/* ==============================================
   BADGE STYLING
   ============================================== */
.badge {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%) !important;
}

.bg-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--secondary-hover) 100%) !important;
}

.bg-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #ea580c 100%) !important;
}

.bg-secondary {
    background: linear-gradient(135deg, var(--gray-500) 0%, var(--gray-600) 100%) !important;
}

/* ==============================================
   PROGRESS BAR STYLING
   ============================================== */
.progress {
    border-radius: var(--border-radius);
    background-color: var(--gray-200);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--border-radius);
    transition: all 0.6s ease;
}

.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

/* ==============================================
   ALERT STYLING
   ============================================== */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
}

.alert-success {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-left: 4px solid var(--success-color);
    color: var(--success-color);
}

.alert-info {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(2, 132, 199, 0.1) 100%);
    border-left: 4px solid var(--info-color);
    color: var(--info-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(234, 88, 12, 0.1) 100%);
    border-left: 4px solid var(--warning-color);
    color: #b45309;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(185, 28, 28, 0.1) 100%);
    border-left: 4px solid var(--danger-color);
    color: var(--danger-color);
}

/* ==============================================
   ENHANCED TYPOGRAPHY & DESIGN SYSTEM
   ============================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(1.5rem, 3vw, 1.75rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    margin-bottom: 0.75rem;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 1rem;
}

h4 {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
}

h5 {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

h6 {
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    font-weight: 600;
}

.display-4 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1.2;
}

.display-4.text-white {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: white;
    background-clip: initial;
    color: white;
}

/* Enhanced text utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lead {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    font-weight: 400;
    line-height: 1.6;
    color: var(--gray-600);
}

/* Enhanced spacing system */
.section-padding {
    padding: 0;
}

.card-spacing {
    margin-bottom: clamp(1rem, 3vw, 2rem);
}

/* Improved component spacing */
.btn + .btn {
    margin-left: 0.5rem;
}

.btn-group .btn + .btn {
    margin-left: 0;
}

.d-flex.gap-2 > * + * {
    margin-left: 0.5rem;
}

.d-flex.gap-3 > * + * {
    margin-left: 1rem;
}

/* Enhanced color system */
.text-primary-soft {
    color: rgba(79, 70, 229, 0.8);
}

.text-secondary-soft {
    color: rgba(16, 185, 129, 0.8);
}

.bg-primary-soft {
    background-color: rgba(79, 70, 229, 0.1);
}

.bg-secondary-soft {
    background-color: rgba(16, 185, 129, 0.1);
}

.border-primary-soft {
    border-color: rgba(79, 70, 229, 0.3);
}

.border-secondary-soft {
    border-color: rgba(16, 185, 129, 0.3);
}

/* Enhanced shadows */
.shadow-soft {
    box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
}

.shadow-medium {
    box-shadow: 0 4px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-strong {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15), 0 2px 10px 0 rgba(0, 0, 0, 0.1);
}

/* Enhanced animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

.scale-in {
    animation: scaleIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Enhanced focus management */
.focus-ring:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}

.focus-ring-inset:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

/* Enhanced list styling */
.list-enhanced {
    list-style: none;
    padding: 0;
}

.list-enhanced li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.list-enhanced li:last-child {
    border-bottom: none;
}

.list-enhanced li::before {
    content: "→";
    color: var(--primary-color);
    font-weight: 600;
    flex-shrink: 0;
}

/* Enhanced status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.status-indicator.success {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.status-indicator.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-indicator.error {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.status-indicator.info {
    background: rgba(14, 165, 233, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(14, 165, 233, 0.2);
}

/* Enhanced content sections */
.content-section {
    padding: clamp(1.5rem, 4vw, 3rem);
    margin-bottom: clamp(1rem, 3vw, 2rem);
}

.content-section-sm {
    padding: clamp(1rem, 2vw, 1.5rem);
}

.content-section-lg {
    padding: clamp(2rem, 6vw, 4rem);
}

/* Enhanced grid system */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.grid-auto-fill {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Enhanced aspect ratios */
.aspect-ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.aspect-ratio-1-1 {
    aspect-ratio: 1 / 1;
}

/* Enhanced text truncation */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==============================================
   MODAL STYLING
   ============================================== */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
}

.modal-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-bottom: 1px solid var(--gray-200);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* ==============================================
   UTILITY CLASSES
   ============================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* Enhanced spacing utilities */
.pt-navbar {
    padding-top: 120px !important; /* Extra spacing for pages with headers */
}

.mt-navbar {
    margin-top: 100px !important; /* Margin equivalent to navbar height */
}

.alert-container {
    position: relative;
    z-index: 999;
    margin-top: 90px;
    margin-bottom: -90px; /* Compensate for the extra margin */
}

/* Page header enhancement */
.page-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.page-header h1,
.page-header h2 {
    margin-bottom: 0.5rem;
    color: white !important;
}

.page-header .breadcrumb {
    margin-bottom: 0;
    background: transparent;
    border: none;
    padding: 0;
}

/* ==============================================
   RESPONSIVE DESIGN - MOBILE FIRST APPROACH
   ============================================== */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .main-content {
        padding-top: 85px;
    }
    
    .navbar {
        padding: 0.5rem 0;
        min-height: 60px;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-brand i {
        font-size: 1rem;
    }
    
    .navbar-collapse {
        margin-top: 0.5rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: var(--border-radius);
        padding: 0.5rem;
    }
    
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 0.875rem;
    }
    
    .card-header {
        padding: 0.875rem;
    }
    
    .card-title, .card-header h5 {
        font-size: 1rem;
    }
    
    /* Button adjustments */
    .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
    
    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: var(--border-radius-sm) !important;
        margin-bottom: 0.25rem;
        width: 100%;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    h2 {
        font-size: 1.35rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    h5, h6 {
        font-size: 1rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Icon sizing */
    .fa-2x {
        font-size: 1.5em !important;
    }
    
    .fa-3x {
        font-size: 2em !important;
    }
    
    .fa-4x {
        font-size: 2.25em !important;
    }
    
    .fa-5x {
        font-size: 2.75em !important;
    }
    
    /* Layout adjustments */
    .d-flex.gap-2,
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .d-flex.justify-content-between,
    .d-flex.justify-content-end {
        flex-direction: column;
        align-items: stretch !important;
    }
    
    .d-flex.justify-content-between > *,
    .d-flex.justify-content-end > * {
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    .d-flex.justify-content-between > *:last-child,
    .d-flex.justify-content-end > *:last-child {
        margin-bottom: 0;
    }
    
    /* Grid adjustments */
    .row.g-3,
    .row.g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
    
    /* Form adjustments */
    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.625rem 0.875rem;
    }
    
    .form-label {
        font-size: 0.875rem;
    }
    
    .input-group {
        flex-wrap: nowrap;
    }
    
    .input-group .btn {
        white-space: nowrap;
        font-size: 0.8rem;
        padding: 0.625rem 0.75rem;
        width: auto;
    }
    
    /* Table adjustments */
    .table {
        font-size: 0.8rem;
    }
    
    .table td,
    .table th {
        padding: 0.5rem 0.25rem;
    }
    
    .badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.4rem;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    /* Alert adjustments */
    .alert {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Stat cards on dashboard */
    .col-md-3,
    .col-md-4,
    .col-md-6 {
        margin-bottom: 0.75rem;
    }
    
    /* Hide mobile-unfriendly elements */
    .d-none-mobile {
        display: none !important;
    }
    
    /* Stack action buttons */
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

/* Small Devices (landscape phones, 576px to 767.98px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .main-content {
        padding-top: 90px;
    }
    
    .navbar {
        min-height: 65px;
    }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 1.25rem;
    }
    
    .card-body {
        padding: 1.125rem;
    }
    
    .btn {
        padding: 0.625rem 1.125rem;
        font-size: 0.9rem;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        flex: 1 1 auto;
        min-width: 0;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .display-4 {
        font-size: 2.25rem;
    }
    
    /* Two-column layout for stats */
    .col-md-3 {
        flex: 0 0 auto;
        width: 50%;
    }
}

/* Medium Devices (tablets, 768px to 991.98px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .main-content {
        padding-top: 95px;
    }
    
    .container-fluid {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        padding-top: 1.5rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.925rem;
    }
    
    .table-responsive {
        border-radius: var(--border-radius);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    /* Optimize navbar dropdowns */
    .navbar-nav .dropdown-menu {
        position: absolute;
    }
}

/* Large Devices (desktops, 992px to 1199.98px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .card:hover {
        transform: translateY(-2px);
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container-fluid {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* XXL Devices (extra large desktops, 1400px and up) */
@media (min-width: 1400px) {
    .container-fluid {
        max-width: 1600px;
    }
    
    .card {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .card:hover {
        transform: translateY(-4px);
    }
}

/* Responsive utilities for specific elements */
@media (max-width: 991.98px) {
    /* Stack navbar items */
    .navbar-nav {
        padding: 0.5rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.625rem 1rem !important;
    }
    
    .navbar-collapse {
        max-height: 70vh;
        overflow-y: auto;
    }
    
    /* Responsive tables - stack on mobile/tablet */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
    }
    
    .table td,
    .table th {
        padding: 0.75rem 0.5rem;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 991.98px) and (orientation: landscape) {
    .main-content {
        padding-top: 75px;
    }
    
    .navbar {
        min-height: 55px;
    }
    
    .modal-dialog {
        max-height: 90vh;
    }
    
    .modal-body {
        max-height: calc(90vh - 150px);
        overflow-y: auto;
    }
}

/* ==============================================
   LANDSCAPE TABLET ADJUSTMENTS
   ============================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .card-body {
        padding: 1.25rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
    }
    
    .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ==============================================
   LARGE SCREEN OPTIMIZATIONS
   ============================================== */
@media (min-width: 1400px) {
    .container-fluid {
        max-width: 1320px;
        margin: 0 auto;
    }
    
    .card {
        transition: all 0.3s ease;
    }
    
    .card:hover {
        transform: translateY(-2px);
    }
}

/* ==============================================
   WELCOME MODAL & ONBOARDING STYLING
   ============================================== */
/* Welcome Modal Enhancements */
.modal-lg {
    max-width: 900px;
}

.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.modal-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    padding: 2rem 2.5rem;
    border-bottom: none;
}

.modal-header h3 {
    color: white !important;
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header h3 i {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body .lead {
    font-size: 1.125rem;
    color: var(--gray-700);
    line-height: 1.6;
}

/* Welcome step cards */
.modal-body .rounded-circle {
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.modal-body .col-md-4:hover .rounded-circle {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-lg);
}

.modal-body h5 {
    color: var(--gray-800);
    font-weight: 700;
    margin-top: 1rem;
}

.modal-body .text-muted.small {
    font-size: 0.9rem;
    line-height: 1.5;
}

.modal-footer.bg-light {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%) !important;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
}

.modal-footer .btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.modal-footer .btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.modal-footer .btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--secondary-hover) 100%);
}

.modal-footer .btn-success:hover {
    background: linear-gradient(135deg, var(--secondary-hover) 0%, var(--success-color) 100%);
}

/* Empty State Styling */
.empty-state-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.empty-state-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.empty-state-card:hover::before {
    transform: translateX(100%);
}

.empty-state-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: currentColor;
}

.empty-state-card.border-primary:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(79, 70, 229, 0.02) 100%);
}

.empty-state-card.border-success:hover {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.05) 0%, rgba(5, 150, 105, 0.02) 100%);
}

.empty-state-card.border-info:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(14, 165, 233, 0.02) 100%);
}

.empty-state-card i.fa-2x {
    transition: all 0.4s ease;
}

.empty-state-card:hover i.fa-2x {
    transform: scale(1.2) rotate(5deg);
}

.empty-state-card h5 {
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.empty-state-card .card-text {
    font-size: 0.9rem;
    color: var(--gray-600);
    min-height: 3rem;
}

.empty-state-card .btn-sm {
    margin-top: 0.75rem;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    border-width: 2px;
    transition: all 0.3s ease;
}

.empty-state-card:hover .btn-sm {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Enhanced Empty State Container */
.text-center.py-5 {
    padding: 3rem 1.5rem !important;
}

.text-center.py-5 h4 {
    color: var(--gray-800);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.text-center.py-5 .text-muted {
    font-size: 1.05rem;
    color: var(--gray-600) !important;
    margin-bottom: 2rem;
}

.text-center.py-5 .row.g-3 {
    margin-top: 1.5rem;
}

/* Quick Actions Styling */
.card.h-100.slide-in-left .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
}

.card.h-100.slide-in-left .card-header h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.card.h-100.slide-in-left .card-header i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.card.h-100.slide-in-left .d-grid.gap-3 .btn {
    text-align: left;
    padding: 1rem 1.25rem;
    font-weight: 600;
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
}

.card.h-100.slide-in-left .d-grid.gap-3 .btn:hover {
    transform: translateX(8px);
    border-color: currentColor;
    box-shadow: var(--shadow-md);
}

.card.h-100.slide-in-left .d-grid.gap-3 .btn i {
    transition: all 0.3s ease;
}

.card.h-100.slide-in-left .d-grid.gap-3 .btn:hover i {
    transform: scale(1.2);
}

/* Tooltip Enhancements */
.tooltip {
    font-family: 'Inter', sans-serif;
}

.tooltip-inner {
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 300px;
}

.tooltip.show {
    opacity: 1;
}

.tooltip .tooltip-arrow::before {
    border-top-color: var(--gray-800);
    border-bottom-color: var(--gray-800);
    border-left-color: var(--gray-800);
    border-right-color: var(--gray-800);
}

/* Stats Card Enhancements */
.card.hover-lift.fade-in {
    position: relative;
    overflow: hidden;
}

.card.hover-lift.fade-in::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card.hover-lift.fade-in:hover::after {
    opacity: 1;
}

.card.hover-lift.fade-in h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card.hover-lift.fade-in .text-muted {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card.hover-lift.fade-in .btn-sm {
    margin-top: 0.75rem;
    font-weight: 600;
    border-width: 2px;
}

/* Budget Empty State */
.card.border-0.shadow-sm .card-body.text-center.py-5 {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.03) 0%, rgba(16, 185, 129, 0.03) 100%);
    border-radius: var(--border-radius);
}

.card.border-0.shadow-sm .card-body.text-center.py-5 i.fa-4x {
    color: var(--primary-color);
    opacity: 0.6;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(79, 70, 229, 0.2));
}

.card.border-0.shadow-sm .card-body.text-center.py-5 h4 {
    color: var(--gray-700);
    font-weight: 700;
}

.card.border-0.shadow-sm .card-body.text-center.py-5 p {
    font-size: 1.05rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.card.border-0.shadow-sm .card-body.text-center.py-5 .btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.card.border-0.shadow-sm .card-body.text-center.py-5 .btn-lg:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Animated Icons */
@keyframes bounce-gentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(79, 70, 229, 0); }
}

.empty-state-card:hover i {
    animation: bounce-gentle 1s ease-in-out infinite;
}

.modal-header h3 i {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Mobile Responsiveness for Onboarding */
@media (max-width: 768px) {
    .modal-lg {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .modal-header {
        padding: 1.5rem 1rem !important;
    }
    
    .modal-header h3 {
        font-size: 1.25rem !important;
    }
    
    .modal-body {
        padding: 1.5rem 1rem !important;
    }
    
    .modal-body .col-md-4 {
        margin-bottom: 1.5rem;
    }
    
    .modal-body .rounded-circle {
        width: 60px !important;
        height: 60px !important;
    }
    
    .modal-body .rounded-circle i {
        font-size: 1.5rem !important;
    }
    
    .modal-footer {
        padding: 1rem !important;
    }
    
    .modal-footer .btn-lg {
        font-size: 1rem !important;
        padding: 0.75rem 1.5rem !important;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .modal-footer .d-grid.gap-2.d-md-flex {
        flex-direction: column !important;
    }
    
    .empty-state-card {
        margin-bottom: 1rem;
    }
    
    .text-center.py-5 {
        padding: 2rem 1rem !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .modal,
    .tooltip {
        display: none !important;
    }
    
    .main-content {
        padding-top: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
    }
}

/* ==============================================
   RESPONSIVE UTILITY CLASSES
   ============================================== */

/* Display utilities for different screen sizes */
.show-mobile {
    display: none !important;
}

@media (max-width: 767.98px) {
    .show-mobile {
        display: block !important;
    }
    
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile-flex {
        display: flex !important;
    }
    
    .show-mobile-inline {
        display: inline !important;
    }
}

.show-tablet {
    display: none !important;
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .show-tablet {
        display: block !important;
    }
    
    .hide-tablet {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .show-desktop {
        display: block !important;
    }
    
    .hide-desktop {
        display: none !important;
    }
}

/* Responsive text alignment */
@media (max-width: 767.98px) {
    .text-mobile-center {
        text-align: center !important;
    }
    
    .text-mobile-left {
        text-align: left !important;
    }
    
    .text-mobile-right {
        text-align: right !important;
    }
}

/* Responsive spacing utilities */
@media (max-width: 767.98px) {
    .px-mobile-0 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .py-mobile-2 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    .mb-mobile-2 {
        margin-bottom: 0.5rem !important;
    }
    
    .mt-mobile-2 {
        margin-top: 0.5rem !important;
    }
}

/* Responsive grid utilities */
@media (max-width: 767.98px) {
    .row-cols-mobile-1 > * {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .row-cols-mobile-2 > * {
        flex: 0 0 auto;
        width: 50%;
    }
}

/* Responsive flexbox utilities */
@media (max-width: 767.98px) {
    .flex-mobile-column {
        flex-direction: column !important;
    }
    
    .flex-mobile-row {
        flex-direction: row !important;
    }
    
    .justify-content-mobile-center {
        justify-content: center !important;
    }
    
    .align-items-mobile-stretch {
        align-items: stretch !important;
    }
}

/* Responsive width utilities */
@media (max-width: 767.98px) {
    .w-mobile-100 {
        width: 100% !important;
    }
    
    .w-mobile-auto {
        width: auto !important;
    }
}

/* Responsive font sizes */
.fs-responsive-1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

.fs-responsive-2 {
    font-size: clamp(1.25rem, 3vw, 2rem);
}

.fs-responsive-3 {
    font-size: clamp(1.125rem, 2.5vw, 1.75rem);
}

.fs-responsive-4 {
    font-size: clamp(1rem, 2vw, 1.5rem);
}

/* Container max-width utilities */
.container-narrow {
    max-width: 800px;
    margin: 0 auto;
}

.container-medium {
    max-width: 1200px;
    margin: 0 auto;
}

.container-wide {
    max-width: 1600px;
    margin: 0 auto;
}

/* Responsive card columns */
.card-columns-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 575.98px) {
    .card-columns-responsive {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Responsive overflow handling */
.overflow-x-mobile-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .overflow-x-mobile-auto {
        overflow-x: visible;
    }
}

/* Sticky elements for mobile */
@media (max-width: 767.98px) {
    .sticky-mobile-top {
        position: sticky;
        top: 85px;
        z-index: 100;
        background: white;
        box-shadow: var(--shadow-sm);
    }
}

/* Enhanced touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    .touch-target {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Responsive image utilities */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-mobile-full {
    width: 100%;
}

@media (min-width: 768px) {
    .img-mobile-full {
        width: auto;
    }
}

/* Responsive aspect ratio utilities */
.aspect-ratio-responsive {
    position: relative;
    width: 100%;
}

.aspect-ratio-responsive::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.aspect-ratio-responsive > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive spacing scale */
@media (max-width: 575.98px) {
    .section-padding {
        padding: 1.5rem 0;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .section-padding {
        padding: 2rem 0;
    }
}

/* Gap utilities for different screen sizes */
@media (max-width: 767.98px) {
    .gap-mobile-1 {
        gap: 0.25rem !important;
    }
    
    .gap-mobile-2 {
        gap: 0.5rem !important;
    }
    
    .gap-mobile-3 {
        gap: 1rem !important;
    }
}

/* ==============================================
   MOBILE UX ENHANCEMENTS - DRAMATICALLY IMPROVED
   ============================================== */

/* Mobile-optimized logo and navbar */
@media (max-width: 991.98px) {
    .navbar-logo.mobile-logo {
        height: 50px !important;
        width: auto !important;
    }
    
    .navbar-brand-text .brand-freedom,
    .navbar-brand-text .brand-ledger {
        font-size: 1rem !important;
        font-weight: bold;
        line-height: 1.2;
    }
    
    .navbar-brand-text .brand-freedom {
        color: #0d6efd;
    }
    
    .navbar-brand-text .brand-ledger {
        color: #198754;
    }
    
    .navbar {
        min-height: 60px !important;
        padding: 0.5rem 1rem;
    }
    
    .main-content {
        padding-top: 70px !important;
        padding-bottom: 80px; /* Space for bottom nav */
    }
    
    /* Hamburger menu styling */
    .navbar-toggler {
        padding: 0.5rem 0.75rem;
        font-size: 1.5rem;
        border: 2px solid rgba(255, 255, 255, 0.5);
        border-radius: 0.5rem;
        min-width: 44px;
        min-height: 44px;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    
    /* Mobile navigation menu */
    .navbar-collapse {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        padding: 1rem;
        margin: 0.5rem -1rem -0.5rem;
        border-radius: 0 0 1rem 1rem;
        box-shadow: var(--shadow-lg);
    }
    
    .navbar-nav .nav-link {
        padding: 1rem !important;
        margin: 0.25rem 0;
        border-radius: 0.5rem;
        font-size: 1.1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        transition: all 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(5px);
    }
    
    .navbar-nav .nav-link.active {
        background: rgba(255, 255, 255, 0.3);
        font-weight: bold;
    }
    
    .navbar-nav .dropdown-menu {
        background: rgba(255, 255, 255, 0.95);
        border: none;
        border-radius: 0.75rem;
        margin: 0.5rem 0;
        padding: 0.5rem;
        box-shadow: var(--shadow-md);
    }
    
    .navbar-nav .dropdown-item {
        padding: 0.875rem 1rem;
        border-radius: 0.5rem;
        margin: 0.25rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
        font-size: 1rem;
    }
    
    .navbar-nav .dropdown-item:hover {
        background: var(--primary-color);
        color: white !important;
    }
}

/* Bottom Navigation Bar for Mobile */
@media (max-width: 991.98px) {
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
        z-index: 1030;
        padding: 0.5rem 0;
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    .mobile-bottom-nav .nav-item {
        flex: 1;
        text-align: center;
    }
    
    .mobile-bottom-nav .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.5rem;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        font-size: 0.75rem;
        min-height: 44px;
        min-width: 44px;
        transition: all 0.3s ease;
    }
    
    .mobile-bottom-nav .nav-link i {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .mobile-bottom-nav .nav-link.active {
        color: white;
        font-weight: bold;
    }
    
    .mobile-bottom-nav .nav-link:hover,
    .mobile-bottom-nav .nav-link:focus {
        color: white;
        transform: translateY(-3px);
    }
    
    /* FAB (Floating Action Button) for Add */
    .mobile-bottom-nav .fab {
        background: white;
        color: var(--primary-color);
        border-radius: 50%;
        width: 56px;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        margin-top: -28px;
        border: 4px solid var(--primary-color);
    }
    
    .mobile-bottom-nav .fab i {
        font-size: 2rem;
        margin-bottom: 0;
    }
    
    .mobile-bottom-nav .fab:hover,
    .mobile-bottom-nav .fab:focus {
        transform: scale(1.1) rotate(90deg);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    }
}

/* Hide bottom nav on desktop */
@media (min-width: 992px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* Touch-friendly buttons and controls */
@media (max-width: 991.98px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
    
    .btn-sm {
        min-height: 38px;
        min-width: 38px;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        min-height: 52px;
        padding: 1rem 1.5rem;
        font-size: 1.125rem;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem 1rem;
    }
    
    .form-label {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    /* Larger checkboxes and radio buttons */
    .form-check-input {
        width: 1.5rem;
        height: 1.5rem;
        margin-top: 0.15rem;
    }
    
    .form-check-label {
        font-size: 1rem;
        padding-left: 0.5rem;
    }
}

/* Card-based layout for mobile tables */
@media (max-width: 767.98px) {
    .table-responsive {
        border: none;
    }
    
    /* Hide table on mobile, use cards instead */
    .table.mobile-cards {
        display: none;
    }
    
    /* Transaction cards for mobile */
    .transaction-card-mobile {
        background: white;
        border-radius: 1rem;
        padding: 1.25rem;
        margin-bottom: 1rem;
        box-shadow: var(--shadow-md);
        border-left: 4px solid var(--primary-color);
        transition: all 0.3s ease;
        min-height: 44px;
    }
    
    .transaction-card-mobile:active {
        transform: scale(0.98);
        box-shadow: var(--shadow-sm);
    }
    
    .transaction-card-mobile .card-header-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.75rem;
    }
    
    .transaction-card-mobile .date {
        font-size: 0.875rem;
        color: var(--gray-600);
        font-weight: 500;
    }
    
    .transaction-card-mobile .amount {
        font-size: 1.5rem;
        font-weight: bold;
    }
    
    .transaction-card-mobile .amount.positive {
        color: var(--success-color);
    }
    
    .transaction-card-mobile .amount.negative {
        color: var(--danger-color);
    }
    
    .transaction-card-mobile .description {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: var(--gray-800);
    }
    
    .transaction-card-mobile .category {
        display: inline-block;
        margin-bottom: 0.75rem;
    }
    
    .transaction-card-mobile .actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .transaction-card-mobile .actions .btn {
        flex: 1;
        min-width: 80px;
    }
    
    /* Swipe gestures indicator */
    .swipeable {
        position: relative;
        overflow: hidden;
    }
    
    .swipeable::before {
        content: "← Swipe for actions";
        position: absolute;
        top: 50%;
        right: 1rem;
        transform: translateY(-50%);
        color: var(--gray-400);
        font-size: 0.75rem;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .swipeable.show-hint::before {
        opacity: 1;
    }
}

/* Modal improvements for mobile */
@media (max-width: 767.98px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-fullscreen-sm-down {
        width: 100vw;
        max-width: none;
        height: 100vh;
        margin: 0;
    }
    
    .modal-fullscreen-sm-down .modal-content {
        height: 100vh;
        border: none;
        border-radius: 0;
    }
    
    .modal-header {
        padding: 1.25rem;
        border-bottom: 2px solid var(--gray-200);
    }
    
    .modal-title {
        font-size: 1.25rem;
        font-weight: bold;
    }
    
    .modal-body {
        padding: 1.25rem;
        font-size: 1rem;
    }
    
    .modal-footer {
        padding: 1.25rem;
        border-top: 2px solid var(--gray-200);
    }
    
    .modal-footer .btn {
        flex: 1;
    }
}

/* Pull-to-refresh indicator */
.pull-to-refresh-indicator {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 1rem 2rem;
    border-radius: 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 1020;
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.pull-to-refresh-indicator.active {
    display: flex;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Optimized spacing for mobile */
@media (max-width: 767.98px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1, .h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    h3, .h3 {
        font-size: 1.25rem;
    }
    
    h4, .h4 {
        font-size: 1.125rem;
    }
    
    h5, .h5 {
        font-size: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
        border-radius: 1rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .card-header {
        padding: 1rem 1.25rem;
        font-size: 1.125rem;
    }
    
    /* Stack action buttons vertically */
    .d-flex.gap-2 {
        flex-direction: column !important;
    }
    
    .d-flex.gap-2 .btn {
        width: 100%;
    }
    
    /* Full width utilities */
    .w-mobile-100 {
        width: 100% !important;
    }
    
    .flex-mobile-column {
        flex-direction: column !important;
    }
    
    /* Larger tap targets for links */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    
    /* Better spacing for stat cards */
    .row-cols-1 > * {
        margin-bottom: 1rem;
    }
}

/* Responsive font sizing */
@media (max-width: 575.98px) {
    .fs-responsive-1 {
        font-size: 1.5rem !important;
    }
    
    .fs-responsive-2 {
        font-size: 1.25rem !important;
    }
    
    .fs-responsive-3 {
        font-size: 1.125rem !important;
    }
}

/* Improved alerts for mobile */
@media (max-width: 767.98px) {
    .alert {
        margin-bottom: 1rem;
        padding: 1rem;
        font-size: 0.95rem;
        border-radius: 0.75rem;
    }
    
    .alert .btn {
        margin-top: 0.75rem;
        width: 100%;
    }
}

/* Loading states for mobile */
.mobile-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    z-index: 2000;
    text-align: center;
}

.mobile-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Accessibility improvements for mobile */
@media (max-width: 991.98px) {
    /* Focus indicators */
    *:focus {
        outline: 3px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    .btn:focus,
    .form-control:focus,
    .form-select:focus {
        box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.25);
    }
    
    /* Skip to main content link */
    .skip-to-main {
        position: absolute;
        top: -40px;
        left: 0;
        background: var(--primary-color);
        color: white;
        padding: 0.75rem 1.5rem;
        text-decoration: none;
        z-index: 10000;
        font-weight: bold;
        border-radius: 0 0.5rem 0.5rem 0;
    }
    
    .skip-to-main:focus {
        top: 0;
    }
}

/* Prevent text selection on touch targets */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .dropdown-item,
    .card {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

/* Safe area insets for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    }
    
    .main-content {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

/* Additional mobile form optimizations */
.mobile-optimized-form .form-control:focus,
.mobile-optimized-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    border-width: 2px;
}

.mobile-optimized-form .input-group-text {
    font-size: 1.25rem;
    font-weight: bold;
}

.mobile-optimized-form .form-text {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

@media (max-width: 767.98px) {
    .mobile-optimized-form .form-label {
        font-size: 1.125rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        margin-bottom: 0.75rem;
    }
    
    .mobile-optimized-form .input-group-lg .form-control {
        font-size: 1.125rem;
    }
}

/* Mobile card container styling */
.mobile-card-container {
    padding: 0.5rem 0;
}

/* Improved modals for mobile */
@media (max-width: 767.98px) {
    .modal-content {
        border-radius: 1.5rem 1.5rem 0 0;
    }
    
    .modal-backdrop.show {
        opacity: 0.7;
    }
}

/* Better stat cards on mobile dashboard */
@media (max-width: 767.98px) {
    .hover-lift {
        transition: transform 0.2s ease;
    }
    
    .hover-lift:active {
        transform: scale(0.97);
    }
    
    .card .btn-sm {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* ==============================================
   ISLAMIC MODE STYLING
   ============================================== */

/* Islamic Mode - Logo Halo Effect */
body.islamic-mode .navbar-brand img.navbar-logo {
    position: relative;
    animation: islamicHalo 2s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.9)) 
            drop-shadow(0 0 24px rgba(255, 215, 0, 0.7))
            drop-shadow(0 0 36px rgba(255, 215, 0, 0.5));
}

/* Pulsing halo animation */
@keyframes islamicHalo {
    0%, 100% {
        filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.9)) 
                drop-shadow(0 0 24px rgba(255, 215, 0, 0.7))
                drop-shadow(0 0 36px rgba(255, 215, 0, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 18px rgba(255, 215, 0, 1)) 
                drop-shadow(0 0 36px rgba(255, 215, 0, 0.9))
                drop-shadow(0 0 54px rgba(255, 215, 0, 0.7));
    }
}

/* Additional glow around the entire navbar brand in Islamic mode */
body.islamic-mode .navbar-brand {
    position: relative;
}

/* Glow disabled by default - uncomment to enable
body.islamic-mode .navbar-brand::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: var(--border-radius);
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    z-index: -1;
    animation: haloGlow 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes haloGlow {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}
*/

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

/* ==============================================
   REPORT CARD SELECTION GLOW EFFECT
   Beautiful glow effect when reports are selected/active
   ============================================== */

/* Selectable report cards */
.report-card {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.report-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--border-radius) + 2px);
    background: transparent;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

/* Subtle glow on hover */
.report-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 10px 30px -10px rgba(79, 70, 229, 0.3),
        0 0 20px rgba(79, 70, 229, 0.1);
}

/* Active/Selected state with beautiful glow */
.report-card.selected,
.report-card.active,
.report-card:focus,
.report-card[aria-selected="true"] {
    transform: translateY(-4px);
    box-shadow: 
        0 0 0 2px var(--primary-color),
        0 0 15px rgba(79, 70, 229, 0.4),
        0 0 30px rgba(79, 70, 229, 0.25),
        0 0 45px rgba(79, 70, 229, 0.15);
    outline: none;
}

.report-card.selected::before,
.report-card.active::before,
.report-card:focus::before,
.report-card[aria-selected="true"]::before {
    opacity: 1;
    background: linear-gradient(135deg, 
        rgba(79, 70, 229, 0.15) 0%, 
        rgba(118, 75, 162, 0.15) 50%,
        rgba(16, 185, 129, 0.15) 100%);
    animation: glowPulse 2s ease-in-out infinite;
}

/* Pulsing glow animation */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 
            0 0 15px rgba(79, 70, 229, 0.4),
            0 0 30px rgba(79, 70, 229, 0.25),
            0 0 45px rgba(79, 70, 229, 0.15);
    }
    50% {
        box-shadow: 
            0 0 20px rgba(79, 70, 229, 0.5),
            0 0 40px rgba(79, 70, 229, 0.35),
            0 0 60px rgba(79, 70, 229, 0.2);
    }
}

/* Analytics/Report card specific styling */
.analytics-card.selected,
.metric-card.selected,
.insight-card.selected {
    box-shadow: 
        0 0 0 2px var(--primary-color),
        0 0 15px rgba(79, 70, 229, 0.4),
        0 0 30px rgba(79, 70, 229, 0.25);
}

/* Success glow variant (for positive metrics) */
.report-card.selected.glow-success,
.report-card.active.glow-success {
    box-shadow: 
        0 0 0 2px var(--success-color),
        0 0 15px rgba(5, 150, 105, 0.4),
        0 0 30px rgba(5, 150, 105, 0.25),
        0 0 45px rgba(5, 150, 105, 0.15);
}

/* Warning glow variant */
.report-card.selected.glow-warning,
.report-card.active.glow-warning {
    box-shadow: 
        0 0 0 2px var(--warning-color),
        0 0 15px rgba(245, 158, 11, 0.4),
        0 0 30px rgba(245, 158, 11, 0.25),
        0 0 45px rgba(245, 158, 11, 0.15);
}

/* Danger glow variant */
.report-card.selected.glow-danger,
.report-card.active.glow-danger {
    box-shadow: 
        0 0 0 2px var(--danger-color),
        0 0 15px rgba(220, 38, 38, 0.4),
        0 0 30px rgba(220, 38, 38, 0.25),
        0 0 45px rgba(220, 38, 38, 0.15);
}

/* Checkbox/selection indicator on report cards */
.report-card .selection-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.report-card:hover .selection-indicator {
    opacity: 1;
    transform: scale(1);
}

.report-card.selected .selection-indicator {
    opacity: 1;
    transform: scale(1);
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.report-card.selected .selection-indicator::after {
    content: '✓';
    font-size: 14px;
    font-weight: bold;
}

/* Interactive chart containers with glow */
.chart-container.interactive {
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
}

.chart-container.interactive:hover {
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.15);
}

.chart-container.interactive.focused {
    box-shadow: 
        0 0 0 2px var(--primary-color),
        0 0 20px rgba(79, 70, 229, 0.3);
}
    body.islamic-mode .navbar-brand img.navbar-logo {
        animation: none;
        filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.9));
    }
    
    body.islamic-mode .navbar-brand::before {
        animation: none;
        opacity: 0.8;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body.islamic-mode .navbar-brand img.navbar-logo {
        filter: drop-shadow(0 0 8px rgba(255, 255, 0, 1))
                drop-shadow(0 0 16px rgba(255, 255, 0, 1));
    }
}

/* ==============================================
   CONSOLIDATED INLINE STYLES FROM _LAYOUT.CSHTML
   ============================================== */

/* Skip to main content link positioning */
.skip-to-main {
    top: 1rem;
    left: 1rem;
    z-index: 9999;
}

/* Navbar brand cursor */
.navbar-brand-clickable {
    cursor: pointer;
}

/* Alert container margin (for when alerts are enabled) */
.alert-container-margin {
    margin-top: 90px;
}

/* Loading overlay display control */
.loading-overlay-hidden {
    display: none;
}

/* Loading spinner size */
.loading-spinner-size {
    width: 3rem;
    height: 3rem;
}

/* PWA Install Banner */
.install-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    z-index: 10000;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

/* Install banner spinner size */
.install-spinner-size {
    width: 3rem;
    height: 3rem;
}

/* Toast notification styling */
.toast-notification {
    top: 100px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    background-color: #0d6efd !important;
    color: white !important;
    border: none !important;
}

/* ==============================================
   DEMO MODE TOAST - ELEGANT & COMPELLING
   ============================================== */
@keyframes slideInFromRight {
    0% {
        transform: translateX(120%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes subtleGlow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15),
                    0 0 0 1px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 12px 48px rgba(139, 92, 246, 0.25),
                    0 0 0 1px rgba(255, 255, 255, 0.15),
                    0 0 60px rgba(168, 85, 247, 0.2);
    }
}

@keyframes floatGentle {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-4px);
    }
}

.demo-mode-toast {
    position: fixed;
    top: 90px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    z-index: 10000;
    
    /* Sophisticated glassmorphism */
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.95) 0%, 
        rgba(139, 92, 246, 0.92) 50%,
        rgba(168, 85, 247, 0.95) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    
    /* Elegant entrance */
    animation: slideInFromRight 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
               floatGentle 4s ease-in-out infinite 1s,
               subtleGlow 3s ease-in-out infinite 0.5s;
    
    /* Shadow for depth */
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    
    color: white;
    overflow: hidden;
    position: relative;
}

.demo-toast-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.demo-toast-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    z-index: 2;
    font-size: 14px;
}

.demo-toast-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.demo-toast-icon {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.demo-toast-content {
    margin-left: 64px;
    position: relative;
    z-index: 1;
}

.demo-toast-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.demo-toast-subtitle {
    font-size: 13px;
    opacity: 0.95;
    margin-bottom: 16px;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.demo-toast-actions {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.demo-toast-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: white;
    color: #6366f1;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    letter-spacing: 0.02em;
}

.demo-toast-cta:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: #4f46e5;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0ff 100%);
}

.demo-toast-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.demo-toast-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .demo-mode-toast {
        top: 70px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
        padding: 16px;
    }
    
    .demo-toast-content {
        margin-left: 56px;
    }
    
    .demo-toast-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .demo-toast-title {
        font-size: 15px;
    }
    
    .demo-toast-subtitle {
        font-size: 12px;
    }
}

/* ==============================================
   DASHBOARD SPECIFIC STYLES
   ============================================== */

.dashboard-hover-lift {
    transition: transform 0.2s;
}

.dashboard-hover-lift:hover {
    transform: translateY(-5px);
}

.dashboard-card {
    border-radius: 12px;
}

.dashboard-progress {
    border-radius: 8px;
}

/* Welcome modal circles */
.welcome-circle {
    width: 80px;
    height: 80px;
}

/* Progress bar heights */
.progress-thin {
    height: 8px;
}

.progress-budget {
    height: 25px;
}


/* ==============================================
   UTILITY CLASSES TO REPLACE INLINE STYLES
   Added: 2025-11-17
   Purpose: Remove inline styles for better caching
   ============================================== */

/* Text Colors */
.text-white-force {
    color: white !important;
}

/* ==============================================
   CRITICAL: TEXT CONTRAST ON GRADIENT BACKGROUND
   Ensures text is legible on the dark gradient body background
   ============================================== */

/* 
 * The body has a dark gradient: linear-gradient(135deg, #1e3a5f 0%, #4a9b8e 100%)
 * Content inside .card elements has white backgrounds (good contrast)
 * Content OUTSIDE cards needs proper text colors for legibility
 */

/* Page-level text that appears directly on the gradient background */
body > .container > h1,
body > .container > h2,
body > .container > h3,
body > .container > p,
body > .container-fluid > h1,
body > .container-fluid > h2,
body > .container-fluid > h3,
body > .container-fluid > p,
.main-content > .container > h1:not(.card *),
.main-content > .container > h2:not(.card *),
.main-content > .container > h3:not(.card *),
.main-content > .container > p:not(.card *),
.main-content > .container-fluid > h1:not(.card *),
.main-content > .container-fluid > h2:not(.card *),
.main-content > .container-fluid > h3:not(.card *),
.main-content > .container-fluid > p:not(.card *) {
    color: white;
}

/* Lead text outside of cards should be white/light for visibility */
.main-content .lead:not(.card .lead):not(.card-body .lead):not(.alert .lead) {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Text-muted outside of cards should be light gray for visibility */
.main-content .text-muted:not(.card .text-muted):not(.card-body .text-muted):not(.alert .text-muted):not(.modal .text-muted) {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Headers outside of cards */
.main-content h1:not(.card h1):not(.card-header h1):not(.modal h1),
.main-content h2:not(.card h2):not(.card-header h2):not(.modal h2),
.main-content h3:not(.card h3):not(.card-header h3):not(.modal h3) {
    color: white;
}

/* Page headers row - common pattern */
.row.mb-4 > .col-12 > h1,
.row.mb-4 > .col-12 > h2,
.row.mb-4 > .col-12 > p,
.row.mb-3 > .col-12 > h1,
.row.mb-3 > .col-12 > h2,
.row.mb-3 > .col-12 > p {
    color: white !important;
}

/* Ensure .text-white-force class always works */
.text-white-force,
.text-white-force * {
    color: white !important;
}

/* Text on dark gradient - utility class for explicit use */
.text-on-gradient {
    color: white !important;
}

.text-on-gradient-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.text-on-gradient-subtle {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Container with dark background context */
.dark-bg-context,
.dark-bg-context h1,
.dark-bg-context h2,
.dark-bg-context h3,
.dark-bg-context h4,
.dark-bg-context h5,
.dark-bg-context h6,
.dark-bg-context p,
.dark-bg-context span,
.dark-bg-context .lead {
    color: white;
}

.dark-bg-context .text-muted {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* High contrast text utilities */
.text-contrast-dark {
    color: var(--gray-900) !important;
    text-shadow: none;
}

.text-contrast-light {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Width utilities for progress bars */
.w-dynamic {
    /* Width set dynamically via inline style or JS */
}

/* Max width utilities */
.max-w-300 {
    max-width: 300px;
}

/* Custom switch sizes */
.switch-lg {
    width: 3rem;
    height: 1.5rem;
}

/* Transform utilities */
.transform-scale-105 {
    transform: scale(1.05);
}

/* Progress bar heights */
.progress-xs {
    height: 8px;
}

.progress-sm {
    height: 15px;
}

.progress-md {
    height: 20px;
}

.progress-lg {
    height: 25px;
}

.progress-xl {
    height: 30px;
}

/* Scrollable containers */
.scroll-y-200 {
    max-height: 200px;
    overflow-y: auto;
}

.scroll-y-300 {
    max-height: 300px;
    overflow-y: auto;
}

.scroll-y-400 {
    max-height: 400px;
    overflow-y: auto;
}

/* CSS Custom Properties for dynamic values */
.progress-circle {
    --progress: 0;
    /* Circle visualization using conic-gradient */
}

.score-circle {
    --score: 0;
    /* Score visualization */
}

.impact-fill {
    /* Impact indicator width set dynamically */
}

/* Arabic/Islamic font */
.font-arabic {
    font-family: 'Times New Roman', serif;
}

/* Category color badges - use data attributes instead of inline styles */
[data-category-color] {
    /* JavaScript will set background-color from data-category-color attribute */
}

/* Hide on display:none - use Bootstrap d-none instead */
.hidden {
    display: none;
}

/* Visibility hidden */
.invisible {
    visibility: hidden;
}


/* Padding top utilities */
.pt-100 { padding-top: 100px !important; }

/* Progress height utilities */
.progress-h-8 { height: 8px !important; }

.progress-h-20 { height: 20px !important; }
.progress-h-30 { height: 30px !important; }

.progress-h-6 { height: 6px !important; }
.progress-h-10 { height: 10px !important; }
.chart-h-300 { height: 300px !important; }

/* Progress width utilities */
.w-32-pc { width: 32% !important; }
.w-45-pc { width: 45% !important; }
.w-65-pc { width: 65% !important; }
.w-75-pc { width: 75% !important; }
.w-78-pc { width: 78% !important; }
.w-95-pc { width: 95% !important; }
\
/* Table column width utilities */
.w-200 { width: 200px !important; }

/* Transform utilities */
.transform-scale-105 { transform: scale(1.05) !important; }

/* Font size utilities */
.fs-5rem { font-size: 5rem !important; }

/* Max height with scroll utilities */
.scroll-y-200 { max-height: 200px !important; overflow-y: auto !important; }

/* Progress height 25px */
.progress-h-25 { height: 25px !important; }

.fs-4rem { font-size: 4rem !important; }
.fs-11em { font-size: 1.1em !important; }

/* ==============================================
   IMPORT PREVIEW - STICKY ACTION BAR
   ============================================== */
.import-sticky-actions {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.98) 0%, rgba(10, 88, 202, 0.98) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 0;
    margin: 0 -12px 24px -12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideDownFade 0.4s ease-out;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.import-sticky-actions .btn {
    min-width: 160px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.import-sticky-actions .btn-success {
    box-shadow: 0 4px 8px rgba(25, 135, 84, 0.3);
}

.import-sticky-actions .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(25, 135, 84, 0.4);
}

.import-sticky-actions .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    .import-sticky-actions {
        padding: 12px 0;
    }
    
    .import-sticky-actions .d-flex {
        flex-direction: column;
        gap: 12px !important;
    }
    
    .import-sticky-actions .btn {
        width: 100%;
        min-width: auto;
    }
}

/* ==============================================
   QUICK CATEGORY CHANGE DROPDOWN
   ============================================== */
.category-cell {
    position: relative;
}

.category-badge-btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-badge-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.category-badge-btn:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

.category-dropdown {
    min-width: 280px;
    border-radius: 0.5rem;
    border: none;
    padding: 0.5rem 0;
}

.category-dropdown .dropdown-header {
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-50);
}

.category-dropdown .category-option {
    padding: 0.5rem 1rem;
    transition: all 0.15s ease;
}

.category-dropdown .category-option:hover {
    background: var(--primary-light, #E0E7FF);
    color: var(--primary-color, #4F46E5);
}

.category-dropdown .category-option.active {
    background: var(--primary-color, #4F46E5);
    color: white;
}

.category-dropdown .category-option.active:hover {
    background: var(--primary-dark, #4338CA);
    color: white;
}

/* Checkbox options at bottom of dropdown */
.category-dropdown .form-check-sm {
    padding-left: 1.25rem;
}

.category-dropdown .form-check-sm .form-check-label {
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.category-dropdown .form-check-input {
    cursor: pointer;
}

.category-dropdown .form-check-input:checked {
    background-color: var(--success-color, #059669);
    border-color: var(--success-color, #059669);
}

/* Toast notification styling */
#categoryToast {
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
