body {
    background-color: rgba(250, 246, 240, 0.7);
}

/* ============================================
   PLACEHOLDER IMAGE STYLES
   ============================================ */
.product-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f2f5 0%, #e2e8f0 100%);
    color: #94a3b8;
    font-size: 3rem;
    position: relative;
}

.product-image-placeholder i {
    opacity: 0.3;
    margin-bottom: 0.5rem;
}

.product-image-placeholder-text {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    text-align: center;
}

.product-image.no-image,
img.product-image[src=""],
img.product-image:not([src]) {
    content: url('/placeholder-product.svg');
    object-fit: contain;
}

/* ============================================
   NAVBAR STYLES
   ============================================ */
#main-navbar {
    background-color: #FAF6F0;
    padding: 0.75rem 0;
}

#main-nlink {
    text-align: left;
    font-family: Raleway, serif;
    color: #cdb096;
    transition: color 0.2s ease;
}

#main-nlink:hover {
    color: #b89a7e;
}

#main-navbar .nav-link.active {
    background-color: rgba(205, 176, 150, 0.1);
    color: #8b6f47;
}

#main-navbar ul {
    border-bottom: none;
}

#main-navbar .navbar-toggler {
    border-color: #cdb096;
}

#main-navbar .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%28205, 176, 150, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   PRODUCT CATALOG CONTAINER
   ============================================ */
.product-catalog-container {
    max-width: 100%;
    padding: 0;
}

.category-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.category-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.category-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
}

.category-icon i {
    color: white !important;
}

.subcategories-container {
    margin-top: 2rem;
    padding-left: 1rem;
    border-left: 3px solid #e9ecef;
}

.deep-subcategories {
    margin-top: 1.5rem;
    padding-left: 1.5rem;
    border-left: 2px dashed #dee2e6;
}

/* ============================================
   PRODUCTS GRID - Responsive Layout
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* ============================================
   PRODUCT CARD - Modern Style
   ============================================ */
.product-card-wrapper {
    position: relative;
}

.product-card-modern {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    background: white;
}

.product-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 142.857%; /* Aspect ratio 0.714 (height/width) */
    background: #f8f9fa;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background: white;
}

.product-card-modern:hover .product-image {
    transform: scale(1.05);
}

/* ============================================
   PRODUCT OVERLAY - Improved Hover Effect
   ============================================ */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.85));
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
}

.product-card-modern:hover .product-overlay {
    opacity: 1;
    visibility: visible;
}

.product-info {
    width: 100%;
    color: white;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.product-description {
    font-size: 0.875rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    max-height: 60px;
    overflow: hidden;
}

.stock-info {
    margin: 0.75rem 0;
}

.stock-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.stock-badges .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    font-weight: 500;
}

.product-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.product-actions .btn {
    width: 100%;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

/* ============================================
   PRODUCTS LIST VIEW
   ============================================ */
.products-list {
    margin-top: 1.5rem;
}

.products-list .list-group {
    border-radius: 8px;
    overflow: hidden;
}

.products-list .list-group-item {
    border: 1px solid #e9ecef;
    border-bottom: none;
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
    min-height: auto !important;
    line-height: 1.4;
}

.products-list .list-group-item:last-child {
    border-bottom: 1px solid #e9ecef;
}

.products-list .list-group-item:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    transform: translateX(4px);
}

.products-list .list-group-item-action {
    cursor: pointer;
}

.product-list-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.product-list-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.products-list .list-group-item h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.125rem;
    line-height: 1.3;
}

.products-list .list-group-item .text-muted {
    font-size: 0.8rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.products-list .list-group-item .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    font-weight: 500;
    line-height: 1.2;
}

.products-list .list-group-item .d-flex.align-items-center {
    align-items: flex-start !important;
    gap: 0.75rem !important;
}

.products-list .list-group-item .d-flex.justify-content-between {
    margin-bottom: 0.25rem !important;
}

.products-list .list-group-item .d-flex.justify-content-between h5 {
    margin-bottom: 0 !important;
}

.products-list .list-group-item .d-flex.flex-wrap {
    margin-top: 0.25rem;
    gap: 0.5rem !important;
}

.products-list .list-group-item p.text-muted {
    margin-bottom: 0.25rem !important;
}

.products-list .list-group-item .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

/* Force compact layout for product list items */
.products-list .list-group-item > .d-flex {
    min-height: auto;
}

