:root {
    --primary: #B31B1B;
    --primary-light: rgba(179, 27, 27, 0.1);
    --secondary: #FFA500;
    --secondary-light: rgba(255, 165, 0, 0.1);
    --text-light: #FFFFFF;
    --text-dark: #2c3e50;
    --danger: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    --info: #17a2b8;
}

/* Login Page Styles */
body.login-page {
    background-color: #f8f9fa;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.google-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.google-btn:hover {
    background: #f1f1f1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.error-message {
    color: red;
    margin-bottom: 15px;
    padding: 10px;
    background: #fee;
    border: 1px solid #f00;
    border-radius: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Shared Navigation Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-picture {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* Common Section Styles */
.welcome-section {
    background-color: #f8f9fa;
    padding: 40px 0;
    margin-bottom: 30px;
}

.welcome-section h1 {
    color: #333;
    margin-bottom: 20px;
}

.content-section {
    padding: 20px 0;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

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

.card-title {
    color: #333;
    font-weight: 600;
}

/* Utility Classes */
.text-muted {
    color: #6c757d !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

/* POS System Styles */
.sidebar {
    height: 100vh;
    width: 250px;
    position: fixed;
    top: 0;
    left: -250px;
    background-color: var(--primary);
    transition: 0.3s;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar .nav-link {
    color: var(--text-light);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
    text-decoration: none;
    border-left: 4px solid transparent;
}

.sidebar .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--secondary);
    border-left-color: var(--secondary);
}

.sidebar .nav-link.active {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--secondary);
    border-left-color: var(--secondary);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar .nav-link[data-bs-toggle="collapse"] {
    position: relative;
}

.sidebar .nav-link[data-bs-toggle="collapse"] .fa-chevron-down {
    transition: transform 0.2s;
    font-size: 0.8em;
}

.sidebar .nav-link[data-bs-toggle="collapse"][aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.submenu {
    background-color: #e1982a;
    padding-left: 20px;
}

.main-content {
    margin-left: 0;
    padding: 20px;
    transition: 0.3s;
}

.main-content.shifted {
    margin-left: 250px;
}

.navbar-pos {
    background-color: var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    color: #FFFFFF;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 991px) {
    .navbar-pos {
        padding: 8px 16px;
    }
    
    .menu-toggle {
        margin-left: -8px;
    }
}

.content-wrapper {
    margin-top: 70px;
    padding: 20px;
}

/* Active menu item */
.sidebar .nav-link.active {
    background-color: #3498db;
    color: white;
}

/* Responsive Design */
@media (min-width: 992px) {
    .sidebar {
        left: 0;
    }
    .main-content {
        margin-left: 250px;
    }
    .menu-toggle {
        display: none;
    }
}

@media (max-width: 991px) {
    .sidebar {
        box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    }
    .main-content.shifted {
        margin-left: 0;
    }
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0,0,0,0.5);
        z-index: 999;
    }
    .overlay.active {
        display: block;
    }
}

/* Login Page Styles */
.login-page {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.login-page .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-page .card-title {
    color: #2c3e50;
    font-weight: 600;
}

.login-page .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-page .btn-primary:hover {
    background-color: #8B0000;
    border-color: #8B0000;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.alert {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.alert-danger {
    background-color: #fff5f5;
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-success {
    background-color: #f0fff4;
    color: var(--success);
    border-left: 4px solid var(--success);
}

/* Welcome Card Styles */
.welcome-card {
    background: linear-gradient(135deg, #4285f4, #34495e);
    color: white;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.welcome-card h2 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.welcome-card p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* Dashboard Styles */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary), #8B0000);
    color: var(--text-light);
    border: none;
    border-radius: 10px;
}

.welcome-banner .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

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

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

.bg-primary-light {
    background-color: var(--primary-light);
}

.bg-primary-light i {
    color: var(--primary);
}

.bg-secondary-light {
    background-color: var(--secondary-light);
}

.bg-secondary-light i {
    color: var(--secondary);
}

.bg-info-light {
    background-color: rgba(23, 162, 184, 0.1);
}

.bg-warning-light {
    background-color: rgba(255, 193, 7, 0.1);
}

.bg-danger-light {
    background-color: rgba(220, 53, 69, 0.1);
}

.stock-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.low-stock-item {
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.low-stock-item:hover {
    background-color: var(--primary-light);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem;
}

.table th {
    border-top: none;
    color: var(--text-dark);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8125rem;
}

.table td {
    vertical-align: middle;
}

/* ===== GLOBAL ACCESSIBILITY FIXES ===== */
/* Fix aria-hidden accessibility warning for modals */
.modal.show {
    aria-hidden: false !important;
}

.modal:not(.show) {
    aria-hidden: true !important;
}

/* Focus management for modal accessibility */
.modal-backdrop {
    pointer-events: none;
}

/* ===== GLOBAL TABLE HEADER FIX ===== */
/* Disable sticky positioning to prevent header overlap issues */
.table thead.sticky-top,
.table thead.sticky-top.bg-white,
thead.sticky-top,
thead.sticky-top.bg-white {
    position: relative !important;
    top: auto !important;
    z-index: auto !important;
    background-color: #fff !important;
}

/* Force override any Bootstrap sticky classes */
.sticky-top {
    position: relative !important;
    top: auto !important;
}

/* Ensure proper table container behavior */
.table-responsive {
    position: relative;
}

.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
}

.badge.bg-primary {
    background-color: var(--primary) !important;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #FFFFFF;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    height: 65px;
    padding: 0;
}

.mobile-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    overflow: hidden;
    white-space: nowrap;
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    height: 100%;
    padding: 0;
    border: none;
}

.mobile-bottom-nav__item:hover,
.mobile-bottom-nav__item:focus {
    color: var(--primary);
    text-decoration: none;
}

.mobile-bottom-nav__item.active {
    background-color: var(--primary);
    color: #FFFFFF;
}

.mobile-bottom-nav__item.active:hover,
.mobile-bottom-nav__item.active:focus {
    color: #FFFFFF;
    text-decoration: none;
}

.mobile-bottom-nav__icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.mobile-bottom-nav__text {
    font-size: 11px;
    font-weight: 500;
}

.mobile-bottom-nav__item.active .mobile-bottom-nav__icon,
.mobile-bottom-nav__item.active .mobile-bottom-nav__text {
    color: #FFFFFF;
}

/* Adjust content area padding for mobile */
@media (max-width: 991px) {
    .content-wrapper {
        padding-bottom: 80px;
    }
}

/* ===== EXPENSES PAGE STYLES ===== */

/* Compact card layout for expenses page */
.expenses-page .card {
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 0.25rem;
    margin-bottom: 0;
    box-shadow: none;
}

.expenses-page .card-body {
    padding: 0.75rem;
}

/* Date filter styles */
#dateFilterForm .form-control {
    width: 110px;
    min-width: 110px;
    padding: 4px;
    margin: 0;
}

#dateFilterForm {
    margin: 0;
    padding: 0;
    overflow: visible;
}

input[type="date"] {
    font-size: 13px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    margin: 0;
    padding: 0;
    width: 15px;
}

/* FAB (Floating Action Button) styles */
#addExpenseBtn {
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#addExpenseBtn:hover {
    transform: scale(1.1);
    transition: transform 0.2s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Enhanced table styles for expenses */
.table-sm td, .table-sm th {
    padding: 0.3rem;
    font-size: 0.95rem;
}

.cursor-pointer {
    cursor: pointer;
}

/* Additional mobile optimizations for expenses */
@media (max-width: 576px) {
    .form-control-sm {
        height: 31px;
        font-size: 0.875rem;
    }
}

/* ===== RECEIPTS PAGE STYLES ===== */

/* Compact card layout for receipts page */
.receipts-page .card {
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 0.25rem;
    margin-bottom: 0;
    box-shadow: none;
}

.receipts-page .card-body {
    padding: 0.75rem;
}

/* Date filter form control for receipts */
.receipts-page .form-control {
    max-width: 130px;
}

/* ===== CUSTOMERS PAGE STYLES ===== */

/* Compact card layout for customers page */
.customers-page .card {
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 0.25rem;
    margin-bottom: 0;
    box-shadow: none;
}

.customers-page .card-body {
    padding: 0.75rem;
}

/* Modal styles for customers */
.customers-page .modal-sm {
    max-width: 300px;
}

.customers-page .modal-header {
    padding: 0.75rem 1rem;
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
}

.customers-page .modal-title {
    font-size: 1rem;
    font-weight: 500;
}

.customers-page .modal-body {
    padding: 1rem;
}

.customers-page .form-label {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.customers-page .form-label:after {
    content: " *";
    color: #dc3545;
}

.customers-page .form-label:not([for$="*"]):after {
    content: none;
}

.customers-page .modal-footer {
    padding: 0.75rem;
    border-top: none;
    gap: 0.5rem;
}

/* Sale links styling */
.view-sale {
    text-decoration: none;
    color: var(--bs-primary);
}

.view-sale:hover {
    text-decoration: underline;
}

/* ===== SHARED STYLES FOR RECEIPTS & CUSTOMERS PAGES ===== */

/* Table link styling */
.table-sm td a {
    text-decoration: none;
}

/* Additional mobile optimizations */
@media (max-width: 576px) {
    .receipts-page .btn-sm,
    .customers-page .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* ===== ITEMS PAGE STYLES ===== */

/* Product grid layout */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1rem;
    row-gap: 0.5rem;
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    height: calc(100vh - 60px);
    overflow-y: auto;
    position: relative;
    -webkit-user-select: none;
    user-select: none;
    align-content: flex-start;
    justify-content: center;
}

/* Product item cards */
.product-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    position: relative;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    width: 150px;
    flex: 0 0 150px;
}

.product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.product-item.add-button {
    cursor: pointer;
    transition: all 0.2s;
}

.product-item.add-button:hover {
    opacity: 0.8;
}

/* Product item elements */
.product-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin: 0 auto 0.5rem;
}

