/* CSS Reset e Variáveis */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --success-color: #82c024;
    --danger-color: #e41f4d;
    --warning-color: #fcc200;
    --info-color: #4361ee;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --gray-light: #e9ecef;
    --border-radius: 12px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7ff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 60px;
    width: auto;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

    .menu-toggle {
        display: none !important;
    }

.nav-list {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
}

.nav-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left, .header-center, .header-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-left {
    justify-content: flex-start;
}

.header-center {
    justify-content: center;
}

.header-right {
    justify-content: flex-end;
}

.section-header h2 {
    font-size: 1.75rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-actions {
    display: flex;
    gap: 0.75rem;
}

/* Botões */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #3a0ca3);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2a4bd7, #2a0a8a);
}

.btn-success:hover {
    background: linear-gradient(135deg, #6aa01e, #558016);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c2183d, #a01432);
}

.btn-secondary {
    background-color: var(--gray-light);
    color: var(--dark-color);
}

.btn-secondary:hover {
    background-color: #d1d9e6;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #6aa01e);
    color: white;
}

.btn-success:hover {
    background-color: #3ab8d9;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #c2183d);
    color: white;
}

.btn-danger:hover {
    background-color: #e11575;
}

.btn-icon {
    padding: 0.5rem;
    background: none;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: var(--gray-light);
}

.icon-sm {
    width: 20px;
    height: 20px;
}

.icon-header {
    width: 1.75rem;
    height: 1.75rem;
    object-fit: contain;
}

/* Barra de Busca */
.search-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-input {
    flex: 1;
    position: relative;
    min-width: 100%;
}

.search-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.search-actions .btn {
    padding: 0.75rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.search-actions .btn img.nav-icon {
    width: 20px;
    height: 20px;
}

@media (min-width: 769px) {
    .search-actions .btn {
        flex: 0;
        padding: 0.75rem 1rem;
    }
}

@media (min-width: 769px) {
    .search-bar {
        flex-direction: row;
        align-items: center;
    }
    
    .search-input {
        min-width: 250px;
    }
}

.search-input i,
.search-input .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.search-input input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.search-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Filtros */
.filters {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Grid de Produtos */
.products-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 1px solid rgba(67, 97, 238, 0.1);
    position: relative; /* Added for absolute positioning context */
}

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

.product-image {
    height: 180px;
    background-color: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative; /* Added for better positioning context */
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 0 1.5rem 1rem;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--dark-color);
    text-align: center;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    gap: 0.75rem;
}

.product-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-color);
    font-size: 0.9rem;
    flex: 1;
}

.product-meta-item:first-child {
    justify-content: flex-start;
}

.product-meta-item:last-child {
    justify-content: flex-end;
}

/* Store Info */
.product-store-info {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-light);
}

.store-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.store-price i {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.price {
    font-size: 1.1rem;
    color: var(--success-color);
    margin-left: auto;
}

.store-name {
    font-size: 0.85rem;
    color: var(--gray-color);
    font-weight: 700;
}


/* Store List */
.store-list {
    margin-top: 0.5rem;
}

.store-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.85rem;
}

