* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Top Bar */
.topbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.topbar .navbar {
    background: transparent !important;
    padding: 1rem 2rem;
}

.sidebar-toggle {
    display: none;
    border: 1px solid rgba(255,255,255,0.35);
    background: transparent;
    color: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 0.4rem;
    font-weight: 600;
    margin-right: 0.75rem;
}

.topbar .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    letter-spacing: 0.5px;
}

.topbar .nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

.topbar .nav-link:hover {
    color: white !important;
}

.topbar .nav-link.active {
    color: white !important;
}

.topbar .btn-logout {
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.topbar .btn-logout:hover {
    background-color: rgba(255,255,255,0.3);
    color: white;
    border-color: rgba(255,255,255,0.5);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    width: 260px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    overflow-y: auto;
    padding: 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar .nav {
    padding: 1.5rem 0;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 1rem 1.5rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255,255,255,0.1);
    border-left-color: #667eea;
}

.sidebar .nav-link.active {
    color: white;
    background-color: rgba(102, 126, 234, 0.2);
    border-left-color: #667eea;
}

.sidebar .nav-link svg {
    width: 20px;
    height: 20px;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 998;
}

.sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

/* Main Content */
.main-content {
    margin-top: 70px;
    margin-left: 260px;
    min-height: calc(100vh - 70px);
    padding: 2rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.card-body {
    padding: 1.5rem;
}

/* Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: #2c3e50;
    font-weight: 700;
    font-size: 2rem;
    margin: 0;
}

.page-header p {
    color: #7c8db0;
    font-size: 0.95rem;
    margin: 0;
}

.btn-criar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-criar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

/* Table */
.table-container {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.table thead th {
    color: #2c3e50;
    font-weight: 600;
    padding: 1rem;
    border: none;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
    color: #3d4a5e;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Product Name */
.product-name {
    font-weight: 600;
    color: #2c3e50;
}

.product-reference {
    font-size: 0.85rem;
    color: #7c8db0;
}

/* Status Badge */
.badge-status {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.badge-ativo {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.badge-inativo {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.badge-destaque {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    margin-left: 0.5rem;
}

.badge-venda {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    margin-left: 0.5rem;
}

/* Price */
.price {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1rem;
}

/* Category */
.category-tag {
    display: inline-block;
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    margin-right: 0.25rem;
}

/* Actions */
.btn-action {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-edit {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.btn-edit:hover {
    background-color: #667eea;
    color: white;
}

.btn-delete {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-delete:hover {
    background-color: #ef4444;
    color: white;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
    justify-content: center;
}

.pagination .page-link {
    border: 1px solid #dee2e6;
    color: #667eea;
    border-radius: 0.375rem;
}

.pagination .page-link:hover {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .page-item.active .page-link {
    background-color: #667eea;
    border-color: #667eea;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #7c8db0;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        margin-top: 70px;
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .topbar .navbar {
        padding: 0.75rem 1rem;
    }

    .table-container {
        overflow-x: auto;
    }

    .table {
        font-size: 0.85rem;
    }

    .main-content .card .card-body {
        overflow-x: auto;
    }

    .main-content .table {
        min-width: 640px;
    }

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

    .filter-row {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}