.product-name {
    font-size: 0.9rem;
    margin: 0.5rem 0;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 1rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
}

.product-unit {
    font-size: 0.8rem;
    color: #666;
}

.product-stock {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Product indicators */
.cart-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}

.cart-counter.show {
    display: flex;
}

.favorite-star {
    position: absolute;
    top: 5px;
    left: 5px;
    color: #f1c40f;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.stock-indicator {
    position: absolute;
    top: 5px;
    left: 5px;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.stock-indicator.in_stock {
    background-color: #28a745;
    color: white;
}

.stock-indicator.low_stock {
    background-color: #ffc107;
    color: #212529;
}

.stock-indicator.out_of_stock {
    background-color: #dc3545;
    color: white;
}

/* Product item states */
.product-item.out_of_stock {
    opacity: 0.6;
    pointer-events: none;
}

.product-item.out_of_stock .product-image {
    filter: grayscale(50%);
}

.product-item.favorite {
    border: 2px solid #f1c40f;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}

/* Cart menu */
.cart-menu-counter {
    display: none;
    background: #2ecc71;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.cart-menu-counter.show {
    display: inline-block;
}

.cart-menu-highlight {
    animation: highlight 0.5s ease-out;
}

@keyframes highlight {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Animations */
.fly-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.85;
    transition: transform 1.1s cubic-bezier(.4,2,.6,1), opacity 0.2s;
    will-change: transform, opacity;
}

/* Modal and edit styles */
.edit-item-btn {
    color: #3498db;
}

.edit-item-btn:hover {
    color: #2980b9;
}

#editItemQty {
    min-width: 40px;
    text-align: center;
    font-size: 1.1rem;
}

.discount-symbol {
    min-width: 35px;
    text-align: center;
}

.form-check {
    margin-bottom: 0;
}

.form-check-input {
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

.d-flex.gap-4 {
    margin-top: 0.5rem;
}

.quantity-controls {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
}

.quantity-controls button {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-controls button.d-none {
    display: none !important;
}

/* Items page cart modal table styling - follows expenses pattern */
.items-page .table-sm td, 
.items-page .table-sm th {
    padding: 0.3rem;
    font-size: 0.95rem;
}

/* Ensure cart modal tables use consistent styling */
#cartModal .table-sm td,
#cartModal .table-sm th {
    padding: 0.3rem;
    font-size: 0.95rem;
}

/* Cart modal height adjustments for better button visibility */
#cartModal .modal-dialog {
    max-height: 85vh;
    margin: 1rem auto;
}

#cartModal .modal-content {
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

#cartModal .modal-body {
    flex: 1;
    overflow: hidden;
    padding: 1rem;
}

