html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f8f9fa; /* Light grey background */
    color: #212529; /* Dark text color */
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0d6efd; /* Standard Bootstrap link blue */
}

/* Standard Bootstrap Button Style */
.btn-primary {
    color: #fff;
    background-color: #0d6efd; /* Bootstrap primary blue */
    border-color: #0d6efd;
    /* Removed neumorphic shadow */
}

/* Standard Focus Style */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Standard Bootstrap focus shadow */
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0Ljcx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jM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1wiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L2RlZnM+PC9zdmc+) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2LjgyOCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5LjcwNiA4Ny4zMDA1IDI1OS43MDYgODkuNzkyMSAyNTkuNzA2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1wiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L2RlZnM+PC9zdmc+) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* Add animation keyframes */
@keyframes buttonClick {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

/* --- Bottom Navigation Bar Styles --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around; /* Distribute buttons evenly */
    align-items: stretch; /* Make buttons fill height */
    padding: 0; /* Remove padding, let buttons handle it */
    background: #ffffff; /* Clean white background */
    border-top: 1px solid #dee2e6; /* Subtle top border */
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05); /* Subtle top shadow */
    height: 60px; /* Define a fixed height */
}

.nav-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1; /* Allow buttons to take equal width */
    padding: 8px 5px; /* Adjust padding */
    text-decoration: none;
    color: #6c757d; /* Muted color for inactive buttons */
    background: transparent; /* Transparent background */
    border: none; /* Remove borders */
    border-radius: 0; /* Remove border-radius */
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
    font-size: 0.75rem; /* Smaller font size for text */
    text-align: center;
    /* Remove old neumorphic styles */
    box-shadow: none; 
}

.nav-button:hover {
    color: #0d6efd; /* Primary color on hover */
    background-color: #f8f9fa; /* Slight background change on hover */
    /* Remove old neumorphic styles */
    transform: none; 
    box-shadow: none;
}

.nav-button:active {
    /* Remove old neumorphic styles */
    transform: none;
    box-shadow: none;
    background-color: #e9ecef; /* Slightly darker background on active press */
}

/* Style for the active navigation button */
/* This class needs to be applied dynamically in NavMenu.razor */
.nav-button.active {
    color: #0d6efd; /* Primary color for active button */
    font-weight: 600; /* Slightly bolder text */
    /* Optional: Add a top border or background indicator */
    /* border-top: 3px solid #0d6efd; */
    /* background-color: #e7f1ff; */
}

.button-icon {
    font-size: 22px; /* Slightly larger icon */
    margin-bottom: 4px; /* Reduced space between icon and text */
    color: inherit; /* Icon color matches text color */
}

/* --- End Bottom Navigation Bar Styles --- */

/* Removed general .neumorphic-button styles */


/* Removed .neumorphic-card styles */


/* Standard Form Control Style */
.form-control {
    background-color: #fff; /* White background */
    color: #212529; /* Dark text */
    border: 1px solid #ced4da; /* Standard border */
}

/* Simplified App Name Style */
.app-name {
    font-size: 1.5rem; /* Keep font size */
    color: #343a40; /* Dark grey color for better contrast on light background */
    margin-left: 0; /* Remove default margin, rely on parent padding */
    font-weight: 600; /* Slightly bolder */
    /* Removed text-shadow, background, border-radius, padding, box-shadow, backdrop-filter */
}

/* Removed .glassmorphism rule */

.floating-add-button {
    position: fixed;
    bottom: 80px; /* Adjusted to be above bottom nav */
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    text-decoration: none;
    color: #555;
    background-color: #fff;
    box-shadow:  3px 3px 6px #b8b8b8,
             -3px -3px 6px #ffffff;
    transition: all 0.3s ease-in-out;
    z-index: 1000;
}

.floating-add-button:hover {
    box-shadow: -5px -5px 10px #111111, 5px 5px 10px #222222;
}

.floating-add-button:active {
    box-shadow: inset -3px -3px 6px #111111, inset 3px 3px 6px #222222;
}