.products-list .list-group-item .flex-grow-1 {
    min-height: auto;
}

@media (max-width: 768px) {
    .product-list-image {
        width: 50px;
        height: 50px;
    }
    
    .products-list .list-group-item {
        padding: 0.625rem 1rem;
    }
    
    .products-list .list-group-item .d-flex {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .products-list .list-group-item .d-flex > div:first-child {
        width: 100%;
    }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    background: white;
    border-radius: 12px;
    padding: 4rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ============================================
   LEGACY SUPPORT (Old Classes)
   ============================================ */
.card-hover-effect {
    transition: all 0.3s ease-in-out;
}

.card-info-overlay {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    transition: opacity 0.3s ease-in-out;
}

.card-hover-effect:hover {
    filter: brightness(0.5);
}

.card-hover-effect:hover .card-info-overlay {
    opacity: 1;
    visibility: visible;
}

.text-shadow {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.product-card-flex {
    flex-basis: 23.5%;
}

/* ============================================
   STOCKS PAGES - Index & Form
   ============================================ */
.stocks-container {
    max-width: 100%;
    padding: 0;
}

/* Table Styles */
#stocksTable {
    border-collapse: separate;
    border-spacing: 0;
}

#stocksTable thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6c757d;
    padding: 1rem;
}

#stocksTable tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

#stocksTable tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

#stocksTable tbody tr.table-danger:hover {
    background-color: #fff5f5;
}

#stocksTable tbody tr.table-warning:hover {
    background-color: #fffbf0;
}

.stock-product-info {
    min-width: 150px;
}

.stock-product-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 4px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease;
}

.stock-product-image:hover {
    transform: scale(1.1);
}

.stock-no-image {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stock-row {
    transition: all 0.2s ease;
}

.stock-row:hover {
    transform: translateX(2px);
}

/* Empty State for Stocks */
.stocks-container .empty-state {
    background: white;
    border-radius: 12px;
    padding: 4rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
}

/* Stock Form Styles */
.stock-form-container {
    max-width: 100%;
    padding: 0;
}

.stock-form .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

.stock-form .form-label i {
    font-size: 1rem;
}

.form-field-wrapper {
    margin-bottom: 0.5rem;
}

.form-field-wrapper .form-text {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.stock-form .form-control-lg,
.stock-form .form-select-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: all 0.2s ease;
}

.stock-form .form-control-lg:focus,
.stock-form .form-select-lg:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.stock-form .card {
    border-radius: 12px;
    overflow: hidden;
}

.stock-form .card-body {
    background: white;
}

/* Badge enhancements */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

.badge i {
    font-size: 0.875em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stocks-container .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }

    .stocks-container .d-flex.justify-content-between .btn {
        width: 100%;
    }

    #stocksTable {
        font-size: 0.875rem;
    }

    #stocksTable thead th,
    #stocksTable tbody td {
        padding: 0.5rem;
    }

    .stock-product-image,
    .stock-no-image {
        width: 40px;
        height: 40px;
    }

    .stock-form-container .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }

    .stock-form-container .d-flex.justify-content-between .btn {
        width: 100%;
    }
}