#cartModal .table-responsive {
    max-height: 45vh;
    overflow-y: auto;
}

/* Additional Expenses page specific styles */
.expenses-page .table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 10;
}

.expenses-page .table tbody tr:hover {
    background-color: #f8f9fa;
}

.expenses-page .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.expenses-page .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.expenses-page .void-expense-btn {
    transition: all 0.2s ease;
}

.expenses-page .void-expense-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.expenses-page .modal-header {
    background: linear-gradient(135deg, var(--primary), #d32f2f);
    color: white;
    border-bottom: none;
}

.expenses-page .modal-header .btn-close {
    filter: invert(1);
}

.expenses-page .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.expenses-page .input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
    font-weight: 600;
}

.expenses-page .alert-warning {
    border-left: 4px solid #ffc107;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.expenses-page #dateFilterForm .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(179, 27, 27, 0.25);
}

.expenses-page .view-expense {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.expenses-page .view-expense:hover {
    color: #d32f2f;
    text-decoration: underline;
}

/* Mobile floating action button for expenses */
.mobile-fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(45deg, var(--primary), #d32f2f);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(179, 27, 27, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    display: none;
}

.mobile-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(179, 27, 27, 0.6);
    color: white;
}

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

/* Show FAB only on mobile */
@media (max-width: 768px) {
    .mobile-fab {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Hide desktop add button on mobile */
    .expenses-page .d-flex .btn-primary {
        display: none !important;
    }
}

/* Mobile table optimizations for expenses */
@media (max-width: 576px) {
    .expenses-page .table-responsive {
        font-size: 0.85rem;
    }
    
    .expenses-page .table th,
    .expenses-page .table td {
        padding: 0.4rem 0.2rem;
    }
    
    .expenses-page .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .expenses-page .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
    
    /* Hide some columns on very small screens */
    .expenses-page .table th:nth-child(4),
    .expenses-page .table td:nth-child(4),
    .expenses-page .table th:nth-child(5),
    .expenses-page .table td:nth-child(5) {
        display: none;
    }
    
    /* Make expense description column wider on mobile */
    .expenses-page .table th:nth-child(3),
    .expenses-page .table td:nth-child(3) {
        min-width: 150px;
    }
    
    /* Better mobile table scrolling */
    .expenses-page .table-responsive {
        -webkit-overflow-scrolling: touch;
        border-radius: 0.25rem;
    }
}

/* Medium mobile screens */
@media (max-width: 768px) {
    .expenses-page .container-fluid {
        padding: 0.5rem;
    }
    
    .expenses-page h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
}

/* Mobile View Expense Modal Optimization */
@media (max-width: 576px) {
    #viewExpenseModal .modal-content {
        height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    #viewExpenseModal .modal-header {
        flex-shrink: 0;
        padding: 1rem;
    }
    
    #viewExpenseModal .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 1rem;
        -webkit-overflow-scrolling: touch;
    }
    
    #viewExpenseModal .modal-footer {
        flex-shrink: 0;
        padding: 1rem;
        background: #f8f9fa;
    }
    
    #viewExpenseModal .form-control {
        border: 1px solid #e0e0e0;
        padding: 0.75rem;
        font-size: 1rem;
        background-color: #f8f9fa !important;
        color: #333;
    }
    
    #viewExpenseModal .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        color: #333;
    }
}