.store-item-name {
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.store-item-price {
    color: #b57736;
    font-weight: 600;
}


.product-actions {
    display: flex;
    gap: 0.5rem;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.product-actions .btn {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 0.5rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

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

.product-actions .btn .nav-icon {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

/* Scan Barcode Button - matches product actions style */
.btn-scan {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 0.5rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.btn-scan:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-scan .nav-icon {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

/* Add Store Cart Button */
.add-store-cart-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 0.375rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    cursor: pointer;
}

.add-store-cart-btn:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.add-store-cart-btn i {
    font-size: 1rem;
    color: var(--primary-color);
}

.add-store-cart-btn:hover i {
    color: var(--secondary-color);
}

/* Remove Product Button */
.btn-remove-product {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 0.25rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    cursor: pointer;
    overflow: hidden;
}

.btn-remove-product:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-remove-product .nav-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.btn-remove-product:hover .nav-icon {
    filter: brightness(0.8);
}

/* Store Management Modal */
.store-management-list {
    margin-bottom: 2rem;
}

.store-management-list h4 {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.store-management-item {
    background-color: var(--gray-light);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.store-management-form .form-row {
    margin-bottom: 0;
}

.store-management-form .form-group {
    margin-bottom: 0;
}

.store-management-form .form-group label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: var(--gray-color);
}

.store-management-form input {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.store-management-form .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.add-store-form {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--gray-light);
}

.add-store-form h4 {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-store-form .form-row {
    margin-bottom: 0;
}

.add-store-form .form-group {
    margin-bottom: 0;
}

.add-store-form .form-group label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: var(--gray-color);
}

.add-store-form input {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.add-store-form .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Barcode Overlay */
.barcode-overlay {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
}

.barcode-overlay i {
    font-size: 0.8rem;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-top: 1px solid var(--gray-light);
    background: white;
}

.pagination-btn {
    padding: 0.5rem 0.5rem;
    background-color: var(--gray-light);
    color: var(--dark-color);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #00aeef;
    color: white;
}

.pagination-btn:disabled {
    background-color: var(--gray-light);
    color: var(--gray-color);
    cursor: not-allowed;
    transform: none;
}

.pagination-btn:disabled .nav-icon {
    display: none;
}

.pagination-btn .nav-icon {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.page-info {
    font-weight: 600;
    color: var(--dark-color);
}

/* Formulários */
.product-form,
.advanced-search,
.prices-management {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 250px;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.barcode-input,
.quantity-input {
    display: flex;
    gap: 0.5rem;
}

.barcode-input input,
{ 
    flex: 1;
}

/* Upload de Imagem */
.image-upload {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-preview {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 200px;
    border: 2px dashed var(--gray-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.image-preview:hover {
    border-color: var(--primary-color);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-color);
    background: var(--gray-light);
}

.image-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.image-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hidden {
    display: none !important;
}

/* Ações do Formulário */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-light);
}

/* Busca Avançada */
.search-filters {
    margin-bottom: 2rem;
}

.search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-results h3 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-container {
    min-height: 200px;
    background: var(--gray-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    text-align: center;
    color: var(--gray-color);
}

.empty-state i,
.empty-state .empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    width: 3rem;
    height: 3rem;
    object-fit: contain;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Gestão de Preços */
.price-selector {
    margin-bottom: 2rem;
}

.product-select {
    width: 100%;
    max-width: 400px;
}

.price-list {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-light);
    overflow: hidden;
    margin-bottom: 2rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    transition: var(--transition);
}

.price-item:hover {
    background-color: var(--gray-light);
}

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

.price-store {
    font-weight: 600;
    color: var(--dark-color);
}

.price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #b57736;
}

.price-actions {
    display: flex;
    gap: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gray-color);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: var(--gray-light);
    color: var(--dark-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Notificações */
.notifications {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 350px;
}

.notification {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 500;
    box-shadow: var(--box-shadow);
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification.success {
    background-color: var(--success-color);
}

.notification.error {
    background-color: var(--danger-color);
}

.notification.warning {
    background-color: var(--warning-color);
}

.notification.info {
    background-color: var(--info-color);
}

.notification-icon {
    font-size: 1.25rem;
}

.notification-content {
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0;
    line-height: 1;
    transition: var(--transition);
}

.notification-close:hover {
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification.hiding {
    animation: slideOutRight 0.3s ease forwards;
}

/* Responsividade */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .nav-list {
        display: flex;
        flex-direction: row;
        width: auto;
        gap: 0.5rem;
        margin-top: 0;
    }

    .nav-link {
        padding: 0.5rem 1rem;
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-input {
        min-width: 100%;
    }
    
    .search-actions {
        width: 100%;
        justify-content: space-between;
    }

    .filters {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        min-width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .form-group {
        min-width: 100%;
    }

    .modal-content {
        margin: 1rem;
        max-height: 80vh;
    }

    .notifications {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        max-width: 100%;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .pagination-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Estados de Loading */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.5rem;
    height: 1.5rem;
    margin: -0.75rem 0 0 -0.75rem;
    border: 2px solid var(--gray-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* Acessibilidade */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Foco visível */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-color);
}

/* Created Date Display */
.created-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--gray-light);
    border-radius: var(--border-radius);
    color: var(--gray-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.created-date i {
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* Utilitários */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Camera Modal Styles */
.camera-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 20px;
    background-color: white;
}

.camera-controls .btn {
    min-width: 150px;
}

#cameraPreview {
    background-color: #000;
    width: 100%;
    max-height: 400px;
    object-fit: contain;
}

/* Responsive camera modal */
@media (max-width: 768px) {
    .camera-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .camera-controls .btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Barcode Scanner Modal Styles */
.scanner-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.scanner-video-container {
    position: relative;
    width: 100%;
    height: 300px;
    background-color: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.scanner-viewport {
    width: 100%;
    height: 100%;
    position: relative;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.scan-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--success-color) 50%, 
        transparent 100%);
    animation: scan 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--success-color);
}

@keyframes scan {
    0%, 100% {
        top: 20%;
    }
    50% {
        top: 80%;
    }
}

.corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: var(--success-color);
    border-style: solid;
}

.corner.top-left {
    top: 20px;
    left: 20px;
    border-width: 4px 0 0 4px;
    border-radius: 8px 0 0 0;
}

.corner.top-right {
    top: 20px;
    right: 20px;
    border-width: 4px 4px 0 0;
    border-radius: 0 8px 0 0;
}

.corner.bottom-left {
    bottom: 20px;
    left: 20px;
    border-width: 0 0 4px 4px;
    border-radius: 0 0 0 8px;
}

.corner.bottom-right {
    bottom: 20px;
    right: 20px;
    border-width: 0 4px 4px 0;
    border-radius: 0 0 8px 0;
}

.scanner-status {
    background-color: var(--gray-light);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.status-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.status-message i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.scan-progress {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    transition: var(--transition);
}

.progress-step.active {
    opacity: 1;
}

.progress-step.completed .step-number {
    background-color: var(--success-color);
    color: white;
}

.progress-step.active .step-number {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--gray-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
}

.step-label {
    font-size: 0.85rem;
    color: var(--gray-color);
    text-align: center;
    font-weight: 500;
}

.scanner-result {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 2px solid var(--success-color);
    box-shadow: var(--box-shadow);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.result-header i {
    color: var(--success-color);
    font-size: 2rem;
}

.result-header h4 {
    font-size: 1.25rem;
    color: var(--dark-color);
    margin: 0;
}

.result-barcode {
    background-color: var(--gray-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.barcode-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.barcode-display i {
    color: var(--dark-color);
    font-size: 2rem;
}

#scannedBarcode {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    letter-spacing: 2px;
}

.barcode-type {
    font-size: 0.9rem;
    color: var(--gray-color);
    font-weight: 500;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.scanner-controls {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

/* Responsive scanner modal */
@media (max-width: 768px) {
    .scanner-video-container {
        height: 250px;
    }
    
    .scan-progress {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .progress-step {
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .scanner-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .scanner-controls .btn {
        width: 100%;
    }
}

/* Manual Input Styles */
.manual-input-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 2px solid var(--primary-color);
    box-shadow: var(--box-shadow);
    margin-top: 1rem;
}

.manual-input-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.manual-input-header i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.manual-input-header h4 {
    font-size: 1.25rem;
    color: var(--dark-color);
    margin: 0;
}

.manual-input-form .form-group {
    margin-bottom: 1.5rem;
}

.manual-input-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.manual-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1.25rem;
    font-family: 'Courier New', monospace;
    text-align: center;
    transition: var(--transition);
}

.manual-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.manual-input-actions {
    display: flex;
    justify-content: center;
}

/* Mobile-first adjustments for scanner */
@media (max-width: 480px) {
    .scanner-video-container {
        height: 200px;
    }
    
    #scannedBarcode {
        font-size: 1.5rem;
    }
    
    .manual-input {
        font-size: 1.1rem;
        padding: 0.75rem;
    }
    
    .manual-input-container {
        padding: 1rem;
    }
}

/* Desktop optimizations */
@media (min-width: 769px) {
    .scanner-video-container {
        height: 350px;
    }
    
    .scanner-controls {
        justify-content: center;
        gap: 2rem;
    }
}

/* Scanner Success Feedback */
.scanner-viewport.scan-success {
    animation: scanSuccess 2s ease;
}

@keyframes scanSuccess {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 201, 240, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(76, 201, 240, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 201, 240, 0);
    }
}

/* Performance Optimizations for Scanner */
.scanner-viewport video {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
}

/* Faster scan animation for better performance */
.scan-line {
    will-change: top;
    transform: translateZ(0);
}

/* Optimize scanner container for GPU acceleration */
.scanner-video-container {
    transform: translateZ(0);
    will-change: transform;
}