.fixed-bottom {
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

/* Removed .neumorphic-container rule */

/* Removed duplicate .neumorphic-button rules */


.nav-menu {
    margin-right: 0.5rem; /* This might be overridden by NavMenu.razor.css, but keep for now */
}

/* Removed .neumorphic-header rule */

/* Removed .neumorphic-content rule */

/* Removed .content rule (basic padding is handled by parent elements like <article>) */

/* --- Generic Data Card Styles --- */
/* Container for cards (optional, use if needed for overall padding/layout) */
.data-cards-container {
    padding: 0 1rem; /* Add some horizontal padding */
}

/* Individual Card */
.data-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    transition: box-shadow 0.3s ease-in-out;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards in a row/grid maintain height */
}

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

/* Card Header Section */
.data-card-header {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0.75rem;
}

/* Main Title in Header (e.g., Invoice Number, Product Name) */
.card-title-main {
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
    color: #343a40;
}

/* Card Body Section */
.data-card-body {
    flex-grow: 1; /* Allows body to take up available space */
    margin-bottom: 1rem; /* Space before footer */
}

/* Row for Label/Value Pairs */
.data-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Label Styling */
.data-label {
    color: #6c757d;
    margin-right: 0.5rem;
    white-space: nowrap; /* Prevent labels from wrapping */
}

/* Value Styling */
.data-value {
    font-weight: 500;
    text-align: right;
    color: #212529;
    /* Allow values to wrap if they are long */
    word-break: break-word; 
}

/* Highlighted Value Styling (e.g., Totals, Prices) */
.data-value-highlight {
    font-weight: 700;
    font-size: 1rem;
    color: #0d6efd; /* Primary color for emphasis */
}

/* Card Footer Section */
.data-card-footer {
    margin-top: auto; /* Pushes footer to bottom */
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
    text-align: right; /* Align actions (like buttons) to the right */
}

/* --- End Generic Data Card Styles --- */

/* Removed old .product-card styles */
/* Removed old .invoice-card styles */

/* Pagination Styles (Keep as is) */
.pagination-controls {
    padding: 0 1rem; /* Match container padding */
}

.page-indicator {
    font-weight: 500;
    color: #495057;
    padding: 0 1rem; /* Add space around page number */
}

/* Removed commented out old .invoice-cards grid */

/* Billing Page Styles */
.billing-page-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px); /* Adjust height considering bottom nav */
    padding: 0.15rem;
    gap: 1rem;
}

.billing-content {
    display: flex;
    flex-grow: 1;
    gap: 1rem;
    overflow: hidden; /* Prevent content overflow */
}

.categories-sidebar {
    flex: 0 0 120px; /* Fixed width for sidebar */
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    overflow-y: auto; /* Enable scrolling for categories */
}

.categories-sidebar h4 {
    margin-top: 0;
    color: #343a40;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.categories-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-sidebar li {
    padding: 0.5rem 0;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    border-bottom: 1px solid #f8f9fa;
}

.categories-sidebar li:last-child {
    border-bottom: none;
}

.categories-sidebar li:hover {
    background-color: #e9ecef;
}

.categories-sidebar li.active {
    font-weight: 600;
    color: #0d6efd;
    background-color: #e7f1ff;
}

.products-list {
    flex-grow: 1; /* Take remaining space */
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    overflow-y: auto; /* Enable scrolling for products */
}

.products-list h4 {
     margin-top: 0;
    color: #343a40;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Responsive grid */
    gap: 1rem;
}

.product-item {
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #f8f9fa;
}

.product-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}

.product-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.product-controls button {
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.product-controls button:hover {
    background-color: #0b5ed7;
}

.product-controls span {
    font-weight: 600;
    color: #212529;
}

.product-price {
    font-weight: 700;
    color: #0d6efd;
}

.total-section {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem; /* Space above total section */
}

.total-section div {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

.total-section .save-button {
    background-color: #28a745; /* Green for save */
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.total-section .save-button:hover {
    background-color: #218838;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050; /* Above other content */
}

.modal-content {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-content h4 {
    margin-top: 0;
    color: #28a745; /* Green for success */
}

.modal-content button {
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.modal-content button:hover {
    background-color: #0b5ed7;
}

.modal-content button:last-child {
    background-color: #6c757d; /* Muted color for close */
}

.modal-content button:last-child:hover {
    background-color: #5a6268;
}

/* Overlay for loading spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it's on top of everything */
}

.save-button {
    margin-top: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
}

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