/* Primary Color Variables */
:root {
    --primary-color: #0369a1;
    --primary-dark: #0284c7;
    --primary-light: #0ea5e9;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Login Page Styles */

.login-page {
    /*   background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-header .logo {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--white);
    font-size: 2rem;
}

.login-header h2 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form .form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.login-form .input-group-text {
    background: var(--light-color);
    border-right: none;
    color: var(--secondary-color);
}

.login-form .form-control {
    border-left: none;
    padding: 12px 15px;
}

.login-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(221, 42, 59, 0.25);
}

.btn-login {
    background: var(--primary-color);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    width: 100%;
    margin-top: 20px;
}

.btn-login:hover {
    background: var(--primary-dark);
}

.demo-credentials {
    background: var(--light-color);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: var(--white);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar.show {
    transform: translateX(0);
}

@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 280px;
    }
}

/* .sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.sidebar-logo i {
    margin-right: 10px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.sidebar-menu {
    padding: 20px 0;
}
 */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;

}

.sidebar-logo i {
    margin-right: 0.75rem;
    font-size: 2rem;
    color: #fff;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
}

.sidebar-menu {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-title {
    color: var(--white);

}

.menu-section {
    margin-bottom: 30px;
}

.menu-section-title {
    padding: 0 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    margin-bottom: 5px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.menu-link:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.menu-item.active .menu-link {
    background: var(--primary-color);
    color: var(--white);
}

.menu-link i {
    width: 20px;
    margin-right: 15px;
    text-align: center;
}

.menu-link .badge {
    margin-left: auto;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.logout-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.content-wrapper {
    padding: 20px;
    padding-bottom: 100px;
    /* Space for bottom navigation */
}

@media (min-width: 992px) {
    .content-wrapper {
        padding-bottom: 20px;
    }
}

/* Top Navigation */
.navbar {
    box-shadow: var(--shadow);
}

.sidebar-toggle-btn {
    color: var(--secondary-color);
    border: none;
    background: none;
    font-size: 1.2rem;
}

/* KPI Cards */
.kpi-card {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    border: none;
    display: flex;
    align-items: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.kpi-icon {
    font-size: 2.5rem;
    margin-right: 20px;
    opacity: 0.9;
}

.kpi-content {
    flex: 1;
}

.kpi-value {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    line-height: 1;
}

.kpi-label {
    font-size: 0.9rem;
    margin: 5px 0 0;
    opacity: 0.9;
}

/* Inventory Grid Styles */
.inventory-grid {
    margin-top: 20px;
}

.inventory-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.inventory-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.inventory-card-header {
    position: relative;
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.product-image {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--white);
    font-size: 1.5rem;
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.8rem;
}

.inventory-card-body {
    padding: 20px;
    flex: 1;
}

.product-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark-color);
    font-size: 1rem;
}

.product-category {
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.product-details {
    margin-bottom: 15px;
}

.price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.cost {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.stock-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stock-count {
    font-weight: bold;
    font-size: 1.1rem;
}

.stock-label {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.inventory-card-actions {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--light-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-controls .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.qty-display {
    font-weight: bold;
    min-width: 30px;
    text-align: center;
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Product View Modal Styles */
.product-profile {
    text-align: center;
}

.product-image-large {
    margin-bottom: 30px;
}

.product-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--white);
}

.product-info-detailed {
    text-align: left;
}

.info-card {
    background: var(--light-color);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.info-card h6 {
    margin-bottom: 5px;
    color: var(--secondary-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-card p {
    margin: 0;
    font-weight: bold;
}

/* Product Image Upload */
.product-image-upload {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--light-color);
}

.product-image-upload:hover {
    border-color: var(--primary-color);
    background: rgba(221, 42, 59, 0.05);
}

.upload-placeholder {
    text-align: center;
    color: var(--secondary-color);
}

.upload-placeholder i {
    color: var(--primary-color);
}

.upload-placeholder p {
    margin: 0;
    font-size: 0.8rem;
}

/* Product Cards for Sales */
.product-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.product-card .product-image {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto 15px;
    color: var(--white);
    font-size: 1.2rem;
}

.product-card .product-info {
    padding: 0 20px 20px;
    text-align: center;
    flex: 1;
}

.product-card .product-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-size: 0.95rem;
}

.product-card .product-price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.product-card .product-stock {
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

/* Cart Styles */
.cart-item {
    background: var(--light-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: #e9ecef;
}

.cart-totals {
    background: var(--light-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Thermal Receipt Styles */
.thermal-receipt {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    max-width: 300px;
    margin: 0 auto;
    background: var(--white);
    padding: 20px;
}

.receipt-header {
    text-align: center;
    margin-bottom: 15px;
}

.receipt-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

.receipt-header p {
    margin: 2px 0;
    font-size: 10px;
}

.receipt-info p {
    margin: 3px 0;
    font-size: 11px;
}

.receipt-items table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.receipt-items th,
.receipt-items td {
    padding: 2px;
    text-align: left;
}

.receipt-totals table {
    width: 100%;
    font-size: 11px;
}

.receipt-footer {
    text-align: center;
    font-size: 10px;
    margin-top: 15px;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 90px;
    /* Above bottom navigation */
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: all 0.3s ease;
}

.fab:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

@media (min-width: 992px) {
    .fab {
        bottom: 20px;
    }
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 998;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 0.75rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 60px;
}

.bottom-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.bottom-nav-item.active {
    color: var(--primary-color);
    background: rgba(221, 42, 59, 0.1);
}

.bottom-nav-item:hover {
    color: var(--primary-color);
}

/* Mobile Modal Styles */
.mobile-modal .modal-dialog {
    margin: 0;
}

@media (max-width: 575.98px) {
    .mobile-modal .modal-dialog {
        max-width: 100%;
        height: 100vh;
        margin: 0;
    }

    .mobile-modal .modal-content {
        height: 100vh;
        border-radius: 0;
        border: none;
    }

    .mobile-modal .modal-body {
        flex: 1;
        overflow-y: auto;
    }
}

/* Report Cards */
.report-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.report-card .card-body {
    padding: 30px;
}

.report-card i {
    margin-bottom: 20px;
}

.report-card .card-title {
    font-weight: 600;
    margin-bottom: 15px;
}

.report-card .card-text {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

/* Toast Notifications */
.toast-container {
    z-index: 9999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 15px;
    }

    .kpi-card {
        padding: 20px;
        margin-bottom: 15px;
    }

    .kpi-icon {
        font-size: 2rem;
        margin-right: 15px;
    }

    .kpi-value {
        font-size: 1.5rem;
    }

    .inventory-card {
        margin-bottom: 15px;
    }

    .inventory-card-header {
        padding: 15px;
    }

    .inventory-card-body {
        padding: 15px;
    }

    .inventory-card-actions {
        padding: 12px 15px;
    }

    .product-image {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .inventory-card-actions {
        flex-direction: column;
        gap: 10px;
    }

    .quantity-controls {
        order: 2;
    }

    .action-buttons {
        order: 1;
        justify-content: center;
    }
}

/* Custom Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(221, 42, 59, 0.25);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(221, 42, 59, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(221, 42, 59, 0.25);
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: rgba(221, 42, 59, 0.05);
}

/* Badge Styles */
.badge {
    font-size: 0.75em;
}

/* Card Styles */
.card {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid var(--border-color);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

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

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Print Styles */
@media print {

    .sidebar,
    .navbar,
    .bottom-nav,
    .fab,
    .btn {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .thermal-receipt {
        max-width: none;
        font-size: 10px;
    }
}


/* Enhanced Product Image Styles */
.product-image-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.product-image-fallback {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

/* List View Styles */
.inventory-list-item {
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: var(--white);
}

.inventory-list-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.product-image-small {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-image-list {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.product-image-fallback-small {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
}

.quantity-controls-list {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-controls-list .btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
}

.action-buttons-list {
    display: flex;
    gap: 5px;
}

.action-buttons-list .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* View Toggle Buttons */
.btn-group .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.btn-group .btn:not(.active) {
    background-color: var(--white);
    border-color: var(--border-color);
    color: var(--secondary-color);
}

.btn-group .btn:not(.active):hover {
    background-color: var(--light-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Enhanced Product View Modal */
.product-image-large .product-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .product-image-container {
        width: 60px;
        height: 60px;
    }

    .product-image-fallback {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }

    .inventory-list-item {
        margin-bottom: 8px;
        padding: 12px;
    }

    .product-image-small {
        width: 50px;
        height: 50px;
    }

    .product-image-fallback-small {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }

    .quantity-controls-list .btn {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .action-buttons-list .btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .inventory-list-item .d-flex {
        flex-direction: column;
        align-items: stretch !important;
    }

    .inventory-list-item .product-image-small {
        align-self: center;
        margin-bottom: 10px;
    }

    .inventory-list-item .flex-grow-1 {
        text-align: center;
        margin-bottom: 10px;
    }

    .inventory-list-item .action-buttons-list {
        justify-content: center;
    }

    .inventory-list-item .quantity-controls-list {
        justify-content: center;
        margin-top: 8px;
    }
}

/* Enhanced Animation for Image Loading */
.product-image,
.product-image-list {
    transition: all 0.3s ease;
}

.product-image:hover,
.product-image-list:hover {
    transform: scale(1.05);
}

/* Loading State for Images */
.product-image-container.loading::after,
.product-image-small.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Enhanced Product Profile Modal */
.product-profile .product-image-large {
    position: relative;
    margin-bottom: 30px;
}

.product-profile .product-image-large img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-lg);
}

.product-profile .product-image-large .product-icon {
    width: 120px;
    height: 120px;
}

/* Inventory Container Transitions */
.inventory-container {
    min-height: 400px;
}

.inventory-grid,
.inventory-list {
    transition: opacity 0.3s ease;
}

.inventory-grid.fade-out,
.inventory-list.fade-out {
    opacity: 0;
}

.inventory-grid.fade-in,
.inventory-list.fade-in {
    opacity: 1;
}


/* Enhanced Product Profile Modal Styles */
.product-image-container-large {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-lg);
}

.product-detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.product-profile .product-icon {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.product-profile .info-card {
    background: var(--light-color);
    padding: 20px;
    border-radius: 12px;
    text-align: left;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    height: 100%;
}

.product-profile .info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.product-profile .info-card h6 {
    margin-bottom: 10px;
    color: var(--secondary-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.product-profile .info-card i {
    font-size: 1.2rem;
}

.product-profile .info-card.text-center h6 {
    margin-bottom: 8px;
}

.product-profile .info-card.text-center p {
    margin: 0;
    font-weight: bold;
}

/* Quick Actions Styling */
.product-profile .info-card .btn {
    border-radius: 25px;
    padding: 8px 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.product-profile .info-card .btn:hover {
    transform: scale(1.05);
}

.decrease-qty-modal,
.increase-qty-modal {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Stock Badge in Modal */
#productDetailStockBadge {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 20px;
}

/* Profit Margin Styling */
#productDetailMargin {
    font-weight: bold;
    font-size: 1.5rem;
}

#productDetailProfitAmount {
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

/* Mobile Responsive for Product Profile */
@media (max-width: 768px) {
    .product-image-container-large {
        width: 120px;
        height: 120px;
    }

    .product-profile .product-icon {
        width: 120px;
        height: 120px;
    }

    .product-profile .info-card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .product-profile .info-card h6 {
        font-size: 0.8rem;
    }

    .decrease-qty-modal,
    .increase-qty-modal {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    #productDetailStockDisplay {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .product-profile .row .col-6 {
        margin-bottom: 15px;
    }

    .product-profile .info-card {
        padding: 12px;
    }

    .product-profile .modal-body {
        padding: 15px;
    }

    .product-image-container-large {
        width: 100px;
        height: 100px;
    }

    .product-profile .product-icon {
        width: 100px;
        height: 100px;
    }

    .product-profile .product-icon i {
        font-size: 2.5rem !important;
    }
}

/* Animation for Modal Content */
.product-profile {
    animation: slideUpFade 0.4s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Info Card Icons */
.product-profile .info-card i {
    display: block;
    margin-bottom: 8px;
}

.product-profile .info-card.text-center i {
    font-size: 1.5rem;
}

/* Stock History Button Styling */
#viewStockHistory {
    background: linear-gradient(135deg, var(--info-color), #138496);
    border: none;
    color: var(--white);
}

#viewStockHistory:hover {
    background: linear-gradient(135deg, #138496, var(--info-color));
    transform: translateY(-1px);
}

/* Add to Cart Button Styling */
#addToCartFromModal {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: var(--white);
}

#addToCartFromModal:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-1px);
}

/* Enhanced Modal Footer */
.product-profile+.modal-footer {
    border-top: 1px solid var(--border-color);
    background: var(--light-color);
}

.product-profile+.modal-footer .btn {
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: 600;
}

/* Activity List */
.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: var(--white);
}

.activity-content {
    flex: 1;
}

.activity-content h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--dark-color);
}

.activity-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--secondary-color);
}

/* Summary Items */
.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.summary-label {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.summary-value {
    font-weight: 600;
    color: var(--dark-color);
}

/* Quick Action Cards */
.quick-action-card {
    display: block;
    text-decoration: none;
    background: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    color: inherit;
}

.quick-action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
    text-decoration: none;
    color: inherit;
}

.quick-action-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--white);
}

.quick-action-card h6 {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.quick-action-card p {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin: 0;
}

/* Customer List */
.customer-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.customer-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.customer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.customer-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.customer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.25rem;
}

.customer-info h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--dark-color);
}

.customer-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.customer-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.customer-stat-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--dark-color);
}

.customer-stat-label {
    font-size: 0.75rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.customer-due {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    padding: 0.5rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 600;
}

.customer-due.paid {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-color: var(--primary-color);
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(221, 42, 59, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    border-radius: 0.5rem;
    font-weight: 500;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ===== Sidebar Dropdowns / Redesign ===== */
.menu-item.has-children .menu-toggle {
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    cursor: pointer;
}

.menu-item.has-children .menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.menu-item.has-children .chevron {
    transition: transform .2s ease;
}

.menu-item.open>.menu-toggle .chevron {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 0;
    /* animated */
    transition: height .25s ease;
}

.menu-item.open>.submenu {
    height: auto;
}

/* JS will set exact height for animation */

.submenu-item {
    margin: 2px 0;
}

.submenu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 10px 48px;
    /* indent under parent icon */
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    transition: background .2s ease, color .2s ease, border-left-color .2s ease;
    border-left: 3px solid transparent;
}

.submenu-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.submenu-link.active,
.submenu-link[aria-current="page"] {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-left-color: rgba(255, 255, 255, 0.6);
}

/* Active parent styling for clarity */
.menu-item.open>.menu-toggle {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Make top-level hover consistent on gradient */
.menu-link:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
}