/* Stocks index: mobile stack layout */
@media (max-width: 767.98px) {
    .stocks-container .stock-product-info {
        min-width: 0;
    }

    .stocks-container .stocks-actions-group {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .stocks-container .stocks-actions-group .btn,
    .stocks-container .stocks-actions-group .form {
        flex: 0 0 auto;
    }

    .stocks-container .table-responsive-wrapper {
        overflow-x: visible;
    }

    .stocks-container .dataTables_wrapper {
        overflow-x: visible;
        max-width: 100%;
    }
}

/* Location index: mobile stack layout */
@media (max-width: 767.98px) {
    .locations-container .locations-actions-group {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .locations-container .locations-actions-group .btn,
    .locations-container .locations-actions-group .form {
        flex: 0 0 auto;
    }

    .locations-container .table-responsive-wrapper {
        overflow-x: visible;
    }

    .locations-container .dataTables_wrapper {
        overflow-x: visible;
        max-width: 100%;
    }
}

/* Brand index: mobile stack layout */
@media (max-width: 767.98px) {
    .brands-container .brands-actions-group {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .brands-container .brands-actions-group .btn,
    .brands-container .brands-actions-group .form {
        flex: 0 0 auto;
    }

    .brands-container .table-responsive-wrapper {
        overflow-x: visible;
    }

    .brands-container .dataTables_wrapper {
        overflow-x: visible;
        max-width: 100%;
    }
}

/* Consumption index: mobile stack layout */
@media (max-width: 767.98px) {
    .consumption-container .table-responsive-wrapper {
        overflow-x: visible;
    }

    .consumption-container .card-header.d-flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Price index: mobile stack layout */
@media (max-width: 767.98px) {
    .prices-container .prices-actions-group {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .prices-container .prices-actions-group .btn,
    .prices-container .prices-actions-group .form {
        flex: 0 0 auto;
    }

    .prices-container .table-responsive-wrapper {
        overflow-x: visible;
    }

    .prices-container .dataTables_wrapper {
        overflow-x: visible;
        max-width: 100%;
    }
}

/* Household index: mobile stack layout */
@media (max-width: 767.98px) {
    .household-container .table-responsive-wrapper {
        overflow-x: visible;
    }

    .household-container .card-header .card-title {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }

    .household-container .invite-code-box {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .household-container .invite-code-box code {
        font-size: 1.25rem;
        word-break: break-all;
    }

    .household-container .invite-link .input-group {
        flex-wrap: wrap;
    }

    .household-container .invite-link .form-control {
        min-width: 0;
        font-size: 0.8rem;
    }
}

/* Category index: mobile stack layout */
@media (max-width: 767.98px) {
    .categories-container .category-card-row {
        flex-wrap: wrap;
    }

    .categories-container .categories-card-actions,
    .categories-container .categories-actions-group {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .categories-container .categories-card-actions .btn,
    .categories-container .categories-card-actions .form,
    .categories-container .categories-actions-group .btn,
    .categories-container .categories-actions-group .form {
        flex: 0 0 auto;
    }

    .categories-container .table-responsive-wrapper {
        overflow-x: visible;
    }

    .categories-container .dataTables_wrapper {
        overflow-x: visible;
        max-width: 100%;
    }

    .categories-container .category-children {
        margin-left: 1rem;
        padding-left: 0.75rem;
    }
}

/* ============================================
   RESPONSIVE GLOBAL IMPROVEMENTS
   ============================================ */

/* Mobile: Extra small devices (< 576px) */
@media (max-width: 575.98px) {
    /* Navbar - seulement pour les pages non-stock */
    #main-navbar {
        display: block !important;
    }

    #main-navbar .navbar-collapse {
        margin-top: 1rem;
    }

    #main-navbar .nav-link {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    /* Ajustement du contenu avec le bouton hamburger */
    #page-content-wrapper {
        padding-top: 60px !important;
    }

    /* Page content padding */
    #page-content-wrapper {
        padding: 10px !important;
    }

    /* Headers */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Buttons */
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    /* Cards */
    .card-body {
        padding: 1rem;
    }

    /* Category sections */
    .category-section {
        padding: 1rem;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .category-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }

    /* Product cards */
    .product-card-modern {
        border-radius: 8px;
    }

    .product-overlay {
        padding: 1rem;
    }

    .product-name {
        font-size: 0.95rem;
    }

    .product-description {
        font-size: 0.75rem;
        max-height: 40px;
    }

    /* Tables */
    .table-responsive {
        font-size: 0.8rem;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }

    /* Forms */
    .stock-form-container .card-body {
        padding: 1rem;
    }

    .form-control-lg,
    .form-select-lg {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Empty states */
    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state h3 {
        font-size: 1.25rem;
    }

    /* Badges */
    .badge {
        font-size: 0.7rem;
        padding: 0.35em 0.6em;
    }

    /* Modal improvements */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 8px;
    }
}

/* Tablet: Small to medium devices (576px - 991.98px) */
@media (min-width: 576px) and (max-width: 991.98px) {
    /* Page content */
    #page-content-wrapper {
        padding: 15px;
    }

    /* Product grid */
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.25rem;
    }

    /* Cards */
    .card-body {
        padding: 1.25rem;
    }

    /* Category sections */
    .category-section {
        padding: 1.5rem;
    }

    /* Tables */
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }

    /* Forms */
    .stock-form-container .card-body {
        padding: 1.5rem;
    }
}

/* Desktop: Large devices (≥ 992px) */
@media (min-width: 992px) {
    /* Sidebar adjustments */
    #sidebar-wrapper {
        position: relative !important;
        left: 0 !important;
    }

    /* Page content */
    #page-content-wrapper {
        padding: 20px;
    }

    /* Product grid optimization */
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }

    /* Tables */
    .table th,
    .table td {
        padding: 1rem;
    }
}

/* Extra large desktop: ≥ 1200px */
@media (min-width: 1200px) {
    /* Maximum width for content */
    .product-catalog-container,
    .stocks-container,
    .stock-form-container {
        max-width: 1400px;
        margin: 0 auto;
    }

    /* Product grid */
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

/* Print styles */
@media print {
    #main-navbar,
    #sidebar-wrapper,
    .mobile-menu-toggle,
    #mobile-menu-overlay,
    .btn,
    .product-actions {
        display: none !important;
    }

    #page-content-wrapper {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .card {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* Accessibility: Touch targets */
@media (max-width: 991.98px) {
    .btn,
    .nav-link,
    a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Landscape mobile orientation */
@media (max-width: 991.98px) and (orientation: landscape) {
    #sidebar-wrapper {
        overflow-y: auto;
    }

    .mobile-menu-toggle {
        top: 60px;
    }
}

/* ============================================
   BARCODE SCANNER STYLES
   ============================================ */
.scanner-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    min-height: 300px;
}

#html5-qrcode-scanner {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #000;
}

#html5-qrcode-scanner video,
#html5-qrcode-scanner canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* html5-qrcode generates its own viewfinder, so we style it */
#html5-qrcode-scanner #qr-shaded-region {
    border-color: rgba(102, 126, 234, 0.9) !important;
    border-radius: 12px;
    animation: scanPulse 2s ease-in-out infinite;
}

#html5-qrcode-scanner #qr-shaded-region::before {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
}

@keyframes scanPulse {
    0%, 100% {
        border-color: rgba(102, 126, 234, 0.9);
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6), 0 0 20px rgba(102, 126, 234, 0.6);
    }
    50% {
        border-color: rgba(102, 126, 234, 1);
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6), 0 0 40px rgba(102, 126, 234, 1);
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .scanner-container {
        min-height: 400px;
    }
    
    #html5-qrcode-scanner #qr-shaded-region {
        border-width: 2px;
        right: 5%;
        bottom: 10%;
    }
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}

.scanner-frame {
    width: 70%;
    max-width: 280px;
    height: 50%;
    max-height: 180px;
    border: 3px solid rgba(102, 126, 234, 0.8);
    border-radius: 12px;
    position: relative;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.scanner-frame::before,
.scanner-frame::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: #667eea;
    border-style: solid;
}

.scanner-frame::before {
    top: -3px;
    left: -3px;
    border-width: 4px 0 0 4px;
    border-radius: 8px 0 0 0;
}

.scanner-frame::after {
    top: -3px;
    right: -3px;
    border-width: 4px 4px 0 0;
    border-radius: 0 8px 0 0;
}

.scanner-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { top: 0; }
    50% { top: calc(100% - 2px); }
    100% { top: 0; }
}

.scanner-hint {
    color: white;
    font-size: 0.875rem;
    margin-top: 1rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Divider with text */
.divider-with-text {
    display: flex;
    align-items: center;
    text-align: center;
    color: #6c757d;
}

.divider-with-text::before,
.divider-with-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.divider-with-text span {
    padding: 0 1rem;
    font-size: 0.875rem;
}

/* ============================================
   GLOBAL SEARCH BAR
   ============================================ */
.global-search-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.global-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.global-search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

.global-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.25rem;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
}

.search-results-dropdown.show {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: #f8fafc;
}

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

.search-result-icon {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: #64748b;
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-weight: 500;
    color: #1e293b;
}

.search-result-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
}

.search-result-type {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: #e2e8f0;
    color: #475569;
}

/* ============================================
   FAVORITES STYLES
   ============================================ */
.favorite-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #cbd5e1;
    font-size: 1.25rem;
}

.favorite-btn:hover {
    color: #f59e0b;
    transform: scale(1.2);
}

.favorite-btn.active {
    color: #f59e0b;
}

.favorite-btn.active i {
    animation: heartbeat 0.5s ease;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ============================================
   CHART STYLES
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.stat-chart-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.stat-chart-card h5 {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}
